@dataramen/cli 0.0.64-beta.4 → 0.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
- (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const c of u)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(u){const c={};return u.integrity&&(c.integrity=u.integrity),u.referrerPolicy&&(c.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?c.credentials="include":u.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(u){if(u.ep)return;u.ep=!0;const c=i(u);fetch(u.href,c)}})();function Dd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Vf={exports:{}},or={};var G0;function b2(){if(G0)return or;G0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,u,c){var d=null;if(c!==void 0&&(d=""+c),u.key!==void 0&&(d=""+u.key),"key"in u){c={};for(var m in u)m!=="key"&&(c[m]=u[m])}else c=u;return u=c.ref,{$$typeof:n,type:r,key:d,ref:u!==void 0?u:null,props:c}}return or.Fragment=l,or.jsx=i,or.jsxs=i,or}var F0;function x2(){return F0||(F0=1,Vf.exports=b2()),Vf.exports}var h=x2(),Kf={exports:{}},ve={};var X0;function S2(){if(X0)return ve;X0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.iterator;function E(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,C={};function N(R,Q,I){this.props=R,this.context=Q,this.refs=C,this.updater=I||j}N.prototype.isReactComponent={},N.prototype.setState=function(R,Q){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,Q,"setState")},N.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function T(){}T.prototype=N.prototype;function _(R,Q,I){this.props=R,this.context=Q,this.refs=C,this.updater=I||j}var D=_.prototype=new T;D.constructor=_,w(D,N.prototype),D.isPureReactComponent=!0;var H=Array.isArray,V={H:null,A:null,T:null,S:null,V:null},X=Object.prototype.hasOwnProperty;function G(R,Q,I,W,ne,ge){return I=ge.ref,{$$typeof:n,type:R,key:Q,ref:I!==void 0?I:null,props:ge}}function P(R,Q){return G(R.type,Q,void 0,void 0,void 0,R.props)}function ae(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function ye(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(I){return Q[I]})}var Ae=/\/+/g;function Ce(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?ye(""+R.key):Q.toString(36)}function Ke(){}function me(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Ke,Ke):(R.status="pending",R.then(function(Q){R.status==="pending"&&(R.status="fulfilled",R.value=Q)},function(Q){R.status==="pending"&&(R.status="rejected",R.reason=Q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function _e(R,Q,I,W,ne){var ge=typeof R;(ge==="undefined"||ge==="boolean")&&(R=null);var oe=!1;if(R===null)oe=!0;else switch(ge){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(R.$$typeof){case n:case l:oe=!0;break;case g:return oe=R._init,_e(oe(R._payload),Q,I,W,ne)}}if(oe)return ne=ne(R),oe=W===""?"."+Ce(R,0):W,H(ne)?(I="",oe!=null&&(I=oe.replace(Ae,"$&/")+"/"),_e(ne,Q,I,"",function(Ge){return Ge})):ne!=null&&(ae(ne)&&(ne=P(ne,I+(ne.key==null||R&&R.key===ne.key?"":(""+ne.key).replace(Ae,"$&/")+"/")+oe)),Q.push(ne)),1;oe=0;var gt=W===""?".":W+":";if(H(R))for(var De=0;De<R.length;De++)W=R[De],ge=gt+Ce(W,De),oe+=_e(W,Q,I,ge,ne);else if(De=E(R),typeof De=="function")for(R=De.call(R),De=0;!(W=R.next()).done;)W=W.value,ge=gt+Ce(W,De++),oe+=_e(W,Q,I,ge,ne);else if(ge==="object"){if(typeof R.then=="function")return _e(me(R),Q,I,W,ne);throw Q=String(R),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return oe}function q(R,Q,I){if(R==null)return R;var W=[],ne=0;return _e(R,W,"","",function(ge){return Q.call(I,ge,ne++)}),W}function F(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.then(function(I){(R._status===0||R._status===-1)&&(R._status=1,R._result=I)},function(I){(R._status===0||R._status===-1)&&(R._status=2,R._result=I)}),R._status===-1&&(R._status=0,R._result=Q)}if(R._status===1)return R._result.default;throw R._result}var J=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function he(){}return ve.Children={map:q,forEach:function(R,Q,I){q(R,function(){Q.apply(this,arguments)},I)},count:function(R){var Q=0;return q(R,function(){Q++}),Q},toArray:function(R){return q(R,function(Q){return Q})||[]},only:function(R){if(!ae(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},ve.Component=N,ve.Fragment=i,ve.Profiler=u,ve.PureComponent=_,ve.StrictMode=r,ve.Suspense=p,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,ve.__COMPILER_RUNTIME={__proto__:null,c:function(R){return V.H.useMemoCache(R)}},ve.cache=function(R){return function(){return R.apply(null,arguments)}},ve.cloneElement=function(R,Q,I){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var W=w({},R.props),ne=R.key,ge=void 0;if(Q!=null)for(oe in Q.ref!==void 0&&(ge=void 0),Q.key!==void 0&&(ne=""+Q.key),Q)!X.call(Q,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&Q.ref===void 0||(W[oe]=Q[oe]);var oe=arguments.length-2;if(oe===1)W.children=I;else if(1<oe){for(var gt=Array(oe),De=0;De<oe;De++)gt[De]=arguments[De+2];W.children=gt}return G(R.type,ne,void 0,void 0,ge,W)},ve.createContext=function(R){return R={$$typeof:d,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:c,_context:R},R},ve.createElement=function(R,Q,I){var W,ne={},ge=null;if(Q!=null)for(W in Q.key!==void 0&&(ge=""+Q.key),Q)X.call(Q,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ne[W]=Q[W]);var oe=arguments.length-2;if(oe===1)ne.children=I;else if(1<oe){for(var gt=Array(oe),De=0;De<oe;De++)gt[De]=arguments[De+2];ne.children=gt}if(R&&R.defaultProps)for(W in oe=R.defaultProps,oe)ne[W]===void 0&&(ne[W]=oe[W]);return G(R,ge,void 0,void 0,null,ne)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(R){return{$$typeof:m,render:R}},ve.isValidElement=ae,ve.lazy=function(R){return{$$typeof:g,_payload:{_status:-1,_result:R},_init:F}},ve.memo=function(R,Q){return{$$typeof:y,type:R,compare:Q===void 0?null:Q}},ve.startTransition=function(R){var Q=V.T,I={};V.T=I;try{var W=R(),ne=V.S;ne!==null&&ne(I,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(he,J)}catch(ge){J(ge)}finally{V.T=Q}},ve.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},ve.use=function(R){return V.H.use(R)},ve.useActionState=function(R,Q,I){return V.H.useActionState(R,Q,I)},ve.useCallback=function(R,Q){return V.H.useCallback(R,Q)},ve.useContext=function(R){return V.H.useContext(R)},ve.useDebugValue=function(){},ve.useDeferredValue=function(R,Q){return V.H.useDeferredValue(R,Q)},ve.useEffect=function(R,Q,I){var W=V.H;if(typeof I=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return W.useEffect(R,Q)},ve.useId=function(){return V.H.useId()},ve.useImperativeHandle=function(R,Q,I){return V.H.useImperativeHandle(R,Q,I)},ve.useInsertionEffect=function(R,Q){return V.H.useInsertionEffect(R,Q)},ve.useLayoutEffect=function(R,Q){return V.H.useLayoutEffect(R,Q)},ve.useMemo=function(R,Q){return V.H.useMemo(R,Q)},ve.useOptimistic=function(R,Q){return V.H.useOptimistic(R,Q)},ve.useReducer=function(R,Q,I){return V.H.useReducer(R,Q,I)},ve.useRef=function(R){return V.H.useRef(R)},ve.useState=function(R){return V.H.useState(R)},ve.useSyncExternalStore=function(R,Q,I){return V.H.useSyncExternalStore(R,Q,I)},ve.useTransition=function(){return V.H.useTransition()},ve.version="19.1.0",ve}var Z0;function Ld(){return Z0||(Z0=1,Kf.exports=S2()),Kf.exports}var b=Ld();const fl=Dd(b);var Gf={exports:{}},ur={},Ff={exports:{}},Xf={};var P0;function w2(){return P0||(P0=1,function(n){function l(q,F){var J=q.length;q.push(F);e:for(;0<J;){var he=J-1>>>1,R=q[he];if(0<u(R,F))q[he]=F,q[J]=R,J=he;else break e}}function i(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var F=q[0],J=q.pop();if(J!==F){q[0]=J;e:for(var he=0,R=q.length,Q=R>>>1;he<Q;){var I=2*(he+1)-1,W=q[I],ne=I+1,ge=q[ne];if(0>u(W,J))ne<R&&0>u(ge,W)?(q[he]=ge,q[ne]=J,he=ne):(q[he]=W,q[I]=J,he=I);else if(ne<R&&0>u(ge,J))q[he]=ge,q[ne]=J,he=ne;else break e}}return F}function u(q,F){var J=q.sortIndex-F.sortIndex;return J!==0?J:q.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],y=[],g=1,x=null,E=3,j=!1,w=!1,C=!1,N=!1,T=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function H(q){for(var F=i(y);F!==null;){if(F.callback===null)r(y);else if(F.startTime<=q)r(y),F.sortIndex=F.expirationTime,l(p,F);else break;F=i(y)}}function V(q){if(C=!1,H(q),!w)if(i(p)!==null)w=!0,X||(X=!0,Ce());else{var F=i(y);F!==null&&_e(V,F.startTime-q)}}var X=!1,G=-1,P=5,ae=-1;function ye(){return N?!0:!(n.unstable_now()-ae<P)}function Ae(){if(N=!1,X){var q=n.unstable_now();ae=q;var F=!0;try{e:{w=!1,C&&(C=!1,_(G),G=-1),j=!0;var J=E;try{t:{for(H(q),x=i(p);x!==null&&!(x.expirationTime>q&&ye());){var he=x.callback;if(typeof he=="function"){x.callback=null,E=x.priorityLevel;var R=he(x.expirationTime<=q);if(q=n.unstable_now(),typeof R=="function"){x.callback=R,H(q),F=!0;break t}x===i(p)&&r(p),H(q)}else r(p);x=i(p)}if(x!==null)F=!0;else{var Q=i(y);Q!==null&&_e(V,Q.startTime-q),F=!1}}break e}finally{x=null,E=J,j=!1}F=void 0}}finally{F?Ce():X=!1}}}var Ce;if(typeof D=="function")Ce=function(){D(Ae)};else if(typeof MessageChannel<"u"){var Ke=new MessageChannel,me=Ke.port2;Ke.port1.onmessage=Ae,Ce=function(){me.postMessage(null)}}else Ce=function(){T(Ae,0)};function _e(q,F){G=T(function(){q(n.unstable_now())},F)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(q){q.callback=null},n.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(q){switch(E){case 1:case 2:case 3:var F=3;break;default:F=E}var J=E;E=F;try{return q()}finally{E=J}},n.unstable_requestPaint=function(){N=!0},n.unstable_runWithPriority=function(q,F){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var J=E;E=q;try{return F()}finally{E=J}},n.unstable_scheduleCallback=function(q,F,J){var he=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?he+J:he):J=he,q){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=J+R,q={id:g++,callback:F,priorityLevel:q,startTime:J,expirationTime:R,sortIndex:-1},J>he?(q.sortIndex=J,l(y,q),i(p)===null&&q===i(y)&&(C?(_(G),G=-1):C=!0,_e(V,J-he))):(q.sortIndex=R,l(p,q),w||j||(w=!0,X||(X=!0,Ce()))),q},n.unstable_shouldYield=ye,n.unstable_wrapCallback=function(q){var F=E;return function(){var J=E;E=F;try{return q.apply(this,arguments)}finally{E=J}}}}(Xf)),Xf}var J0;function E2(){return J0||(J0=1,Ff.exports=w2()),Ff.exports}var Zf={exports:{}},At={};var I0;function C2(){if(I0)return At;I0=1;var n=Ld();function l(p){var y="https://react.dev/errors/"+p;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)y+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function c(p,y,g){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:p,containerInfo:y,implementation:g}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,y){if(p==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,At.createPortal=function(p,y){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(l(299));return c(p,y,null,g)},At.flushSync=function(p){var y=d.T,g=r.p;try{if(d.T=null,r.p=2,p)return p()}finally{d.T=y,r.p=g,r.d.f()}},At.preconnect=function(p,y){typeof p=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,r.d.C(p,y))},At.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},At.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var g=y.as,x=m(g,y.crossOrigin),E=typeof y.integrity=="string"?y.integrity:void 0,j=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;g==="style"?r.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:x,integrity:E,fetchPriority:j}):g==="script"&&r.d.X(p,{crossOrigin:x,integrity:E,fetchPriority:j,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},At.preinitModule=function(p,y){if(typeof p=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var g=m(y.as,y.crossOrigin);r.d.M(p,{crossOrigin:g,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&r.d.M(p)},At.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var g=y.as,x=m(g,y.crossOrigin);r.d.L(p,g,{crossOrigin:x,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},At.preloadModule=function(p,y){if(typeof p=="string")if(y){var g=m(y.as,y.crossOrigin);r.d.m(p,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:g,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else r.d.m(p)},At.requestFormReset=function(p){r.d.r(p)},At.unstable_batchedUpdates=function(p,y){return p(y)},At.useFormState=function(p,y,g){return d.H.useFormState(p,y,g)},At.useFormStatus=function(){return d.H.useHostTransitionStatus()},At.version="19.1.0",At}var W0;function l1(){if(W0)return Zf.exports;W0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Zf.exports=C2(),Zf.exports}var ey;function _2(){if(ey)return ur;ey=1;var n=E2(),l=Ld(),i=l1();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(c(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,s=t;;){var o=a.return;if(o===null)break;var f=o.alternate;if(f===null){if(s=o.return,s!==null){a=s;continue}break}if(o.child===f.child){for(f=o.child;f;){if(f===a)return m(o),e;if(f===s)return m(o),t;f=f.sibling}throw Error(r(188))}if(a.return!==s.return)a=o,s=f;else{for(var v=!1,S=o.child;S;){if(S===a){v=!0,a=o,s=f;break}if(S===s){v=!0,s=o,a=f;break}S=S.sibling}if(!v){for(S=f.child;S;){if(S===a){v=!0,a=f,s=o;break}if(S===s){v=!0,s=f,a=o;break}S=S.sibling}if(!v)throw Error(r(189))}}if(a.alternate!==s)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),_=Symbol.for("react.consumer"),D=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),ye=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function Ce(e){return e===null||typeof e!="object"?null:(e=Ae&&e[Ae]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Symbol.for("react.client.reference");function me(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ke?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case N:return"Profiler";case C:return"StrictMode";case V:return"Suspense";case X:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case D:return(e.displayName||"Context")+".Provider";case _:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:me(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}var _e=Array.isArray,q=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},he=[],R=-1;function Q(e){return{current:e}}function I(e){0>R||(e.current=he[R],he[R]=null,R--)}function W(e,t){R++,he[R]=e.current,e.current=t}var ne=Q(null),ge=Q(null),oe=Q(null),gt=Q(null);function De(e,t){switch(W(oe,t),W(ge,e),W(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?x0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=x0(t),e=S0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(ne),W(ne,e)}function Ge(){I(ne),I(ge),I(oe)}function Hn(e){e.memoizedState!==null&&W(gt,e);var t=ne.current,a=S0(t,e.type);t!==a&&(W(ge,e),W(ne,a))}function Et(e){ge.current===e&&(I(ne),I(ge)),gt.current===e&&(I(gt),ar._currentValue=J)}var fn=Object.prototype.hasOwnProperty,sa=n.unstable_scheduleCallback,dn=n.unstable_cancelCallback,di=n.unstable_shouldYield,Mt=n.unstable_requestPaint,Dt=n.unstable_now,ia=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,Ye=n.unstable_UserBlockingPriority,$n=n.unstable_NormalPriority,xl=n.unstable_LowPriority,ka=n.unstable_IdlePriority,Sl=n.log,ss=n.unstable_setDisableYieldValue,hn=null,Je=null;function Bt(e){if(typeof Sl=="function"&&ss(e),Je&&typeof Je.setStrictMode=="function")try{Je.setStrictMode(hn,e)}catch{}}var tt=Math.clz32?Math.clz32:za,Ua=Math.log,hi=Math.LN2;function za(e){return e>>>=0,e===0?32:31-(Ua(e)/hi|0)|0}var mn=256,Ct=4194304;function ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ra(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var o=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var S=s&134217727;return S!==0?(s=S&~f,s!==0?o=ze(s):(v&=S,v!==0?o=ze(v):a||(a=S&~e,a!==0&&(o=ze(a))))):(S=s&~f,S!==0?o=ze(S):v!==0?o=ze(v):a||(a=s&~e,a!==0&&(o=ze(a)))),o===0?0:t!==0&&t!==o&&(t&f)===0&&(f=o&-o,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:o}function An(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qa(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ba(){var e=mn;return mn<<=1,(mn&4194048)===0&&(mn=256),e}function oa(){var e=Ct;return Ct<<=1,(Ct&62914560)===0&&(Ct=4194304),e}function Yn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function pn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wl(e,t,a,s,o,f){var v=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,A=e.expirationTimes,k=e.hiddenUpdates;for(a=v&~a;0<a;){var $=31-tt(a),K=1<<$;S[$]=0,A[$]=-1;var U=k[$];if(U!==null)for(k[$]=null,$=0;$<U.length;$++){var z=U[$];z!==null&&(z.lane&=-536870913)}a&=~K}s!==0&&El(e,s,0),f!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~t))}function El(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-tt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&4194090}function nt(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-tt(a),o=1<<s;o&t|e[s]&t&&(e[s]|=t),a&=~o}}function _t(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ie(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Se(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:H0(e.type))}function Lt(e,t){var a=F.p;try{return F.p=e,t()}finally{F.p=a}}var Nt=Math.random().toString(36).slice(2),Z="__reactFiber$"+Nt,te="__reactProps$"+Nt,ce="__reactContainer$"+Nt,Xe="__reactEvents$"+Nt,ht="__reactListeners$"+Nt,yn="__reactHandles$"+Nt,Jt="__reactResources$"+Nt,at="__reactMarker$"+Nt;function jt(e){delete e[Z],delete e[te],delete e[Xe],delete e[ht],delete e[yn]}function Re(e){var t=e[Z];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ce]||a[Z]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=_0(e);e!==null;){if(a=e[Z])return a;e=_0(e)}return t}e=a,a=e.parentNode}return null}function It(e){if(e=e[Z]||e[ce]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Cl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Ha(e){var t=e[Jt];return t||(t=e[Jt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function lt(e){e[at]=!0}var mi=new Set,pi={};function Vn(e,t){ua(e,t),ua(e+"Capture",t)}function ua(e,t){for(pi[e]=t,e=0;e<t.length;e++)mi.add(t[e])}var Oe=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),vn={},is={};function _l(e){return fn.call(is,e)?!0:fn.call(vn,e)?!1:Oe.test(e)?is[e]=!0:(vn[e]=!0,!1)}function rs(e,t,a){if(_l(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Qa(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ca(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}var zu,hh;function os(e){if(zu===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);zu=t&&t[1]||"",hh=-1<a.stack.indexOf(`
1
+ (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const c of u)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(u){const c={};return u.integrity&&(c.integrity=u.integrity),u.referrerPolicy&&(c.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?c.credentials="include":u.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(u){if(u.ep)return;u.ep=!0;const c=i(u);fetch(u.href,c)}})();function Dd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Vf={exports:{}},or={};var G0;function b2(){if(G0)return or;G0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,u,c){var d=null;if(c!==void 0&&(d=""+c),u.key!==void 0&&(d=""+u.key),"key"in u){c={};for(var m in u)m!=="key"&&(c[m]=u[m])}else c=u;return u=c.ref,{$$typeof:n,type:r,key:d,ref:u!==void 0?u:null,props:c}}return or.Fragment=l,or.jsx=i,or.jsxs=i,or}var F0;function x2(){return F0||(F0=1,Vf.exports=b2()),Vf.exports}var h=x2(),Kf={exports:{}},ge={};var X0;function S2(){if(X0)return ge;X0=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.iterator;function E(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,C={};function N(R,Q,I){this.props=R,this.context=Q,this.refs=C,this.updater=I||j}N.prototype.isReactComponent={},N.prototype.setState=function(R,Q){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,Q,"setState")},N.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function T(){}T.prototype=N.prototype;function _(R,Q,I){this.props=R,this.context=Q,this.refs=C,this.updater=I||j}var D=_.prototype=new T;D.constructor=_,w(D,N.prototype),D.isPureReactComponent=!0;var H=Array.isArray,V={H:null,A:null,T:null,S:null,V:null},X=Object.prototype.hasOwnProperty;function G(R,Q,I,W,ne,ve){return I=ve.ref,{$$typeof:n,type:R,key:Q,ref:I!==void 0?I:null,props:ve}}function P(R,Q){return G(R.type,Q,void 0,void 0,void 0,R.props)}function ae(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function ye(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(I){return Q[I]})}var Ae=/\/+/g;function Ce(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?ye(""+R.key):Q.toString(36)}function Ke(){}function me(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Ke,Ke):(R.status="pending",R.then(function(Q){R.status==="pending"&&(R.status="fulfilled",R.value=Q)},function(Q){R.status==="pending"&&(R.status="rejected",R.reason=Q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function _e(R,Q,I,W,ne){var ve=typeof R;(ve==="undefined"||ve==="boolean")&&(R=null);var oe=!1;if(R===null)oe=!0;else switch(ve){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(R.$$typeof){case n:case l:oe=!0;break;case v:return oe=R._init,_e(oe(R._payload),Q,I,W,ne)}}if(oe)return ne=ne(R),oe=W===""?"."+Ce(R,0):W,H(ne)?(I="",oe!=null&&(I=oe.replace(Ae,"$&/")+"/"),_e(ne,Q,I,"",function(Ge){return Ge})):ne!=null&&(ae(ne)&&(ne=P(ne,I+(ne.key==null||R&&R.key===ne.key?"":(""+ne.key).replace(Ae,"$&/")+"/")+oe)),Q.push(ne)),1;oe=0;var vt=W===""?".":W+":";if(H(R))for(var De=0;De<R.length;De++)W=R[De],ve=vt+Ce(W,De),oe+=_e(W,Q,I,ve,ne);else if(De=E(R),typeof De=="function")for(R=De.call(R),De=0;!(W=R.next()).done;)W=W.value,ve=vt+Ce(W,De++),oe+=_e(W,Q,I,ve,ne);else if(ve==="object"){if(typeof R.then=="function")return _e(me(R),Q,I,W,ne);throw Q=String(R),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return oe}function q(R,Q,I){if(R==null)return R;var W=[],ne=0;return _e(R,W,"","",function(ve){return Q.call(I,ve,ne++)}),W}function F(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.then(function(I){(R._status===0||R._status===-1)&&(R._status=1,R._result=I)},function(I){(R._status===0||R._status===-1)&&(R._status=2,R._result=I)}),R._status===-1&&(R._status=0,R._result=Q)}if(R._status===1)return R._result.default;throw R._result}var J=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function he(){}return ge.Children={map:q,forEach:function(R,Q,I){q(R,function(){Q.apply(this,arguments)},I)},count:function(R){var Q=0;return q(R,function(){Q++}),Q},toArray:function(R){return q(R,function(Q){return Q})||[]},only:function(R){if(!ae(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},ge.Component=N,ge.Fragment=i,ge.Profiler=u,ge.PureComponent=_,ge.StrictMode=r,ge.Suspense=p,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,ge.__COMPILER_RUNTIME={__proto__:null,c:function(R){return V.H.useMemoCache(R)}},ge.cache=function(R){return function(){return R.apply(null,arguments)}},ge.cloneElement=function(R,Q,I){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var W=w({},R.props),ne=R.key,ve=void 0;if(Q!=null)for(oe in Q.ref!==void 0&&(ve=void 0),Q.key!==void 0&&(ne=""+Q.key),Q)!X.call(Q,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&Q.ref===void 0||(W[oe]=Q[oe]);var oe=arguments.length-2;if(oe===1)W.children=I;else if(1<oe){for(var vt=Array(oe),De=0;De<oe;De++)vt[De]=arguments[De+2];W.children=vt}return G(R.type,ne,void 0,void 0,ve,W)},ge.createContext=function(R){return R={$$typeof:d,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:c,_context:R},R},ge.createElement=function(R,Q,I){var W,ne={},ve=null;if(Q!=null)for(W in Q.key!==void 0&&(ve=""+Q.key),Q)X.call(Q,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ne[W]=Q[W]);var oe=arguments.length-2;if(oe===1)ne.children=I;else if(1<oe){for(var vt=Array(oe),De=0;De<oe;De++)vt[De]=arguments[De+2];ne.children=vt}if(R&&R.defaultProps)for(W in oe=R.defaultProps,oe)ne[W]===void 0&&(ne[W]=oe[W]);return G(R,ve,void 0,void 0,null,ne)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(R){return{$$typeof:m,render:R}},ge.isValidElement=ae,ge.lazy=function(R){return{$$typeof:v,_payload:{_status:-1,_result:R},_init:F}},ge.memo=function(R,Q){return{$$typeof:y,type:R,compare:Q===void 0?null:Q}},ge.startTransition=function(R){var Q=V.T,I={};V.T=I;try{var W=R(),ne=V.S;ne!==null&&ne(I,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(he,J)}catch(ve){J(ve)}finally{V.T=Q}},ge.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},ge.use=function(R){return V.H.use(R)},ge.useActionState=function(R,Q,I){return V.H.useActionState(R,Q,I)},ge.useCallback=function(R,Q){return V.H.useCallback(R,Q)},ge.useContext=function(R){return V.H.useContext(R)},ge.useDebugValue=function(){},ge.useDeferredValue=function(R,Q){return V.H.useDeferredValue(R,Q)},ge.useEffect=function(R,Q,I){var W=V.H;if(typeof I=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return W.useEffect(R,Q)},ge.useId=function(){return V.H.useId()},ge.useImperativeHandle=function(R,Q,I){return V.H.useImperativeHandle(R,Q,I)},ge.useInsertionEffect=function(R,Q){return V.H.useInsertionEffect(R,Q)},ge.useLayoutEffect=function(R,Q){return V.H.useLayoutEffect(R,Q)},ge.useMemo=function(R,Q){return V.H.useMemo(R,Q)},ge.useOptimistic=function(R,Q){return V.H.useOptimistic(R,Q)},ge.useReducer=function(R,Q,I){return V.H.useReducer(R,Q,I)},ge.useRef=function(R){return V.H.useRef(R)},ge.useState=function(R){return V.H.useState(R)},ge.useSyncExternalStore=function(R,Q,I){return V.H.useSyncExternalStore(R,Q,I)},ge.useTransition=function(){return V.H.useTransition()},ge.version="19.1.0",ge}var Z0;function Ld(){return Z0||(Z0=1,Kf.exports=S2()),Kf.exports}var b=Ld();const fl=Dd(b);var Gf={exports:{}},ur={},Ff={exports:{}},Xf={};var P0;function w2(){return P0||(P0=1,function(n){function l(q,F){var J=q.length;q.push(F);e:for(;0<J;){var he=J-1>>>1,R=q[he];if(0<u(R,F))q[he]=F,q[J]=R,J=he;else break e}}function i(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var F=q[0],J=q.pop();if(J!==F){q[0]=J;e:for(var he=0,R=q.length,Q=R>>>1;he<Q;){var I=2*(he+1)-1,W=q[I],ne=I+1,ve=q[ne];if(0>u(W,J))ne<R&&0>u(ve,W)?(q[he]=ve,q[ne]=J,he=ne):(q[he]=W,q[I]=J,he=I);else if(ne<R&&0>u(ve,J))q[he]=ve,q[ne]=J,he=ne;else break e}}return F}function u(q,F){var J=q.sortIndex-F.sortIndex;return J!==0?J:q.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],y=[],v=1,x=null,E=3,j=!1,w=!1,C=!1,N=!1,T=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function H(q){for(var F=i(y);F!==null;){if(F.callback===null)r(y);else if(F.startTime<=q)r(y),F.sortIndex=F.expirationTime,l(p,F);else break;F=i(y)}}function V(q){if(C=!1,H(q),!w)if(i(p)!==null)w=!0,X||(X=!0,Ce());else{var F=i(y);F!==null&&_e(V,F.startTime-q)}}var X=!1,G=-1,P=5,ae=-1;function ye(){return N?!0:!(n.unstable_now()-ae<P)}function Ae(){if(N=!1,X){var q=n.unstable_now();ae=q;var F=!0;try{e:{w=!1,C&&(C=!1,_(G),G=-1),j=!0;var J=E;try{t:{for(H(q),x=i(p);x!==null&&!(x.expirationTime>q&&ye());){var he=x.callback;if(typeof he=="function"){x.callback=null,E=x.priorityLevel;var R=he(x.expirationTime<=q);if(q=n.unstable_now(),typeof R=="function"){x.callback=R,H(q),F=!0;break t}x===i(p)&&r(p),H(q)}else r(p);x=i(p)}if(x!==null)F=!0;else{var Q=i(y);Q!==null&&_e(V,Q.startTime-q),F=!1}}break e}finally{x=null,E=J,j=!1}F=void 0}}finally{F?Ce():X=!1}}}var Ce;if(typeof D=="function")Ce=function(){D(Ae)};else if(typeof MessageChannel<"u"){var Ke=new MessageChannel,me=Ke.port2;Ke.port1.onmessage=Ae,Ce=function(){me.postMessage(null)}}else Ce=function(){T(Ae,0)};function _e(q,F){G=T(function(){q(n.unstable_now())},F)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(q){q.callback=null},n.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(q){switch(E){case 1:case 2:case 3:var F=3;break;default:F=E}var J=E;E=F;try{return q()}finally{E=J}},n.unstable_requestPaint=function(){N=!0},n.unstable_runWithPriority=function(q,F){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var J=E;E=q;try{return F()}finally{E=J}},n.unstable_scheduleCallback=function(q,F,J){var he=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?he+J:he):J=he,q){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=J+R,q={id:v++,callback:F,priorityLevel:q,startTime:J,expirationTime:R,sortIndex:-1},J>he?(q.sortIndex=J,l(y,q),i(p)===null&&q===i(y)&&(C?(_(G),G=-1):C=!0,_e(V,J-he))):(q.sortIndex=R,l(p,q),w||j||(w=!0,X||(X=!0,Ce()))),q},n.unstable_shouldYield=ye,n.unstable_wrapCallback=function(q){var F=E;return function(){var J=E;E=F;try{return q.apply(this,arguments)}finally{E=J}}}}(Xf)),Xf}var J0;function E2(){return J0||(J0=1,Ff.exports=w2()),Ff.exports}var Zf={exports:{}},At={};var I0;function C2(){if(I0)return At;I0=1;var n=Ld();function l(p){var y="https://react.dev/errors/"+p;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)y+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function c(p,y,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:p,containerInfo:y,implementation:v}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,y){if(p==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,At.createPortal=function(p,y){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(l(299));return c(p,y,null,v)},At.flushSync=function(p){var y=d.T,v=r.p;try{if(d.T=null,r.p=2,p)return p()}finally{d.T=y,r.p=v,r.d.f()}},At.preconnect=function(p,y){typeof p=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,r.d.C(p,y))},At.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},At.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var v=y.as,x=m(v,y.crossOrigin),E=typeof y.integrity=="string"?y.integrity:void 0,j=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;v==="style"?r.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:x,integrity:E,fetchPriority:j}):v==="script"&&r.d.X(p,{crossOrigin:x,integrity:E,fetchPriority:j,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},At.preinitModule=function(p,y){if(typeof p=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var v=m(y.as,y.crossOrigin);r.d.M(p,{crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&r.d.M(p)},At.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var v=y.as,x=m(v,y.crossOrigin);r.d.L(p,v,{crossOrigin:x,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},At.preloadModule=function(p,y){if(typeof p=="string")if(y){var v=m(y.as,y.crossOrigin);r.d.m(p,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else r.d.m(p)},At.requestFormReset=function(p){r.d.r(p)},At.unstable_batchedUpdates=function(p,y){return p(y)},At.useFormState=function(p,y,v){return d.H.useFormState(p,y,v)},At.useFormStatus=function(){return d.H.useHostTransitionStatus()},At.version="19.1.0",At}var W0;function l1(){if(W0)return Zf.exports;W0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Zf.exports=C2(),Zf.exports}var ey;function _2(){if(ey)return ur;ey=1;var n=E2(),l=Ld(),i=l1();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(c(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,s=t;;){var o=a.return;if(o===null)break;var f=o.alternate;if(f===null){if(s=o.return,s!==null){a=s;continue}break}if(o.child===f.child){for(f=o.child;f;){if(f===a)return m(o),e;if(f===s)return m(o),t;f=f.sibling}throw Error(r(188))}if(a.return!==s.return)a=o,s=f;else{for(var g=!1,S=o.child;S;){if(S===a){g=!0,a=o,s=f;break}if(S===s){g=!0,s=o,a=f;break}S=S.sibling}if(!g){for(S=f.child;S;){if(S===a){g=!0,a=f,s=o;break}if(S===s){g=!0,s=f,a=o;break}S=S.sibling}if(!g)throw Error(r(189))}}if(a.alternate!==s)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),_=Symbol.for("react.consumer"),D=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),ye=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function Ce(e){return e===null||typeof e!="object"?null:(e=Ae&&e[Ae]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Symbol.for("react.client.reference");function me(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ke?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case N:return"Profiler";case C:return"StrictMode";case V:return"Suspense";case X:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case D:return(e.displayName||"Context")+".Provider";case _:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:me(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}var _e=Array.isArray,q=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},he=[],R=-1;function Q(e){return{current:e}}function I(e){0>R||(e.current=he[R],he[R]=null,R--)}function W(e,t){R++,he[R]=e.current,e.current=t}var ne=Q(null),ve=Q(null),oe=Q(null),vt=Q(null);function De(e,t){switch(W(oe,t),W(ve,e),W(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?x0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=x0(t),e=S0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(ne),W(ne,e)}function Ge(){I(ne),I(ve),I(oe)}function Hn(e){e.memoizedState!==null&&W(vt,e);var t=ne.current,a=S0(t,e.type);t!==a&&(W(ve,e),W(ne,a))}function Et(e){ve.current===e&&(I(ne),I(ve)),vt.current===e&&(I(vt),ar._currentValue=J)}var fn=Object.prototype.hasOwnProperty,sa=n.unstable_scheduleCallback,dn=n.unstable_cancelCallback,di=n.unstable_shouldYield,Mt=n.unstable_requestPaint,Dt=n.unstable_now,ia=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,Ye=n.unstable_UserBlockingPriority,$n=n.unstable_NormalPriority,xl=n.unstable_LowPriority,Ua=n.unstable_IdlePriority,Sl=n.log,ss=n.unstable_setDisableYieldValue,hn=null,Je=null;function Bt(e){if(typeof Sl=="function"&&ss(e),Je&&typeof Je.setStrictMode=="function")try{Je.setStrictMode(hn,e)}catch{}}var tt=Math.clz32?Math.clz32:za,ka=Math.log,hi=Math.LN2;function za(e){return e>>>=0,e===0?32:31-(ka(e)/hi|0)|0}var mn=256,Ct=4194304;function ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ra(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var o=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=s&134217727;return S!==0?(s=S&~f,s!==0?o=ze(s):(g&=S,g!==0?o=ze(g):a||(a=S&~e,a!==0&&(o=ze(a))))):(S=s&~f,S!==0?o=ze(S):g!==0?o=ze(g):a||(a=s&~e,a!==0&&(o=ze(a)))),o===0?0:t!==0&&t!==o&&(t&f)===0&&(f=o&-o,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:o}function An(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qa(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ba(){var e=mn;return mn<<=1,(mn&4194048)===0&&(mn=256),e}function oa(){var e=Ct;return Ct<<=1,(Ct&62914560)===0&&(Ct=4194304),e}function Yn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function pn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wl(e,t,a,s,o,f){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,A=e.expirationTimes,U=e.hiddenUpdates;for(a=g&~a;0<a;){var $=31-tt(a),K=1<<$;S[$]=0,A[$]=-1;var k=U[$];if(k!==null)for(U[$]=null,$=0;$<k.length;$++){var z=k[$];z!==null&&(z.lane&=-536870913)}a&=~K}s!==0&&El(e,s,0),f!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function El(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-tt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&4194090}function nt(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-tt(a),o=1<<s;o&t|e[s]&t&&(e[s]|=t),a&=~o}}function _t(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ie(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Se(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:H0(e.type))}function Lt(e,t){var a=F.p;try{return F.p=e,t()}finally{F.p=a}}var Nt=Math.random().toString(36).slice(2),Z="__reactFiber$"+Nt,te="__reactProps$"+Nt,ce="__reactContainer$"+Nt,Xe="__reactEvents$"+Nt,ht="__reactListeners$"+Nt,yn="__reactHandles$"+Nt,Jt="__reactResources$"+Nt,at="__reactMarker$"+Nt;function jt(e){delete e[Z],delete e[te],delete e[Xe],delete e[ht],delete e[yn]}function Re(e){var t=e[Z];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ce]||a[Z]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=_0(e);e!==null;){if(a=e[Z])return a;e=_0(e)}return t}e=a,a=e.parentNode}return null}function It(e){if(e=e[Z]||e[ce]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Cl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Ha(e){var t=e[Jt];return t||(t=e[Jt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function lt(e){e[at]=!0}var mi=new Set,pi={};function Vn(e,t){ua(e,t),ua(e+"Capture",t)}function ua(e,t){for(pi[e]=t,e=0;e<t.length;e++)mi.add(t[e])}var Oe=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),gn={},is={};function _l(e){return fn.call(is,e)?!0:fn.call(gn,e)?!1:Oe.test(e)?is[e]=!0:(gn[e]=!0,!1)}function rs(e,t,a){if(_l(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Qa(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ca(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}var zu,hh;function os(e){if(zu===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);zu=t&&t[1]||"",hh=-1<a.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+zu+e+hh}var qu=!1;function Bu(e,t){if(!e||qu)return"";qu=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(z){var U=z}Reflect.construct(e,[],K)}else{try{K.call()}catch(z){U=z}e.call(K.prototype)}}else{try{throw Error()}catch(z){U=z}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(z){if(z&&U&&typeof z.stack=="string")return[z.stack,U.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=s.DetermineComponentFrameRoot(),v=f[0],S=f[1];if(v&&S){var A=v.split(`
4
- `),k=S.split(`
5
- `);for(o=s=0;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;for(;o<k.length&&!k[o].includes("DetermineComponentFrameRoot");)o++;if(s===A.length||o===k.length)for(s=A.length-1,o=k.length-1;1<=s&&0<=o&&A[s]!==k[o];)o--;for(;1<=s&&0<=o;s--,o--)if(A[s]!==k[o]){if(s!==1||o!==1)do if(s--,o--,0>o||A[s]!==k[o]){var $=`
6
- `+A[s].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=s&&0<=o);break}}}finally{qu=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?os(a):""}function hg(e){switch(e.tag){case 26:case 27:case 5:return os(e.type);case 16:return os("Lazy");case 13:return os("Suspense");case 19:return os("SuspenseList");case 0:case 15:return Bu(e.type,!1);case 11:return Bu(e.type.render,!1);case 1:return Bu(e.type,!0);case 31:return os("Activity");default:return""}}function mh(e){try{var t="";do t+=hg(e),e=e.return;while(e);return t}catch(a){return`
3
+ `+zu+e+hh}var qu=!1;function Bu(e,t){if(!e||qu)return"";qu=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(z){var k=z}Reflect.construct(e,[],K)}else{try{K.call()}catch(z){k=z}e.call(K.prototype)}}else{try{throw Error()}catch(z){k=z}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(z){if(z&&k&&typeof z.stack=="string")return[z.stack,k.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=s.DetermineComponentFrameRoot(),g=f[0],S=f[1];if(g&&S){var A=g.split(`
4
+ `),U=S.split(`
5
+ `);for(o=s=0;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;for(;o<U.length&&!U[o].includes("DetermineComponentFrameRoot");)o++;if(s===A.length||o===U.length)for(s=A.length-1,o=U.length-1;1<=s&&0<=o&&A[s]!==U[o];)o--;for(;1<=s&&0<=o;s--,o--)if(A[s]!==U[o]){if(s!==1||o!==1)do if(s--,o--,0>o||A[s]!==U[o]){var $=`
6
+ `+A[s].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=s&&0<=o);break}}}finally{qu=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?os(a):""}function hv(e){switch(e.tag){case 26:case 27:case 5:return os(e.type);case 16:return os("Lazy");case 13:return os("Suspense");case 19:return os("SuspenseList");case 0:case 15:return Bu(e.type,!1);case 11:return Bu(e.type.render,!1);case 1:return Bu(e.type,!0);case 31:return os("Activity");default:return""}}function mh(e){try{var t="";do t+=hv(e),e=e.return;while(e);return t}catch(a){return`
7
7
  Error generating stack: `+a.message+`
8
- `+a.stack}}function gn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ph(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mg(e){var t=ph(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,f=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(v){s=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return s},setValue:function(v){s=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hr(e){e._valueTracker||(e._valueTracker=mg(e))}function yh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=ph(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function Qr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var pg=/[\n"\\]/g;function bn(e){return e.replace(pg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Hu(e,t,a,s,o,f,v,S){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+gn(t)):e.value!==""+gn(t)&&(e.value=""+gn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Qu(e,v,gn(t)):a!=null?Qu(e,v,gn(a)):s!=null&&e.removeAttribute("value"),o==null&&f!=null&&(e.defaultChecked=!!f),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+gn(S):e.removeAttribute("name")}function vh(e,t,a,s,o,f,v,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null))return;a=a!=null?""+gn(a):"",t=t!=null?""+gn(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=S?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v)}function Qu(e,t,a){t==="number"&&Qr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function us(e,t,a,s){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&s&&(e[a].defaultSelected=!0)}else{for(a=""+gn(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,s&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function gh(e,t,a){if(t!=null&&(t=""+gn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+gn(a):""}function bh(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(r(92));if(_e(s)){if(1<s.length)throw Error(r(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=gn(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s)}function cs(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var yg=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xh(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||yg.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Sh(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var o in t)s=t[o],t.hasOwnProperty(o)&&a[o]!==s&&xh(e,o,s)}else for(var f in t)t.hasOwnProperty(f)&&xh(e,f,t[f])}function $u(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vg=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),gg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $r(e){return gg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Yu=null;function Vu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fs=null,ds=null;function wh(e){var t=It(e);if(t&&(e=t.stateNode)){var a=e[te]||null;e:switch(e=t.stateNode,t.type){case"input":if(Hu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+bn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var o=s[te]||null;if(!o)throw Error(r(90));Hu(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&yh(s)}break e;case"textarea":gh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&us(e,!!a.multiple,t,!1)}}}var Ku=!1;function Eh(e,t,a){if(Ku)return e(t,a);Ku=!0;try{var s=e(t);return s}finally{if(Ku=!1,(fs!==null||ds!==null)&&(To(),fs&&(t=fs,e=ds,ds=fs=null,wh(t),e)))for(t=0;t<e.length;t++)wh(e[t])}}function yi(e,t){var a=e.stateNode;if(a===null)return null;var s=a[te]||null;if(s===null)return null;a=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gu=!1;if(fa)try{var vi={};Object.defineProperty(vi,"passive",{get:function(){Gu=!0}}),window.addEventListener("test",vi,vi),window.removeEventListener("test",vi,vi)}catch{Gu=!1}var $a=null,Fu=null,Yr=null;function Ch(){if(Yr)return Yr;var e,t=Fu,a=t.length,s,o="value"in $a?$a.value:$a.textContent,f=o.length;for(e=0;e<a&&t[e]===o[e];e++);var v=a-e;for(s=1;s<=v&&t[a-s]===o[f-s];s++);return Yr=o.slice(e,1<s?1-s:void 0)}function Vr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Kr(){return!0}function _h(){return!1}function Ht(e){function t(a,s,o,f,v){this._reactName=a,this._targetInst=o,this.type=s,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Kr:_h,this.isPropagationStopped=_h,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Kr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Kr)},persist:function(){},isPersistent:Kr}),t}var Nl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gr=Ht(Nl),gi=g({},Nl,{view:0,detail:0}),bg=Ht(gi),Xu,Zu,bi,Fr=g({},gi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bi&&(bi&&e.type==="mousemove"?(Xu=e.screenX-bi.screenX,Zu=e.screenY-bi.screenY):Zu=Xu=0,bi=e),Xu)},movementY:function(e){return"movementY"in e?e.movementY:Zu}}),Nh=Ht(Fr),xg=g({},Fr,{dataTransfer:0}),Sg=Ht(xg),wg=g({},gi,{relatedTarget:0}),Pu=Ht(wg),Eg=g({},Nl,{animationName:0,elapsedTime:0,pseudoElement:0}),Cg=Ht(Eg),_g=g({},Nl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ng=Ht(_g),jg=g({},Nl,{data:0}),jh=Ht(jg),Tg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ag={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"},Rg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Og(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rg[e])?!!t[e]:!1}function Ju(){return Og}var Mg=g({},gi,{key:function(e){if(e.key){var t=Tg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ag[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(e){return e.type==="keypress"?Vr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Dg=Ht(Mg),Lg=g({},Fr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Th=Ht(Lg),kg=g({},gi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),Ug=Ht(kg),zg=g({},Nl,{propertyName:0,elapsedTime:0,pseudoElement:0}),qg=Ht(zg),Bg=g({},Fr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Hg=Ht(Bg),Qg=g({},Nl,{newState:0,oldState:0}),$g=Ht(Qg),Yg=[9,13,27,32],Iu=fa&&"CompositionEvent"in window,xi=null;fa&&"documentMode"in document&&(xi=document.documentMode);var Vg=fa&&"TextEvent"in window&&!xi,Ah=fa&&(!Iu||xi&&8<xi&&11>=xi),Rh=" ",Oh=!1;function Mh(e,t){switch(e){case"keyup":return Yg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hs=!1;function Kg(e,t){switch(e){case"compositionend":return Dh(t);case"keypress":return t.which!==32?null:(Oh=!0,Rh);case"textInput":return e=t.data,e===Rh&&Oh?null:e;default:return null}}function Gg(e,t){if(hs)return e==="compositionend"||!Iu&&Mh(e,t)?(e=Ch(),Yr=Fu=$a=null,hs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ah&&t.locale!=="ko"?null:t.data;default:return null}}var Fg={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 Lh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fg[e.type]:t==="textarea"}function kh(e,t,a,s){fs?ds?ds.push(s):ds=[s]:fs=s,t=Lo(t,"onChange"),0<t.length&&(a=new Gr("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var Si=null,wi=null;function Xg(e){p0(e,0)}function Xr(e){var t=Cl(e);if(yh(t))return e}function Uh(e,t){if(e==="change")return t}var zh=!1;if(fa){var Wu;if(fa){var ec="oninput"in document;if(!ec){var qh=document.createElement("div");qh.setAttribute("oninput","return;"),ec=typeof qh.oninput=="function"}Wu=ec}else Wu=!1;zh=Wu&&(!document.documentMode||9<document.documentMode)}function Bh(){Si&&(Si.detachEvent("onpropertychange",Hh),wi=Si=null)}function Hh(e){if(e.propertyName==="value"&&Xr(wi)){var t=[];kh(t,wi,e,Vu(e)),Eh(Xg,t)}}function Zg(e,t,a){e==="focusin"?(Bh(),Si=t,wi=a,Si.attachEvent("onpropertychange",Hh)):e==="focusout"&&Bh()}function Pg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xr(wi)}function Jg(e,t){if(e==="click")return Xr(t)}function Ig(e,t){if(e==="input"||e==="change")return Xr(t)}function Wg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Wt=typeof Object.is=="function"?Object.is:Wg;function Ei(e,t){if(Wt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var o=a[s];if(!fn.call(t,o)||!Wt(e[o],t[o]))return!1}return!0}function Qh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $h(e,t){var a=Qh(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Qh(a)}}function Yh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Qr(e.document)}return t}function tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var eb=fa&&"documentMode"in document&&11>=document.documentMode,ms=null,nc=null,Ci=null,ac=!1;function Kh(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ac||ms==null||ms!==Qr(s)||(s=ms,"selectionStart"in s&&tc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ci&&Ei(Ci,s)||(Ci=s,s=Lo(nc,"onSelect"),0<s.length&&(t=new Gr("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=ms)))}function jl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ps={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionrun:jl("Transition","TransitionRun"),transitionstart:jl("Transition","TransitionStart"),transitioncancel:jl("Transition","TransitionCancel"),transitionend:jl("Transition","TransitionEnd")},lc={},Gh={};fa&&(Gh=document.createElement("div").style,"AnimationEvent"in window||(delete ps.animationend.animation,delete ps.animationiteration.animation,delete ps.animationstart.animation),"TransitionEvent"in window||delete ps.transitionend.transition);function Tl(e){if(lc[e])return lc[e];if(!ps[e])return e;var t=ps[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Gh)return lc[e]=t[a];return e}var Fh=Tl("animationend"),Xh=Tl("animationiteration"),Zh=Tl("animationstart"),tb=Tl("transitionrun"),nb=Tl("transitionstart"),ab=Tl("transitioncancel"),Ph=Tl("transitionend"),Jh=new Map,sc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");sc.push("scrollEnd");function Rn(e,t){Jh.set(e,t),Vn(t,[e])}var Ih=new WeakMap;function xn(e,t){if(typeof e=="object"&&e!==null){var a=Ih.get(e);return a!==void 0?a:(t={value:e,source:t,stack:mh(t)},Ih.set(e,t),t)}return{value:e,source:t,stack:mh(t)}}var Sn=[],ys=0,ic=0;function Zr(){for(var e=ys,t=ic=ys=0;t<e;){var a=Sn[t];Sn[t++]=null;var s=Sn[t];Sn[t++]=null;var o=Sn[t];Sn[t++]=null;var f=Sn[t];if(Sn[t++]=null,s!==null&&o!==null){var v=s.pending;v===null?o.next=o:(o.next=v.next,v.next=o),s.pending=o}f!==0&&Wh(a,o,f)}}function Pr(e,t,a,s){Sn[ys++]=e,Sn[ys++]=t,Sn[ys++]=a,Sn[ys++]=s,ic|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function rc(e,t,a,s){return Pr(e,t,a,s),Jr(e)}function vs(e,t){return Pr(e,null,null,t),Jr(e)}function Wh(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var o=!1,f=e.return;f!==null;)f.childLanes|=a,s=f.alternate,s!==null&&(s.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(o=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,o&&t!==null&&(o=31-tt(a),e=f.hiddenUpdates,s=e[o],s===null?e[o]=[t]:s.push(t),t.lane=a|536870912),f):null}function Jr(e){if(50<Zi)throw Zi=0,mf=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gs={};function lb(e,t,a,s){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,a,s){return new lb(e,t,a,s)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function da(e,t){var a=e.alternate;return a===null?(a=en(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function em(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ir(e,t,a,s,o,f){var v=0;if(s=e,typeof e=="function")oc(e)&&(v=1);else if(typeof e=="string")v=i2(e,a,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=en(31,a,t,o),e.elementType=ae,e.lanes=f,e;case w:return Al(a.children,o,f,t);case C:v=8,o|=24;break;case N:return e=en(12,a,t,o|2),e.elementType=N,e.lanes=f,e;case V:return e=en(13,a,t,o),e.elementType=V,e.lanes=f,e;case X:return e=en(19,a,t,o),e.elementType=X,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case T:case D:v=10;break e;case _:v=9;break e;case H:v=11;break e;case G:v=14;break e;case P:v=16,s=null;break e}v=29,a=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=en(v,a,t,o),t.elementType=e,t.type=s,t.lanes=f,t}function Al(e,t,a,s){return e=en(7,e,s,t),e.lanes=a,e}function uc(e,t,a){return e=en(6,e,null,t),e.lanes=a,e}function cc(e,t,a){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var bs=[],xs=0,Wr=null,eo=0,wn=[],En=0,Rl=null,ha=1,ma="";function Ol(e,t){bs[xs++]=eo,bs[xs++]=Wr,Wr=e,eo=t}function tm(e,t,a){wn[En++]=ha,wn[En++]=ma,wn[En++]=Rl,Rl=e;var s=ha;e=ma;var o=32-tt(s)-1;s&=~(1<<o),a+=1;var f=32-tt(t)+o;if(30<f){var v=o-o%5;f=(s&(1<<v)-1).toString(32),s>>=v,o-=v,ha=1<<32-tt(t)+o|a<<o|s,ma=f+e}else ha=1<<f|a<<o|s,ma=e}function fc(e){e.return!==null&&(Ol(e,1),tm(e,1,0))}function dc(e){for(;e===Wr;)Wr=bs[--xs],bs[xs]=null,eo=bs[--xs],bs[xs]=null;for(;e===Rl;)Rl=wn[--En],wn[En]=null,ma=wn[--En],wn[En]=null,ha=wn[--En],wn[En]=null}var kt=null,Ie=null,Me=!1,Ml=null,Kn=!1,hc=Error(r(519));function Dl(e){var t=Error(r(418,""));throw ji(xn(t,e)),hc}function nm(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[Z]=e,t[te]=s,a){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(a=0;a<Ji.length;a++)Ee(Ji[a],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),vh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0),Hr(t);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),bh(t,s.value,s.defaultValue,s.children),Hr(t)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||b0(t.textContent,a)?(s.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),s.onScroll!=null&&Ee("scroll",t),s.onScrollEnd!=null&&Ee("scrollend",t),s.onClick!=null&&(t.onclick=ko),t=!0):t=!1,t||Dl(e)}function am(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:kt=kt.return}}function _i(e){if(e!==kt)return!1;if(!Me)return am(e),Me=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Rf(e.type,e.memoizedProps)),a=!a),a&&Ie&&Dl(e),am(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){Ie=Mn(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Ie=null}}else t===27?(t=Ie,ll(e.type)?(e=Lf,Lf=null,Ie=e):Ie=t):Ie=kt?Mn(e.stateNode.nextSibling):null;return!0}function Ni(){Ie=kt=null,Me=!1}function lm(){var e=Ml;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),Ml=null),e}function ji(e){Ml===null?Ml=[e]:Ml.push(e)}var mc=Q(null),Ll=null,pa=null;function Ya(e,t,a){W(mc,t._currentValue),t._currentValue=a}function ya(e){e._currentValue=mc.current,I(mc)}function pc(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function yc(e,t,a,s){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var f=o.dependencies;if(f!==null){var v=o.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=o;for(var A=0;A<t.length;A++)if(S.context===t[A]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),pc(f.return,a,e),s||(v=null);break e}f=S.next}}else if(o.tag===18){if(v=o.return,v===null)throw Error(r(341));v.lanes|=a,f=v.alternate,f!==null&&(f.lanes|=a),pc(v,a,e),v=null}else v=o.child;if(v!==null)v.return=o;else for(v=o;v!==null;){if(v===e){v=null;break}if(o=v.sibling,o!==null){o.return=v.return,v=o;break}v=v.return}o=v}}function Ti(e,t,a,s){e=null;for(var o=t,f=!1;o!==null;){if(!f){if((o.flags&524288)!==0)f=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var v=o.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var S=o.type;Wt(o.pendingProps.value,v.value)||(e!==null?e.push(S):e=[S])}}else if(o===gt.current){if(v=o.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ar):e=[ar])}o=o.return}e!==null&&yc(t,e,a,s),t.flags|=262144}function to(e){for(e=e.firstContext;e!==null;){if(!Wt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function kl(e){Ll=e,pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return sm(Ll,e)}function no(e,t){return Ll===null&&kl(e),sm(e,t)}function sm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},pa===null){if(e===null)throw Error(r(308));pa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pa=pa.next=t;return a}var sb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},ib=n.unstable_scheduleCallback,rb=n.unstable_NormalPriority,ct={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vc(){return{controller:new sb,data:new Map,refCount:0}}function Ai(e){e.refCount--,e.refCount===0&&ib(rb,function(){e.controller.abort()})}var Ri=null,gc=0,Ss=0,ws=null;function ob(e,t){if(Ri===null){var a=Ri=[];gc=0,Ss=Sf(),ws={status:"pending",value:void 0,then:function(s){a.push(s)}}}return gc++,t.then(im,im),t}function im(){if(--gc===0&&Ri!==null){ws!==null&&(ws.status="fulfilled");var e=Ri;Ri=null,Ss=0,ws=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ub(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(s.status="rejected",s.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),s}var rm=q.S;q.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&ob(e,t),rm!==null&&rm(e,t)};var Ul=Q(null);function bc(){var e=Ul.current;return e!==null?e:Ve.pooledCache}function ao(e,t){t===null?W(Ul,Ul.current):W(Ul,t.pool)}function om(){var e=bc();return e===null?null:{parent:ct._currentValue,pool:e}}var Oi=Error(r(460)),um=Error(r(474)),lo=Error(r(542)),xc={then:function(){}};function cm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function so(){}function fm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(so,so),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hm(e),e;default:if(typeof t.status=="string")t.then(so,so);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=s}},function(s){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hm(e),e}throw Mi=t,Oi}}var Mi=null;function dm(){if(Mi===null)throw Error(r(459));var e=Mi;return Mi=null,e}function hm(e){if(e===Oi||e===lo)throw Error(r(483))}var Va=!1;function Sc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Le&2)!==0){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,t=Jr(e),Wh(e,null,a),t}return Pr(e,s,t,a),Jr(e)}function Di(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,nt(e,a)}}function Ec(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var o=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?o=f=v:f=f.next=v,a=a.next}while(a!==null);f===null?o=f=t:f=f.next=t}else o=f=t;a={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Cc=!1;function Li(){if(Cc){var e=ws;if(e!==null)throw e}}function ki(e,t,a,s){Cc=!1;var o=e.updateQueue;Va=!1;var f=o.firstBaseUpdate,v=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var A=S,k=A.next;A.next=null,v===null?f=k:v.next=k,v=A;var $=e.alternate;$!==null&&($=$.updateQueue,S=$.lastBaseUpdate,S!==v&&(S===null?$.firstBaseUpdate=k:S.next=k,$.lastBaseUpdate=A))}if(f!==null){var K=o.baseState;v=0,$=k=A=null,S=f;do{var U=S.lane&-536870913,z=U!==S.lane;if(z?(Ne&U)===U:(s&U)===U){U!==0&&U===Ss&&(Cc=!0),$!==null&&($=$.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var de=e,ue=S;U=t;var He=a;switch(ue.tag){case 1:if(de=ue.payload,typeof de=="function"){K=de.call(He,K,U);break e}K=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ue.payload,U=typeof de=="function"?de.call(He,K,U):de,U==null)break e;K=g({},K,U);break e;case 2:Va=!0}}U=S.callback,U!==null&&(e.flags|=64,z&&(e.flags|=8192),z=o.callbacks,z===null?o.callbacks=[U]:z.push(U))}else z={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},$===null?(k=$=z,A=K):$=$.next=z,v|=U;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;z=S,S=z.next,z.next=null,o.lastBaseUpdate=z,o.shared.pending=null}}while(!0);$===null&&(A=K),o.baseState=A,o.firstBaseUpdate=k,o.lastBaseUpdate=$,f===null&&(o.shared.lanes=0),el|=v,e.lanes=v,e.memoizedState=K}}function mm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function pm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)mm(a[e],t)}var Es=Q(null),io=Q(0);function ym(e,t){e=Ea,W(io,e),W(Es,t),Ea=e|t.baseLanes}function _c(){W(io,Ea),W(Es,Es.current)}function Nc(){Ea=io.current,I(Es),I(io)}var Fa=0,be=null,qe=null,ot=null,ro=!1,Cs=!1,zl=!1,oo=0,Ui=0,_s=null,cb=0;function st(){throw Error(r(321))}function jc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Wt(e[a],t[a]))return!1;return!0}function Tc(e,t,a,s,o,f){return Fa=f,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Wm:ep,zl=!1,f=a(s,o),zl=!1,Cs&&(f=gm(t,a,s,o)),vm(e),f}function vm(e){q.H=po;var t=qe!==null&&qe.next!==null;if(Fa=0,ot=qe=be=null,ro=!1,Ui=0,_s=null,t)throw Error(r(300));e===null||mt||(e=e.dependencies,e!==null&&to(e)&&(mt=!0))}function gm(e,t,a,s){be=e;var o=0;do{if(Cs&&(_s=null),Ui=0,Cs=!1,25<=o)throw Error(r(301));if(o+=1,ot=qe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}q.H=vb,f=t(a,s)}while(Cs);return f}function fb(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?zi(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(be.flags|=1024),t}function Ac(){var e=oo!==0;return oo=0,e}function Rc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Oc(e){if(ro){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ro=!1}Fa=0,ot=qe=be=null,Cs=!1,Ui=oo=0,_s=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?be.memoizedState=ot=e:ot=ot.next=e,ot}function ut(){if(qe===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=ot===null?be.memoizedState:ot.next;if(t!==null)ot=t,qe=e;else{if(e===null)throw be.alternate===null?Error(r(467)):Error(r(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},ot===null?be.memoizedState=ot=e:ot=ot.next=e}return ot}function Mc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zi(e){var t=Ui;return Ui+=1,_s===null&&(_s=[]),e=fm(_s,e,t),t=be,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Wm:ep),e}function uo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return zi(e);if(e.$$typeof===D)return Tt(e)}throw Error(r(438,String(e)))}function Dc(e){var t=null,a=be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=be.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Mc(),be.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=ye;return t.index++,a}function va(e,t){return typeof t=="function"?t(e):t}function co(e){var t=ut();return Lc(t,qe,e)}function Lc(e,t,a){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=a;var o=e.baseQueue,f=s.pending;if(f!==null){if(o!==null){var v=o.next;o.next=f.next,f.next=v}t.baseQueue=o=f,s.pending=null}if(f=e.baseState,o===null)e.memoizedState=f;else{t=o.next;var S=v=null,A=null,k=t,$=!1;do{var K=k.lane&-536870913;if(K!==k.lane?(Ne&K)===K:(Fa&K)===K){var U=k.revertLane;if(U===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null}),K===Ss&&($=!0);else if((Fa&U)===U){k=k.next,U===Ss&&($=!0);continue}else K={lane:0,revertLane:k.revertLane,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},A===null?(S=A=K,v=f):A=A.next=K,be.lanes|=U,el|=U;K=k.action,zl&&a(f,K),f=k.hasEagerState?k.eagerState:a(f,K)}else U={lane:K,revertLane:k.revertLane,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},A===null?(S=A=U,v=f):A=A.next=U,be.lanes|=K,el|=K;k=k.next}while(k!==null&&k!==t);if(A===null?v=f:A.next=S,!Wt(f,e.memoizedState)&&(mt=!0,$&&(a=ws,a!==null)))throw a;e.memoizedState=f,e.baseState=v,e.baseQueue=A,s.lastRenderedState=f}return o===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function kc(e){var t=ut(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var s=a.dispatch,o=a.pending,f=t.memoizedState;if(o!==null){a.pending=null;var v=o=o.next;do f=e(f,v.action),v=v.next;while(v!==o);Wt(f,t.memoizedState)||(mt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,s]}function bm(e,t,a){var s=be,o=ut(),f=Me;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=t();var v=!Wt((qe||o).memoizedState,a);v&&(o.memoizedState=a,mt=!0),o=o.queue;var S=wm.bind(null,s,o,e);if(qi(2048,8,S,[e]),o.getSnapshot!==t||v||ot!==null&&ot.memoizedState.tag&1){if(s.flags|=2048,Ns(9,fo(),Sm.bind(null,s,o,a,t),null),Ve===null)throw Error(r(349));f||(Fa&124)!==0||xm(s,t,a)}return a}function xm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=be.updateQueue,t===null?(t=Mc(),be.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Sm(e,t,a,s){t.value=a,t.getSnapshot=s,Em(t)&&Cm(e)}function wm(e,t,a){return a(function(){Em(t)&&Cm(e)})}function Em(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Wt(e,a)}catch{return!0}}function Cm(e){var t=vs(e,2);t!==null&&sn(t,e,2)}function Uc(e){var t=Qt();if(typeof e=="function"){var a=e;if(e=a(),zl){Bt(!0);try{a()}finally{Bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:e},t}function _m(e,t,a,s){return e.baseState=a,Lc(e,qe,typeof s=="function"?s:va)}function db(e,t,a,s,o){if(mo(e))throw Error(r(485));if(e=t.action,e!==null){var f={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};q.T!==null?a(!0):f.isTransition=!1,s(f),a=t.pending,a===null?(f.next=t.pending=f,Nm(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Nm(e,t){var a=t.action,s=t.payload,o=e.state;if(t.isTransition){var f=q.T,v={};q.T=v;try{var S=a(o,s),A=q.S;A!==null&&A(v,S),jm(e,t,S)}catch(k){zc(e,t,k)}finally{q.T=f}}else try{f=a(o,s),jm(e,t,f)}catch(k){zc(e,t,k)}}function jm(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){Tm(e,t,s)},function(s){return zc(e,t,s)}):Tm(e,t,a)}function Tm(e,t,a){t.status="fulfilled",t.value=a,Am(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Nm(e,a)))}function zc(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,Am(t),t=t.next;while(t!==s)}e.action=null}function Am(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Rm(e,t){return t}function Om(e,t){if(Me){var a=Ve.formState;if(a!==null){e:{var s=be;if(Me){if(Ie){t:{for(var o=Ie,f=Kn;o.nodeType!==8;){if(!f){o=null;break t}if(o=Mn(o.nextSibling),o===null){o=null;break t}}f=o.data,o=f==="F!"||f==="F"?o:null}if(o){Ie=Mn(o.nextSibling),s=o.data==="F!";break e}}Dl(s)}s=!1}s&&(t=a[0])}}return a=Qt(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rm,lastRenderedState:t},a.queue=s,a=Pm.bind(null,be,s),s.dispatch=a,s=Uc(!1),f=$c.bind(null,be,!1,s.queue),s=Qt(),o={state:t,dispatch:null,action:e,pending:null},s.queue=o,a=db.bind(null,be,o,f,a),o.dispatch=a,s.memoizedState=e,[t,a,!1]}function Mm(e){var t=ut();return Dm(t,qe,e)}function Dm(e,t,a){if(t=Lc(e,t,Rm)[0],e=co(va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=zi(t)}catch(v){throw v===Oi?lo:v}else s=t;t=ut();var o=t.queue,f=o.dispatch;return a!==t.memoizedState&&(be.flags|=2048,Ns(9,fo(),hb.bind(null,o,a),null)),[s,f,e]}function hb(e,t){e.action=t}function Lm(e){var t=ut(),a=qe;if(a!==null)return Dm(t,a,e);ut(),t=t.memoizedState,a=ut();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function Ns(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=be.updateQueue,t===null&&(t=Mc(),be.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function fo(){return{destroy:void 0,resource:void 0}}function km(){return ut().memoizedState}function ho(e,t,a,s){var o=Qt();s=s===void 0?null:s,be.flags|=e,o.memoizedState=Ns(1|t,fo(),a,s)}function qi(e,t,a,s){var o=ut();s=s===void 0?null:s;var f=o.memoizedState.inst;qe!==null&&s!==null&&jc(s,qe.memoizedState.deps)?o.memoizedState=Ns(t,f,a,s):(be.flags|=e,o.memoizedState=Ns(1|t,f,a,s))}function Um(e,t){ho(8390656,8,e,t)}function zm(e,t){qi(2048,8,e,t)}function qm(e,t){return qi(4,2,e,t)}function Bm(e,t){return qi(4,4,e,t)}function Hm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Qm(e,t,a){a=a!=null?a.concat([e]):null,qi(4,4,Hm.bind(null,t,e),a)}function qc(){}function $m(e,t){var a=ut();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&jc(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function Ym(e,t){var a=ut();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&jc(t,s[1]))return s[0];if(s=e(),zl){Bt(!0);try{e()}finally{Bt(!1)}}return a.memoizedState=[s,t],s}function Bc(e,t,a){return a===void 0||(Fa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Gp(),be.lanes|=e,el|=e,a)}function Vm(e,t,a,s){return Wt(a,t)?a:Es.current!==null?(e=Bc(e,a,s),Wt(e,t)||(mt=!0),e):(Fa&42)===0?(mt=!0,e.memoizedState=a):(e=Gp(),be.lanes|=e,el|=e,t)}function Km(e,t,a,s,o){var f=F.p;F.p=f!==0&&8>f?f:8;var v=q.T,S={};q.T=S,$c(e,!1,t,a);try{var A=o(),k=q.S;if(k!==null&&k(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var $=ub(A,s);Bi(e,t,$,ln(e))}else Bi(e,t,s,ln(e))}catch(K){Bi(e,t,{then:function(){},status:"rejected",reason:K},ln())}finally{F.p=f,q.T=v}}function mb(){}function Hc(e,t,a,s){if(e.tag!==5)throw Error(r(476));var o=Gm(e).queue;Km(e,o,t,J,a===null?mb:function(){return Fm(e),a(s)})}function Gm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:J},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fm(e){var t=Gm(e).next.queue;Bi(e,t,{},ln())}function Qc(){return Tt(ar)}function Xm(){return ut().memoizedState}function Zm(){return ut().memoizedState}function pb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ln();e=Ka(a);var s=Ga(t,e,a);s!==null&&(sn(s,t,a),Di(s,t,a)),t={cache:vc()},e.payload=t;return}t=t.return}}function yb(e,t,a){var s=ln();a={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},mo(e)?Jm(t,a):(a=rc(e,t,a,s),a!==null&&(sn(a,e,s),Im(a,t,s)))}function Pm(e,t,a){var s=ln();Bi(e,t,a,s)}function Bi(e,t,a,s){var o={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(mo(e))Jm(t,o);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var v=t.lastRenderedState,S=f(v,a);if(o.hasEagerState=!0,o.eagerState=S,Wt(S,v))return Pr(e,t,o,0),Ve===null&&Zr(),!1}catch{}finally{}if(a=rc(e,t,o,s),a!==null)return sn(a,e,s),Im(a,t,s),!0}return!1}function $c(e,t,a,s){if(s={lane:2,revertLane:Sf(),action:s,hasEagerState:!1,eagerState:null,next:null},mo(e)){if(t)throw Error(r(479))}else t=rc(e,a,s,2),t!==null&&sn(t,e,2)}function mo(e){var t=e.alternate;return e===be||t!==null&&t===be}function Jm(e,t){Cs=ro=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Im(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,nt(e,a)}}var po={readContext:Tt,use:uo,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st},Wm={readContext:Tt,use:uo,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:Um,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ho(4194308,4,Hm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ho(4194308,4,e,t)},useInsertionEffect:function(e,t){ho(4,2,e,t)},useMemo:function(e,t){var a=Qt();t=t===void 0?null:t;var s=e();if(zl){Bt(!0);try{e()}finally{Bt(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=Qt();if(a!==void 0){var o=a(t);if(zl){Bt(!0);try{a(t)}finally{Bt(!1)}}}else o=t;return s.memoizedState=s.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},s.queue=e,e=e.dispatch=yb.bind(null,be,e),[s.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=Uc(e);var t=e.queue,a=Pm.bind(null,be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:qc,useDeferredValue:function(e,t){var a=Qt();return Bc(a,e,t)},useTransition:function(){var e=Uc(!1);return e=Km.bind(null,be,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=be,o=Qt();if(Me){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ve===null)throw Error(r(349));(Ne&124)!==0||xm(s,t,a)}o.memoizedState=a;var f={value:a,getSnapshot:t};return o.queue=f,Um(wm.bind(null,s,f,e),[e]),s.flags|=2048,Ns(9,fo(),Sm.bind(null,s,f,a,t),null),a},useId:function(){var e=Qt(),t=Ve.identifierPrefix;if(Me){var a=ma,s=ha;a=(s&~(1<<32-tt(s)-1)).toString(32)+a,t="«"+t+"R"+a,a=oo++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=cb++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Qc,useFormState:Om,useActionState:Om,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=$c.bind(null,be,!0,a),a.dispatch=t,[e,t]},useMemoCache:Dc,useCacheRefresh:function(){return Qt().memoizedState=pb.bind(null,be)}},ep={readContext:Tt,use:uo,useCallback:$m,useContext:Tt,useEffect:zm,useImperativeHandle:Qm,useInsertionEffect:qm,useLayoutEffect:Bm,useMemo:Ym,useReducer:co,useRef:km,useState:function(){return co(va)},useDebugValue:qc,useDeferredValue:function(e,t){var a=ut();return Vm(a,qe.memoizedState,e,t)},useTransition:function(){var e=co(va)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:zi(e),t]},useSyncExternalStore:bm,useId:Xm,useHostTransitionStatus:Qc,useFormState:Mm,useActionState:Mm,useOptimistic:function(e,t){var a=ut();return _m(a,qe,e,t)},useMemoCache:Dc,useCacheRefresh:Zm},vb={readContext:Tt,use:uo,useCallback:$m,useContext:Tt,useEffect:zm,useImperativeHandle:Qm,useInsertionEffect:qm,useLayoutEffect:Bm,useMemo:Ym,useReducer:kc,useRef:km,useState:function(){return kc(va)},useDebugValue:qc,useDeferredValue:function(e,t){var a=ut();return qe===null?Bc(a,e,t):Vm(a,qe.memoizedState,e,t)},useTransition:function(){var e=kc(va)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:zi(e),t]},useSyncExternalStore:bm,useId:Xm,useHostTransitionStatus:Qc,useFormState:Lm,useActionState:Lm,useOptimistic:function(e,t){var a=ut();return qe!==null?_m(a,qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Dc,useCacheRefresh:Zm},js=null,Hi=0;function yo(e){var t=Hi;return Hi+=1,js===null&&(js=[]),fm(js,e,t)}function Qi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function vo(e,t){throw t.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function tp(e){var t=e._init;return t(e._payload)}function np(e){function t(M,O){if(e){var L=M.deletions;L===null?(M.deletions=[O],M.flags|=16):L.push(O)}}function a(M,O){if(!e)return null;for(;O!==null;)t(M,O),O=O.sibling;return null}function s(M){for(var O=new Map;M!==null;)M.key!==null?O.set(M.key,M):O.set(M.index,M),M=M.sibling;return O}function o(M,O){return M=da(M,O),M.index=0,M.sibling=null,M}function f(M,O,L){return M.index=L,e?(L=M.alternate,L!==null?(L=L.index,L<O?(M.flags|=67108866,O):L):(M.flags|=67108866,O)):(M.flags|=1048576,O)}function v(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function S(M,O,L,Y){return O===null||O.tag!==6?(O=uc(L,M.mode,Y),O.return=M,O):(O=o(O,L),O.return=M,O)}function A(M,O,L,Y){var ee=L.type;return ee===w?$(M,O,L.props.children,Y,L.key):O!==null&&(O.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===P&&tp(ee)===O.type)?(O=o(O,L.props),Qi(O,L),O.return=M,O):(O=Ir(L.type,L.key,L.props,null,M.mode,Y),Qi(O,L),O.return=M,O)}function k(M,O,L,Y){return O===null||O.tag!==4||O.stateNode.containerInfo!==L.containerInfo||O.stateNode.implementation!==L.implementation?(O=cc(L,M.mode,Y),O.return=M,O):(O=o(O,L.children||[]),O.return=M,O)}function $(M,O,L,Y,ee){return O===null||O.tag!==7?(O=Al(L,M.mode,Y,ee),O.return=M,O):(O=o(O,L),O.return=M,O)}function K(M,O,L){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=uc(""+O,M.mode,L),O.return=M,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case E:return L=Ir(O.type,O.key,O.props,null,M.mode,L),Qi(L,O),L.return=M,L;case j:return O=cc(O,M.mode,L),O.return=M,O;case P:var Y=O._init;return O=Y(O._payload),K(M,O,L)}if(_e(O)||Ce(O))return O=Al(O,M.mode,L,null),O.return=M,O;if(typeof O.then=="function")return K(M,yo(O),L);if(O.$$typeof===D)return K(M,no(M,O),L);vo(M,O)}return null}function U(M,O,L,Y){var ee=O!==null?O.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ee!==null?null:S(M,O,""+L,Y);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case E:return L.key===ee?A(M,O,L,Y):null;case j:return L.key===ee?k(M,O,L,Y):null;case P:return ee=L._init,L=ee(L._payload),U(M,O,L,Y)}if(_e(L)||Ce(L))return ee!==null?null:$(M,O,L,Y,null);if(typeof L.then=="function")return U(M,O,yo(L),Y);if(L.$$typeof===D)return U(M,O,no(M,L),Y);vo(M,L)}return null}function z(M,O,L,Y,ee){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return M=M.get(L)||null,S(O,M,""+Y,ee);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:return M=M.get(Y.key===null?L:Y.key)||null,A(O,M,Y,ee);case j:return M=M.get(Y.key===null?L:Y.key)||null,k(O,M,Y,ee);case P:var xe=Y._init;return Y=xe(Y._payload),z(M,O,L,Y,ee)}if(_e(Y)||Ce(Y))return M=M.get(L)||null,$(O,M,Y,ee,null);if(typeof Y.then=="function")return z(M,O,L,yo(Y),ee);if(Y.$$typeof===D)return z(M,O,L,no(O,Y),ee);vo(O,Y)}return null}function de(M,O,L,Y){for(var ee=null,xe=null,le=O,fe=O=0,yt=null;le!==null&&fe<L.length;fe++){le.index>fe?(yt=le,le=null):yt=le.sibling;var Te=U(M,le,L[fe],Y);if(Te===null){le===null&&(le=yt);break}e&&le&&Te.alternate===null&&t(M,le),O=f(Te,O,fe),xe===null?ee=Te:xe.sibling=Te,xe=Te,le=yt}if(fe===L.length)return a(M,le),Me&&Ol(M,fe),ee;if(le===null){for(;fe<L.length;fe++)le=K(M,L[fe],Y),le!==null&&(O=f(le,O,fe),xe===null?ee=le:xe.sibling=le,xe=le);return Me&&Ol(M,fe),ee}for(le=s(le);fe<L.length;fe++)yt=z(le,M,fe,L[fe],Y),yt!==null&&(e&&yt.alternate!==null&&le.delete(yt.key===null?fe:yt.key),O=f(yt,O,fe),xe===null?ee=yt:xe.sibling=yt,xe=yt);return e&&le.forEach(function(ul){return t(M,ul)}),Me&&Ol(M,fe),ee}function ue(M,O,L,Y){if(L==null)throw Error(r(151));for(var ee=null,xe=null,le=O,fe=O=0,yt=null,Te=L.next();le!==null&&!Te.done;fe++,Te=L.next()){le.index>fe?(yt=le,le=null):yt=le.sibling;var ul=U(M,le,Te.value,Y);if(ul===null){le===null&&(le=yt);break}e&&le&&ul.alternate===null&&t(M,le),O=f(ul,O,fe),xe===null?ee=ul:xe.sibling=ul,xe=ul,le=yt}if(Te.done)return a(M,le),Me&&Ol(M,fe),ee;if(le===null){for(;!Te.done;fe++,Te=L.next())Te=K(M,Te.value,Y),Te!==null&&(O=f(Te,O,fe),xe===null?ee=Te:xe.sibling=Te,xe=Te);return Me&&Ol(M,fe),ee}for(le=s(le);!Te.done;fe++,Te=L.next())Te=z(le,M,fe,Te.value,Y),Te!==null&&(e&&Te.alternate!==null&&le.delete(Te.key===null?fe:Te.key),O=f(Te,O,fe),xe===null?ee=Te:xe.sibling=Te,xe=Te);return e&&le.forEach(function(g2){return t(M,g2)}),Me&&Ol(M,fe),ee}function He(M,O,L,Y){if(typeof L=="object"&&L!==null&&L.type===w&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case E:e:{for(var ee=L.key;O!==null;){if(O.key===ee){if(ee=L.type,ee===w){if(O.tag===7){a(M,O.sibling),Y=o(O,L.props.children),Y.return=M,M=Y;break e}}else if(O.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===P&&tp(ee)===O.type){a(M,O.sibling),Y=o(O,L.props),Qi(Y,L),Y.return=M,M=Y;break e}a(M,O);break}else t(M,O);O=O.sibling}L.type===w?(Y=Al(L.props.children,M.mode,Y,L.key),Y.return=M,M=Y):(Y=Ir(L.type,L.key,L.props,null,M.mode,Y),Qi(Y,L),Y.return=M,M=Y)}return v(M);case j:e:{for(ee=L.key;O!==null;){if(O.key===ee)if(O.tag===4&&O.stateNode.containerInfo===L.containerInfo&&O.stateNode.implementation===L.implementation){a(M,O.sibling),Y=o(O,L.children||[]),Y.return=M,M=Y;break e}else{a(M,O);break}else t(M,O);O=O.sibling}Y=cc(L,M.mode,Y),Y.return=M,M=Y}return v(M);case P:return ee=L._init,L=ee(L._payload),He(M,O,L,Y)}if(_e(L))return de(M,O,L,Y);if(Ce(L)){if(ee=Ce(L),typeof ee!="function")throw Error(r(150));return L=ee.call(L),ue(M,O,L,Y)}if(typeof L.then=="function")return He(M,O,yo(L),Y);if(L.$$typeof===D)return He(M,O,no(M,L),Y);vo(M,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,O!==null&&O.tag===6?(a(M,O.sibling),Y=o(O,L),Y.return=M,M=Y):(a(M,O),Y=uc(L,M.mode,Y),Y.return=M,M=Y),v(M)):a(M,O)}return function(M,O,L,Y){try{Hi=0;var ee=He(M,O,L,Y);return js=null,ee}catch(le){if(le===Oi||le===lo)throw le;var xe=en(29,le,null,M.mode);return xe.lanes=Y,xe.return=M,xe}finally{}}}var Ts=np(!0),ap=np(!1),Cn=Q(null),Gn=null;function Xa(e){var t=e.alternate;W(ft,ft.current&1),W(Cn,e),Gn===null&&(t===null||Es.current!==null||t.memoizedState!==null)&&(Gn=e)}function lp(e){if(e.tag===22){if(W(ft,ft.current),W(Cn,e),Gn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Gn=e)}}else Za()}function Za(){W(ft,ft.current),W(Cn,Cn.current)}function ga(e){I(Cn),Gn===e&&(Gn=null),I(ft)}var ft=Q(0);function go(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Df(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Yc(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:g({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Vc={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=ln(),o=Ka(s);o.payload=t,a!=null&&(o.callback=a),t=Ga(e,o,s),t!==null&&(sn(t,e,s),Di(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=ln(),o=Ka(s);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Ga(e,o,s),t!==null&&(sn(t,e,s),Di(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ln(),s=Ka(a);s.tag=2,t!=null&&(s.callback=t),t=Ga(e,s,a),t!==null&&(sn(t,e,a),Di(t,e,a))}};function sp(e,t,a,s,o,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,v):t.prototype&&t.prototype.isPureReactComponent?!Ei(a,s)||!Ei(o,f):!0}function ip(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&Vc.enqueueReplaceState(t,t.state,null)}function ql(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=g({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}var bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function rp(e){bo(e)}function op(e){console.error(e)}function up(e){bo(e)}function xo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function cp(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Kc(e,t,a){return a=Ka(a),a.tag=3,a.payload={element:null},a.callback=function(){xo(e,t)},a}function fp(e){return e=Ka(e),e.tag=3,e}function dp(e,t,a,s){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var f=s.value;e.payload=function(){return o(f)},e.callback=function(){cp(t,a,s)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){cp(t,a,s),typeof o!="function"&&(tl===null?tl=new Set([this]):tl.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function gb(e,t,a,s,o){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&Ti(t,a,o,!0),a=Cn.current,a!==null){switch(a.tag){case 13:return Gn===null?yf():a.alternate===null&&We===0&&(We=3),a.flags&=-257,a.flags|=65536,a.lanes=o,s===xc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),gf(e,s,o)),!1;case 22:return a.flags|=65536,s===xc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),gf(e,s,o)),!1}throw Error(r(435,a.tag))}return gf(e,s,o),yf(),!1}if(Me)return t=Cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,s!==hc&&(e=Error(r(422),{cause:s}),ji(xn(e,a)))):(s!==hc&&(t=Error(r(423),{cause:s}),ji(xn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,s=xn(s,a),o=Kc(e.stateNode,s,o),Ec(e,o),We!==4&&(We=2)),!1;var f=Error(r(520),{cause:s});if(f=xn(f,a),Xi===null?Xi=[f]:Xi.push(f),We!==4&&(We=2),t===null)return!0;s=xn(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Kc(a.stateNode,s,e),Ec(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(tl===null||!tl.has(f))))return a.flags|=65536,o&=-o,a.lanes|=o,o=fp(o),dp(o,e,a,s),Ec(a,o),!1}a=a.return}while(a!==null);return!1}var hp=Error(r(461)),mt=!1;function bt(e,t,a,s){t.child=e===null?ap(t,null,a,s):Ts(t,e.child,a,s)}function mp(e,t,a,s,o){a=a.render;var f=t.ref;if("ref"in s){var v={};for(var S in s)S!=="ref"&&(v[S]=s[S])}else v=s;return kl(t),s=Tc(e,t,a,v,f,o),S=Ac(),e!==null&&!mt?(Rc(e,t,o),ba(e,t,o)):(Me&&S&&fc(t),t.flags|=1,bt(e,t,s,o),t.child)}function pp(e,t,a,s,o){if(e===null){var f=a.type;return typeof f=="function"&&!oc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,yp(e,t,f,s,o)):(e=Ir(a.type,null,s,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Wc(e,o)){var v=f.memoizedProps;if(a=a.compare,a=a!==null?a:Ei,a(v,s)&&e.ref===t.ref)return ba(e,t,o)}return t.flags|=1,e=da(f,s),e.ref=t.ref,e.return=t,t.child=e}function yp(e,t,a,s,o){if(e!==null){var f=e.memoizedProps;if(Ei(f,s)&&e.ref===t.ref)if(mt=!1,t.pendingProps=s=f,Wc(e,o))(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,ba(e,t,o)}return Gc(e,t,a,s,o)}function vp(e,t,a){var s=t.pendingProps,o=s.children,f=e!==null?e.memoizedState:null;if(s.mode==="hidden"){if((t.flags&128)!==0){if(s=f!==null?f.baseLanes|a:a,e!==null){for(o=t.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;t.childLanes=f&~s}else t.childLanes=0,t.child=null;return gp(e,t,s,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ao(t,f!==null?f.cachePool:null),f!==null?ym(t,f):_c(),lp(t);else return t.lanes=t.childLanes=536870912,gp(e,t,f!==null?f.baseLanes|a:a,a)}else f!==null?(ao(t,f.cachePool),ym(t,f),Za(),t.memoizedState=null):(e!==null&&ao(t,null),_c(),Za());return bt(e,t,o,a),t.child}function gp(e,t,a,s){var o=bc();return o=o===null?null:{parent:ct._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&ao(t,null),_c(),lp(t),e!==null&&Ti(e,t,s,!0),null}function So(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Gc(e,t,a,s,o){return kl(t),a=Tc(e,t,a,s,void 0,o),s=Ac(),e!==null&&!mt?(Rc(e,t,o),ba(e,t,o)):(Me&&s&&fc(t),t.flags|=1,bt(e,t,a,o),t.child)}function bp(e,t,a,s,o,f){return kl(t),t.updateQueue=null,a=gm(t,s,a,o),vm(e),s=Ac(),e!==null&&!mt?(Rc(e,t,f),ba(e,t,f)):(Me&&s&&fc(t),t.flags|=1,bt(e,t,a,f),t.child)}function xp(e,t,a,s,o){if(kl(t),t.stateNode===null){var f=gs,v=a.contextType;typeof v=="object"&&v!==null&&(f=Tt(v)),f=new a(s,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Vc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=s,f.state=t.memoizedState,f.refs={},Sc(t),v=a.contextType,f.context=typeof v=="object"&&v!==null?Tt(v):gs,f.state=t.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Yc(t,a,v,s),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&Vc.enqueueReplaceState(f,f.state,null),ki(t,s,f,o),Li(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,A=ql(a,S);f.props=A;var k=f.context,$=a.contextType;v=gs,typeof $=="object"&&$!==null&&(v=Tt($));var K=a.getDerivedStateFromProps;$=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||k!==v)&&ip(t,f,s,v),Va=!1;var U=t.memoizedState;f.state=U,ki(t,s,f,o),Li(),k=t.memoizedState,S||U!==k||Va?(typeof K=="function"&&(Yc(t,a,K,s),k=t.memoizedState),(A=Va||sp(t,a,A,s,U,k,v))?($||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=k),f.props=s,f.state=k,f.context=v,s=A):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,wc(e,t),v=t.memoizedProps,$=ql(a,v),f.props=$,K=t.pendingProps,U=f.context,k=a.contextType,A=gs,typeof k=="object"&&k!==null&&(A=Tt(k)),S=a.getDerivedStateFromProps,(k=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==K||U!==A)&&ip(t,f,s,A),Va=!1,U=t.memoizedState,f.state=U,ki(t,s,f,o),Li();var z=t.memoizedState;v!==K||U!==z||Va||e!==null&&e.dependencies!==null&&to(e.dependencies)?(typeof S=="function"&&(Yc(t,a,S,s),z=t.memoizedState),($=Va||sp(t,a,$,s,U,z,A)||e!==null&&e.dependencies!==null&&to(e.dependencies))?(k||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,z,A),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,z,A)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=z),f.props=s,f.state=z,f.context=A,s=$):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),s=!1)}return f=s,So(e,t),s=(t.flags&128)!==0,f||s?(f=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&s?(t.child=Ts(t,e.child,null,o),t.child=Ts(t,null,a,o)):bt(e,t,a,o),t.memoizedState=f.state,e=t.child):e=ba(e,t,o),e}function Sp(e,t,a,s){return Ni(),t.flags|=256,bt(e,t,a,s),t.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:om()}}function Zc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=_n),e}function wp(e,t,a){var s=t.pendingProps,o=!1,f=(t.flags&128)!==0,v;if((v=f)||(v=e!==null&&e.memoizedState===null?!1:(ft.current&2)!==0),v&&(o=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(o?Xa(t):Za(),Me){var S=Ie,A;if(A=S){e:{for(A=S,S=Kn;A.nodeType!==8;){if(!S){S=null;break e}if(A=Mn(A.nextSibling),A===null){S=null;break e}}S=A}S!==null?(t.memoizedState={dehydrated:S,treeContext:Rl!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},A=en(18,null,null,0),A.stateNode=S,A.return=t,t.child=A,kt=t,Ie=null,A=!0):A=!1}A||Dl(t)}if(S=t.memoizedState,S!==null&&(S=S.dehydrated,S!==null))return Df(S)?t.lanes=32:t.lanes=536870912,null;ga(t)}return S=s.children,s=s.fallback,o?(Za(),o=t.mode,S=wo({mode:"hidden",children:S},o),s=Al(s,o,a,null),S.return=t,s.return=t,S.sibling=s,t.child=S,o=t.child,o.memoizedState=Xc(a),o.childLanes=Zc(e,v,a),t.memoizedState=Fc,s):(Xa(t),Pc(t,S))}if(A=e.memoizedState,A!==null&&(S=A.dehydrated,S!==null)){if(f)t.flags&256?(Xa(t),t.flags&=-257,t=Jc(e,t,a)):t.memoizedState!==null?(Za(),t.child=e.child,t.flags|=128,t=null):(Za(),o=s.fallback,S=t.mode,s=wo({mode:"visible",children:s.children},S),o=Al(o,S,a,null),o.flags|=2,s.return=t,o.return=t,s.sibling=o,t.child=s,Ts(t,e.child,null,a),s=t.child,s.memoizedState=Xc(a),s.childLanes=Zc(e,v,a),t.memoizedState=Fc,t=o);else if(Xa(t),Df(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var k=v.dgst;v=k,s=Error(r(419)),s.stack="",s.digest=v,ji({value:s,source:null,stack:null}),t=Jc(e,t,a)}else if(mt||Ti(e,t,a,!1),v=(a&e.childLanes)!==0,mt||v){if(v=Ve,v!==null&&(s=a&-a,s=(s&42)!==0?1:_t(s),s=(s&(v.suspendedLanes|a))!==0?0:s,s!==0&&s!==A.retryLane))throw A.retryLane=s,vs(e,s),sn(v,e,s),hp;S.data==="$?"||yf(),t=Jc(e,t,a)}else S.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,Ie=Mn(S.nextSibling),kt=t,Me=!0,Ml=null,Kn=!1,e!==null&&(wn[En++]=ha,wn[En++]=ma,wn[En++]=Rl,ha=e.id,ma=e.overflow,Rl=t),t=Pc(t,s.children),t.flags|=4096);return t}return o?(Za(),o=s.fallback,S=t.mode,A=e.child,k=A.sibling,s=da(A,{mode:"hidden",children:s.children}),s.subtreeFlags=A.subtreeFlags&65011712,k!==null?o=da(k,o):(o=Al(o,S,a,null),o.flags|=2),o.return=t,s.return=t,s.sibling=o,t.child=s,s=o,o=t.child,S=e.child.memoizedState,S===null?S=Xc(a):(A=S.cachePool,A!==null?(k=ct._currentValue,A=A.parent!==k?{parent:k,pool:k}:A):A=om(),S={baseLanes:S.baseLanes|a,cachePool:A}),o.memoizedState=S,o.childLanes=Zc(e,v,a),t.memoizedState=Fc,s):(Xa(t),a=e.child,e=a.sibling,a=da(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=a,t.memoizedState=null,a)}function Pc(e,t){return t=wo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wo(e,t){return e=en(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Jc(e,t,a){return Ts(t,e.child,null,a),e=Pc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ep(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),pc(e.return,t,a)}function Ic(e,t,a,s,o){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:o}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=s,f.tail=a,f.tailMode=o)}function Cp(e,t,a){var s=t.pendingProps,o=s.revealOrder,f=s.tail;if(bt(e,t,s.children,a),s=ft.current,(s&2)!==0)s=s&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ep(e,a,t);else if(e.tag===19)Ep(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}switch(W(ft,s),o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&go(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Ic(t,!1,o,a,f);break;case"backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&go(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Ic(t,!0,a,null,f);break;case"together":Ic(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ba(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),el|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ti(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=da(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=da(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Wc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&to(e)))}function bb(e,t,a){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),Ya(t,ct,e.memoizedState.cache),Ni();break;case 27:case 5:Hn(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:Ya(t,t.type,t.memoizedProps.value);break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Xa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?wp(e,t,a):(Xa(t),e=ba(e,t,a),e!==null?e.sibling:null);Xa(t);break;case 19:var o=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(Ti(e,t,a,!1),s=(a&t.childLanes)!==0),o){if(s)return Cp(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),W(ft,ft.current),s)break;return null;case 22:case 23:return t.lanes=0,vp(e,t,a);case 24:Ya(t,ct,e.memoizedState.cache)}return ba(e,t,a)}function _p(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!Wc(e,a)&&(t.flags&128)===0)return mt=!1,bb(e,t,a);mt=(e.flags&131072)!==0}else mt=!1,Me&&(t.flags&1048576)!==0&&tm(t,eo,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var s=t.elementType,o=s._init;if(s=o(s._payload),t.type=s,typeof s=="function")oc(s)?(e=ql(s,e),t.tag=1,t=xp(null,t,s,e,a)):(t.tag=0,t=Gc(null,t,s,e,a));else{if(s!=null){if(o=s.$$typeof,o===H){t.tag=11,t=mp(null,t,s,e,a);break e}else if(o===G){t.tag=14,t=pp(null,t,s,e,a);break e}}throw t=me(s)||s,Error(r(306,t,""))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,o=ql(s,t.pendingProps),xp(e,t,s,o,a);case 3:e:{if(De(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var f=t.memoizedState;o=f.element,wc(e,t),ki(t,s,null,a);var v=t.memoizedState;if(s=v.cache,Ya(t,ct,s),s!==f.cache&&yc(t,[ct],a,!0),Li(),s=v.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Sp(e,t,s,a);break e}else if(s!==o){o=xn(Error(r(424)),t),ji(o),t=Sp(e,t,s,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ie=Mn(e.firstChild),kt=t,Me=!0,Ml=null,Kn=!0,a=ap(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ni(),s===o){t=ba(e,t,a);break e}bt(e,t,s,a)}t=t.child}return t;case 26:return So(e,t),e===null?(a=A0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Me||(a=t.type,e=t.pendingProps,s=Uo(oe.current).createElement(a),s[Z]=t,s[te]=e,St(s,a,e),lt(s),t.stateNode=s):t.memoizedState=A0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Hn(t),e===null&&Me&&(s=t.stateNode=N0(t.type,t.pendingProps,oe.current),kt=t,Kn=!0,o=Ie,ll(t.type)?(Lf=o,Ie=Mn(s.firstChild)):Ie=o),bt(e,t,t.pendingProps.children,a),So(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((o=s=Ie)&&(s=Fb(s,t.type,t.pendingProps,Kn),s!==null?(t.stateNode=s,kt=t,Ie=Mn(s.firstChild),Kn=!1,o=!0):o=!1),o||Dl(t)),Hn(t),o=t.type,f=t.pendingProps,v=e!==null?e.memoizedProps:null,s=f.children,Rf(o,f)?s=null:v!==null&&Rf(o,v)&&(t.flags|=32),t.memoizedState!==null&&(o=Tc(e,t,fb,null,null,a),ar._currentValue=o),So(e,t),bt(e,t,s,a),t.child;case 6:return e===null&&Me&&((e=a=Ie)&&(a=Xb(a,t.pendingProps,Kn),a!==null?(t.stateNode=a,kt=t,Ie=null,e=!0):e=!1),e||Dl(t)),null;case 13:return wp(e,t,a);case 4:return De(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ts(t,null,s,a):bt(e,t,s,a),t.child;case 11:return mp(e,t,t.type,t.pendingProps,a);case 7:return bt(e,t,t.pendingProps,a),t.child;case 8:return bt(e,t,t.pendingProps.children,a),t.child;case 12:return bt(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,Ya(t,t.type,s.value),bt(e,t,s.children,a),t.child;case 9:return o=t.type._context,s=t.pendingProps.children,kl(t),o=Tt(o),s=s(o),t.flags|=1,bt(e,t,s,a),t.child;case 14:return pp(e,t,t.type,t.pendingProps,a);case 15:return yp(e,t,t.type,t.pendingProps,a);case 19:return Cp(e,t,a);case 31:return s=t.pendingProps,a=t.mode,s={mode:s.mode,children:s.children},e===null?(a=wo(s,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=da(e.child,s),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return vp(e,t,a);case 24:return kl(t),s=Tt(ct),e===null?(o=bc(),o===null&&(o=Ve,f=vc(),o.pooledCache=f,f.refCount++,f!==null&&(o.pooledCacheLanes|=a),o=f),t.memoizedState={parent:s,cache:o},Sc(t),Ya(t,ct,o)):((e.lanes&a)!==0&&(wc(e,t),ki(t,null,null,a),Li()),o=e.memoizedState,f=t.memoizedState,o.parent!==s?(o={parent:s,cache:s},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Ya(t,ct,s)):(s=f.cache,Ya(t,ct,s),s!==o.cache&&yc(t,[ct],a,!0))),bt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function xa(e){e.flags|=4}function Np(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!L0(t)){if(t=Cn.current,t!==null&&((Ne&4194048)===Ne?Gn!==null:(Ne&62914560)!==Ne&&(Ne&536870912)===0||t!==Gn))throw Mi=xc,um;e.flags|=8192}}function Eo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?oa():536870912,e.lanes|=t,Ms|=t)}function $i(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function xb(e,t,a){var s=t.pendingProps;switch(dc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ya(ct),Ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(_i(t)?xa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,lm())),Ze(t),null;case 26:return a=t.memoizedState,e===null?(xa(t),a!==null?(Ze(t),Np(t,a)):(Ze(t),t.flags&=-16777217)):a?a!==e.memoizedState?(xa(t),Ze(t),Np(t,a)):(Ze(t),t.flags&=-16777217):(e.memoizedProps!==s&&xa(t),Ze(t),t.flags&=-16777217),null;case 27:Et(t),a=oe.current;var o=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==s&&xa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ze(t),null}e=ne.current,_i(t)?nm(t):(e=N0(o,s,a),t.stateNode=e,xa(t))}return Ze(t),null;case 5:if(Et(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&xa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ze(t),null}if(e=ne.current,_i(t))nm(t);else{switch(o=Uo(oe.current),e){case 1:e=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof s.is=="string"?o.createElement("select",{is:s.is}):o.createElement("select"),s.multiple?e.multiple=!0:s.size&&(e.size=s.size);break;default:e=typeof s.is=="string"?o.createElement(a,{is:s.is}):o.createElement(a)}}e[Z]=t,e[te]=s;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=e;e:switch(St(e,a,s),a){case"button":case"input":case"select":case"textarea":e=!!s.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&xa(t)}}return Ze(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&xa(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=oe.current,_i(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,o=kt,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}e[Z]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||b0(e.nodeValue,a)),e||Dl(t)}else e=Uo(e).createTextNode(s),e[Z]=t,t.stateNode=e}return Ze(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=_i(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[Z]=t}else Ni(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),o=!1}else o=lm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(ga(t),t):(ga(t),null)}if(ga(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=s!==null,e=e!==null&&e.memoizedState!==null,a){s=t.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool);var f=null;s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==o&&(s.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Eo(t,t.updateQueue),Ze(t),null;case 4:return Ge(),e===null&&_f(t.stateNode.containerInfo),Ze(t),null;case 10:return ya(t.type),Ze(t),null;case 19:if(I(ft),o=t.memoizedState,o===null)return Ze(t),null;if(s=(t.flags&128)!==0,f=o.rendering,f===null)if(s)$i(o,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=go(e),f!==null){for(t.flags|=128,$i(o,!1),e=f.updateQueue,t.updateQueue=e,Eo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)em(a,e),a=a.sibling;return W(ft,ft.current&1|2),t.child}e=e.sibling}o.tail!==null&&Dt()>No&&(t.flags|=128,s=!0,$i(o,!1),t.lanes=4194304)}else{if(!s)if(e=go(f),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Eo(t,e),$i(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!Me)return Ze(t),null}else 2*Dt()-o.renderingStartTime>No&&a!==536870912&&(t.flags|=128,s=!0,$i(o,!1),t.lanes=4194304);o.isBackwards?(f.sibling=t.child,t.child=f):(e=o.last,e!==null?e.sibling=f:t.child=f,o.last=f)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Dt(),t.sibling=null,e=ft.current,W(ft,s?e&1|2:e&1),t):(Ze(t),null);case 22:case 23:return ga(t),Nc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),a=t.updateQueue,a!==null&&Eo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&I(Ul),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ya(ct),Ze(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Sb(e,t){switch(dc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(ct),Ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Et(t),null;case 13:if(ga(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(ft),null;case 4:return Ge(),null;case 10:return ya(t.type),null;case 22:case 23:return ga(t),Nc(),e!==null&&I(Ul),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(ct),null;case 25:return null;default:return null}}function jp(e,t){switch(dc(t),t.tag){case 3:ya(ct),Ge();break;case 26:case 27:case 5:Et(t);break;case 4:Ge();break;case 13:ga(t);break;case 19:I(ft);break;case 10:ya(t.type);break;case 22:case 23:ga(t),Nc(),e!==null&&I(Ul);break;case 24:ya(ct)}}function Yi(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var o=s.next;a=o;do{if((a.tag&e)===e){s=void 0;var f=a.create,v=a.inst;s=f(),v.destroy=s}a=a.next}while(a!==o)}}catch(S){Qe(t,t.return,S)}}function Pa(e,t,a){try{var s=t.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var f=o.next;s=f;do{if((s.tag&e)===e){var v=s.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,o=t;var A=a,k=S;try{k()}catch($){Qe(o,A,$)}}}s=s.next}while(s!==f)}}catch($){Qe(t,t.return,$)}}function Tp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{pm(t,a)}catch(s){Qe(e,e.return,s)}}}function Ap(e,t,a){a.props=ql(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){Qe(e,t,s)}}function Vi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(o){Qe(e,t,o)}}function Fn(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(o){Qe(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Qe(e,t,o)}else a.current=null}function Rp(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(o){Qe(e,e.return,o)}}function ef(e,t,a){try{var s=e.stateNode;$b(s,e.type,a,t),s[te]=t}catch(o){Qe(e,e.return,o)}}function Op(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ll(e.type)||e.tag===4}function tf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Op(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ll(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nf(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ko));else if(s!==4&&(s===27&&ll(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(nf(e,t,a),e=e.sibling;e!==null;)nf(e,t,a),e=e.sibling}function Co(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&ll(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Co(e,t,a),e=e.sibling;e!==null;)Co(e,t,a),e=e.sibling}function Mp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);St(t,s,a),t[Z]=e,t[te]=a}catch(f){Qe(e,e.return,f)}}var Sa=!1,it=!1,af=!1,Dp=typeof WeakSet=="function"?WeakSet:Set,pt=null;function wb(e,t){if(e=e.containerInfo,Tf=$o,e=Vh(e),tc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var o=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var v=0,S=-1,A=-1,k=0,$=0,K=e,U=null;t:for(;;){for(var z;K!==a||o!==0&&K.nodeType!==3||(S=v+o),K!==f||s!==0&&K.nodeType!==3||(A=v+s),K.nodeType===3&&(v+=K.nodeValue.length),(z=K.firstChild)!==null;)U=K,K=z;for(;;){if(K===e)break t;if(U===a&&++k===o&&(S=v),U===f&&++$===s&&(A=v),(z=K.nextSibling)!==null)break;K=U,U=K.parentNode}K=z}a=S===-1||A===-1?null:{start:S,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Af={focusedElem:e,selectionRange:a},$o=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,f=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,o=f.memoizedProps,f=f.memoizedState,s=a.stateNode;try{var de=ql(a.type,o,a.elementType===a.type);e=s.getSnapshotBeforeUpdate(de,f),s.__reactInternalSnapshotBeforeUpdate=e}catch(ue){Qe(a,a.return,ue)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Mf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function Lp(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Ja(e,a),s&4&&Yi(5,a);break;case 1:if(Ja(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(v){Qe(a,a.return,v)}else{var o=ql(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Qe(a,a.return,v)}}s&64&&Tp(a),s&512&&Vi(a,a.return);break;case 3:if(Ja(e,a),s&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{pm(e,t)}catch(v){Qe(a,a.return,v)}}break;case 27:t===null&&s&4&&Mp(a);case 26:case 5:Ja(e,a),t===null&&s&4&&Rp(a),s&512&&Vi(a,a.return);break;case 12:Ja(e,a);break;case 13:Ja(e,a),s&4&&zp(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ob.bind(null,a),Zb(e,a))));break;case 22:if(s=a.memoizedState!==null||Sa,!s){t=t!==null&&t.memoizedState!==null||it,o=Sa;var f=it;Sa=s,(it=t)&&!f?Ia(e,a,(a.subtreeFlags&8772)!==0):Ja(e,a),Sa=o,it=f}break;case 30:break;default:Ja(e,a)}}function kp(e){var t=e.alternate;t!==null&&(e.alternate=null,kp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fe=null,$t=!1;function wa(e,t,a){for(a=a.child;a!==null;)Up(e,t,a),a=a.sibling}function Up(e,t,a){if(Je&&typeof Je.onCommitFiberUnmount=="function")try{Je.onCommitFiberUnmount(hn,a)}catch{}switch(a.tag){case 26:it||Fn(a,t),wa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:it||Fn(a,t);var s=Fe,o=$t;ll(a.type)&&(Fe=a.stateNode,$t=!1),wa(e,t,a),Wi(a.stateNode),Fe=s,$t=o;break;case 5:it||Fn(a,t);case 6:if(s=Fe,o=$t,Fe=null,wa(e,t,a),Fe=s,$t=o,Fe!==null)if($t)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(a.stateNode)}catch(f){Qe(a,t,f)}else try{Fe.removeChild(a.stateNode)}catch(f){Qe(a,t,f)}break;case 18:Fe!==null&&($t?(e=Fe,C0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),rr(e)):C0(Fe,a.stateNode));break;case 4:s=Fe,o=$t,Fe=a.stateNode.containerInfo,$t=!0,wa(e,t,a),Fe=s,$t=o;break;case 0:case 11:case 14:case 15:it||Pa(2,a,t),it||Pa(4,a,t),wa(e,t,a);break;case 1:it||(Fn(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Ap(a,t,s)),wa(e,t,a);break;case 21:wa(e,t,a);break;case 22:it=(s=it)||a.memoizedState!==null,wa(e,t,a),it=s;break;default:wa(e,t,a)}}function zp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{rr(e)}catch(a){Qe(t,t.return,a)}}function Eb(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dp),t;default:throw Error(r(435,e.tag))}}function lf(e,t){var a=Eb(e);t.forEach(function(s){var o=Mb.bind(null,e,s);a.has(s)||(a.add(s),s.then(o,o))})}function tn(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var o=a[s],f=e,v=t,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(ll(S.type)){Fe=S.stateNode,$t=!1;break e}break;case 5:Fe=S.stateNode,$t=!1;break e;case 3:case 4:Fe=S.stateNode.containerInfo,$t=!0;break e}S=S.return}if(Fe===null)throw Error(r(160));Up(f,v,o),Fe=null,$t=!1,f=o.alternate,f!==null&&(f.return=null),o.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)qp(t,e),t=t.sibling}var On=null;function qp(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),s&4&&(Pa(3,e,e.return),Yi(3,e),Pa(5,e,e.return));break;case 1:tn(t,e),nn(e),s&512&&(it||a===null||Fn(a,a.return)),s&64&&Sa&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var o=On;if(tn(t,e),nn(e),s&512&&(it||a===null||Fn(a,a.return)),s&4){var f=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(s){case"title":f=o.getElementsByTagName("title")[0],(!f||f[at]||f[Z]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=o.createElement(s),o.head.insertBefore(f,o.querySelector("head > title"))),St(f,s,a),f[Z]=e,lt(f),s=f;break e;case"link":var v=M0("link","href",o).get(s+(a.href||""));if(v){for(var S=0;S<v.length;S++)if(f=v[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(S,1);break t}}f=o.createElement(s),St(f,s,a),o.head.appendChild(f);break;case"meta":if(v=M0("meta","content",o).get(s+(a.content||""))){for(S=0;S<v.length;S++)if(f=v[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(S,1);break t}}f=o.createElement(s),St(f,s,a),o.head.appendChild(f);break;default:throw Error(r(468,s))}f[Z]=e,lt(f),s=f}e.stateNode=s}else D0(o,e.type,e.stateNode);else e.stateNode=O0(o,s,e.memoizedProps);else f!==s?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,s===null?D0(o,e.type,e.stateNode):O0(o,s,e.memoizedProps)):s===null&&e.stateNode!==null&&ef(e,e.memoizedProps,a.memoizedProps)}break;case 27:tn(t,e),nn(e),s&512&&(it||a===null||Fn(a,a.return)),a!==null&&s&4&&ef(e,e.memoizedProps,a.memoizedProps);break;case 5:if(tn(t,e),nn(e),s&512&&(it||a===null||Fn(a,a.return)),e.flags&32){o=e.stateNode;try{cs(o,"")}catch(z){Qe(e,e.return,z)}}s&4&&e.stateNode!=null&&(o=e.memoizedProps,ef(e,o,a!==null?a.memoizedProps:o)),s&1024&&(af=!0);break;case 6:if(tn(t,e),nn(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(z){Qe(e,e.return,z)}}break;case 3:if(Bo=null,o=On,On=zo(t.containerInfo),tn(t,e),On=o,nn(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{rr(t.containerInfo)}catch(z){Qe(e,e.return,z)}af&&(af=!1,Bp(e));break;case 4:s=On,On=zo(e.stateNode.containerInfo),tn(t,e),nn(e),On=s;break;case 12:tn(t,e),nn(e);break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ff=Dt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,lf(e,s)));break;case 22:o=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,k=Sa,$=it;if(Sa=k||o,it=$||A,tn(t,e),it=$,Sa=k,nn(e),s&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||A||Sa||it||Bl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){A=a=t;try{if(f=A.stateNode,o)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=A.stateNode;var K=A.memoizedProps.style,U=K!=null&&K.hasOwnProperty("display")?K.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(z){Qe(A,A.return,z)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=o?"":A.memoizedProps}catch(z){Qe(A,A.return,z)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,lf(e,a))));break;case 19:tn(t,e),nn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,lf(e,s)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(Op(s)){a=s;break}s=s.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,f=tf(e);Co(e,f,o);break;case 5:var v=a.stateNode;a.flags&32&&(cs(v,""),a.flags&=-33);var S=tf(e);Co(e,S,v);break;case 3:case 4:var A=a.stateNode.containerInfo,k=tf(e);nf(e,k,A);break;default:throw Error(r(161))}}catch($){Qe(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Bp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ja(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Lp(e,t.alternate,t),t=t.sibling}function Bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pa(4,t,t.return),Bl(t);break;case 1:Fn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Ap(t,t.return,a),Bl(t);break;case 27:Wi(t.stateNode);case 26:case 5:Fn(t,t.return),Bl(t);break;case 22:t.memoizedState===null&&Bl(t);break;case 30:Bl(t);break;default:Bl(t)}e=e.sibling}}function Ia(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,o=e,f=t,v=f.flags;switch(f.tag){case 0:case 11:case 15:Ia(o,f,a),Yi(4,f);break;case 1:if(Ia(o,f,a),s=f,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(k){Qe(s,s.return,k)}if(s=f,o=s.updateQueue,o!==null){var S=s.stateNode;try{var A=o.shared.hiddenCallbacks;if(A!==null)for(o.shared.hiddenCallbacks=null,o=0;o<A.length;o++)mm(A[o],S)}catch(k){Qe(s,s.return,k)}}a&&v&64&&Tp(f),Vi(f,f.return);break;case 27:Mp(f);case 26:case 5:Ia(o,f,a),a&&s===null&&v&4&&Rp(f),Vi(f,f.return);break;case 12:Ia(o,f,a);break;case 13:Ia(o,f,a),a&&v&4&&zp(o,f);break;case 22:f.memoizedState===null&&Ia(o,f,a),Vi(f,f.return);break;case 30:break;default:Ia(o,f,a)}t=t.sibling}}function sf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ai(a))}function rf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ai(e))}function Xn(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hp(e,t,a,s),t=t.sibling}function Hp(e,t,a,s){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,a,s),o&2048&&Yi(9,t);break;case 1:Xn(e,t,a,s);break;case 3:Xn(e,t,a,s),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ai(e)));break;case 12:if(o&2048){Xn(e,t,a,s),e=t.stateNode;try{var f=t.memoizedProps,v=f.id,S=f.onPostCommit;typeof S=="function"&&S(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Qe(t,t.return,A)}}else Xn(e,t,a,s);break;case 13:Xn(e,t,a,s);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?f._visibility&2?Xn(e,t,a,s):Ki(e,t):f._visibility&2?Xn(e,t,a,s):(f._visibility|=2,As(e,t,a,s,(t.subtreeFlags&10256)!==0)),o&2048&&sf(v,t);break;case 24:Xn(e,t,a,s),o&2048&&rf(t.alternate,t);break;default:Xn(e,t,a,s)}}function As(e,t,a,s,o){for(o=o&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var f=e,v=t,S=a,A=s,k=v.flags;switch(v.tag){case 0:case 11:case 15:As(f,v,S,A,o),Yi(8,v);break;case 23:break;case 22:var $=v.stateNode;v.memoizedState!==null?$._visibility&2?As(f,v,S,A,o):Ki(f,v):($._visibility|=2,As(f,v,S,A,o)),o&&k&2048&&sf(v.alternate,v);break;case 24:As(f,v,S,A,o),o&&k&2048&&rf(v.alternate,v);break;default:As(f,v,S,A,o)}t=t.sibling}}function Ki(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,o=s.flags;switch(s.tag){case 22:Ki(a,s),o&2048&&sf(s.alternate,s);break;case 24:Ki(a,s),o&2048&&rf(s.alternate,s);break;default:Ki(a,s)}t=t.sibling}}var Gi=8192;function Rs(e){if(e.subtreeFlags&Gi)for(e=e.child;e!==null;)Qp(e),e=e.sibling}function Qp(e){switch(e.tag){case 26:Rs(e),e.flags&Gi&&e.memoizedState!==null&&o2(On,e.memoizedState,e.memoizedProps);break;case 5:Rs(e);break;case 3:case 4:var t=On;On=zo(e.stateNode.containerInfo),Rs(e),On=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Gi,Gi=16777216,Rs(e),Gi=t):Rs(e));break;default:Rs(e)}}function $p(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];pt=s,Vp(s,e)}$p(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yp(e),e=e.sibling}function Yp(e){switch(e.tag){case 0:case 11:case 15:Fi(e),e.flags&2048&&Pa(9,e,e.return);break;case 3:Fi(e);break;case 12:Fi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,_o(e)):Fi(e);break;default:Fi(e)}}function _o(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];pt=s,Vp(s,e)}$p(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pa(8,t,t.return),_o(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,_o(t));break;default:_o(t)}e=e.sibling}}function Vp(e,t){for(;pt!==null;){var a=pt;switch(a.tag){case 0:case 11:case 15:Pa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ai(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,pt=s;else e:for(a=e;pt!==null;){s=pt;var o=s.sibling,f=s.return;if(kp(s),s===a){pt=null;break e}if(o!==null){o.return=f,pt=o;break e}pt=f}}}var Cb={getCacheForType:function(e){var t=Tt(ct),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},_b=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ve=null,we=null,Ne=0,ke=0,an=null,Wa=!1,Os=!1,of=!1,Ea=0,We=0,el=0,Hl=0,uf=0,_n=0,Ms=0,Xi=null,Yt=null,cf=!1,ff=0,No=1/0,jo=null,tl=null,xt=0,nl=null,Ds=null,Ls=0,df=0,hf=null,Kp=null,Zi=0,mf=null;function ln(){if((Le&2)!==0&&Ne!==0)return Ne&-Ne;if(q.T!==null){var e=Ss;return e!==0?e:Sf()}return Se()}function Gp(){_n===0&&(_n=(Ne&536870912)===0||Me?Ba():536870912);var e=Cn.current;return e!==null&&(e.flags|=32),_n}function sn(e,t,a){(e===Ve&&(ke===2||ke===9)||e.cancelPendingCommit!==null)&&(ks(e,0),al(e,Ne,_n,!1)),pn(e,a),((Le&2)===0||e!==Ve)&&(e===Ve&&((Le&2)===0&&(Hl|=a),We===4&&al(e,Ne,_n,!1)),Zn(e))}function Fp(e,t,a){if((Le&6)!==0)throw Error(r(327));var s=!a&&(t&124)===0&&(t&e.expiredLanes)===0||An(e,t),o=s?Tb(e,t):vf(e,t,!0),f=s;do{if(o===0){Os&&!s&&al(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!Nb(a)){o=vf(e,t,!1),f=!1;continue}if(o===2){if(f=t,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var S=e;o=Xi;var A=S.current.memoizedState.isDehydrated;if(A&&(ks(S,v).flags|=256),v=vf(S,v,!1),v!==2){if(of&&!A){S.errorRecoveryDisabledLanes|=f,Hl|=f,o=4;break e}f=Yt,Yt=o,f!==null&&(Yt===null?Yt=f:Yt.push.apply(Yt,f))}o=v}if(f=!1,o!==2)continue}}if(o===1){ks(e,0),al(e,t,0,!0);break}e:{switch(s=e,f=o,f){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:al(s,t,_n,!Wa);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=ff+300-Dt(),10<o)){if(al(s,t,_n,!Wa),ra(s,0,!0)!==0)break e;s.timeoutHandle=w0(Xp.bind(null,s,a,Yt,jo,cf,t,_n,Hl,Ms,Wa,f,2,-0,0),o);break e}Xp(s,a,Yt,jo,cf,t,_n,Hl,Ms,Wa,f,0,-0,0)}}break}while(!0);Zn(e)}function Xp(e,t,a,s,o,f,v,S,A,k,$,K,U,z){if(e.timeoutHandle=-1,K=t.subtreeFlags,(K&8192||(K&16785408)===16785408)&&(nr={stylesheets:null,count:0,unsuspend:r2},Qp(t),K=u2(),K!==null)){e.cancelPendingCommit=K(t0.bind(null,e,t,f,a,s,o,v,S,A,$,1,U,z)),al(e,f,v,!k);return}t0(e,t,f,a,s,o,v,S,A)}function Nb(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var o=a[s],f=o.getSnapshot;o=o.value;try{if(!Wt(f(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function al(e,t,a,s){t&=~uf,t&=~Hl,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var o=t;0<o;){var f=31-tt(o),v=1<<f;s[f]=-1,o&=~v}a!==0&&El(e,a,t)}function To(){return(Le&6)===0?(Pi(0),!1):!0}function pf(){if(we!==null){if(ke===0)var e=we.return;else e=we,pa=Ll=null,Oc(e),js=null,Hi=0,e=we;for(;e!==null;)jp(e.alternate,e),e=e.return;we=null}}function ks(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Vb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),pf(),Ve=e,we=a=da(e.current,null),Ne=t,ke=0,an=null,Wa=!1,Os=An(e,t),of=!1,Ms=_n=uf=Hl=el=We=0,Yt=Xi=null,cf=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var o=31-tt(s),f=1<<o;t|=e[o],s&=~f}return Ea=t,Zr(),a}function Zp(e,t){be=null,q.H=po,t===Oi||t===lo?(t=dm(),ke=3):t===um?(t=dm(),ke=4):ke=t===hp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,an=t,we===null&&(We=1,xo(e,xn(t,e.current)))}function Pp(){var e=q.H;return q.H=po,e===null?po:e}function Jp(){var e=q.A;return q.A=Cb,e}function yf(){We=4,Wa||(Ne&4194048)!==Ne&&Cn.current!==null||(Os=!0),(el&134217727)===0&&(Hl&134217727)===0||Ve===null||al(Ve,Ne,_n,!1)}function vf(e,t,a){var s=Le;Le|=2;var o=Pp(),f=Jp();(Ve!==e||Ne!==t)&&(jo=null,ks(e,t)),t=!1;var v=We;e:do try{if(ke!==0&&we!==null){var S=we,A=an;switch(ke){case 8:pf(),v=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(t=!0);var k=ke;if(ke=0,an=null,Us(e,S,A,k),a&&Os){v=0;break e}break;default:k=ke,ke=0,an=null,Us(e,S,A,k)}}jb(),v=We;break}catch($){Zp(e,$)}while(!0);return t&&e.shellSuspendCounter++,pa=Ll=null,Le=s,q.H=o,q.A=f,we===null&&(Ve=null,Ne=0,Zr()),v}function jb(){for(;we!==null;)Ip(we)}function Tb(e,t){var a=Le;Le|=2;var s=Pp(),o=Jp();Ve!==e||Ne!==t?(jo=null,No=Dt()+500,ks(e,t)):Os=An(e,t);e:do try{if(ke!==0&&we!==null){t=we;var f=an;t:switch(ke){case 1:ke=0,an=null,Us(e,t,f,1);break;case 2:case 9:if(cm(f)){ke=0,an=null,Wp(t);break}t=function(){ke!==2&&ke!==9||Ve!==e||(ke=7),Zn(e)},f.then(t,t);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:cm(f)?(ke=0,an=null,Wp(t)):(ke=0,an=null,Us(e,t,f,7));break;case 5:var v=null;switch(we.tag){case 26:v=we.memoizedState;case 5:case 27:var S=we;if(!v||L0(v)){ke=0,an=null;var A=S.sibling;if(A!==null)we=A;else{var k=S.return;k!==null?(we=k,Ao(k)):we=null}break t}}ke=0,an=null,Us(e,t,f,5);break;case 6:ke=0,an=null,Us(e,t,f,6);break;case 8:pf(),We=6;break e;default:throw Error(r(462))}}Ab();break}catch($){Zp(e,$)}while(!0);return pa=Ll=null,q.H=s,q.A=o,Le=a,we!==null?0:(Ve=null,Ne=0,Zr(),We)}function Ab(){for(;we!==null&&!di();)Ip(we)}function Ip(e){var t=_p(e.alternate,e,Ea);e.memoizedProps=e.pendingProps,t===null?Ao(e):we=t}function Wp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=bp(a,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=bp(a,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:Oc(t);default:jp(a,t),t=we=em(t,Ea),t=_p(a,t,Ea)}e.memoizedProps=e.pendingProps,t===null?Ao(e):we=t}function Us(e,t,a,s){pa=Ll=null,Oc(t),js=null,Hi=0;var o=t.return;try{if(gb(e,o,t,a,Ne)){We=1,xo(e,xn(a,e.current)),we=null;return}}catch(f){if(o!==null)throw we=o,f;We=1,xo(e,xn(a,e.current)),we=null;return}t.flags&32768?(Me||s===1?e=!0:Os||(Ne&536870912)!==0?e=!1:(Wa=e=!0,(s===2||s===9||s===3||s===6)&&(s=Cn.current,s!==null&&s.tag===13&&(s.flags|=16384))),e0(t,e)):Ao(t)}function Ao(e){var t=e;do{if((t.flags&32768)!==0){e0(t,Wa);return}e=t.return;var a=xb(t.alternate,t,Ea);if(a!==null){we=a;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);We===0&&(We=5)}function e0(e,t){do{var a=Sb(e.alternate,e);if(a!==null){a.flags&=32767,we=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=a}while(e!==null);We=6,we=null}function t0(e,t,a,s,o,f,v,S,A){e.cancelPendingCommit=null;do Ro();while(xt!==0);if((Le&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(f=t.lanes|t.childLanes,f|=ic,wl(e,a,f,v,S,A),e===Ve&&(we=Ve=null,Ne=0),Ds=t,nl=e,Ls=a,df=f,hf=o,Kp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Db($n,function(){return i0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null,o=F.p,F.p=2,v=Le,Le|=4;try{wb(e,t,a)}finally{Le=v,F.p=o,q.T=s}}xt=1,n0(),a0(),l0()}}function n0(){if(xt===1){xt=0;var e=nl,t=Ds,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=q.T,q.T=null;var s=F.p;F.p=2;var o=Le;Le|=4;try{qp(t,e);var f=Af,v=Vh(e.containerInfo),S=f.focusedElem,A=f.selectionRange;if(v!==S&&S&&S.ownerDocument&&Yh(S.ownerDocument.documentElement,S)){if(A!==null&&tc(S)){var k=A.start,$=A.end;if($===void 0&&($=k),"selectionStart"in S)S.selectionStart=k,S.selectionEnd=Math.min($,S.value.length);else{var K=S.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var z=U.getSelection(),de=S.textContent.length,ue=Math.min(A.start,de),He=A.end===void 0?ue:Math.min(A.end,de);!z.extend&&ue>He&&(v=He,He=ue,ue=v);var M=$h(S,ue),O=$h(S,He);if(M&&O&&(z.rangeCount!==1||z.anchorNode!==M.node||z.anchorOffset!==M.offset||z.focusNode!==O.node||z.focusOffset!==O.offset)){var L=K.createRange();L.setStart(M.node,M.offset),z.removeAllRanges(),ue>He?(z.addRange(L),z.extend(O.node,O.offset)):(L.setEnd(O.node,O.offset),z.addRange(L))}}}}for(K=[],z=S;z=z.parentNode;)z.nodeType===1&&K.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<K.length;S++){var Y=K[S];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}$o=!!Tf,Af=Tf=null}finally{Le=o,F.p=s,q.T=a}}e.current=t,xt=2}}function a0(){if(xt===2){xt=0;var e=nl,t=Ds,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=q.T,q.T=null;var s=F.p;F.p=2;var o=Le;Le|=4;try{Lp(e,t.alternate,t)}finally{Le=o,F.p=s,q.T=a}}xt=3}}function l0(){if(xt===4||xt===3){xt=0,Mt();var e=nl,t=Ds,a=Ls,s=Kp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?xt=5:(xt=0,Ds=nl=null,s0(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(tl=null),ie(a),t=t.stateNode,Je&&typeof Je.onCommitFiberRoot=="function")try{Je.onCommitFiberRoot(hn,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=q.T,o=F.p,F.p=2,q.T=null;try{for(var f=e.onRecoverableError,v=0;v<s.length;v++){var S=s[v];f(S.value,{componentStack:S.stack})}}finally{q.T=t,F.p=o}}(Ls&3)!==0&&Ro(),Zn(e),o=e.pendingLanes,(a&4194090)!==0&&(o&42)!==0?e===mf?Zi++:(Zi=0,mf=e):Zi=0,Pi(0)}}function s0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ai(t)))}function Ro(e){return n0(),a0(),l0(),i0()}function i0(){if(xt!==5)return!1;var e=nl,t=df;df=0;var a=ie(Ls),s=q.T,o=F.p;try{F.p=32>a?32:a,q.T=null,a=hf,hf=null;var f=nl,v=Ls;if(xt=0,Ds=nl=null,Ls=0,(Le&6)!==0)throw Error(r(331));var S=Le;if(Le|=4,Yp(f.current),Hp(f,f.current,v,a),Le=S,Pi(0,!1),Je&&typeof Je.onPostCommitFiberRoot=="function")try{Je.onPostCommitFiberRoot(hn,f)}catch{}return!0}finally{F.p=o,q.T=s,s0(e,t)}}function r0(e,t,a){t=xn(a,t),t=Kc(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(pn(e,2),Zn(e))}function Qe(e,t,a){if(e.tag===3)r0(e,e,a);else for(;t!==null;){if(t.tag===3){r0(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(tl===null||!tl.has(s))){e=xn(a,e),a=fp(2),s=Ga(t,a,2),s!==null&&(dp(a,s,t,e),pn(s,2),Zn(s));break}}t=t.return}}function gf(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new _b;var o=new Set;s.set(t,o)}else o=s.get(t),o===void 0&&(o=new Set,s.set(t,o));o.has(a)||(of=!0,o.add(a),e=Rb.bind(null,e,t,a),t.then(e,e))}function Rb(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ve===e&&(Ne&a)===a&&(We===4||We===3&&(Ne&62914560)===Ne&&300>Dt()-ff?(Le&2)===0&&ks(e,0):uf|=a,Ms===Ne&&(Ms=0)),Zn(e)}function o0(e,t){t===0&&(t=oa()),e=vs(e,t),e!==null&&(pn(e,t),Zn(e))}function Ob(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),o0(e,a)}function Mb(e,t){var a=0;switch(e.tag){case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),o0(e,a)}function Db(e,t){return sa(e,t)}var Oo=null,zs=null,bf=!1,Mo=!1,xf=!1,Ql=0;function Zn(e){e!==zs&&e.next===null&&(zs===null?Oo=zs=e:zs=zs.next=e),Mo=!0,bf||(bf=!0,kb())}function Pi(e,t){if(!xf&&Mo){xf=!0;do for(var a=!1,s=Oo;s!==null;){if(e!==0){var o=s.pendingLanes;if(o===0)var f=0;else{var v=s.suspendedLanes,S=s.pingedLanes;f=(1<<31-tt(42|e)+1)-1,f&=o&~(v&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,d0(s,f))}else f=Ne,f=ra(s,s===Ve?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||An(s,f)||(a=!0,d0(s,f));s=s.next}while(a);xf=!1}}function Lb(){u0()}function u0(){Mo=bf=!1;var e=0;Ql!==0&&(Yb()&&(e=Ql),Ql=0);for(var t=Dt(),a=null,s=Oo;s!==null;){var o=s.next,f=c0(s,t);f===0?(s.next=null,a===null?Oo=o:a.next=o,o===null&&(zs=a)):(a=s,(e!==0||(f&3)!==0)&&(Mo=!0)),s=o}Pi(e)}function c0(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,o=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-tt(f),S=1<<v,A=o[v];A===-1?((S&a)===0||(S&s)!==0)&&(o[v]=qa(S,t)):A<=t&&(e.expiredLanes|=S),f&=~S}if(t=Ve,a=Ne,a=ra(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(ke===2||ke===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&dn(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||An(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&dn(s),ie(a)){case 2:case 8:a=Ye;break;case 32:a=$n;break;case 268435456:a=ka;break;default:a=$n}return s=f0.bind(null,e),a=sa(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&dn(s),e.callbackPriority=2,e.callbackNode=null,2}function f0(e,t){if(xt!==0&&xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ro()&&e.callbackNode!==a)return null;var s=Ne;return s=ra(e,e===Ve?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Fp(e,s,t),c0(e,Dt()),e.callbackNode!=null&&e.callbackNode===a?f0.bind(null,e):null)}function d0(e,t){if(Ro())return null;Fp(e,t,!0)}function kb(){Kb(function(){(Le&6)!==0?sa(Qn,Lb):u0()})}function Sf(){return Ql===0&&(Ql=Ba()),Ql}function h0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$r(""+e)}function m0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Ub(e,t,a,s,o){if(t==="submit"&&a&&a.stateNode===o){var f=h0((o[te]||null).action),v=s.submitter;v&&(t=(t=v[te]||null)?h0(t.formAction):v.getAttribute("formAction"),t!==null&&(f=t,v=null));var S=new Gr("action","action",null,s,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ql!==0){var A=v?m0(o,v):new FormData(o);Hc(a,{pending:!0,data:A,method:o.method,action:f},null,A)}}else typeof f=="function"&&(S.preventDefault(),A=v?m0(o,v):new FormData(o),Hc(a,{pending:!0,data:A,method:o.method,action:f},f,A))},currentTarget:o}]})}}for(var wf=0;wf<sc.length;wf++){var Ef=sc[wf],zb=Ef.toLowerCase(),qb=Ef[0].toUpperCase()+Ef.slice(1);Rn(zb,"on"+qb)}Rn(Fh,"onAnimationEnd"),Rn(Xh,"onAnimationIteration"),Rn(Zh,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(tb,"onTransitionRun"),Rn(nb,"onTransitionStart"),Rn(ab,"onTransitionCancel"),Rn(Ph,"onTransitionEnd"),ua("onMouseEnter",["mouseout","mouseover"]),ua("onMouseLeave",["mouseout","mouseover"]),ua("onPointerEnter",["pointerout","pointerover"]),ua("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ji="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(" "),Bb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ji));function p0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],o=s.event;s=s.listeners;e:{var f=void 0;if(t)for(var v=s.length-1;0<=v;v--){var S=s[v],A=S.instance,k=S.currentTarget;if(S=S.listener,A!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=k;try{f(o)}catch($){bo($)}o.currentTarget=null,f=A}else for(v=0;v<s.length;v++){if(S=s[v],A=S.instance,k=S.currentTarget,S=S.listener,A!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=k;try{f(o)}catch($){bo($)}o.currentTarget=null,f=A}}}}function Ee(e,t){var a=t[Xe];a===void 0&&(a=t[Xe]=new Set);var s=e+"__bubble";a.has(s)||(y0(t,e,2,!1),a.add(s))}function Cf(e,t,a){var s=0;t&&(s|=4),y0(a,e,s,t)}var Do="_reactListening"+Math.random().toString(36).slice(2);function _f(e){if(!e[Do]){e[Do]=!0,mi.forEach(function(a){a!=="selectionchange"&&(Bb.has(a)||Cf(a,!1,e),Cf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Do]||(t[Do]=!0,Cf("selectionchange",!1,t))}}function y0(e,t,a,s){switch(H0(t)){case 2:var o=d2;break;case 8:o=h2;break;default:o=Bf}a=o.bind(null,t,a,e),o=void 0,!Gu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),s?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Nf(e,t,a,s,o){var f=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var S=s.stateNode.containerInfo;if(S===o)break;if(v===4)for(v=s.return;v!==null;){var A=v.tag;if((A===3||A===4)&&v.stateNode.containerInfo===o)return;v=v.return}for(;S!==null;){if(v=Re(S),v===null)return;if(A=v.tag,A===5||A===6||A===26||A===27){s=f=v;continue e}S=S.parentNode}}s=s.return}Eh(function(){var k=f,$=Vu(a),K=[];e:{var U=Jh.get(e);if(U!==void 0){var z=Gr,de=e;switch(e){case"keypress":if(Vr(a)===0)break e;case"keydown":case"keyup":z=Dg;break;case"focusin":de="focus",z=Pu;break;case"focusout":de="blur",z=Pu;break;case"beforeblur":case"afterblur":z=Pu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=Nh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Sg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=Ug;break;case Fh:case Xh:case Zh:z=Cg;break;case Ph:z=qg;break;case"scroll":case"scrollend":z=bg;break;case"wheel":z=Hg;break;case"copy":case"cut":case"paste":z=Ng;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Th;break;case"toggle":case"beforetoggle":z=$g}var ue=(t&4)!==0,He=!ue&&(e==="scroll"||e==="scrollend"),M=ue?U!==null?U+"Capture":null:U;ue=[];for(var O=k,L;O!==null;){var Y=O;if(L=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||L===null||M===null||(Y=yi(O,M),Y!=null&&ue.push(Ii(O,Y,L))),He)break;O=O.return}0<ue.length&&(U=new z(U,de,null,a,$),K.push({event:U,listeners:ue}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",U&&a!==Yu&&(de=a.relatedTarget||a.fromElement)&&(Re(de)||de[ce]))break e;if((z||U)&&(U=$.window===$?$:(U=$.ownerDocument)?U.defaultView||U.parentWindow:window,z?(de=a.relatedTarget||a.toElement,z=k,de=de?Re(de):null,de!==null&&(He=c(de),ue=de.tag,de!==He||ue!==5&&ue!==27&&ue!==6)&&(de=null)):(z=null,de=k),z!==de)){if(ue=Nh,Y="onMouseLeave",M="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(ue=Th,Y="onPointerLeave",M="onPointerEnter",O="pointer"),He=z==null?U:Cl(z),L=de==null?U:Cl(de),U=new ue(Y,O+"leave",z,a,$),U.target=He,U.relatedTarget=L,Y=null,Re($)===k&&(ue=new ue(M,O+"enter",de,a,$),ue.target=L,ue.relatedTarget=He,Y=ue),He=Y,z&&de)t:{for(ue=z,M=de,O=0,L=ue;L;L=qs(L))O++;for(L=0,Y=M;Y;Y=qs(Y))L++;for(;0<O-L;)ue=qs(ue),O--;for(;0<L-O;)M=qs(M),L--;for(;O--;){if(ue===M||M!==null&&ue===M.alternate)break t;ue=qs(ue),M=qs(M)}ue=null}else ue=null;z!==null&&v0(K,U,z,ue,!1),de!==null&&He!==null&&v0(K,He,de,ue,!0)}}e:{if(U=k?Cl(k):window,z=U.nodeName&&U.nodeName.toLowerCase(),z==="select"||z==="input"&&U.type==="file")var ee=Uh;else if(Lh(U))if(zh)ee=Ig;else{ee=Pg;var xe=Zg}else z=U.nodeName,!z||z.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?k&&$u(k.elementType)&&(ee=Uh):ee=Jg;if(ee&&(ee=ee(e,k))){kh(K,ee,a,$);break e}xe&&xe(e,U,k),e==="focusout"&&k&&U.type==="number"&&k.memoizedProps.value!=null&&Qu(U,"number",U.value)}switch(xe=k?Cl(k):window,e){case"focusin":(Lh(xe)||xe.contentEditable==="true")&&(ms=xe,nc=k,Ci=null);break;case"focusout":Ci=nc=ms=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,Kh(K,a,$);break;case"selectionchange":if(eb)break;case"keydown":case"keyup":Kh(K,a,$)}var le;if(Iu)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else hs?Mh(e,a)&&(fe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(fe="onCompositionStart");fe&&(Ah&&a.locale!=="ko"&&(hs||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&hs&&(le=Ch()):($a=$,Fu="value"in $a?$a.value:$a.textContent,hs=!0)),xe=Lo(k,fe),0<xe.length&&(fe=new jh(fe,e,null,a,$),K.push({event:fe,listeners:xe}),le?fe.data=le:(le=Dh(a),le!==null&&(fe.data=le)))),(le=Vg?Kg(e,a):Gg(e,a))&&(fe=Lo(k,"onBeforeInput"),0<fe.length&&(xe=new jh("onBeforeInput","beforeinput",null,a,$),K.push({event:xe,listeners:fe}),xe.data=le)),Ub(K,e,k,a,$)}p0(K,t)})}function Ii(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Lo(e,t){for(var a=t+"Capture",s=[];e!==null;){var o=e,f=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||f===null||(o=yi(e,a),o!=null&&s.unshift(Ii(e,o,f)),o=yi(e,t),o!=null&&s.push(Ii(e,o,f))),e.tag===3)return s;e=e.return}return[]}function qs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function v0(e,t,a,s,o){for(var f=t._reactName,v=[];a!==null&&a!==s;){var S=a,A=S.alternate,k=S.stateNode;if(S=S.tag,A!==null&&A===s)break;S!==5&&S!==26&&S!==27||k===null||(A=k,o?(k=yi(a,f),k!=null&&v.unshift(Ii(a,k,A))):o||(k=yi(a,f),k!=null&&v.push(Ii(a,k,A)))),a=a.return}v.length!==0&&e.push({event:t,listeners:v})}var Hb=/\r\n?/g,Qb=/\u0000|\uFFFD/g;function g0(e){return(typeof e=="string"?e:""+e).replace(Hb,`
9
- `).replace(Qb,"")}function b0(e,t){return t=g0(t),g0(e)===t}function ko(){}function Be(e,t,a,s,o,f){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||cs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&cs(e,""+s);break;case"className":Qa(e,"class",s);break;case"tabIndex":Qa(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Qa(e,a,s);break;case"style":Sh(e,s,f);break;case"data":if(t!=="object"){Qa(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=$r(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(t!=="input"&&Be(e,t,"name",o.name,o,null),Be(e,t,"formEncType",o.formEncType,o,null),Be(e,t,"formMethod",o.formMethod,o,null),Be(e,t,"formTarget",o.formTarget,o,null)):(Be(e,t,"encType",o.encType,o,null),Be(e,t,"method",o.method,o,null),Be(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=$r(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=ko);break;case"onScroll":s!=null&&Ee("scroll",e);break;case"onScrollEnd":s!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=$r(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),rs(e,"popover",s);break;case"xlinkActuate":ca(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ca(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ca(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ca(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ca(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ca(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ca(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ca(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ca(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":rs(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=vg.get(a)||a,rs(e,a,s))}}function jf(e,t,a,s,o,f){switch(a){case"style":Sh(e,s,f);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof s=="string"?cs(e,s):(typeof s=="number"||typeof s=="bigint")&&cs(e,""+s);break;case"onScroll":s!=null&&Ee("scroll",e);break;case"onScrollEnd":s!=null&&Ee("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ko);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pi.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),f=e[te]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,o),typeof s=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,o);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):rs(e,a,s)}}}function St(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var s=!1,o=!1,f;for(f in a)if(a.hasOwnProperty(f)){var v=a[f];if(v!=null)switch(f){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Be(e,t,f,v,a,null)}}o&&Be(e,t,"srcSet",a.srcSet,a,null),s&&Be(e,t,"src",a.src,a,null);return;case"input":Ee("invalid",e);var S=f=v=o=null,A=null,k=null;for(s in a)if(a.hasOwnProperty(s)){var $=a[s];if($!=null)switch(s){case"name":o=$;break;case"type":v=$;break;case"checked":A=$;break;case"defaultChecked":k=$;break;case"value":f=$;break;case"defaultValue":S=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,t));break;default:Be(e,t,s,$,a,null)}}vh(e,f,S,A,k,v,o,!1),Hr(e);return;case"select":Ee("invalid",e),s=v=f=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":f=S;break;case"defaultValue":v=S;break;case"multiple":s=S;default:Be(e,t,o,S,a,null)}t=f,a=v,e.multiple=!!s,t!=null?us(e,!!s,t,!1):a!=null&&us(e,!!s,a,!0);return;case"textarea":Ee("invalid",e),f=o=s=null;for(v in a)if(a.hasOwnProperty(v)&&(S=a[v],S!=null))switch(v){case"value":s=S;break;case"defaultValue":o=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Be(e,t,v,S,a,null)}bh(e,s,o,f),Hr(e);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(s=a[A],s!=null))switch(A){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Be(e,t,A,s,a,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(s=0;s<Ji.length;s++)Ee(Ji[s],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(k in a)if(a.hasOwnProperty(k)&&(s=a[k],s!=null))switch(k){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Be(e,t,k,s,a,null)}return;default:if($u(t)){for($ in a)a.hasOwnProperty($)&&(s=a[$],s!==void 0&&jf(e,t,$,s,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(s=a[S],s!=null&&Be(e,t,S,s,a,null))}function $b(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,f=null,v=null,S=null,A=null,k=null,$=null;for(z in a){var K=a[z];if(a.hasOwnProperty(z)&&K!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":A=K;default:s.hasOwnProperty(z)||Be(e,t,z,null,s,K)}}for(var U in s){var z=s[U];if(K=a[U],s.hasOwnProperty(U)&&(z!=null||K!=null))switch(U){case"type":f=z;break;case"name":o=z;break;case"checked":k=z;break;case"defaultChecked":$=z;break;case"value":v=z;break;case"defaultValue":S=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:z!==K&&Be(e,t,U,z,s,K)}}Hu(e,v,S,A,k,$,f,o);return;case"select":z=v=S=U=null;for(f in a)if(A=a[f],a.hasOwnProperty(f)&&A!=null)switch(f){case"value":break;case"multiple":z=A;default:s.hasOwnProperty(f)||Be(e,t,f,null,s,A)}for(o in s)if(f=s[o],A=a[o],s.hasOwnProperty(o)&&(f!=null||A!=null))switch(o){case"value":U=f;break;case"defaultValue":S=f;break;case"multiple":v=f;default:f!==A&&Be(e,t,o,f,s,A)}t=S,a=v,s=z,U!=null?us(e,!!a,U,!1):!!s!=!!a&&(t!=null?us(e,!!a,t,!0):us(e,!!a,a?[]:"",!1));return;case"textarea":z=U=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Be(e,t,S,null,s,o)}for(v in s)if(o=s[v],f=a[v],s.hasOwnProperty(v)&&(o!=null||f!=null))switch(v){case"value":U=o;break;case"defaultValue":z=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==f&&Be(e,t,v,o,s,f)}gh(e,U,z);return;case"option":for(var de in a)if(U=a[de],a.hasOwnProperty(de)&&U!=null&&!s.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Be(e,t,de,null,s,U)}for(A in s)if(U=s[A],z=a[A],s.hasOwnProperty(A)&&U!==z&&(U!=null||z!=null))switch(A){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Be(e,t,A,U,s,z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ue in a)U=a[ue],a.hasOwnProperty(ue)&&U!=null&&!s.hasOwnProperty(ue)&&Be(e,t,ue,null,s,U);for(k in s)if(U=s[k],z=a[k],s.hasOwnProperty(k)&&U!==z&&(U!=null||z!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Be(e,t,k,U,s,z)}return;default:if($u(t)){for(var He in a)U=a[He],a.hasOwnProperty(He)&&U!==void 0&&!s.hasOwnProperty(He)&&jf(e,t,He,void 0,s,U);for($ in s)U=s[$],z=a[$],!s.hasOwnProperty($)||U===z||U===void 0&&z===void 0||jf(e,t,$,U,s,z);return}}for(var M in a)U=a[M],a.hasOwnProperty(M)&&U!=null&&!s.hasOwnProperty(M)&&Be(e,t,M,null,s,U);for(K in s)U=s[K],z=a[K],!s.hasOwnProperty(K)||U===z||U==null&&z==null||Be(e,t,K,U,s,z)}var Tf=null,Af=null;function Uo(e){return e.nodeType===9?e:e.ownerDocument}function x0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function S0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Rf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Of=null;function Yb(){var e=window.event;return e&&e.type==="popstate"?e===Of?!1:(Of=e,!0):(Of=null,!1)}var w0=typeof setTimeout=="function"?setTimeout:void 0,Vb=typeof clearTimeout=="function"?clearTimeout:void 0,E0=typeof Promise=="function"?Promise:void 0,Kb=typeof queueMicrotask=="function"?queueMicrotask:typeof E0<"u"?function(e){return E0.resolve(null).then(e).catch(Gb)}:w0;function Gb(e){setTimeout(function(){throw e})}function ll(e){return e==="head"}function C0(e,t){var a=t,s=0,o=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"){if(0<s&&8>s){a=s;var v=e.ownerDocument;if(a&1&&Wi(v.documentElement),a&2&&Wi(v.body),a&4)for(a=v.head,Wi(a),v=a.firstChild;v;){var S=v.nextSibling,A=v.nodeName;v[at]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&v.rel.toLowerCase()==="stylesheet"||a.removeChild(v),v=S}}if(o===0){e.removeChild(f),rr(t);return}o--}else a==="$"||a==="$?"||a==="$!"?o++:s=a.charCodeAt(0)-48;else s=0;a=f}while(a);rr(t)}function Mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Mf(a),jt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Fb(e,t,a,s){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[at])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Mn(e.nextSibling),e===null)break}return null}function Xb(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Mn(e.nextSibling),e===null))return null;return e}function Df(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Zb(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Mn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Lf=null;function _0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function N0(e,t,a){switch(t=Uo(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Wi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jt(e)}var Nn=new Map,j0=new Set;function zo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ca=F.d;F.d={f:Pb,r:Jb,D:Ib,C:Wb,L:e2,m:t2,X:a2,S:n2,M:l2};function Pb(){var e=Ca.f(),t=To();return e||t}function Jb(e){var t=It(e);t!==null&&t.tag===5&&t.type==="form"?Fm(t):Ca.r(e)}var Bs=typeof document>"u"?null:document;function T0(e,t,a){var s=Bs;if(s&&typeof t=="string"&&t){var o=bn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),j0.has(o)||(j0.add(o),e={rel:e,crossOrigin:a,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),St(t,"link",e),lt(t),s.head.appendChild(t)))}}function Ib(e){Ca.D(e),T0("dns-prefetch",e,null)}function Wb(e,t){Ca.C(e,t),T0("preconnect",e,t)}function e2(e,t,a){Ca.L(e,t,a);var s=Bs;if(s&&e&&t){var o='link[rel="preload"][as="'+bn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+bn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+bn(a.imageSizes)+'"]')):o+='[href="'+bn(e)+'"]';var f=o;switch(t){case"style":f=Hs(e);break;case"script":f=Qs(e)}Nn.has(f)||(e=g({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Nn.set(f,e),s.querySelector(o)!==null||t==="style"&&s.querySelector(er(f))||t==="script"&&s.querySelector(tr(f))||(t=s.createElement("link"),St(t,"link",e),lt(t),s.head.appendChild(t)))}}function t2(e,t){Ca.m(e,t);var a=Bs;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+bn(s)+'"][href="'+bn(e)+'"]',f=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Qs(e)}if(!Nn.has(f)&&(e=g({rel:"modulepreload",href:e},t),Nn.set(f,e),a.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(tr(f)))return}s=a.createElement("link"),St(s,"link",e),lt(s),a.head.appendChild(s)}}}function n2(e,t,a){Ca.S(e,t,a);var s=Bs;if(s&&e){var o=Ha(s).hoistableStyles,f=Hs(e);t=t||"default";var v=o.get(f);if(!v){var S={loading:0,preload:null};if(v=s.querySelector(er(f)))S.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Nn.get(f))&&kf(e,a);var A=v=s.createElement("link");lt(A),St(A,"link",e),A._p=new Promise(function(k,$){A.onload=k,A.onerror=$}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,qo(v,t,s)}v={type:"stylesheet",instance:v,count:1,state:S},o.set(f,v)}}}function a2(e,t){Ca.X(e,t);var a=Bs;if(a&&e){var s=Ha(a).hoistableScripts,o=Qs(e),f=s.get(o);f||(f=a.querySelector(tr(o)),f||(e=g({src:e,async:!0},t),(t=Nn.get(o))&&Uf(e,t),f=a.createElement("script"),lt(f),St(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(o,f))}}function l2(e,t){Ca.M(e,t);var a=Bs;if(a&&e){var s=Ha(a).hoistableScripts,o=Qs(e),f=s.get(o);f||(f=a.querySelector(tr(o)),f||(e=g({src:e,async:!0,type:"module"},t),(t=Nn.get(o))&&Uf(e,t),f=a.createElement("script"),lt(f),St(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(o,f))}}function A0(e,t,a,s){var o=(o=oe.current)?zo(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Hs(a.href),a=Ha(o).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Hs(a.href);var f=Ha(o).hoistableStyles,v=f.get(e);if(v||(o=o.ownerDocument||o,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,v),(f=o.querySelector(er(e)))&&!f._p&&(v.instance=f,v.state.loading=5),Nn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Nn.set(e,a),f||s2(o,e,a,v.state))),t&&s===null)throw Error(r(528,""));return v}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Qs(a),a=Ha(o).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Hs(e){return'href="'+bn(e)+'"'}function er(e){return'link[rel="stylesheet"]['+e+"]"}function R0(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function s2(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),St(t,"link",a),lt(t),e.head.appendChild(t))}function Qs(e){return'[src="'+bn(e)+'"]'}function tr(e){return"script[async]"+e}function O0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+bn(a.href)+'"]');if(s)return t.instance=s,lt(s),s;var o=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),lt(s),St(s,"style",o),qo(s,a.precedence,e),t.instance=s;case"stylesheet":o=Hs(a.href);var f=e.querySelector(er(o));if(f)return t.state.loading|=4,t.instance=f,lt(f),f;s=R0(a),(o=Nn.get(o))&&kf(s,o),f=(e.ownerDocument||e).createElement("link"),lt(f);var v=f;return v._p=new Promise(function(S,A){v.onload=S,v.onerror=A}),St(f,"link",s),t.state.loading|=4,qo(f,a.precedence,e),t.instance=f;case"script":return f=Qs(a.src),(o=e.querySelector(tr(f)))?(t.instance=o,lt(o),o):(s=a,(o=Nn.get(f))&&(s=g({},a),Uf(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),lt(o),St(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,qo(s,a.precedence,e));return t.instance}function qo(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,f=o,v=0;v<s.length;v++){var S=s[v];if(S.dataset.precedence===t)f=S;else if(f!==o)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function kf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Uf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Bo=null;function M0(e,t,a){if(Bo===null){var s=new Map,o=Bo=new Map;o.set(a,s)}else o=Bo,s=o.get(a),s||(s=new Map,o.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var f=a[o];if(!(f[at]||f[Z]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(t)||"";v=e+v;var S=s.get(v);S?S.push(f):s.set(v,[f])}}return s}function D0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function i2(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function L0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var nr=null;function r2(){}function o2(e,t,a){if(nr===null)throw Error(r(475));var s=nr;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=Hs(a.href),f=e.querySelector(er(o));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(s.count++,s=Ho.bind(s),e.then(s,s)),t.state.loading|=4,t.instance=f,lt(f);return}f=e.ownerDocument||e,a=R0(a),(o=Nn.get(o))&&kf(a,o),f=f.createElement("link"),lt(f);var v=f;v._p=new Promise(function(S,A){v.onload=S,v.onerror=A}),St(f,"link",a),t.instance=f}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(s.count++,t=Ho.bind(s),e.addEventListener("load",t),e.addEventListener("error",t))}}function u2(){if(nr===null)throw Error(r(475));var e=nr;return e.stylesheets&&e.count===0&&zf(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&zf(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Ho(){if(this.count--,this.count===0){if(this.stylesheets)zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qo=null;function zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qo=new Map,t.forEach(c2,e),Qo=null,Ho.call(e))}function c2(e,t){if(!(t.state.loading&4)){var a=Qo.get(e);if(a)var s=a.get(null);else{a=new Map,Qo.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<o.length;f++){var v=o[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),s=v)}s&&a.set(null,s)}o=t.instance,v=o.getAttribute("data-precedence"),f=a.get(v)||s,f===s&&a.set(null,o),a.set(v,o),this.count++,s=Ho.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),f?f.parentNode.insertBefore(o,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ar={$$typeof:D,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function f2(e,t,a,s,o,f,v,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Yn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yn(0),this.hiddenUpdates=Yn(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function k0(e,t,a,s,o,f,v,S,A,k,$,K){return e=new f2(e,t,a,v,S,A,k,K),t=1,f===!0&&(t|=24),f=en(3,null,null,t),e.current=f,f.stateNode=e,t=vc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:s,isDehydrated:a,cache:t},Sc(f),e}function U0(e){return e?(e=gs,e):gs}function z0(e,t,a,s,o,f){o=U0(o),s.context===null?s.context=o:s.pendingContext=o,s=Ka(t),s.payload={element:a},f=f===void 0?null:f,f!==null&&(s.callback=f),a=Ga(e,s,t),a!==null&&(sn(a,e,t),Di(a,e,t))}function q0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function qf(e,t){q0(e,t),(e=e.alternate)&&q0(e,t)}function B0(e){if(e.tag===13){var t=vs(e,67108864);t!==null&&sn(t,e,67108864),qf(e,67108864)}}var $o=!0;function d2(e,t,a,s){var o=q.T;q.T=null;var f=F.p;try{F.p=2,Bf(e,t,a,s)}finally{F.p=f,q.T=o}}function h2(e,t,a,s){var o=q.T;q.T=null;var f=F.p;try{F.p=8,Bf(e,t,a,s)}finally{F.p=f,q.T=o}}function Bf(e,t,a,s){if($o){var o=Hf(s);if(o===null)Nf(e,t,s,Yo,a),Q0(e,s);else if(p2(o,e,t,a,s))s.stopPropagation();else if(Q0(e,s),t&4&&-1<m2.indexOf(e)){for(;o!==null;){var f=It(o);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=ze(f.pendingLanes);if(v!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var A=1<<31-tt(v);S.entanglements[1]|=A,v&=~A}Zn(f),(Le&6)===0&&(No=Dt()+500,Pi(0))}}break;case 13:S=vs(f,2),S!==null&&sn(S,f,2),To(),qf(f,2)}if(f=Hf(s),f===null&&Nf(e,t,s,Yo,a),f===o)break;o=f}o!==null&&s.stopPropagation()}else Nf(e,t,s,null,a)}}function Hf(e){return e=Vu(e),Qf(e)}var Yo=null;function Qf(e){if(Yo=null,e=Re(e),e!==null){var t=c(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Yo=e,null}function H0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ia()){case Qn:return 2;case Ye:return 8;case $n:case xl:return 32;case ka:return 268435456;default:return 32}default:return 32}}var $f=!1,sl=null,il=null,rl=null,lr=new Map,sr=new Map,ol=[],m2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Q0(e,t){switch(e){case"focusin":case"focusout":sl=null;break;case"dragenter":case"dragleave":il=null;break;case"mouseover":case"mouseout":rl=null;break;case"pointerover":case"pointerout":lr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sr.delete(t.pointerId)}}function ir(e,t,a,s,o,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:f,targetContainers:[o]},t!==null&&(t=It(t),t!==null&&B0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function p2(e,t,a,s,o){switch(t){case"focusin":return sl=ir(sl,e,t,a,s,o),!0;case"dragenter":return il=ir(il,e,t,a,s,o),!0;case"mouseover":return rl=ir(rl,e,t,a,s,o),!0;case"pointerover":var f=o.pointerId;return lr.set(f,ir(lr.get(f)||null,e,t,a,s,o)),!0;case"gotpointercapture":return f=o.pointerId,sr.set(f,ir(sr.get(f)||null,e,t,a,s,o)),!0}return!1}function $0(e){var t=Re(e.target);if(t!==null){var a=c(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,Lt(e.priority,function(){if(a.tag===13){var s=ln();s=_t(s);var o=vs(a,s);o!==null&&sn(o,a,s),qf(a,s)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Hf(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Yu=s,a.target.dispatchEvent(s),Yu=null}else return t=It(a),t!==null&&B0(t),e.blockedOn=a,!1;t.shift()}return!0}function Y0(e,t,a){Vo(e)&&a.delete(t)}function y2(){$f=!1,sl!==null&&Vo(sl)&&(sl=null),il!==null&&Vo(il)&&(il=null),rl!==null&&Vo(rl)&&(rl=null),lr.forEach(Y0),sr.forEach(Y0)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,$f||($f=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,y2)))}var Go=null;function V0(e){Go!==e&&(Go=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Go===e&&(Go=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if(Qf(s||a)===null)continue;break}var f=It(a);f!==null&&(e.splice(t,3),t-=3,Hc(f,{pending:!0,data:o,method:a.method,action:s},s,o))}}))}function rr(e){function t(A){return Ko(A,e)}sl!==null&&Ko(sl,e),il!==null&&Ko(il,e),rl!==null&&Ko(rl,e),lr.forEach(t),sr.forEach(t);for(var a=0;a<ol.length;a++){var s=ol[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ol.length&&(a=ol[0],a.blockedOn===null);)$0(a),a.blockedOn===null&&ol.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var o=a[s],f=a[s+1],v=o[te]||null;if(typeof f=="function")v||V0(a);else if(v){var S=null;if(f&&f.hasAttribute("formAction")){if(o=f,v=f[te]||null)S=v.formAction;else if(Qf(o)!==null)continue}else S=v.action;typeof S=="function"?a[s+1]=S:(a.splice(s,3),s-=3),V0(a)}}}function Yf(e){this._internalRoot=e}Fo.prototype.render=Yf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,s=ln();z0(a,s,e,t,null,null)},Fo.prototype.unmount=Yf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;z0(e.current,2,null,e,null,null),To(),t[ce]=null}};function Fo(e){this._internalRoot=e}Fo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Se();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ol.length&&t!==0&&t<ol[a].priority;a++);ol.splice(a,0,e),a===0&&$0(e)}};var K0=l.version;if(K0!=="19.1.0")throw Error(r(527,K0,"19.1.0"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var v2={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xo.isDisabled&&Xo.supportsFiber)try{hn=Xo.inject(v2),Je=Xo}catch{}}return ur.createRoot=function(e,t){if(!u(e))throw Error(r(299));var a=!1,s="",o=rp,f=op,v=up,S=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(S=t.unstable_transitionCallbacks)),t=k0(e,1,!1,null,null,a,s,o,f,v,S,null),e[ce]=t.current,_f(e),new Yf(t)},ur.hydrateRoot=function(e,t,a){if(!u(e))throw Error(r(299));var s=!1,o="",f=rp,v=op,S=up,A=null,k=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(A=a.unstable_transitionCallbacks),a.formState!==void 0&&(k=a.formState)),t=k0(e,1,!0,t,a??null,s,o,f,v,S,A,k),t.context=U0(null),a=t.current,s=ln(),s=_t(s),o=Ka(s),o.callback=null,Ga(a,o,s),a=s,t.current.lanes=a,pn(t,a),Zn(t),e[ce]=t.current,_f(e),new Fo(t)},ur.version="19.1.0",ur}var ty;function N2(){if(ty)return Gf.exports;ty=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Gf.exports=_2(),Gf.exports}var j2=N2();const T2=Dd(j2);var cr={},ny;function A2(){if(ny)return cr;ny=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.parse=d,cr.serialize=y;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,l=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,u=Object.prototype.toString,c=(()=>{const E=function(){};return E.prototype=Object.create(null),E})();function d(E,j){const w=new c,C=E.length;if(C<2)return w;const N=j?.decode||g;let T=0;do{const _=E.indexOf("=",T);if(_===-1)break;const D=E.indexOf(";",T),H=D===-1?C:D;if(_>H){T=E.lastIndexOf(";",_-1)+1;continue}const V=m(E,T,_),X=p(E,_,V),G=E.slice(V,X);if(w[G]===void 0){let P=m(E,_+1,H),ae=p(E,H,P);const ye=N(E.slice(P,ae));w[G]=ye}T=H+1}while(T<C);return w}function m(E,j,w){do{const C=E.charCodeAt(j);if(C!==32&&C!==9)return j}while(++j<w);return w}function p(E,j,w){for(;j>w;){const C=E.charCodeAt(--j);if(C!==32&&C!==9)return j+1}return w}function y(E,j,w){const C=w?.encode||encodeURIComponent;if(!n.test(E))throw new TypeError(`argument name is invalid: ${E}`);const N=C(j);if(!l.test(N))throw new TypeError(`argument val is invalid: ${j}`);let T=E+"="+N;if(!w)return T;if(w.maxAge!==void 0){if(!Number.isInteger(w.maxAge))throw new TypeError(`option maxAge is invalid: ${w.maxAge}`);T+="; Max-Age="+w.maxAge}if(w.domain){if(!i.test(w.domain))throw new TypeError(`option domain is invalid: ${w.domain}`);T+="; Domain="+w.domain}if(w.path){if(!r.test(w.path))throw new TypeError(`option path is invalid: ${w.path}`);T+="; Path="+w.path}if(w.expires){if(!x(w.expires)||!Number.isFinite(w.expires.valueOf()))throw new TypeError(`option expires is invalid: ${w.expires}`);T+="; Expires="+w.expires.toUTCString()}if(w.httpOnly&&(T+="; HttpOnly"),w.secure&&(T+="; Secure"),w.partitioned&&(T+="; Partitioned"),w.priority)switch(typeof w.priority=="string"?w.priority.toLowerCase():void 0){case"low":T+="; Priority=Low";break;case"medium":T+="; Priority=Medium";break;case"high":T+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${w.priority}`)}if(w.sameSite)switch(typeof w.sameSite=="string"?w.sameSite.toLowerCase():w.sameSite){case!0:case"strict":T+="; SameSite=Strict";break;case"lax":T+="; SameSite=Lax";break;case"none":T+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${w.sameSite}`)}return T}function g(E){if(E.indexOf("%")===-1)return E;try{return decodeURIComponent(E)}catch{return E}}function x(E){return u.call(E)==="[object Date]"}return cr}A2();var ay="popstate";function R2(n={}){function l(r,u){let{pathname:c,search:d,hash:m}=r.location;return fd("",{pathname:c,search:d,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(r,u){return typeof u=="string"?u:br(u)}return M2(l,i,null,n)}function Pe(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function Ln(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function O2(){return Math.random().toString(36).substring(2,10)}function ly(n,l){return{usr:n.state,key:n.key,idx:l}}function fd(n,l,i=null,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?ti(l):l,state:i,key:l&&l.key||r||O2()}}function br({pathname:n="/",search:l="",hash:i=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function ti(n){let l={};if(n){let i=n.indexOf("#");i>=0&&(l.hash=n.substring(i),n=n.substring(0,i));let r=n.indexOf("?");r>=0&&(l.search=n.substring(r),n=n.substring(0,r)),n&&(l.pathname=n)}return l}function M2(n,l,i,r={}){let{window:u=document.defaultView,v5Compat:c=!1}=r,d=u.history,m="POP",p=null,y=g();y==null&&(y=0,d.replaceState({...d.state,idx:y},""));function g(){return(d.state||{idx:null}).idx}function x(){m="POP";let N=g(),T=N==null?null:N-y;y=N,p&&p({action:m,location:C.location,delta:T})}function E(N,T){m="PUSH";let _=fd(C.location,N,T);y=g()+1;let D=ly(_,y),H=C.createHref(_);try{d.pushState(D,"",H)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;u.location.assign(H)}c&&p&&p({action:m,location:C.location,delta:1})}function j(N,T){m="REPLACE";let _=fd(C.location,N,T);y=g();let D=ly(_,y),H=C.createHref(_);d.replaceState(D,"",H),c&&p&&p({action:m,location:C.location,delta:0})}function w(N){return D2(N)}let C={get action(){return m},get location(){return n(u,d)},listen(N){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(ay,x),p=N,()=>{u.removeEventListener(ay,x),p=null}},createHref(N){return l(u,N)},createURL:w,encodeLocation(N){let T=w(N);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:E,replace:j,go(N){return d.go(N)}};return C}function D2(n,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(i,"No window.location.(origin|href) available to create URL");let r=typeof n=="string"?n:br(n);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=i+r),new URL(r,i)}function s1(n,l,i="/"){return L2(n,l,i,!1)}function L2(n,l,i,r){let u=typeof l=="string"?ti(l):l,c=Aa(u.pathname||"/",i);if(c==null)return null;let d=i1(n);k2(d);let m=null;for(let p=0;m==null&&p<d.length;++p){let y=G2(c);m=V2(d[p],y,r)}return m}function i1(n,l=[],i=[],r=""){let u=(c,d,m)=>{let p={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};p.relativePath.startsWith("/")&&(Pe(p.relativePath.startsWith(r),`Absolute route path "${p.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(r.length));let y=ja([r,p.relativePath]),g=i.concat(p);c.children&&c.children.length>0&&(Pe(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),i1(c.children,l,g,y)),!(c.path==null&&!c.index)&&l.push({path:y,score:$2(y,c.index),routesMeta:g})};return n.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))u(c,d);else for(let m of r1(c.path))u(c,d,m)}),l}function r1(n){let l=n.split("/");if(l.length===0)return[];let[i,...r]=l,u=i.endsWith("?"),c=i.replace(/\?$/,"");if(r.length===0)return u?[c,""]:[c];let d=r1(r.join("/")),m=[];return m.push(...d.map(p=>p===""?c:[c,p].join("/"))),u&&m.push(...d),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function k2(n){n.sort((l,i)=>l.score!==i.score?i.score-l.score:Y2(l.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var U2=/^:[\w-]+$/,z2=3,q2=2,B2=1,H2=10,Q2=-2,sy=n=>n==="*";function $2(n,l){let i=n.split("/"),r=i.length;return i.some(sy)&&(r+=Q2),l&&(r+=q2),i.filter(u=>!sy(u)).reduce((u,c)=>u+(U2.test(c)?z2:c===""?B2:H2),r)}function Y2(n,l){return n.length===l.length&&n.slice(0,-1).every((r,u)=>r===l[u])?n[n.length-1]-l[l.length-1]:0}function V2(n,l,i=!1){let{routesMeta:r}=n,u={},c="/",d=[];for(let m=0;m<r.length;++m){let p=r[m],y=m===r.length-1,g=c==="/"?l:l.slice(c.length)||"/",x=xr({path:p.relativePath,caseSensitive:p.caseSensitive,end:y},g),E=p.route;if(!x&&y&&i&&!r[r.length-1].route.index&&(x=xr({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},g)),!x)return null;Object.assign(u,x.params),d.push({params:u,pathname:ja([c,x.pathname]),pathnameBase:P2(ja([c,x.pathnameBase])),route:E}),x.pathnameBase!=="/"&&(c=ja([c,x.pathnameBase]))}return d}function xr(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,r]=K2(n.path,n.caseSensitive,n.end),u=l.match(i);if(!u)return null;let c=u[0],d=c.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:r.reduce((y,{paramName:g,isOptional:x},E)=>{if(g==="*"){let w=m[E]||"";d=c.slice(0,c.length-w.length).replace(/(.)\/+$/,"$1")}const j=m[E];return x&&!j?y[g]=void 0:y[g]=(j||"").replace(/%2F/g,"/"),y},{}),pathname:c,pathnameBase:d,pattern:n}}function K2(n,l=!1,i=!0){Ln(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let r=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,p)=>(r.push({paramName:m,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,l?void 0:"i"),r]}function G2(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Ln(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),n}}function Aa(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,r=n.charAt(i);return r&&r!=="/"?null:n.slice(i)||"/"}function F2(n,l="/"){let{pathname:i,search:r="",hash:u=""}=typeof n=="string"?ti(n):n;return{pathname:i?i.startsWith("/")?i:X2(i,l):l,search:J2(r),hash:I2(u)}}function X2(n,l){let i=l.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?i.length>1&&i.pop():u!=="."&&i.push(u)}),i.length>1?i.join("/"):"/"}function Pf(n,l,i,r){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Z2(n){return n.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function o1(n){let l=Z2(n);return l.map((i,r)=>r===l.length-1?i.pathname:i.pathnameBase)}function u1(n,l,i,r=!1){let u;typeof n=="string"?u=ti(n):(u={...n},Pe(!u.pathname||!u.pathname.includes("?"),Pf("?","pathname","search",u)),Pe(!u.pathname||!u.pathname.includes("#"),Pf("#","pathname","hash",u)),Pe(!u.search||!u.search.includes("#"),Pf("#","search","hash",u)));let c=n===""||u.pathname==="",d=c?"/":u.pathname,m;if(d==null)m=i;else{let x=l.length-1;if(!r&&d.startsWith("..")){let E=d.split("/");for(;E[0]==="..";)E.shift(),x-=1;u.pathname=E.join("/")}m=x>=0?l[x]:"/"}let p=F2(u,m),y=d&&d!=="/"&&d.endsWith("/"),g=(c||d===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(y||g)&&(p.pathname+="/"),p}var ja=n=>n.join("/").replace(/\/\/+/g,"/"),P2=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),J2=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,I2=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function W2(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var c1=["POST","PUT","PATCH","DELETE"];new Set(c1);var ex=["GET",...c1];new Set(ex);var ni=b.createContext(null);ni.displayName="DataRouter";var Eu=b.createContext(null);Eu.displayName="DataRouterState";var f1=b.createContext({isTransitioning:!1});f1.displayName="ViewTransition";var tx=b.createContext(new Map);tx.displayName="Fetchers";var nx=b.createContext(null);nx.displayName="Await";var ta=b.createContext(null);ta.displayName="Navigation";var Er=b.createContext(null);Er.displayName="Location";var na=b.createContext({outlet:null,matches:[],isDataRoute:!1});na.displayName="Route";var kd=b.createContext(null);kd.displayName="RouteError";function ax(n,{relative:l}={}){Pe(Cr(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=b.useContext(ta),{hash:u,pathname:c,search:d}=_r(n,{relative:l}),m=c;return i!=="/"&&(m=c==="/"?i:ja([i,c])),r.createHref({pathname:m,search:d,hash:u})}function Cr(){return b.useContext(Er)!=null}function qt(){return Pe(Cr(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Er).location}var d1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function h1(n){b.useContext(ta).static||b.useLayoutEffect(n)}function wt(){let{isDataRoute:n}=b.useContext(na);return n?vx():lx()}function lx(){Pe(Cr(),"useNavigate() may be used only in the context of a <Router> component.");let n=b.useContext(ni),{basename:l,navigator:i}=b.useContext(ta),{matches:r}=b.useContext(na),{pathname:u}=qt(),c=JSON.stringify(o1(r)),d=b.useRef(!1);return h1(()=>{d.current=!0}),b.useCallback((p,y={})=>{if(Ln(d.current,d1),!d.current)return;if(typeof p=="number"){i.go(p);return}let g=u1(p,JSON.parse(c),u,y.relative==="path");n==null&&l!=="/"&&(g.pathname=g.pathname==="/"?l:ja([l,g.pathname])),(y.replace?i.replace:i.push)(g,y.state,y)},[l,i,c,u,n])}b.createContext(null);function sx(){let{matches:n}=b.useContext(na),l=n[n.length-1];return l?l.params:{}}function _r(n,{relative:l}={}){let{matches:i}=b.useContext(na),{pathname:r}=qt(),u=JSON.stringify(o1(i));return b.useMemo(()=>u1(n,JSON.parse(u),r,l==="path"),[n,u,r,l])}function ix(n,l){return m1(n,l)}function m1(n,l,i,r){Pe(Cr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u,static:c}=b.useContext(ta),{matches:d}=b.useContext(na),m=d[d.length-1],p=m?m.params:{},y=m?m.pathname:"/",g=m?m.pathnameBase:"/",x=m&&m.route;{let _=x&&x.path||"";p1(y,!x||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${_}">) 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.
8
+ `+a.stack}}function vn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ph(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mv(e){var t=ph(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,f=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){s=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return s},setValue:function(g){s=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hr(e){e._valueTracker||(e._valueTracker=mv(e))}function yh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=ph(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function Qr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var pv=/[\n"\\]/g;function bn(e){return e.replace(pv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Hu(e,t,a,s,o,f,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+vn(t)):e.value!==""+vn(t)&&(e.value=""+vn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Qu(e,g,vn(t)):a!=null?Qu(e,g,vn(a)):s!=null&&e.removeAttribute("value"),o==null&&f!=null&&(e.defaultChecked=!!f),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+vn(S):e.removeAttribute("name")}function gh(e,t,a,s,o,f,g,S){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null))return;a=a!=null?""+vn(a):"",t=t!=null?""+vn(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=S?e.checked:!!s,e.defaultChecked=!!s,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g)}function Qu(e,t,a){t==="number"&&Qr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function us(e,t,a,s){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&s&&(e[a].defaultSelected=!0)}else{for(a=""+vn(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,s&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function vh(e,t,a){if(t!=null&&(t=""+vn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+vn(a):""}function bh(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(r(92));if(_e(s)){if(1<s.length)throw Error(r(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=vn(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s)}function cs(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var yv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xh(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||yv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Sh(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var o in t)s=t[o],t.hasOwnProperty(o)&&a[o]!==s&&xh(e,o,s)}else for(var f in t)t.hasOwnProperty(f)&&xh(e,f,t[f])}function $u(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),vv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $r(e){return vv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Yu=null;function Vu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fs=null,ds=null;function wh(e){var t=It(e);if(t&&(e=t.stateNode)){var a=e[te]||null;e:switch(e=t.stateNode,t.type){case"input":if(Hu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+bn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var o=s[te]||null;if(!o)throw Error(r(90));Hu(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&yh(s)}break e;case"textarea":vh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&us(e,!!a.multiple,t,!1)}}}var Ku=!1;function Eh(e,t,a){if(Ku)return e(t,a);Ku=!0;try{var s=e(t);return s}finally{if(Ku=!1,(fs!==null||ds!==null)&&(To(),fs&&(t=fs,e=ds,ds=fs=null,wh(t),e)))for(t=0;t<e.length;t++)wh(e[t])}}function yi(e,t){var a=e.stateNode;if(a===null)return null;var s=a[te]||null;if(s===null)return null;a=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gu=!1;if(fa)try{var gi={};Object.defineProperty(gi,"passive",{get:function(){Gu=!0}}),window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch{Gu=!1}var $a=null,Fu=null,Yr=null;function Ch(){if(Yr)return Yr;var e,t=Fu,a=t.length,s,o="value"in $a?$a.value:$a.textContent,f=o.length;for(e=0;e<a&&t[e]===o[e];e++);var g=a-e;for(s=1;s<=g&&t[a-s]===o[f-s];s++);return Yr=o.slice(e,1<s?1-s:void 0)}function Vr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Kr(){return!0}function _h(){return!1}function Ht(e){function t(a,s,o,f,g){this._reactName=a,this._targetInst=o,this.type=s,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(f):f[S]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Kr:_h,this.isPropagationStopped=_h,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Kr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Kr)},persist:function(){},isPersistent:Kr}),t}var Nl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gr=Ht(Nl),vi=v({},Nl,{view:0,detail:0}),bv=Ht(vi),Xu,Zu,bi,Fr=v({},vi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bi&&(bi&&e.type==="mousemove"?(Xu=e.screenX-bi.screenX,Zu=e.screenY-bi.screenY):Zu=Xu=0,bi=e),Xu)},movementY:function(e){return"movementY"in e?e.movementY:Zu}}),Nh=Ht(Fr),xv=v({},Fr,{dataTransfer:0}),Sv=Ht(xv),wv=v({},vi,{relatedTarget:0}),Pu=Ht(wv),Ev=v({},Nl,{animationName:0,elapsedTime:0,pseudoElement:0}),Cv=Ht(Ev),_v=v({},Nl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Nv=Ht(_v),jv=v({},Nl,{data:0}),jh=Ht(jv),Tv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Av={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"},Rv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ov(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rv[e])?!!t[e]:!1}function Ju(){return Ov}var Mv=v({},vi,{key:function(e){if(e.key){var t=Tv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Av[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(e){return e.type==="keypress"?Vr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Dv=Ht(Mv),Lv=v({},Fr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Th=Ht(Lv),Uv=v({},vi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),kv=Ht(Uv),zv=v({},Nl,{propertyName:0,elapsedTime:0,pseudoElement:0}),qv=Ht(zv),Bv=v({},Fr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Hv=Ht(Bv),Qv=v({},Nl,{newState:0,oldState:0}),$v=Ht(Qv),Yv=[9,13,27,32],Iu=fa&&"CompositionEvent"in window,xi=null;fa&&"documentMode"in document&&(xi=document.documentMode);var Vv=fa&&"TextEvent"in window&&!xi,Ah=fa&&(!Iu||xi&&8<xi&&11>=xi),Rh=" ",Oh=!1;function Mh(e,t){switch(e){case"keyup":return Yv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hs=!1;function Kv(e,t){switch(e){case"compositionend":return Dh(t);case"keypress":return t.which!==32?null:(Oh=!0,Rh);case"textInput":return e=t.data,e===Rh&&Oh?null:e;default:return null}}function Gv(e,t){if(hs)return e==="compositionend"||!Iu&&Mh(e,t)?(e=Ch(),Yr=Fu=$a=null,hs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ah&&t.locale!=="ko"?null:t.data;default:return null}}var Fv={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 Lh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fv[e.type]:t==="textarea"}function Uh(e,t,a,s){fs?ds?ds.push(s):ds=[s]:fs=s,t=Lo(t,"onChange"),0<t.length&&(a=new Gr("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var Si=null,wi=null;function Xv(e){p0(e,0)}function Xr(e){var t=Cl(e);if(yh(t))return e}function kh(e,t){if(e==="change")return t}var zh=!1;if(fa){var Wu;if(fa){var ec="oninput"in document;if(!ec){var qh=document.createElement("div");qh.setAttribute("oninput","return;"),ec=typeof qh.oninput=="function"}Wu=ec}else Wu=!1;zh=Wu&&(!document.documentMode||9<document.documentMode)}function Bh(){Si&&(Si.detachEvent("onpropertychange",Hh),wi=Si=null)}function Hh(e){if(e.propertyName==="value"&&Xr(wi)){var t=[];Uh(t,wi,e,Vu(e)),Eh(Xv,t)}}function Zv(e,t,a){e==="focusin"?(Bh(),Si=t,wi=a,Si.attachEvent("onpropertychange",Hh)):e==="focusout"&&Bh()}function Pv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xr(wi)}function Jv(e,t){if(e==="click")return Xr(t)}function Iv(e,t){if(e==="input"||e==="change")return Xr(t)}function Wv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Wt=typeof Object.is=="function"?Object.is:Wv;function Ei(e,t){if(Wt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var o=a[s];if(!fn.call(t,o)||!Wt(e[o],t[o]))return!1}return!0}function Qh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $h(e,t){var a=Qh(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Qh(a)}}function Yh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Qr(e.document)}return t}function tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var eb=fa&&"documentMode"in document&&11>=document.documentMode,ms=null,nc=null,Ci=null,ac=!1;function Kh(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ac||ms==null||ms!==Qr(s)||(s=ms,"selectionStart"in s&&tc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ci&&Ei(Ci,s)||(Ci=s,s=Lo(nc,"onSelect"),0<s.length&&(t=new Gr("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=ms)))}function jl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ps={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionrun:jl("Transition","TransitionRun"),transitionstart:jl("Transition","TransitionStart"),transitioncancel:jl("Transition","TransitionCancel"),transitionend:jl("Transition","TransitionEnd")},lc={},Gh={};fa&&(Gh=document.createElement("div").style,"AnimationEvent"in window||(delete ps.animationend.animation,delete ps.animationiteration.animation,delete ps.animationstart.animation),"TransitionEvent"in window||delete ps.transitionend.transition);function Tl(e){if(lc[e])return lc[e];if(!ps[e])return e;var t=ps[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Gh)return lc[e]=t[a];return e}var Fh=Tl("animationend"),Xh=Tl("animationiteration"),Zh=Tl("animationstart"),tb=Tl("transitionrun"),nb=Tl("transitionstart"),ab=Tl("transitioncancel"),Ph=Tl("transitionend"),Jh=new Map,sc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");sc.push("scrollEnd");function Rn(e,t){Jh.set(e,t),Vn(t,[e])}var Ih=new WeakMap;function xn(e,t){if(typeof e=="object"&&e!==null){var a=Ih.get(e);return a!==void 0?a:(t={value:e,source:t,stack:mh(t)},Ih.set(e,t),t)}return{value:e,source:t,stack:mh(t)}}var Sn=[],ys=0,ic=0;function Zr(){for(var e=ys,t=ic=ys=0;t<e;){var a=Sn[t];Sn[t++]=null;var s=Sn[t];Sn[t++]=null;var o=Sn[t];Sn[t++]=null;var f=Sn[t];if(Sn[t++]=null,s!==null&&o!==null){var g=s.pending;g===null?o.next=o:(o.next=g.next,g.next=o),s.pending=o}f!==0&&Wh(a,o,f)}}function Pr(e,t,a,s){Sn[ys++]=e,Sn[ys++]=t,Sn[ys++]=a,Sn[ys++]=s,ic|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function rc(e,t,a,s){return Pr(e,t,a,s),Jr(e)}function gs(e,t){return Pr(e,null,null,t),Jr(e)}function Wh(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var o=!1,f=e.return;f!==null;)f.childLanes|=a,s=f.alternate,s!==null&&(s.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(o=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,o&&t!==null&&(o=31-tt(a),e=f.hiddenUpdates,s=e[o],s===null?e[o]=[t]:s.push(t),t.lane=a|536870912),f):null}function Jr(e){if(50<Zi)throw Zi=0,mf=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var vs={};function lb(e,t,a,s){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,a,s){return new lb(e,t,a,s)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function da(e,t){var a=e.alternate;return a===null?(a=en(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function em(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ir(e,t,a,s,o,f){var g=0;if(s=e,typeof e=="function")oc(e)&&(g=1);else if(typeof e=="string")g=i2(e,a,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=en(31,a,t,o),e.elementType=ae,e.lanes=f,e;case w:return Al(a.children,o,f,t);case C:g=8,o|=24;break;case N:return e=en(12,a,t,o|2),e.elementType=N,e.lanes=f,e;case V:return e=en(13,a,t,o),e.elementType=V,e.lanes=f,e;case X:return e=en(19,a,t,o),e.elementType=X,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case T:case D:g=10;break e;case _:g=9;break e;case H:g=11;break e;case G:g=14;break e;case P:g=16,s=null;break e}g=29,a=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=en(g,a,t,o),t.elementType=e,t.type=s,t.lanes=f,t}function Al(e,t,a,s){return e=en(7,e,s,t),e.lanes=a,e}function uc(e,t,a){return e=en(6,e,null,t),e.lanes=a,e}function cc(e,t,a){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var bs=[],xs=0,Wr=null,eo=0,wn=[],En=0,Rl=null,ha=1,ma="";function Ol(e,t){bs[xs++]=eo,bs[xs++]=Wr,Wr=e,eo=t}function tm(e,t,a){wn[En++]=ha,wn[En++]=ma,wn[En++]=Rl,Rl=e;var s=ha;e=ma;var o=32-tt(s)-1;s&=~(1<<o),a+=1;var f=32-tt(t)+o;if(30<f){var g=o-o%5;f=(s&(1<<g)-1).toString(32),s>>=g,o-=g,ha=1<<32-tt(t)+o|a<<o|s,ma=f+e}else ha=1<<f|a<<o|s,ma=e}function fc(e){e.return!==null&&(Ol(e,1),tm(e,1,0))}function dc(e){for(;e===Wr;)Wr=bs[--xs],bs[xs]=null,eo=bs[--xs],bs[xs]=null;for(;e===Rl;)Rl=wn[--En],wn[En]=null,ma=wn[--En],wn[En]=null,ha=wn[--En],wn[En]=null}var Ut=null,Ie=null,Me=!1,Ml=null,Kn=!1,hc=Error(r(519));function Dl(e){var t=Error(r(418,""));throw ji(xn(t,e)),hc}function nm(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[Z]=e,t[te]=s,a){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(a=0;a<Ji.length;a++)Ee(Ji[a],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),gh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0),Hr(t);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),bh(t,s.value,s.defaultValue,s.children),Hr(t)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||b0(t.textContent,a)?(s.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),s.onScroll!=null&&Ee("scroll",t),s.onScrollEnd!=null&&Ee("scrollend",t),s.onClick!=null&&(t.onclick=Uo),t=!0):t=!1,t||Dl(e)}function am(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Ut=Ut.return}}function _i(e){if(e!==Ut)return!1;if(!Me)return am(e),Me=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Rf(e.type,e.memoizedProps)),a=!a),a&&Ie&&Dl(e),am(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){Ie=Mn(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Ie=null}}else t===27?(t=Ie,ll(e.type)?(e=Lf,Lf=null,Ie=e):Ie=t):Ie=Ut?Mn(e.stateNode.nextSibling):null;return!0}function Ni(){Ie=Ut=null,Me=!1}function lm(){var e=Ml;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),Ml=null),e}function ji(e){Ml===null?Ml=[e]:Ml.push(e)}var mc=Q(null),Ll=null,pa=null;function Ya(e,t,a){W(mc,t._currentValue),t._currentValue=a}function ya(e){e._currentValue=mc.current,I(mc)}function pc(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function yc(e,t,a,s){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var f=o.dependencies;if(f!==null){var g=o.child;f=f.firstContext;e:for(;f!==null;){var S=f;f=o;for(var A=0;A<t.length;A++)if(S.context===t[A]){f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),pc(f.return,a,e),s||(g=null);break e}f=S.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(r(341));g.lanes|=a,f=g.alternate,f!==null&&(f.lanes|=a),pc(g,a,e),g=null}else g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function Ti(e,t,a,s){e=null;for(var o=t,f=!1;o!==null;){if(!f){if((o.flags&524288)!==0)f=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var S=o.type;Wt(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===vt.current){if(g=o.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ar):e=[ar])}o=o.return}e!==null&&yc(t,e,a,s),t.flags|=262144}function to(e){for(e=e.firstContext;e!==null;){if(!Wt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ul(e){Ll=e,pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return sm(Ll,e)}function no(e,t){return Ll===null&&Ul(e),sm(e,t)}function sm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},pa===null){if(e===null)throw Error(r(308));pa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pa=pa.next=t;return a}var sb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},ib=n.unstable_scheduleCallback,rb=n.unstable_NormalPriority,ct={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gc(){return{controller:new sb,data:new Map,refCount:0}}function Ai(e){e.refCount--,e.refCount===0&&ib(rb,function(){e.controller.abort()})}var Ri=null,vc=0,Ss=0,ws=null;function ob(e,t){if(Ri===null){var a=Ri=[];vc=0,Ss=Sf(),ws={status:"pending",value:void 0,then:function(s){a.push(s)}}}return vc++,t.then(im,im),t}function im(){if(--vc===0&&Ri!==null){ws!==null&&(ws.status="fulfilled");var e=Ri;Ri=null,Ss=0,ws=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ub(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(s.status="rejected",s.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),s}var rm=q.S;q.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&ob(e,t),rm!==null&&rm(e,t)};var kl=Q(null);function bc(){var e=kl.current;return e!==null?e:Ve.pooledCache}function ao(e,t){t===null?W(kl,kl.current):W(kl,t.pool)}function om(){var e=bc();return e===null?null:{parent:ct._currentValue,pool:e}}var Oi=Error(r(460)),um=Error(r(474)),lo=Error(r(542)),xc={then:function(){}};function cm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function so(){}function fm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(so,so),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hm(e),e;default:if(typeof t.status=="string")t.then(so,so);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=s}},function(s){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hm(e),e}throw Mi=t,Oi}}var Mi=null;function dm(){if(Mi===null)throw Error(r(459));var e=Mi;return Mi=null,e}function hm(e){if(e===Oi||e===lo)throw Error(r(483))}var Va=!1;function Sc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Le&2)!==0){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,t=Jr(e),Wh(e,null,a),t}return Pr(e,s,t,a),Jr(e)}function Di(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,nt(e,a)}}function Ec(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var o=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?o=f=g:f=f.next=g,a=a.next}while(a!==null);f===null?o=f=t:f=f.next=t}else o=f=t;a={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Cc=!1;function Li(){if(Cc){var e=ws;if(e!==null)throw e}}function Ui(e,t,a,s){Cc=!1;var o=e.updateQueue;Va=!1;var f=o.firstBaseUpdate,g=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var A=S,U=A.next;A.next=null,g===null?f=U:g.next=U,g=A;var $=e.alternate;$!==null&&($=$.updateQueue,S=$.lastBaseUpdate,S!==g&&(S===null?$.firstBaseUpdate=U:S.next=U,$.lastBaseUpdate=A))}if(f!==null){var K=o.baseState;g=0,$=U=A=null,S=f;do{var k=S.lane&-536870913,z=k!==S.lane;if(z?(Ne&k)===k:(s&k)===k){k!==0&&k===Ss&&(Cc=!0),$!==null&&($=$.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var de=e,ue=S;k=t;var He=a;switch(ue.tag){case 1:if(de=ue.payload,typeof de=="function"){K=de.call(He,K,k);break e}K=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ue.payload,k=typeof de=="function"?de.call(He,K,k):de,k==null)break e;K=v({},K,k);break e;case 2:Va=!0}}k=S.callback,k!==null&&(e.flags|=64,z&&(e.flags|=8192),z=o.callbacks,z===null?o.callbacks=[k]:z.push(k))}else z={lane:k,tag:S.tag,payload:S.payload,callback:S.callback,next:null},$===null?(U=$=z,A=K):$=$.next=z,g|=k;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;z=S,S=z.next,z.next=null,o.lastBaseUpdate=z,o.shared.pending=null}}while(!0);$===null&&(A=K),o.baseState=A,o.firstBaseUpdate=U,o.lastBaseUpdate=$,f===null&&(o.shared.lanes=0),el|=g,e.lanes=g,e.memoizedState=K}}function mm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function pm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)mm(a[e],t)}var Es=Q(null),io=Q(0);function ym(e,t){e=Ea,W(io,e),W(Es,t),Ea=e|t.baseLanes}function _c(){W(io,Ea),W(Es,Es.current)}function Nc(){Ea=io.current,I(Es),I(io)}var Fa=0,be=null,qe=null,ot=null,ro=!1,Cs=!1,zl=!1,oo=0,ki=0,_s=null,cb=0;function st(){throw Error(r(321))}function jc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Wt(e[a],t[a]))return!1;return!0}function Tc(e,t,a,s,o,f){return Fa=f,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Wm:ep,zl=!1,f=a(s,o),zl=!1,Cs&&(f=vm(t,a,s,o)),gm(e),f}function gm(e){q.H=po;var t=qe!==null&&qe.next!==null;if(Fa=0,ot=qe=be=null,ro=!1,ki=0,_s=null,t)throw Error(r(300));e===null||mt||(e=e.dependencies,e!==null&&to(e)&&(mt=!0))}function vm(e,t,a,s){be=e;var o=0;do{if(Cs&&(_s=null),ki=0,Cs=!1,25<=o)throw Error(r(301));if(o+=1,ot=qe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}q.H=gb,f=t(a,s)}while(Cs);return f}function fb(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?zi(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(be.flags|=1024),t}function Ac(){var e=oo!==0;return oo=0,e}function Rc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Oc(e){if(ro){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ro=!1}Fa=0,ot=qe=be=null,Cs=!1,ki=oo=0,_s=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?be.memoizedState=ot=e:ot=ot.next=e,ot}function ut(){if(qe===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=ot===null?be.memoizedState:ot.next;if(t!==null)ot=t,qe=e;else{if(e===null)throw be.alternate===null?Error(r(467)):Error(r(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},ot===null?be.memoizedState=ot=e:ot=ot.next=e}return ot}function Mc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zi(e){var t=ki;return ki+=1,_s===null&&(_s=[]),e=fm(_s,e,t),t=be,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Wm:ep),e}function uo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return zi(e);if(e.$$typeof===D)return Tt(e)}throw Error(r(438,String(e)))}function Dc(e){var t=null,a=be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=be.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Mc(),be.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=ye;return t.index++,a}function ga(e,t){return typeof t=="function"?t(e):t}function co(e){var t=ut();return Lc(t,qe,e)}function Lc(e,t,a){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=a;var o=e.baseQueue,f=s.pending;if(f!==null){if(o!==null){var g=o.next;o.next=f.next,f.next=g}t.baseQueue=o=f,s.pending=null}if(f=e.baseState,o===null)e.memoizedState=f;else{t=o.next;var S=g=null,A=null,U=t,$=!1;do{var K=U.lane&-536870913;if(K!==U.lane?(Ne&K)===K:(Fa&K)===K){var k=U.revertLane;if(k===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),K===Ss&&($=!0);else if((Fa&k)===k){U=U.next,k===Ss&&($=!0);continue}else K={lane:0,revertLane:U.revertLane,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},A===null?(S=A=K,g=f):A=A.next=K,be.lanes|=k,el|=k;K=U.action,zl&&a(f,K),f=U.hasEagerState?U.eagerState:a(f,K)}else k={lane:K,revertLane:U.revertLane,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},A===null?(S=A=k,g=f):A=A.next=k,be.lanes|=K,el|=K;U=U.next}while(U!==null&&U!==t);if(A===null?g=f:A.next=S,!Wt(f,e.memoizedState)&&(mt=!0,$&&(a=ws,a!==null)))throw a;e.memoizedState=f,e.baseState=g,e.baseQueue=A,s.lastRenderedState=f}return o===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Uc(e){var t=ut(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var s=a.dispatch,o=a.pending,f=t.memoizedState;if(o!==null){a.pending=null;var g=o=o.next;do f=e(f,g.action),g=g.next;while(g!==o);Wt(f,t.memoizedState)||(mt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,s]}function bm(e,t,a){var s=be,o=ut(),f=Me;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=t();var g=!Wt((qe||o).memoizedState,a);g&&(o.memoizedState=a,mt=!0),o=o.queue;var S=wm.bind(null,s,o,e);if(qi(2048,8,S,[e]),o.getSnapshot!==t||g||ot!==null&&ot.memoizedState.tag&1){if(s.flags|=2048,Ns(9,fo(),Sm.bind(null,s,o,a,t),null),Ve===null)throw Error(r(349));f||(Fa&124)!==0||xm(s,t,a)}return a}function xm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=be.updateQueue,t===null?(t=Mc(),be.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Sm(e,t,a,s){t.value=a,t.getSnapshot=s,Em(t)&&Cm(e)}function wm(e,t,a){return a(function(){Em(t)&&Cm(e)})}function Em(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Wt(e,a)}catch{return!0}}function Cm(e){var t=gs(e,2);t!==null&&sn(t,e,2)}function kc(e){var t=Qt();if(typeof e=="function"){var a=e;if(e=a(),zl){Bt(!0);try{a()}finally{Bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:e},t}function _m(e,t,a,s){return e.baseState=a,Lc(e,qe,typeof s=="function"?s:ga)}function db(e,t,a,s,o){if(mo(e))throw Error(r(485));if(e=t.action,e!==null){var f={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};q.T!==null?a(!0):f.isTransition=!1,s(f),a=t.pending,a===null?(f.next=t.pending=f,Nm(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Nm(e,t){var a=t.action,s=t.payload,o=e.state;if(t.isTransition){var f=q.T,g={};q.T=g;try{var S=a(o,s),A=q.S;A!==null&&A(g,S),jm(e,t,S)}catch(U){zc(e,t,U)}finally{q.T=f}}else try{f=a(o,s),jm(e,t,f)}catch(U){zc(e,t,U)}}function jm(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){Tm(e,t,s)},function(s){return zc(e,t,s)}):Tm(e,t,a)}function Tm(e,t,a){t.status="fulfilled",t.value=a,Am(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Nm(e,a)))}function zc(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,Am(t),t=t.next;while(t!==s)}e.action=null}function Am(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Rm(e,t){return t}function Om(e,t){if(Me){var a=Ve.formState;if(a!==null){e:{var s=be;if(Me){if(Ie){t:{for(var o=Ie,f=Kn;o.nodeType!==8;){if(!f){o=null;break t}if(o=Mn(o.nextSibling),o===null){o=null;break t}}f=o.data,o=f==="F!"||f==="F"?o:null}if(o){Ie=Mn(o.nextSibling),s=o.data==="F!";break e}}Dl(s)}s=!1}s&&(t=a[0])}}return a=Qt(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rm,lastRenderedState:t},a.queue=s,a=Pm.bind(null,be,s),s.dispatch=a,s=kc(!1),f=$c.bind(null,be,!1,s.queue),s=Qt(),o={state:t,dispatch:null,action:e,pending:null},s.queue=o,a=db.bind(null,be,o,f,a),o.dispatch=a,s.memoizedState=e,[t,a,!1]}function Mm(e){var t=ut();return Dm(t,qe,e)}function Dm(e,t,a){if(t=Lc(e,t,Rm)[0],e=co(ga)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=zi(t)}catch(g){throw g===Oi?lo:g}else s=t;t=ut();var o=t.queue,f=o.dispatch;return a!==t.memoizedState&&(be.flags|=2048,Ns(9,fo(),hb.bind(null,o,a),null)),[s,f,e]}function hb(e,t){e.action=t}function Lm(e){var t=ut(),a=qe;if(a!==null)return Dm(t,a,e);ut(),t=t.memoizedState,a=ut();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function Ns(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=be.updateQueue,t===null&&(t=Mc(),be.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function fo(){return{destroy:void 0,resource:void 0}}function Um(){return ut().memoizedState}function ho(e,t,a,s){var o=Qt();s=s===void 0?null:s,be.flags|=e,o.memoizedState=Ns(1|t,fo(),a,s)}function qi(e,t,a,s){var o=ut();s=s===void 0?null:s;var f=o.memoizedState.inst;qe!==null&&s!==null&&jc(s,qe.memoizedState.deps)?o.memoizedState=Ns(t,f,a,s):(be.flags|=e,o.memoizedState=Ns(1|t,f,a,s))}function km(e,t){ho(8390656,8,e,t)}function zm(e,t){qi(2048,8,e,t)}function qm(e,t){return qi(4,2,e,t)}function Bm(e,t){return qi(4,4,e,t)}function Hm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Qm(e,t,a){a=a!=null?a.concat([e]):null,qi(4,4,Hm.bind(null,t,e),a)}function qc(){}function $m(e,t){var a=ut();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&jc(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function Ym(e,t){var a=ut();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&jc(t,s[1]))return s[0];if(s=e(),zl){Bt(!0);try{e()}finally{Bt(!1)}}return a.memoizedState=[s,t],s}function Bc(e,t,a){return a===void 0||(Fa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Gp(),be.lanes|=e,el|=e,a)}function Vm(e,t,a,s){return Wt(a,t)?a:Es.current!==null?(e=Bc(e,a,s),Wt(e,t)||(mt=!0),e):(Fa&42)===0?(mt=!0,e.memoizedState=a):(e=Gp(),be.lanes|=e,el|=e,t)}function Km(e,t,a,s,o){var f=F.p;F.p=f!==0&&8>f?f:8;var g=q.T,S={};q.T=S,$c(e,!1,t,a);try{var A=o(),U=q.S;if(U!==null&&U(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var $=ub(A,s);Bi(e,t,$,ln(e))}else Bi(e,t,s,ln(e))}catch(K){Bi(e,t,{then:function(){},status:"rejected",reason:K},ln())}finally{F.p=f,q.T=g}}function mb(){}function Hc(e,t,a,s){if(e.tag!==5)throw Error(r(476));var o=Gm(e).queue;Km(e,o,t,J,a===null?mb:function(){return Fm(e),a(s)})}function Gm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:J},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fm(e){var t=Gm(e).next.queue;Bi(e,t,{},ln())}function Qc(){return Tt(ar)}function Xm(){return ut().memoizedState}function Zm(){return ut().memoizedState}function pb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ln();e=Ka(a);var s=Ga(t,e,a);s!==null&&(sn(s,t,a),Di(s,t,a)),t={cache:gc()},e.payload=t;return}t=t.return}}function yb(e,t,a){var s=ln();a={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},mo(e)?Jm(t,a):(a=rc(e,t,a,s),a!==null&&(sn(a,e,s),Im(a,t,s)))}function Pm(e,t,a){var s=ln();Bi(e,t,a,s)}function Bi(e,t,a,s){var o={lane:s,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(mo(e))Jm(t,o);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,S=f(g,a);if(o.hasEagerState=!0,o.eagerState=S,Wt(S,g))return Pr(e,t,o,0),Ve===null&&Zr(),!1}catch{}finally{}if(a=rc(e,t,o,s),a!==null)return sn(a,e,s),Im(a,t,s),!0}return!1}function $c(e,t,a,s){if(s={lane:2,revertLane:Sf(),action:s,hasEagerState:!1,eagerState:null,next:null},mo(e)){if(t)throw Error(r(479))}else t=rc(e,a,s,2),t!==null&&sn(t,e,2)}function mo(e){var t=e.alternate;return e===be||t!==null&&t===be}function Jm(e,t){Cs=ro=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Im(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,nt(e,a)}}var po={readContext:Tt,use:uo,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st},Wm={readContext:Tt,use:uo,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:km,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ho(4194308,4,Hm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ho(4194308,4,e,t)},useInsertionEffect:function(e,t){ho(4,2,e,t)},useMemo:function(e,t){var a=Qt();t=t===void 0?null:t;var s=e();if(zl){Bt(!0);try{e()}finally{Bt(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=Qt();if(a!==void 0){var o=a(t);if(zl){Bt(!0);try{a(t)}finally{Bt(!1)}}}else o=t;return s.memoizedState=s.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},s.queue=e,e=e.dispatch=yb.bind(null,be,e),[s.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=kc(e);var t=e.queue,a=Pm.bind(null,be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:qc,useDeferredValue:function(e,t){var a=Qt();return Bc(a,e,t)},useTransition:function(){var e=kc(!1);return e=Km.bind(null,be,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=be,o=Qt();if(Me){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ve===null)throw Error(r(349));(Ne&124)!==0||xm(s,t,a)}o.memoizedState=a;var f={value:a,getSnapshot:t};return o.queue=f,km(wm.bind(null,s,f,e),[e]),s.flags|=2048,Ns(9,fo(),Sm.bind(null,s,f,a,t),null),a},useId:function(){var e=Qt(),t=Ve.identifierPrefix;if(Me){var a=ma,s=ha;a=(s&~(1<<32-tt(s)-1)).toString(32)+a,t="«"+t+"R"+a,a=oo++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=cb++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Qc,useFormState:Om,useActionState:Om,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=$c.bind(null,be,!0,a),a.dispatch=t,[e,t]},useMemoCache:Dc,useCacheRefresh:function(){return Qt().memoizedState=pb.bind(null,be)}},ep={readContext:Tt,use:uo,useCallback:$m,useContext:Tt,useEffect:zm,useImperativeHandle:Qm,useInsertionEffect:qm,useLayoutEffect:Bm,useMemo:Ym,useReducer:co,useRef:Um,useState:function(){return co(ga)},useDebugValue:qc,useDeferredValue:function(e,t){var a=ut();return Vm(a,qe.memoizedState,e,t)},useTransition:function(){var e=co(ga)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:zi(e),t]},useSyncExternalStore:bm,useId:Xm,useHostTransitionStatus:Qc,useFormState:Mm,useActionState:Mm,useOptimistic:function(e,t){var a=ut();return _m(a,qe,e,t)},useMemoCache:Dc,useCacheRefresh:Zm},gb={readContext:Tt,use:uo,useCallback:$m,useContext:Tt,useEffect:zm,useImperativeHandle:Qm,useInsertionEffect:qm,useLayoutEffect:Bm,useMemo:Ym,useReducer:Uc,useRef:Um,useState:function(){return Uc(ga)},useDebugValue:qc,useDeferredValue:function(e,t){var a=ut();return qe===null?Bc(a,e,t):Vm(a,qe.memoizedState,e,t)},useTransition:function(){var e=Uc(ga)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:zi(e),t]},useSyncExternalStore:bm,useId:Xm,useHostTransitionStatus:Qc,useFormState:Lm,useActionState:Lm,useOptimistic:function(e,t){var a=ut();return qe!==null?_m(a,qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Dc,useCacheRefresh:Zm},js=null,Hi=0;function yo(e){var t=Hi;return Hi+=1,js===null&&(js=[]),fm(js,e,t)}function Qi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function go(e,t){throw t.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function tp(e){var t=e._init;return t(e._payload)}function np(e){function t(M,O){if(e){var L=M.deletions;L===null?(M.deletions=[O],M.flags|=16):L.push(O)}}function a(M,O){if(!e)return null;for(;O!==null;)t(M,O),O=O.sibling;return null}function s(M){for(var O=new Map;M!==null;)M.key!==null?O.set(M.key,M):O.set(M.index,M),M=M.sibling;return O}function o(M,O){return M=da(M,O),M.index=0,M.sibling=null,M}function f(M,O,L){return M.index=L,e?(L=M.alternate,L!==null?(L=L.index,L<O?(M.flags|=67108866,O):L):(M.flags|=67108866,O)):(M.flags|=1048576,O)}function g(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function S(M,O,L,Y){return O===null||O.tag!==6?(O=uc(L,M.mode,Y),O.return=M,O):(O=o(O,L),O.return=M,O)}function A(M,O,L,Y){var ee=L.type;return ee===w?$(M,O,L.props.children,Y,L.key):O!==null&&(O.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===P&&tp(ee)===O.type)?(O=o(O,L.props),Qi(O,L),O.return=M,O):(O=Ir(L.type,L.key,L.props,null,M.mode,Y),Qi(O,L),O.return=M,O)}function U(M,O,L,Y){return O===null||O.tag!==4||O.stateNode.containerInfo!==L.containerInfo||O.stateNode.implementation!==L.implementation?(O=cc(L,M.mode,Y),O.return=M,O):(O=o(O,L.children||[]),O.return=M,O)}function $(M,O,L,Y,ee){return O===null||O.tag!==7?(O=Al(L,M.mode,Y,ee),O.return=M,O):(O=o(O,L),O.return=M,O)}function K(M,O,L){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=uc(""+O,M.mode,L),O.return=M,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case E:return L=Ir(O.type,O.key,O.props,null,M.mode,L),Qi(L,O),L.return=M,L;case j:return O=cc(O,M.mode,L),O.return=M,O;case P:var Y=O._init;return O=Y(O._payload),K(M,O,L)}if(_e(O)||Ce(O))return O=Al(O,M.mode,L,null),O.return=M,O;if(typeof O.then=="function")return K(M,yo(O),L);if(O.$$typeof===D)return K(M,no(M,O),L);go(M,O)}return null}function k(M,O,L,Y){var ee=O!==null?O.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ee!==null?null:S(M,O,""+L,Y);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case E:return L.key===ee?A(M,O,L,Y):null;case j:return L.key===ee?U(M,O,L,Y):null;case P:return ee=L._init,L=ee(L._payload),k(M,O,L,Y)}if(_e(L)||Ce(L))return ee!==null?null:$(M,O,L,Y,null);if(typeof L.then=="function")return k(M,O,yo(L),Y);if(L.$$typeof===D)return k(M,O,no(M,L),Y);go(M,L)}return null}function z(M,O,L,Y,ee){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return M=M.get(L)||null,S(O,M,""+Y,ee);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:return M=M.get(Y.key===null?L:Y.key)||null,A(O,M,Y,ee);case j:return M=M.get(Y.key===null?L:Y.key)||null,U(O,M,Y,ee);case P:var xe=Y._init;return Y=xe(Y._payload),z(M,O,L,Y,ee)}if(_e(Y)||Ce(Y))return M=M.get(L)||null,$(O,M,Y,ee,null);if(typeof Y.then=="function")return z(M,O,L,yo(Y),ee);if(Y.$$typeof===D)return z(M,O,L,no(O,Y),ee);go(O,Y)}return null}function de(M,O,L,Y){for(var ee=null,xe=null,le=O,fe=O=0,yt=null;le!==null&&fe<L.length;fe++){le.index>fe?(yt=le,le=null):yt=le.sibling;var Te=k(M,le,L[fe],Y);if(Te===null){le===null&&(le=yt);break}e&&le&&Te.alternate===null&&t(M,le),O=f(Te,O,fe),xe===null?ee=Te:xe.sibling=Te,xe=Te,le=yt}if(fe===L.length)return a(M,le),Me&&Ol(M,fe),ee;if(le===null){for(;fe<L.length;fe++)le=K(M,L[fe],Y),le!==null&&(O=f(le,O,fe),xe===null?ee=le:xe.sibling=le,xe=le);return Me&&Ol(M,fe),ee}for(le=s(le);fe<L.length;fe++)yt=z(le,M,fe,L[fe],Y),yt!==null&&(e&&yt.alternate!==null&&le.delete(yt.key===null?fe:yt.key),O=f(yt,O,fe),xe===null?ee=yt:xe.sibling=yt,xe=yt);return e&&le.forEach(function(ul){return t(M,ul)}),Me&&Ol(M,fe),ee}function ue(M,O,L,Y){if(L==null)throw Error(r(151));for(var ee=null,xe=null,le=O,fe=O=0,yt=null,Te=L.next();le!==null&&!Te.done;fe++,Te=L.next()){le.index>fe?(yt=le,le=null):yt=le.sibling;var ul=k(M,le,Te.value,Y);if(ul===null){le===null&&(le=yt);break}e&&le&&ul.alternate===null&&t(M,le),O=f(ul,O,fe),xe===null?ee=ul:xe.sibling=ul,xe=ul,le=yt}if(Te.done)return a(M,le),Me&&Ol(M,fe),ee;if(le===null){for(;!Te.done;fe++,Te=L.next())Te=K(M,Te.value,Y),Te!==null&&(O=f(Te,O,fe),xe===null?ee=Te:xe.sibling=Te,xe=Te);return Me&&Ol(M,fe),ee}for(le=s(le);!Te.done;fe++,Te=L.next())Te=z(le,M,fe,Te.value,Y),Te!==null&&(e&&Te.alternate!==null&&le.delete(Te.key===null?fe:Te.key),O=f(Te,O,fe),xe===null?ee=Te:xe.sibling=Te,xe=Te);return e&&le.forEach(function(v2){return t(M,v2)}),Me&&Ol(M,fe),ee}function He(M,O,L,Y){if(typeof L=="object"&&L!==null&&L.type===w&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case E:e:{for(var ee=L.key;O!==null;){if(O.key===ee){if(ee=L.type,ee===w){if(O.tag===7){a(M,O.sibling),Y=o(O,L.props.children),Y.return=M,M=Y;break e}}else if(O.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===P&&tp(ee)===O.type){a(M,O.sibling),Y=o(O,L.props),Qi(Y,L),Y.return=M,M=Y;break e}a(M,O);break}else t(M,O);O=O.sibling}L.type===w?(Y=Al(L.props.children,M.mode,Y,L.key),Y.return=M,M=Y):(Y=Ir(L.type,L.key,L.props,null,M.mode,Y),Qi(Y,L),Y.return=M,M=Y)}return g(M);case j:e:{for(ee=L.key;O!==null;){if(O.key===ee)if(O.tag===4&&O.stateNode.containerInfo===L.containerInfo&&O.stateNode.implementation===L.implementation){a(M,O.sibling),Y=o(O,L.children||[]),Y.return=M,M=Y;break e}else{a(M,O);break}else t(M,O);O=O.sibling}Y=cc(L,M.mode,Y),Y.return=M,M=Y}return g(M);case P:return ee=L._init,L=ee(L._payload),He(M,O,L,Y)}if(_e(L))return de(M,O,L,Y);if(Ce(L)){if(ee=Ce(L),typeof ee!="function")throw Error(r(150));return L=ee.call(L),ue(M,O,L,Y)}if(typeof L.then=="function")return He(M,O,yo(L),Y);if(L.$$typeof===D)return He(M,O,no(M,L),Y);go(M,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,O!==null&&O.tag===6?(a(M,O.sibling),Y=o(O,L),Y.return=M,M=Y):(a(M,O),Y=uc(L,M.mode,Y),Y.return=M,M=Y),g(M)):a(M,O)}return function(M,O,L,Y){try{Hi=0;var ee=He(M,O,L,Y);return js=null,ee}catch(le){if(le===Oi||le===lo)throw le;var xe=en(29,le,null,M.mode);return xe.lanes=Y,xe.return=M,xe}finally{}}}var Ts=np(!0),ap=np(!1),Cn=Q(null),Gn=null;function Xa(e){var t=e.alternate;W(ft,ft.current&1),W(Cn,e),Gn===null&&(t===null||Es.current!==null||t.memoizedState!==null)&&(Gn=e)}function lp(e){if(e.tag===22){if(W(ft,ft.current),W(Cn,e),Gn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Gn=e)}}else Za()}function Za(){W(ft,ft.current),W(Cn,Cn.current)}function va(e){I(Cn),Gn===e&&(Gn=null),I(ft)}var ft=Q(0);function vo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Df(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Yc(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Vc={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=ln(),o=Ka(s);o.payload=t,a!=null&&(o.callback=a),t=Ga(e,o,s),t!==null&&(sn(t,e,s),Di(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=ln(),o=Ka(s);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Ga(e,o,s),t!==null&&(sn(t,e,s),Di(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ln(),s=Ka(a);s.tag=2,t!=null&&(s.callback=t),t=Ga(e,s,a),t!==null&&(sn(t,e,a),Di(t,e,a))}};function sp(e,t,a,s,o,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,g):t.prototype&&t.prototype.isPureReactComponent?!Ei(a,s)||!Ei(o,f):!0}function ip(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&Vc.enqueueReplaceState(t,t.state,null)}function ql(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}var bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function rp(e){bo(e)}function op(e){console.error(e)}function up(e){bo(e)}function xo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function cp(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Kc(e,t,a){return a=Ka(a),a.tag=3,a.payload={element:null},a.callback=function(){xo(e,t)},a}function fp(e){return e=Ka(e),e.tag=3,e}function dp(e,t,a,s){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var f=s.value;e.payload=function(){return o(f)},e.callback=function(){cp(t,a,s)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){cp(t,a,s),typeof o!="function"&&(tl===null?tl=new Set([this]):tl.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function vb(e,t,a,s,o){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&Ti(t,a,o,!0),a=Cn.current,a!==null){switch(a.tag){case 13:return Gn===null?yf():a.alternate===null&&We===0&&(We=3),a.flags&=-257,a.flags|=65536,a.lanes=o,s===xc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),vf(e,s,o)),!1;case 22:return a.flags|=65536,s===xc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),vf(e,s,o)),!1}throw Error(r(435,a.tag))}return vf(e,s,o),yf(),!1}if(Me)return t=Cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,s!==hc&&(e=Error(r(422),{cause:s}),ji(xn(e,a)))):(s!==hc&&(t=Error(r(423),{cause:s}),ji(xn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,s=xn(s,a),o=Kc(e.stateNode,s,o),Ec(e,o),We!==4&&(We=2)),!1;var f=Error(r(520),{cause:s});if(f=xn(f,a),Xi===null?Xi=[f]:Xi.push(f),We!==4&&(We=2),t===null)return!0;s=xn(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Kc(a.stateNode,s,e),Ec(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(tl===null||!tl.has(f))))return a.flags|=65536,o&=-o,a.lanes|=o,o=fp(o),dp(o,e,a,s),Ec(a,o),!1}a=a.return}while(a!==null);return!1}var hp=Error(r(461)),mt=!1;function bt(e,t,a,s){t.child=e===null?ap(t,null,a,s):Ts(t,e.child,a,s)}function mp(e,t,a,s,o){a=a.render;var f=t.ref;if("ref"in s){var g={};for(var S in s)S!=="ref"&&(g[S]=s[S])}else g=s;return Ul(t),s=Tc(e,t,a,g,f,o),S=Ac(),e!==null&&!mt?(Rc(e,t,o),ba(e,t,o)):(Me&&S&&fc(t),t.flags|=1,bt(e,t,s,o),t.child)}function pp(e,t,a,s,o){if(e===null){var f=a.type;return typeof f=="function"&&!oc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,yp(e,t,f,s,o)):(e=Ir(a.type,null,s,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Wc(e,o)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:Ei,a(g,s)&&e.ref===t.ref)return ba(e,t,o)}return t.flags|=1,e=da(f,s),e.ref=t.ref,e.return=t,t.child=e}function yp(e,t,a,s,o){if(e!==null){var f=e.memoizedProps;if(Ei(f,s)&&e.ref===t.ref)if(mt=!1,t.pendingProps=s=f,Wc(e,o))(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,ba(e,t,o)}return Gc(e,t,a,s,o)}function gp(e,t,a){var s=t.pendingProps,o=s.children,f=e!==null?e.memoizedState:null;if(s.mode==="hidden"){if((t.flags&128)!==0){if(s=f!==null?f.baseLanes|a:a,e!==null){for(o=t.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;t.childLanes=f&~s}else t.childLanes=0,t.child=null;return vp(e,t,s,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ao(t,f!==null?f.cachePool:null),f!==null?ym(t,f):_c(),lp(t);else return t.lanes=t.childLanes=536870912,vp(e,t,f!==null?f.baseLanes|a:a,a)}else f!==null?(ao(t,f.cachePool),ym(t,f),Za(),t.memoizedState=null):(e!==null&&ao(t,null),_c(),Za());return bt(e,t,o,a),t.child}function vp(e,t,a,s){var o=bc();return o=o===null?null:{parent:ct._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&ao(t,null),_c(),lp(t),e!==null&&Ti(e,t,s,!0),null}function So(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Gc(e,t,a,s,o){return Ul(t),a=Tc(e,t,a,s,void 0,o),s=Ac(),e!==null&&!mt?(Rc(e,t,o),ba(e,t,o)):(Me&&s&&fc(t),t.flags|=1,bt(e,t,a,o),t.child)}function bp(e,t,a,s,o,f){return Ul(t),t.updateQueue=null,a=vm(t,s,a,o),gm(e),s=Ac(),e!==null&&!mt?(Rc(e,t,f),ba(e,t,f)):(Me&&s&&fc(t),t.flags|=1,bt(e,t,a,f),t.child)}function xp(e,t,a,s,o){if(Ul(t),t.stateNode===null){var f=vs,g=a.contextType;typeof g=="object"&&g!==null&&(f=Tt(g)),f=new a(s,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Vc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=s,f.state=t.memoizedState,f.refs={},Sc(t),g=a.contextType,f.context=typeof g=="object"&&g!==null?Tt(g):vs,f.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(Yc(t,a,g,s),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&Vc.enqueueReplaceState(f,f.state,null),Ui(t,s,f,o),Li(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){f=t.stateNode;var S=t.memoizedProps,A=ql(a,S);f.props=A;var U=f.context,$=a.contextType;g=vs,typeof $=="object"&&$!==null&&(g=Tt($));var K=a.getDerivedStateFromProps;$=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S||U!==g)&&ip(t,f,s,g),Va=!1;var k=t.memoizedState;f.state=k,Ui(t,s,f,o),Li(),U=t.memoizedState,S||k!==U||Va?(typeof K=="function"&&(Yc(t,a,K,s),U=t.memoizedState),(A=Va||sp(t,a,A,s,k,U,g))?($||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=U),f.props=s,f.state=U,f.context=g,s=A):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,wc(e,t),g=t.memoizedProps,$=ql(a,g),f.props=$,K=t.pendingProps,k=f.context,U=a.contextType,A=vs,typeof U=="object"&&U!==null&&(A=Tt(U)),S=a.getDerivedStateFromProps,(U=typeof S=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==K||k!==A)&&ip(t,f,s,A),Va=!1,k=t.memoizedState,f.state=k,Ui(t,s,f,o),Li();var z=t.memoizedState;g!==K||k!==z||Va||e!==null&&e.dependencies!==null&&to(e.dependencies)?(typeof S=="function"&&(Yc(t,a,S,s),z=t.memoizedState),($=Va||sp(t,a,$,s,k,z,A)||e!==null&&e.dependencies!==null&&to(e.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,z,A),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,z,A)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=z),f.props=s,f.state=z,f.context=A,s=$):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),s=!1)}return f=s,So(e,t),s=(t.flags&128)!==0,f||s?(f=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&s?(t.child=Ts(t,e.child,null,o),t.child=Ts(t,null,a,o)):bt(e,t,a,o),t.memoizedState=f.state,e=t.child):e=ba(e,t,o),e}function Sp(e,t,a,s){return Ni(),t.flags|=256,bt(e,t,a,s),t.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:om()}}function Zc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=_n),e}function wp(e,t,a){var s=t.pendingProps,o=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(ft.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(o?Xa(t):Za(),Me){var S=Ie,A;if(A=S){e:{for(A=S,S=Kn;A.nodeType!==8;){if(!S){S=null;break e}if(A=Mn(A.nextSibling),A===null){S=null;break e}}S=A}S!==null?(t.memoizedState={dehydrated:S,treeContext:Rl!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},A=en(18,null,null,0),A.stateNode=S,A.return=t,t.child=A,Ut=t,Ie=null,A=!0):A=!1}A||Dl(t)}if(S=t.memoizedState,S!==null&&(S=S.dehydrated,S!==null))return Df(S)?t.lanes=32:t.lanes=536870912,null;va(t)}return S=s.children,s=s.fallback,o?(Za(),o=t.mode,S=wo({mode:"hidden",children:S},o),s=Al(s,o,a,null),S.return=t,s.return=t,S.sibling=s,t.child=S,o=t.child,o.memoizedState=Xc(a),o.childLanes=Zc(e,g,a),t.memoizedState=Fc,s):(Xa(t),Pc(t,S))}if(A=e.memoizedState,A!==null&&(S=A.dehydrated,S!==null)){if(f)t.flags&256?(Xa(t),t.flags&=-257,t=Jc(e,t,a)):t.memoizedState!==null?(Za(),t.child=e.child,t.flags|=128,t=null):(Za(),o=s.fallback,S=t.mode,s=wo({mode:"visible",children:s.children},S),o=Al(o,S,a,null),o.flags|=2,s.return=t,o.return=t,s.sibling=o,t.child=s,Ts(t,e.child,null,a),s=t.child,s.memoizedState=Xc(a),s.childLanes=Zc(e,g,a),t.memoizedState=Fc,t=o);else if(Xa(t),Df(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var U=g.dgst;g=U,s=Error(r(419)),s.stack="",s.digest=g,ji({value:s,source:null,stack:null}),t=Jc(e,t,a)}else if(mt||Ti(e,t,a,!1),g=(a&e.childLanes)!==0,mt||g){if(g=Ve,g!==null&&(s=a&-a,s=(s&42)!==0?1:_t(s),s=(s&(g.suspendedLanes|a))!==0?0:s,s!==0&&s!==A.retryLane))throw A.retryLane=s,gs(e,s),sn(g,e,s),hp;S.data==="$?"||yf(),t=Jc(e,t,a)}else S.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,Ie=Mn(S.nextSibling),Ut=t,Me=!0,Ml=null,Kn=!1,e!==null&&(wn[En++]=ha,wn[En++]=ma,wn[En++]=Rl,ha=e.id,ma=e.overflow,Rl=t),t=Pc(t,s.children),t.flags|=4096);return t}return o?(Za(),o=s.fallback,S=t.mode,A=e.child,U=A.sibling,s=da(A,{mode:"hidden",children:s.children}),s.subtreeFlags=A.subtreeFlags&65011712,U!==null?o=da(U,o):(o=Al(o,S,a,null),o.flags|=2),o.return=t,s.return=t,s.sibling=o,t.child=s,s=o,o=t.child,S=e.child.memoizedState,S===null?S=Xc(a):(A=S.cachePool,A!==null?(U=ct._currentValue,A=A.parent!==U?{parent:U,pool:U}:A):A=om(),S={baseLanes:S.baseLanes|a,cachePool:A}),o.memoizedState=S,o.childLanes=Zc(e,g,a),t.memoizedState=Fc,s):(Xa(t),a=e.child,e=a.sibling,a=da(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function Pc(e,t){return t=wo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wo(e,t){return e=en(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Jc(e,t,a){return Ts(t,e.child,null,a),e=Pc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ep(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),pc(e.return,t,a)}function Ic(e,t,a,s,o){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:o}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=s,f.tail=a,f.tailMode=o)}function Cp(e,t,a){var s=t.pendingProps,o=s.revealOrder,f=s.tail;if(bt(e,t,s.children,a),s=ft.current,(s&2)!==0)s=s&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ep(e,a,t);else if(e.tag===19)Ep(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}switch(W(ft,s),o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&vo(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Ic(t,!1,o,a,f);break;case"backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&vo(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Ic(t,!0,a,null,f);break;case"together":Ic(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ba(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),el|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ti(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=da(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=da(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Wc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&to(e)))}function bb(e,t,a){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),Ya(t,ct,e.memoizedState.cache),Ni();break;case 27:case 5:Hn(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:Ya(t,t.type,t.memoizedProps.value);break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Xa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?wp(e,t,a):(Xa(t),e=ba(e,t,a),e!==null?e.sibling:null);Xa(t);break;case 19:var o=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(Ti(e,t,a,!1),s=(a&t.childLanes)!==0),o){if(s)return Cp(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),W(ft,ft.current),s)break;return null;case 22:case 23:return t.lanes=0,gp(e,t,a);case 24:Ya(t,ct,e.memoizedState.cache)}return ba(e,t,a)}function _p(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!Wc(e,a)&&(t.flags&128)===0)return mt=!1,bb(e,t,a);mt=(e.flags&131072)!==0}else mt=!1,Me&&(t.flags&1048576)!==0&&tm(t,eo,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var s=t.elementType,o=s._init;if(s=o(s._payload),t.type=s,typeof s=="function")oc(s)?(e=ql(s,e),t.tag=1,t=xp(null,t,s,e,a)):(t.tag=0,t=Gc(null,t,s,e,a));else{if(s!=null){if(o=s.$$typeof,o===H){t.tag=11,t=mp(null,t,s,e,a);break e}else if(o===G){t.tag=14,t=pp(null,t,s,e,a);break e}}throw t=me(s)||s,Error(r(306,t,""))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,o=ql(s,t.pendingProps),xp(e,t,s,o,a);case 3:e:{if(De(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var f=t.memoizedState;o=f.element,wc(e,t),Ui(t,s,null,a);var g=t.memoizedState;if(s=g.cache,Ya(t,ct,s),s!==f.cache&&yc(t,[ct],a,!0),Li(),s=g.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Sp(e,t,s,a);break e}else if(s!==o){o=xn(Error(r(424)),t),ji(o),t=Sp(e,t,s,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ie=Mn(e.firstChild),Ut=t,Me=!0,Ml=null,Kn=!0,a=ap(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ni(),s===o){t=ba(e,t,a);break e}bt(e,t,s,a)}t=t.child}return t;case 26:return So(e,t),e===null?(a=A0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Me||(a=t.type,e=t.pendingProps,s=ko(oe.current).createElement(a),s[Z]=t,s[te]=e,St(s,a,e),lt(s),t.stateNode=s):t.memoizedState=A0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Hn(t),e===null&&Me&&(s=t.stateNode=N0(t.type,t.pendingProps,oe.current),Ut=t,Kn=!0,o=Ie,ll(t.type)?(Lf=o,Ie=Mn(s.firstChild)):Ie=o),bt(e,t,t.pendingProps.children,a),So(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((o=s=Ie)&&(s=Fb(s,t.type,t.pendingProps,Kn),s!==null?(t.stateNode=s,Ut=t,Ie=Mn(s.firstChild),Kn=!1,o=!0):o=!1),o||Dl(t)),Hn(t),o=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,s=f.children,Rf(o,f)?s=null:g!==null&&Rf(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Tc(e,t,fb,null,null,a),ar._currentValue=o),So(e,t),bt(e,t,s,a),t.child;case 6:return e===null&&Me&&((e=a=Ie)&&(a=Xb(a,t.pendingProps,Kn),a!==null?(t.stateNode=a,Ut=t,Ie=null,e=!0):e=!1),e||Dl(t)),null;case 13:return wp(e,t,a);case 4:return De(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ts(t,null,s,a):bt(e,t,s,a),t.child;case 11:return mp(e,t,t.type,t.pendingProps,a);case 7:return bt(e,t,t.pendingProps,a),t.child;case 8:return bt(e,t,t.pendingProps.children,a),t.child;case 12:return bt(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,Ya(t,t.type,s.value),bt(e,t,s.children,a),t.child;case 9:return o=t.type._context,s=t.pendingProps.children,Ul(t),o=Tt(o),s=s(o),t.flags|=1,bt(e,t,s,a),t.child;case 14:return pp(e,t,t.type,t.pendingProps,a);case 15:return yp(e,t,t.type,t.pendingProps,a);case 19:return Cp(e,t,a);case 31:return s=t.pendingProps,a=t.mode,s={mode:s.mode,children:s.children},e===null?(a=wo(s,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=da(e.child,s),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return gp(e,t,a);case 24:return Ul(t),s=Tt(ct),e===null?(o=bc(),o===null&&(o=Ve,f=gc(),o.pooledCache=f,f.refCount++,f!==null&&(o.pooledCacheLanes|=a),o=f),t.memoizedState={parent:s,cache:o},Sc(t),Ya(t,ct,o)):((e.lanes&a)!==0&&(wc(e,t),Ui(t,null,null,a),Li()),o=e.memoizedState,f=t.memoizedState,o.parent!==s?(o={parent:s,cache:s},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Ya(t,ct,s)):(s=f.cache,Ya(t,ct,s),s!==o.cache&&yc(t,[ct],a,!0))),bt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function xa(e){e.flags|=4}function Np(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!L0(t)){if(t=Cn.current,t!==null&&((Ne&4194048)===Ne?Gn!==null:(Ne&62914560)!==Ne&&(Ne&536870912)===0||t!==Gn))throw Mi=xc,um;e.flags|=8192}}function Eo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?oa():536870912,e.lanes|=t,Ms|=t)}function $i(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function xb(e,t,a){var s=t.pendingProps;switch(dc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ya(ct),Ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(_i(t)?xa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,lm())),Ze(t),null;case 26:return a=t.memoizedState,e===null?(xa(t),a!==null?(Ze(t),Np(t,a)):(Ze(t),t.flags&=-16777217)):a?a!==e.memoizedState?(xa(t),Ze(t),Np(t,a)):(Ze(t),t.flags&=-16777217):(e.memoizedProps!==s&&xa(t),Ze(t),t.flags&=-16777217),null;case 27:Et(t),a=oe.current;var o=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==s&&xa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ze(t),null}e=ne.current,_i(t)?nm(t):(e=N0(o,s,a),t.stateNode=e,xa(t))}return Ze(t),null;case 5:if(Et(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&xa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ze(t),null}if(e=ne.current,_i(t))nm(t);else{switch(o=ko(oe.current),e){case 1:e=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof s.is=="string"?o.createElement("select",{is:s.is}):o.createElement("select"),s.multiple?e.multiple=!0:s.size&&(e.size=s.size);break;default:e=typeof s.is=="string"?o.createElement(a,{is:s.is}):o.createElement(a)}}e[Z]=t,e[te]=s;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=e;e:switch(St(e,a,s),a){case"button":case"input":case"select":case"textarea":e=!!s.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&xa(t)}}return Ze(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&xa(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=oe.current,_i(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,o=Ut,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}e[Z]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||b0(e.nodeValue,a)),e||Dl(t)}else e=ko(e).createTextNode(s),e[Z]=t,t.stateNode=e}return Ze(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=_i(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[Z]=t}else Ni(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),o=!1}else o=lm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(va(t),t):(va(t),null)}if(va(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=s!==null,e=e!==null&&e.memoizedState!==null,a){s=t.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool);var f=null;s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==o&&(s.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Eo(t,t.updateQueue),Ze(t),null;case 4:return Ge(),e===null&&_f(t.stateNode.containerInfo),Ze(t),null;case 10:return ya(t.type),Ze(t),null;case 19:if(I(ft),o=t.memoizedState,o===null)return Ze(t),null;if(s=(t.flags&128)!==0,f=o.rendering,f===null)if(s)$i(o,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=vo(e),f!==null){for(t.flags|=128,$i(o,!1),e=f.updateQueue,t.updateQueue=e,Eo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)em(a,e),a=a.sibling;return W(ft,ft.current&1|2),t.child}e=e.sibling}o.tail!==null&&Dt()>No&&(t.flags|=128,s=!0,$i(o,!1),t.lanes=4194304)}else{if(!s)if(e=vo(f),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Eo(t,e),$i(o,!0),o.tail===null&&o.tailMode==="hidden"&&!f.alternate&&!Me)return Ze(t),null}else 2*Dt()-o.renderingStartTime>No&&a!==536870912&&(t.flags|=128,s=!0,$i(o,!1),t.lanes=4194304);o.isBackwards?(f.sibling=t.child,t.child=f):(e=o.last,e!==null?e.sibling=f:t.child=f,o.last=f)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Dt(),t.sibling=null,e=ft.current,W(ft,s?e&1|2:e&1),t):(Ze(t),null);case 22:case 23:return va(t),Nc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),a=t.updateQueue,a!==null&&Eo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&I(kl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ya(ct),Ze(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Sb(e,t){switch(dc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(ct),Ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Et(t),null;case 13:if(va(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(ft),null;case 4:return Ge(),null;case 10:return ya(t.type),null;case 22:case 23:return va(t),Nc(),e!==null&&I(kl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(ct),null;case 25:return null;default:return null}}function jp(e,t){switch(dc(t),t.tag){case 3:ya(ct),Ge();break;case 26:case 27:case 5:Et(t);break;case 4:Ge();break;case 13:va(t);break;case 19:I(ft);break;case 10:ya(t.type);break;case 22:case 23:va(t),Nc(),e!==null&&I(kl);break;case 24:ya(ct)}}function Yi(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var o=s.next;a=o;do{if((a.tag&e)===e){s=void 0;var f=a.create,g=a.inst;s=f(),g.destroy=s}a=a.next}while(a!==o)}}catch(S){Qe(t,t.return,S)}}function Pa(e,t,a){try{var s=t.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var f=o.next;s=f;do{if((s.tag&e)===e){var g=s.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var A=a,U=S;try{U()}catch($){Qe(o,A,$)}}}s=s.next}while(s!==f)}}catch($){Qe(t,t.return,$)}}function Tp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{pm(t,a)}catch(s){Qe(e,e.return,s)}}}function Ap(e,t,a){a.props=ql(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){Qe(e,t,s)}}function Vi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(o){Qe(e,t,o)}}function Fn(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(o){Qe(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Qe(e,t,o)}else a.current=null}function Rp(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(o){Qe(e,e.return,o)}}function ef(e,t,a){try{var s=e.stateNode;$b(s,e.type,a,t),s[te]=t}catch(o){Qe(e,e.return,o)}}function Op(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ll(e.type)||e.tag===4}function tf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Op(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ll(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nf(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Uo));else if(s!==4&&(s===27&&ll(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(nf(e,t,a),e=e.sibling;e!==null;)nf(e,t,a),e=e.sibling}function Co(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&ll(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Co(e,t,a),e=e.sibling;e!==null;)Co(e,t,a),e=e.sibling}function Mp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);St(t,s,a),t[Z]=e,t[te]=a}catch(f){Qe(e,e.return,f)}}var Sa=!1,it=!1,af=!1,Dp=typeof WeakSet=="function"?WeakSet:Set,pt=null;function wb(e,t){if(e=e.containerInfo,Tf=$o,e=Vh(e),tc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var o=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var g=0,S=-1,A=-1,U=0,$=0,K=e,k=null;t:for(;;){for(var z;K!==a||o!==0&&K.nodeType!==3||(S=g+o),K!==f||s!==0&&K.nodeType!==3||(A=g+s),K.nodeType===3&&(g+=K.nodeValue.length),(z=K.firstChild)!==null;)k=K,K=z;for(;;){if(K===e)break t;if(k===a&&++U===o&&(S=g),k===f&&++$===s&&(A=g),(z=K.nextSibling)!==null)break;K=k,k=K.parentNode}K=z}a=S===-1||A===-1?null:{start:S,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Af={focusedElem:e,selectionRange:a},$o=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,f=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,o=f.memoizedProps,f=f.memoizedState,s=a.stateNode;try{var de=ql(a.type,o,a.elementType===a.type);e=s.getSnapshotBeforeUpdate(de,f),s.__reactInternalSnapshotBeforeUpdate=e}catch(ue){Qe(a,a.return,ue)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Mf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function Lp(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Ja(e,a),s&4&&Yi(5,a);break;case 1:if(Ja(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Qe(a,a.return,g)}else{var o=ql(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Qe(a,a.return,g)}}s&64&&Tp(a),s&512&&Vi(a,a.return);break;case 3:if(Ja(e,a),s&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{pm(e,t)}catch(g){Qe(a,a.return,g)}}break;case 27:t===null&&s&4&&Mp(a);case 26:case 5:Ja(e,a),t===null&&s&4&&Rp(a),s&512&&Vi(a,a.return);break;case 12:Ja(e,a);break;case 13:Ja(e,a),s&4&&zp(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ob.bind(null,a),Zb(e,a))));break;case 22:if(s=a.memoizedState!==null||Sa,!s){t=t!==null&&t.memoizedState!==null||it,o=Sa;var f=it;Sa=s,(it=t)&&!f?Ia(e,a,(a.subtreeFlags&8772)!==0):Ja(e,a),Sa=o,it=f}break;case 30:break;default:Ja(e,a)}}function Up(e){var t=e.alternate;t!==null&&(e.alternate=null,Up(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fe=null,$t=!1;function wa(e,t,a){for(a=a.child;a!==null;)kp(e,t,a),a=a.sibling}function kp(e,t,a){if(Je&&typeof Je.onCommitFiberUnmount=="function")try{Je.onCommitFiberUnmount(hn,a)}catch{}switch(a.tag){case 26:it||Fn(a,t),wa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:it||Fn(a,t);var s=Fe,o=$t;ll(a.type)&&(Fe=a.stateNode,$t=!1),wa(e,t,a),Wi(a.stateNode),Fe=s,$t=o;break;case 5:it||Fn(a,t);case 6:if(s=Fe,o=$t,Fe=null,wa(e,t,a),Fe=s,$t=o,Fe!==null)if($t)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(a.stateNode)}catch(f){Qe(a,t,f)}else try{Fe.removeChild(a.stateNode)}catch(f){Qe(a,t,f)}break;case 18:Fe!==null&&($t?(e=Fe,C0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),rr(e)):C0(Fe,a.stateNode));break;case 4:s=Fe,o=$t,Fe=a.stateNode.containerInfo,$t=!0,wa(e,t,a),Fe=s,$t=o;break;case 0:case 11:case 14:case 15:it||Pa(2,a,t),it||Pa(4,a,t),wa(e,t,a);break;case 1:it||(Fn(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Ap(a,t,s)),wa(e,t,a);break;case 21:wa(e,t,a);break;case 22:it=(s=it)||a.memoizedState!==null,wa(e,t,a),it=s;break;default:wa(e,t,a)}}function zp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{rr(e)}catch(a){Qe(t,t.return,a)}}function Eb(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dp),t;default:throw Error(r(435,e.tag))}}function lf(e,t){var a=Eb(e);t.forEach(function(s){var o=Mb.bind(null,e,s);a.has(s)||(a.add(s),s.then(o,o))})}function tn(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var o=a[s],f=e,g=t,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(ll(S.type)){Fe=S.stateNode,$t=!1;break e}break;case 5:Fe=S.stateNode,$t=!1;break e;case 3:case 4:Fe=S.stateNode.containerInfo,$t=!0;break e}S=S.return}if(Fe===null)throw Error(r(160));kp(f,g,o),Fe=null,$t=!1,f=o.alternate,f!==null&&(f.return=null),o.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)qp(t,e),t=t.sibling}var On=null;function qp(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),s&4&&(Pa(3,e,e.return),Yi(3,e),Pa(5,e,e.return));break;case 1:tn(t,e),nn(e),s&512&&(it||a===null||Fn(a,a.return)),s&64&&Sa&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var o=On;if(tn(t,e),nn(e),s&512&&(it||a===null||Fn(a,a.return)),s&4){var f=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(s){case"title":f=o.getElementsByTagName("title")[0],(!f||f[at]||f[Z]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=o.createElement(s),o.head.insertBefore(f,o.querySelector("head > title"))),St(f,s,a),f[Z]=e,lt(f),s=f;break e;case"link":var g=M0("link","href",o).get(s+(a.href||""));if(g){for(var S=0;S<g.length;S++)if(f=g[S],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(S,1);break t}}f=o.createElement(s),St(f,s,a),o.head.appendChild(f);break;case"meta":if(g=M0("meta","content",o).get(s+(a.content||""))){for(S=0;S<g.length;S++)if(f=g[S],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(S,1);break t}}f=o.createElement(s),St(f,s,a),o.head.appendChild(f);break;default:throw Error(r(468,s))}f[Z]=e,lt(f),s=f}e.stateNode=s}else D0(o,e.type,e.stateNode);else e.stateNode=O0(o,s,e.memoizedProps);else f!==s?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,s===null?D0(o,e.type,e.stateNode):O0(o,s,e.memoizedProps)):s===null&&e.stateNode!==null&&ef(e,e.memoizedProps,a.memoizedProps)}break;case 27:tn(t,e),nn(e),s&512&&(it||a===null||Fn(a,a.return)),a!==null&&s&4&&ef(e,e.memoizedProps,a.memoizedProps);break;case 5:if(tn(t,e),nn(e),s&512&&(it||a===null||Fn(a,a.return)),e.flags&32){o=e.stateNode;try{cs(o,"")}catch(z){Qe(e,e.return,z)}}s&4&&e.stateNode!=null&&(o=e.memoizedProps,ef(e,o,a!==null?a.memoizedProps:o)),s&1024&&(af=!0);break;case 6:if(tn(t,e),nn(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(z){Qe(e,e.return,z)}}break;case 3:if(Bo=null,o=On,On=zo(t.containerInfo),tn(t,e),On=o,nn(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{rr(t.containerInfo)}catch(z){Qe(e,e.return,z)}af&&(af=!1,Bp(e));break;case 4:s=On,On=zo(e.stateNode.containerInfo),tn(t,e),nn(e),On=s;break;case 12:tn(t,e),nn(e);break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ff=Dt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,lf(e,s)));break;case 22:o=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,U=Sa,$=it;if(Sa=U||o,it=$||A,tn(t,e),it=$,Sa=U,nn(e),s&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||A||Sa||it||Bl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){A=a=t;try{if(f=A.stateNode,o)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{S=A.stateNode;var K=A.memoizedProps.style,k=K!=null&&K.hasOwnProperty("display")?K.display:null;S.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(z){Qe(A,A.return,z)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=o?"":A.memoizedProps}catch(z){Qe(A,A.return,z)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,lf(e,a))));break;case 19:tn(t,e),nn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,lf(e,s)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(Op(s)){a=s;break}s=s.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,f=tf(e);Co(e,f,o);break;case 5:var g=a.stateNode;a.flags&32&&(cs(g,""),a.flags&=-33);var S=tf(e);Co(e,S,g);break;case 3:case 4:var A=a.stateNode.containerInfo,U=tf(e);nf(e,U,A);break;default:throw Error(r(161))}}catch($){Qe(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Bp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ja(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Lp(e,t.alternate,t),t=t.sibling}function Bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pa(4,t,t.return),Bl(t);break;case 1:Fn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Ap(t,t.return,a),Bl(t);break;case 27:Wi(t.stateNode);case 26:case 5:Fn(t,t.return),Bl(t);break;case 22:t.memoizedState===null&&Bl(t);break;case 30:Bl(t);break;default:Bl(t)}e=e.sibling}}function Ia(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,o=e,f=t,g=f.flags;switch(f.tag){case 0:case 11:case 15:Ia(o,f,a),Yi(4,f);break;case 1:if(Ia(o,f,a),s=f,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(U){Qe(s,s.return,U)}if(s=f,o=s.updateQueue,o!==null){var S=s.stateNode;try{var A=o.shared.hiddenCallbacks;if(A!==null)for(o.shared.hiddenCallbacks=null,o=0;o<A.length;o++)mm(A[o],S)}catch(U){Qe(s,s.return,U)}}a&&g&64&&Tp(f),Vi(f,f.return);break;case 27:Mp(f);case 26:case 5:Ia(o,f,a),a&&s===null&&g&4&&Rp(f),Vi(f,f.return);break;case 12:Ia(o,f,a);break;case 13:Ia(o,f,a),a&&g&4&&zp(o,f);break;case 22:f.memoizedState===null&&Ia(o,f,a),Vi(f,f.return);break;case 30:break;default:Ia(o,f,a)}t=t.sibling}}function sf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ai(a))}function rf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ai(e))}function Xn(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hp(e,t,a,s),t=t.sibling}function Hp(e,t,a,s){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,a,s),o&2048&&Yi(9,t);break;case 1:Xn(e,t,a,s);break;case 3:Xn(e,t,a,s),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ai(e)));break;case 12:if(o&2048){Xn(e,t,a,s),e=t.stateNode;try{var f=t.memoizedProps,g=f.id,S=f.onPostCommit;typeof S=="function"&&S(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Qe(t,t.return,A)}}else Xn(e,t,a,s);break;case 13:Xn(e,t,a,s);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?Xn(e,t,a,s):Ki(e,t):f._visibility&2?Xn(e,t,a,s):(f._visibility|=2,As(e,t,a,s,(t.subtreeFlags&10256)!==0)),o&2048&&sf(g,t);break;case 24:Xn(e,t,a,s),o&2048&&rf(t.alternate,t);break;default:Xn(e,t,a,s)}}function As(e,t,a,s,o){for(o=o&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var f=e,g=t,S=a,A=s,U=g.flags;switch(g.tag){case 0:case 11:case 15:As(f,g,S,A,o),Yi(8,g);break;case 23:break;case 22:var $=g.stateNode;g.memoizedState!==null?$._visibility&2?As(f,g,S,A,o):Ki(f,g):($._visibility|=2,As(f,g,S,A,o)),o&&U&2048&&sf(g.alternate,g);break;case 24:As(f,g,S,A,o),o&&U&2048&&rf(g.alternate,g);break;default:As(f,g,S,A,o)}t=t.sibling}}function Ki(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,o=s.flags;switch(s.tag){case 22:Ki(a,s),o&2048&&sf(s.alternate,s);break;case 24:Ki(a,s),o&2048&&rf(s.alternate,s);break;default:Ki(a,s)}t=t.sibling}}var Gi=8192;function Rs(e){if(e.subtreeFlags&Gi)for(e=e.child;e!==null;)Qp(e),e=e.sibling}function Qp(e){switch(e.tag){case 26:Rs(e),e.flags&Gi&&e.memoizedState!==null&&o2(On,e.memoizedState,e.memoizedProps);break;case 5:Rs(e);break;case 3:case 4:var t=On;On=zo(e.stateNode.containerInfo),Rs(e),On=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Gi,Gi=16777216,Rs(e),Gi=t):Rs(e));break;default:Rs(e)}}function $p(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];pt=s,Vp(s,e)}$p(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yp(e),e=e.sibling}function Yp(e){switch(e.tag){case 0:case 11:case 15:Fi(e),e.flags&2048&&Pa(9,e,e.return);break;case 3:Fi(e);break;case 12:Fi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,_o(e)):Fi(e);break;default:Fi(e)}}function _o(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];pt=s,Vp(s,e)}$p(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pa(8,t,t.return),_o(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,_o(t));break;default:_o(t)}e=e.sibling}}function Vp(e,t){for(;pt!==null;){var a=pt;switch(a.tag){case 0:case 11:case 15:Pa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ai(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,pt=s;else e:for(a=e;pt!==null;){s=pt;var o=s.sibling,f=s.return;if(Up(s),s===a){pt=null;break e}if(o!==null){o.return=f,pt=o;break e}pt=f}}}var Cb={getCacheForType:function(e){var t=Tt(ct),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},_b=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ve=null,we=null,Ne=0,Ue=0,an=null,Wa=!1,Os=!1,of=!1,Ea=0,We=0,el=0,Hl=0,uf=0,_n=0,Ms=0,Xi=null,Yt=null,cf=!1,ff=0,No=1/0,jo=null,tl=null,xt=0,nl=null,Ds=null,Ls=0,df=0,hf=null,Kp=null,Zi=0,mf=null;function ln(){if((Le&2)!==0&&Ne!==0)return Ne&-Ne;if(q.T!==null){var e=Ss;return e!==0?e:Sf()}return Se()}function Gp(){_n===0&&(_n=(Ne&536870912)===0||Me?Ba():536870912);var e=Cn.current;return e!==null&&(e.flags|=32),_n}function sn(e,t,a){(e===Ve&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(Us(e,0),al(e,Ne,_n,!1)),pn(e,a),((Le&2)===0||e!==Ve)&&(e===Ve&&((Le&2)===0&&(Hl|=a),We===4&&al(e,Ne,_n,!1)),Zn(e))}function Fp(e,t,a){if((Le&6)!==0)throw Error(r(327));var s=!a&&(t&124)===0&&(t&e.expiredLanes)===0||An(e,t),o=s?Tb(e,t):gf(e,t,!0),f=s;do{if(o===0){Os&&!s&&al(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!Nb(a)){o=gf(e,t,!1),f=!1;continue}if(o===2){if(f=t,e.errorRecoveryDisabledLanes&f)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;o=Xi;var A=S.current.memoizedState.isDehydrated;if(A&&(Us(S,g).flags|=256),g=gf(S,g,!1),g!==2){if(of&&!A){S.errorRecoveryDisabledLanes|=f,Hl|=f,o=4;break e}f=Yt,Yt=o,f!==null&&(Yt===null?Yt=f:Yt.push.apply(Yt,f))}o=g}if(f=!1,o!==2)continue}}if(o===1){Us(e,0),al(e,t,0,!0);break}e:{switch(s=e,f=o,f){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:al(s,t,_n,!Wa);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=ff+300-Dt(),10<o)){if(al(s,t,_n,!Wa),ra(s,0,!0)!==0)break e;s.timeoutHandle=w0(Xp.bind(null,s,a,Yt,jo,cf,t,_n,Hl,Ms,Wa,f,2,-0,0),o);break e}Xp(s,a,Yt,jo,cf,t,_n,Hl,Ms,Wa,f,0,-0,0)}}break}while(!0);Zn(e)}function Xp(e,t,a,s,o,f,g,S,A,U,$,K,k,z){if(e.timeoutHandle=-1,K=t.subtreeFlags,(K&8192||(K&16785408)===16785408)&&(nr={stylesheets:null,count:0,unsuspend:r2},Qp(t),K=u2(),K!==null)){e.cancelPendingCommit=K(t0.bind(null,e,t,f,a,s,o,g,S,A,$,1,k,z)),al(e,f,g,!U);return}t0(e,t,f,a,s,o,g,S,A)}function Nb(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var o=a[s],f=o.getSnapshot;o=o.value;try{if(!Wt(f(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function al(e,t,a,s){t&=~uf,t&=~Hl,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var o=t;0<o;){var f=31-tt(o),g=1<<f;s[f]=-1,o&=~g}a!==0&&El(e,a,t)}function To(){return(Le&6)===0?(Pi(0),!1):!0}function pf(){if(we!==null){if(Ue===0)var e=we.return;else e=we,pa=Ll=null,Oc(e),js=null,Hi=0,e=we;for(;e!==null;)jp(e.alternate,e),e=e.return;we=null}}function Us(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Vb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),pf(),Ve=e,we=a=da(e.current,null),Ne=t,Ue=0,an=null,Wa=!1,Os=An(e,t),of=!1,Ms=_n=uf=Hl=el=We=0,Yt=Xi=null,cf=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var o=31-tt(s),f=1<<o;t|=e[o],s&=~f}return Ea=t,Zr(),a}function Zp(e,t){be=null,q.H=po,t===Oi||t===lo?(t=dm(),Ue=3):t===um?(t=dm(),Ue=4):Ue=t===hp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,an=t,we===null&&(We=1,xo(e,xn(t,e.current)))}function Pp(){var e=q.H;return q.H=po,e===null?po:e}function Jp(){var e=q.A;return q.A=Cb,e}function yf(){We=4,Wa||(Ne&4194048)!==Ne&&Cn.current!==null||(Os=!0),(el&134217727)===0&&(Hl&134217727)===0||Ve===null||al(Ve,Ne,_n,!1)}function gf(e,t,a){var s=Le;Le|=2;var o=Pp(),f=Jp();(Ve!==e||Ne!==t)&&(jo=null,Us(e,t)),t=!1;var g=We;e:do try{if(Ue!==0&&we!==null){var S=we,A=an;switch(Ue){case 8:pf(),g=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(t=!0);var U=Ue;if(Ue=0,an=null,ks(e,S,A,U),a&&Os){g=0;break e}break;default:U=Ue,Ue=0,an=null,ks(e,S,A,U)}}jb(),g=We;break}catch($){Zp(e,$)}while(!0);return t&&e.shellSuspendCounter++,pa=Ll=null,Le=s,q.H=o,q.A=f,we===null&&(Ve=null,Ne=0,Zr()),g}function jb(){for(;we!==null;)Ip(we)}function Tb(e,t){var a=Le;Le|=2;var s=Pp(),o=Jp();Ve!==e||Ne!==t?(jo=null,No=Dt()+500,Us(e,t)):Os=An(e,t);e:do try{if(Ue!==0&&we!==null){t=we;var f=an;t:switch(Ue){case 1:Ue=0,an=null,ks(e,t,f,1);break;case 2:case 9:if(cm(f)){Ue=0,an=null,Wp(t);break}t=function(){Ue!==2&&Ue!==9||Ve!==e||(Ue=7),Zn(e)},f.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:cm(f)?(Ue=0,an=null,Wp(t)):(Ue=0,an=null,ks(e,t,f,7));break;case 5:var g=null;switch(we.tag){case 26:g=we.memoizedState;case 5:case 27:var S=we;if(!g||L0(g)){Ue=0,an=null;var A=S.sibling;if(A!==null)we=A;else{var U=S.return;U!==null?(we=U,Ao(U)):we=null}break t}}Ue=0,an=null,ks(e,t,f,5);break;case 6:Ue=0,an=null,ks(e,t,f,6);break;case 8:pf(),We=6;break e;default:throw Error(r(462))}}Ab();break}catch($){Zp(e,$)}while(!0);return pa=Ll=null,q.H=s,q.A=o,Le=a,we!==null?0:(Ve=null,Ne=0,Zr(),We)}function Ab(){for(;we!==null&&!di();)Ip(we)}function Ip(e){var t=_p(e.alternate,e,Ea);e.memoizedProps=e.pendingProps,t===null?Ao(e):we=t}function Wp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=bp(a,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=bp(a,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:Oc(t);default:jp(a,t),t=we=em(t,Ea),t=_p(a,t,Ea)}e.memoizedProps=e.pendingProps,t===null?Ao(e):we=t}function ks(e,t,a,s){pa=Ll=null,Oc(t),js=null,Hi=0;var o=t.return;try{if(vb(e,o,t,a,Ne)){We=1,xo(e,xn(a,e.current)),we=null;return}}catch(f){if(o!==null)throw we=o,f;We=1,xo(e,xn(a,e.current)),we=null;return}t.flags&32768?(Me||s===1?e=!0:Os||(Ne&536870912)!==0?e=!1:(Wa=e=!0,(s===2||s===9||s===3||s===6)&&(s=Cn.current,s!==null&&s.tag===13&&(s.flags|=16384))),e0(t,e)):Ao(t)}function Ao(e){var t=e;do{if((t.flags&32768)!==0){e0(t,Wa);return}e=t.return;var a=xb(t.alternate,t,Ea);if(a!==null){we=a;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);We===0&&(We=5)}function e0(e,t){do{var a=Sb(e.alternate,e);if(a!==null){a.flags&=32767,we=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=a}while(e!==null);We=6,we=null}function t0(e,t,a,s,o,f,g,S,A){e.cancelPendingCommit=null;do Ro();while(xt!==0);if((Le&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(f=t.lanes|t.childLanes,f|=ic,wl(e,a,f,g,S,A),e===Ve&&(we=Ve=null,Ne=0),Ds=t,nl=e,Ls=a,df=f,hf=o,Kp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Db($n,function(){return i0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null,o=F.p,F.p=2,g=Le,Le|=4;try{wb(e,t,a)}finally{Le=g,F.p=o,q.T=s}}xt=1,n0(),a0(),l0()}}function n0(){if(xt===1){xt=0;var e=nl,t=Ds,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=q.T,q.T=null;var s=F.p;F.p=2;var o=Le;Le|=4;try{qp(t,e);var f=Af,g=Vh(e.containerInfo),S=f.focusedElem,A=f.selectionRange;if(g!==S&&S&&S.ownerDocument&&Yh(S.ownerDocument.documentElement,S)){if(A!==null&&tc(S)){var U=A.start,$=A.end;if($===void 0&&($=U),"selectionStart"in S)S.selectionStart=U,S.selectionEnd=Math.min($,S.value.length);else{var K=S.ownerDocument||document,k=K&&K.defaultView||window;if(k.getSelection){var z=k.getSelection(),de=S.textContent.length,ue=Math.min(A.start,de),He=A.end===void 0?ue:Math.min(A.end,de);!z.extend&&ue>He&&(g=He,He=ue,ue=g);var M=$h(S,ue),O=$h(S,He);if(M&&O&&(z.rangeCount!==1||z.anchorNode!==M.node||z.anchorOffset!==M.offset||z.focusNode!==O.node||z.focusOffset!==O.offset)){var L=K.createRange();L.setStart(M.node,M.offset),z.removeAllRanges(),ue>He?(z.addRange(L),z.extend(O.node,O.offset)):(L.setEnd(O.node,O.offset),z.addRange(L))}}}}for(K=[],z=S;z=z.parentNode;)z.nodeType===1&&K.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<K.length;S++){var Y=K[S];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}$o=!!Tf,Af=Tf=null}finally{Le=o,F.p=s,q.T=a}}e.current=t,xt=2}}function a0(){if(xt===2){xt=0;var e=nl,t=Ds,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=q.T,q.T=null;var s=F.p;F.p=2;var o=Le;Le|=4;try{Lp(e,t.alternate,t)}finally{Le=o,F.p=s,q.T=a}}xt=3}}function l0(){if(xt===4||xt===3){xt=0,Mt();var e=nl,t=Ds,a=Ls,s=Kp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?xt=5:(xt=0,Ds=nl=null,s0(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(tl=null),ie(a),t=t.stateNode,Je&&typeof Je.onCommitFiberRoot=="function")try{Je.onCommitFiberRoot(hn,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=q.T,o=F.p,F.p=2,q.T=null;try{for(var f=e.onRecoverableError,g=0;g<s.length;g++){var S=s[g];f(S.value,{componentStack:S.stack})}}finally{q.T=t,F.p=o}}(Ls&3)!==0&&Ro(),Zn(e),o=e.pendingLanes,(a&4194090)!==0&&(o&42)!==0?e===mf?Zi++:(Zi=0,mf=e):Zi=0,Pi(0)}}function s0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ai(t)))}function Ro(e){return n0(),a0(),l0(),i0()}function i0(){if(xt!==5)return!1;var e=nl,t=df;df=0;var a=ie(Ls),s=q.T,o=F.p;try{F.p=32>a?32:a,q.T=null,a=hf,hf=null;var f=nl,g=Ls;if(xt=0,Ds=nl=null,Ls=0,(Le&6)!==0)throw Error(r(331));var S=Le;if(Le|=4,Yp(f.current),Hp(f,f.current,g,a),Le=S,Pi(0,!1),Je&&typeof Je.onPostCommitFiberRoot=="function")try{Je.onPostCommitFiberRoot(hn,f)}catch{}return!0}finally{F.p=o,q.T=s,s0(e,t)}}function r0(e,t,a){t=xn(a,t),t=Kc(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(pn(e,2),Zn(e))}function Qe(e,t,a){if(e.tag===3)r0(e,e,a);else for(;t!==null;){if(t.tag===3){r0(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(tl===null||!tl.has(s))){e=xn(a,e),a=fp(2),s=Ga(t,a,2),s!==null&&(dp(a,s,t,e),pn(s,2),Zn(s));break}}t=t.return}}function vf(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new _b;var o=new Set;s.set(t,o)}else o=s.get(t),o===void 0&&(o=new Set,s.set(t,o));o.has(a)||(of=!0,o.add(a),e=Rb.bind(null,e,t,a),t.then(e,e))}function Rb(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ve===e&&(Ne&a)===a&&(We===4||We===3&&(Ne&62914560)===Ne&&300>Dt()-ff?(Le&2)===0&&Us(e,0):uf|=a,Ms===Ne&&(Ms=0)),Zn(e)}function o0(e,t){t===0&&(t=oa()),e=gs(e,t),e!==null&&(pn(e,t),Zn(e))}function Ob(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),o0(e,a)}function Mb(e,t){var a=0;switch(e.tag){case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),o0(e,a)}function Db(e,t){return sa(e,t)}var Oo=null,zs=null,bf=!1,Mo=!1,xf=!1,Ql=0;function Zn(e){e!==zs&&e.next===null&&(zs===null?Oo=zs=e:zs=zs.next=e),Mo=!0,bf||(bf=!0,Ub())}function Pi(e,t){if(!xf&&Mo){xf=!0;do for(var a=!1,s=Oo;s!==null;){if(e!==0){var o=s.pendingLanes;if(o===0)var f=0;else{var g=s.suspendedLanes,S=s.pingedLanes;f=(1<<31-tt(42|e)+1)-1,f&=o&~(g&~S),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,d0(s,f))}else f=Ne,f=ra(s,s===Ve?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||An(s,f)||(a=!0,d0(s,f));s=s.next}while(a);xf=!1}}function Lb(){u0()}function u0(){Mo=bf=!1;var e=0;Ql!==0&&(Yb()&&(e=Ql),Ql=0);for(var t=Dt(),a=null,s=Oo;s!==null;){var o=s.next,f=c0(s,t);f===0?(s.next=null,a===null?Oo=o:a.next=o,o===null&&(zs=a)):(a=s,(e!==0||(f&3)!==0)&&(Mo=!0)),s=o}Pi(e)}function c0(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,o=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-tt(f),S=1<<g,A=o[g];A===-1?((S&a)===0||(S&s)!==0)&&(o[g]=qa(S,t)):A<=t&&(e.expiredLanes|=S),f&=~S}if(t=Ve,a=Ne,a=ra(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&dn(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||An(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&dn(s),ie(a)){case 2:case 8:a=Ye;break;case 32:a=$n;break;case 268435456:a=Ua;break;default:a=$n}return s=f0.bind(null,e),a=sa(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&dn(s),e.callbackPriority=2,e.callbackNode=null,2}function f0(e,t){if(xt!==0&&xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ro()&&e.callbackNode!==a)return null;var s=Ne;return s=ra(e,e===Ve?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Fp(e,s,t),c0(e,Dt()),e.callbackNode!=null&&e.callbackNode===a?f0.bind(null,e):null)}function d0(e,t){if(Ro())return null;Fp(e,t,!0)}function Ub(){Kb(function(){(Le&6)!==0?sa(Qn,Lb):u0()})}function Sf(){return Ql===0&&(Ql=Ba()),Ql}function h0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$r(""+e)}function m0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function kb(e,t,a,s,o){if(t==="submit"&&a&&a.stateNode===o){var f=h0((o[te]||null).action),g=s.submitter;g&&(t=(t=g[te]||null)?h0(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var S=new Gr("action","action",null,s,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ql!==0){var A=g?m0(o,g):new FormData(o);Hc(a,{pending:!0,data:A,method:o.method,action:f},null,A)}}else typeof f=="function"&&(S.preventDefault(),A=g?m0(o,g):new FormData(o),Hc(a,{pending:!0,data:A,method:o.method,action:f},f,A))},currentTarget:o}]})}}for(var wf=0;wf<sc.length;wf++){var Ef=sc[wf],zb=Ef.toLowerCase(),qb=Ef[0].toUpperCase()+Ef.slice(1);Rn(zb,"on"+qb)}Rn(Fh,"onAnimationEnd"),Rn(Xh,"onAnimationIteration"),Rn(Zh,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(tb,"onTransitionRun"),Rn(nb,"onTransitionStart"),Rn(ab,"onTransitionCancel"),Rn(Ph,"onTransitionEnd"),ua("onMouseEnter",["mouseout","mouseover"]),ua("onMouseLeave",["mouseout","mouseover"]),ua("onPointerEnter",["pointerout","pointerover"]),ua("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ji="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(" "),Bb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ji));function p0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],o=s.event;s=s.listeners;e:{var f=void 0;if(t)for(var g=s.length-1;0<=g;g--){var S=s[g],A=S.instance,U=S.currentTarget;if(S=S.listener,A!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=U;try{f(o)}catch($){bo($)}o.currentTarget=null,f=A}else for(g=0;g<s.length;g++){if(S=s[g],A=S.instance,U=S.currentTarget,S=S.listener,A!==f&&o.isPropagationStopped())break e;f=S,o.currentTarget=U;try{f(o)}catch($){bo($)}o.currentTarget=null,f=A}}}}function Ee(e,t){var a=t[Xe];a===void 0&&(a=t[Xe]=new Set);var s=e+"__bubble";a.has(s)||(y0(t,e,2,!1),a.add(s))}function Cf(e,t,a){var s=0;t&&(s|=4),y0(a,e,s,t)}var Do="_reactListening"+Math.random().toString(36).slice(2);function _f(e){if(!e[Do]){e[Do]=!0,mi.forEach(function(a){a!=="selectionchange"&&(Bb.has(a)||Cf(a,!1,e),Cf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Do]||(t[Do]=!0,Cf("selectionchange",!1,t))}}function y0(e,t,a,s){switch(H0(t)){case 2:var o=d2;break;case 8:o=h2;break;default:o=Bf}a=o.bind(null,t,a,e),o=void 0,!Gu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),s?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Nf(e,t,a,s,o){var f=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var g=s.tag;if(g===3||g===4){var S=s.stateNode.containerInfo;if(S===o)break;if(g===4)for(g=s.return;g!==null;){var A=g.tag;if((A===3||A===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;S!==null;){if(g=Re(S),g===null)return;if(A=g.tag,A===5||A===6||A===26||A===27){s=f=g;continue e}S=S.parentNode}}s=s.return}Eh(function(){var U=f,$=Vu(a),K=[];e:{var k=Jh.get(e);if(k!==void 0){var z=Gr,de=e;switch(e){case"keypress":if(Vr(a)===0)break e;case"keydown":case"keyup":z=Dv;break;case"focusin":de="focus",z=Pu;break;case"focusout":de="blur",z=Pu;break;case"beforeblur":case"afterblur":z=Pu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=Nh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Sv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=kv;break;case Fh:case Xh:case Zh:z=Cv;break;case Ph:z=qv;break;case"scroll":case"scrollend":z=bv;break;case"wheel":z=Hv;break;case"copy":case"cut":case"paste":z=Nv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Th;break;case"toggle":case"beforetoggle":z=$v}var ue=(t&4)!==0,He=!ue&&(e==="scroll"||e==="scrollend"),M=ue?k!==null?k+"Capture":null:k;ue=[];for(var O=U,L;O!==null;){var Y=O;if(L=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||L===null||M===null||(Y=yi(O,M),Y!=null&&ue.push(Ii(O,Y,L))),He)break;O=O.return}0<ue.length&&(k=new z(k,de,null,a,$),K.push({event:k,listeners:ue}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",k&&a!==Yu&&(de=a.relatedTarget||a.fromElement)&&(Re(de)||de[ce]))break e;if((z||k)&&(k=$.window===$?$:(k=$.ownerDocument)?k.defaultView||k.parentWindow:window,z?(de=a.relatedTarget||a.toElement,z=U,de=de?Re(de):null,de!==null&&(He=c(de),ue=de.tag,de!==He||ue!==5&&ue!==27&&ue!==6)&&(de=null)):(z=null,de=U),z!==de)){if(ue=Nh,Y="onMouseLeave",M="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(ue=Th,Y="onPointerLeave",M="onPointerEnter",O="pointer"),He=z==null?k:Cl(z),L=de==null?k:Cl(de),k=new ue(Y,O+"leave",z,a,$),k.target=He,k.relatedTarget=L,Y=null,Re($)===U&&(ue=new ue(M,O+"enter",de,a,$),ue.target=L,ue.relatedTarget=He,Y=ue),He=Y,z&&de)t:{for(ue=z,M=de,O=0,L=ue;L;L=qs(L))O++;for(L=0,Y=M;Y;Y=qs(Y))L++;for(;0<O-L;)ue=qs(ue),O--;for(;0<L-O;)M=qs(M),L--;for(;O--;){if(ue===M||M!==null&&ue===M.alternate)break t;ue=qs(ue),M=qs(M)}ue=null}else ue=null;z!==null&&g0(K,k,z,ue,!1),de!==null&&He!==null&&g0(K,He,de,ue,!0)}}e:{if(k=U?Cl(U):window,z=k.nodeName&&k.nodeName.toLowerCase(),z==="select"||z==="input"&&k.type==="file")var ee=kh;else if(Lh(k))if(zh)ee=Iv;else{ee=Pv;var xe=Zv}else z=k.nodeName,!z||z.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?U&&$u(U.elementType)&&(ee=kh):ee=Jv;if(ee&&(ee=ee(e,U))){Uh(K,ee,a,$);break e}xe&&xe(e,k,U),e==="focusout"&&U&&k.type==="number"&&U.memoizedProps.value!=null&&Qu(k,"number",k.value)}switch(xe=U?Cl(U):window,e){case"focusin":(Lh(xe)||xe.contentEditable==="true")&&(ms=xe,nc=U,Ci=null);break;case"focusout":Ci=nc=ms=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,Kh(K,a,$);break;case"selectionchange":if(eb)break;case"keydown":case"keyup":Kh(K,a,$)}var le;if(Iu)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else hs?Mh(e,a)&&(fe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(fe="onCompositionStart");fe&&(Ah&&a.locale!=="ko"&&(hs||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&hs&&(le=Ch()):($a=$,Fu="value"in $a?$a.value:$a.textContent,hs=!0)),xe=Lo(U,fe),0<xe.length&&(fe=new jh(fe,e,null,a,$),K.push({event:fe,listeners:xe}),le?fe.data=le:(le=Dh(a),le!==null&&(fe.data=le)))),(le=Vv?Kv(e,a):Gv(e,a))&&(fe=Lo(U,"onBeforeInput"),0<fe.length&&(xe=new jh("onBeforeInput","beforeinput",null,a,$),K.push({event:xe,listeners:fe}),xe.data=le)),kb(K,e,U,a,$)}p0(K,t)})}function Ii(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Lo(e,t){for(var a=t+"Capture",s=[];e!==null;){var o=e,f=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||f===null||(o=yi(e,a),o!=null&&s.unshift(Ii(e,o,f)),o=yi(e,t),o!=null&&s.push(Ii(e,o,f))),e.tag===3)return s;e=e.return}return[]}function qs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function g0(e,t,a,s,o){for(var f=t._reactName,g=[];a!==null&&a!==s;){var S=a,A=S.alternate,U=S.stateNode;if(S=S.tag,A!==null&&A===s)break;S!==5&&S!==26&&S!==27||U===null||(A=U,o?(U=yi(a,f),U!=null&&g.unshift(Ii(a,U,A))):o||(U=yi(a,f),U!=null&&g.push(Ii(a,U,A)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var Hb=/\r\n?/g,Qb=/\u0000|\uFFFD/g;function v0(e){return(typeof e=="string"?e:""+e).replace(Hb,`
9
+ `).replace(Qb,"")}function b0(e,t){return t=v0(t),v0(e)===t}function Uo(){}function Be(e,t,a,s,o,f){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||cs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&cs(e,""+s);break;case"className":Qa(e,"class",s);break;case"tabIndex":Qa(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Qa(e,a,s);break;case"style":Sh(e,s,f);break;case"data":if(t!=="object"){Qa(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=$r(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(t!=="input"&&Be(e,t,"name",o.name,o,null),Be(e,t,"formEncType",o.formEncType,o,null),Be(e,t,"formMethod",o.formMethod,o,null),Be(e,t,"formTarget",o.formTarget,o,null)):(Be(e,t,"encType",o.encType,o,null),Be(e,t,"method",o.method,o,null),Be(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=$r(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=Uo);break;case"onScroll":s!=null&&Ee("scroll",e);break;case"onScrollEnd":s!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=$r(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),rs(e,"popover",s);break;case"xlinkActuate":ca(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ca(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ca(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ca(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ca(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ca(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ca(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ca(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ca(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":rs(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=gv.get(a)||a,rs(e,a,s))}}function jf(e,t,a,s,o,f){switch(a){case"style":Sh(e,s,f);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof s=="string"?cs(e,s):(typeof s=="number"||typeof s=="bigint")&&cs(e,""+s);break;case"onScroll":s!=null&&Ee("scroll",e);break;case"onScrollEnd":s!=null&&Ee("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Uo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pi.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),f=e[te]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,o),typeof s=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,o);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):rs(e,a,s)}}}function St(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var s=!1,o=!1,f;for(f in a)if(a.hasOwnProperty(f)){var g=a[f];if(g!=null)switch(f){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Be(e,t,f,g,a,null)}}o&&Be(e,t,"srcSet",a.srcSet,a,null),s&&Be(e,t,"src",a.src,a,null);return;case"input":Ee("invalid",e);var S=f=g=o=null,A=null,U=null;for(s in a)if(a.hasOwnProperty(s)){var $=a[s];if($!=null)switch(s){case"name":o=$;break;case"type":g=$;break;case"checked":A=$;break;case"defaultChecked":U=$;break;case"value":f=$;break;case"defaultValue":S=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,t));break;default:Be(e,t,s,$,a,null)}}gh(e,f,S,A,U,g,o,!1),Hr(e);return;case"select":Ee("invalid",e),s=g=f=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":f=S;break;case"defaultValue":g=S;break;case"multiple":s=S;default:Be(e,t,o,S,a,null)}t=f,a=g,e.multiple=!!s,t!=null?us(e,!!s,t,!1):a!=null&&us(e,!!s,a,!0);return;case"textarea":Ee("invalid",e),f=o=s=null;for(g in a)if(a.hasOwnProperty(g)&&(S=a[g],S!=null))switch(g){case"value":s=S;break;case"defaultValue":o=S;break;case"children":f=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Be(e,t,g,S,a,null)}bh(e,s,o,f),Hr(e);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(s=a[A],s!=null))switch(A){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Be(e,t,A,s,a,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(s=0;s<Ji.length;s++)Ee(Ji[s],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in a)if(a.hasOwnProperty(U)&&(s=a[U],s!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Be(e,t,U,s,a,null)}return;default:if($u(t)){for($ in a)a.hasOwnProperty($)&&(s=a[$],s!==void 0&&jf(e,t,$,s,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(s=a[S],s!=null&&Be(e,t,S,s,a,null))}function $b(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,f=null,g=null,S=null,A=null,U=null,$=null;for(z in a){var K=a[z];if(a.hasOwnProperty(z)&&K!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":A=K;default:s.hasOwnProperty(z)||Be(e,t,z,null,s,K)}}for(var k in s){var z=s[k];if(K=a[k],s.hasOwnProperty(k)&&(z!=null||K!=null))switch(k){case"type":f=z;break;case"name":o=z;break;case"checked":U=z;break;case"defaultChecked":$=z;break;case"value":g=z;break;case"defaultValue":S=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:z!==K&&Be(e,t,k,z,s,K)}}Hu(e,g,S,A,U,$,f,o);return;case"select":z=g=S=k=null;for(f in a)if(A=a[f],a.hasOwnProperty(f)&&A!=null)switch(f){case"value":break;case"multiple":z=A;default:s.hasOwnProperty(f)||Be(e,t,f,null,s,A)}for(o in s)if(f=s[o],A=a[o],s.hasOwnProperty(o)&&(f!=null||A!=null))switch(o){case"value":k=f;break;case"defaultValue":S=f;break;case"multiple":g=f;default:f!==A&&Be(e,t,o,f,s,A)}t=S,a=g,s=z,k!=null?us(e,!!a,k,!1):!!s!=!!a&&(t!=null?us(e,!!a,t,!0):us(e,!!a,a?[]:"",!1));return;case"textarea":z=k=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Be(e,t,S,null,s,o)}for(g in s)if(o=s[g],f=a[g],s.hasOwnProperty(g)&&(o!=null||f!=null))switch(g){case"value":k=o;break;case"defaultValue":z=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==f&&Be(e,t,g,o,s,f)}vh(e,k,z);return;case"option":for(var de in a)if(k=a[de],a.hasOwnProperty(de)&&k!=null&&!s.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Be(e,t,de,null,s,k)}for(A in s)if(k=s[A],z=a[A],s.hasOwnProperty(A)&&k!==z&&(k!=null||z!=null))switch(A){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Be(e,t,A,k,s,z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ue in a)k=a[ue],a.hasOwnProperty(ue)&&k!=null&&!s.hasOwnProperty(ue)&&Be(e,t,ue,null,s,k);for(U in s)if(k=s[U],z=a[U],s.hasOwnProperty(U)&&k!==z&&(k!=null||z!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,t));break;default:Be(e,t,U,k,s,z)}return;default:if($u(t)){for(var He in a)k=a[He],a.hasOwnProperty(He)&&k!==void 0&&!s.hasOwnProperty(He)&&jf(e,t,He,void 0,s,k);for($ in s)k=s[$],z=a[$],!s.hasOwnProperty($)||k===z||k===void 0&&z===void 0||jf(e,t,$,k,s,z);return}}for(var M in a)k=a[M],a.hasOwnProperty(M)&&k!=null&&!s.hasOwnProperty(M)&&Be(e,t,M,null,s,k);for(K in s)k=s[K],z=a[K],!s.hasOwnProperty(K)||k===z||k==null&&z==null||Be(e,t,K,k,s,z)}var Tf=null,Af=null;function ko(e){return e.nodeType===9?e:e.ownerDocument}function x0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function S0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Rf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Of=null;function Yb(){var e=window.event;return e&&e.type==="popstate"?e===Of?!1:(Of=e,!0):(Of=null,!1)}var w0=typeof setTimeout=="function"?setTimeout:void 0,Vb=typeof clearTimeout=="function"?clearTimeout:void 0,E0=typeof Promise=="function"?Promise:void 0,Kb=typeof queueMicrotask=="function"?queueMicrotask:typeof E0<"u"?function(e){return E0.resolve(null).then(e).catch(Gb)}:w0;function Gb(e){setTimeout(function(){throw e})}function ll(e){return e==="head"}function C0(e,t){var a=t,s=0,o=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"){if(0<s&&8>s){a=s;var g=e.ownerDocument;if(a&1&&Wi(g.documentElement),a&2&&Wi(g.body),a&4)for(a=g.head,Wi(a),g=a.firstChild;g;){var S=g.nextSibling,A=g.nodeName;g[at]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&g.rel.toLowerCase()==="stylesheet"||a.removeChild(g),g=S}}if(o===0){e.removeChild(f),rr(t);return}o--}else a==="$"||a==="$?"||a==="$!"?o++:s=a.charCodeAt(0)-48;else s=0;a=f}while(a);rr(t)}function Mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Mf(a),jt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Fb(e,t,a,s){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[at])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Mn(e.nextSibling),e===null)break}return null}function Xb(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Mn(e.nextSibling),e===null))return null;return e}function Df(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Zb(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Mn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Lf=null;function _0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function N0(e,t,a){switch(t=ko(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Wi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jt(e)}var Nn=new Map,j0=new Set;function zo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ca=F.d;F.d={f:Pb,r:Jb,D:Ib,C:Wb,L:e2,m:t2,X:a2,S:n2,M:l2};function Pb(){var e=Ca.f(),t=To();return e||t}function Jb(e){var t=It(e);t!==null&&t.tag===5&&t.type==="form"?Fm(t):Ca.r(e)}var Bs=typeof document>"u"?null:document;function T0(e,t,a){var s=Bs;if(s&&typeof t=="string"&&t){var o=bn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),j0.has(o)||(j0.add(o),e={rel:e,crossOrigin:a,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),St(t,"link",e),lt(t),s.head.appendChild(t)))}}function Ib(e){Ca.D(e),T0("dns-prefetch",e,null)}function Wb(e,t){Ca.C(e,t),T0("preconnect",e,t)}function e2(e,t,a){Ca.L(e,t,a);var s=Bs;if(s&&e&&t){var o='link[rel="preload"][as="'+bn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+bn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+bn(a.imageSizes)+'"]')):o+='[href="'+bn(e)+'"]';var f=o;switch(t){case"style":f=Hs(e);break;case"script":f=Qs(e)}Nn.has(f)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Nn.set(f,e),s.querySelector(o)!==null||t==="style"&&s.querySelector(er(f))||t==="script"&&s.querySelector(tr(f))||(t=s.createElement("link"),St(t,"link",e),lt(t),s.head.appendChild(t)))}}function t2(e,t){Ca.m(e,t);var a=Bs;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+bn(s)+'"][href="'+bn(e)+'"]',f=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Qs(e)}if(!Nn.has(f)&&(e=v({rel:"modulepreload",href:e},t),Nn.set(f,e),a.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(tr(f)))return}s=a.createElement("link"),St(s,"link",e),lt(s),a.head.appendChild(s)}}}function n2(e,t,a){Ca.S(e,t,a);var s=Bs;if(s&&e){var o=Ha(s).hoistableStyles,f=Hs(e);t=t||"default";var g=o.get(f);if(!g){var S={loading:0,preload:null};if(g=s.querySelector(er(f)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Nn.get(f))&&Uf(e,a);var A=g=s.createElement("link");lt(A),St(A,"link",e),A._p=new Promise(function(U,$){A.onload=U,A.onerror=$}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,qo(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(f,g)}}}function a2(e,t){Ca.X(e,t);var a=Bs;if(a&&e){var s=Ha(a).hoistableScripts,o=Qs(e),f=s.get(o);f||(f=a.querySelector(tr(o)),f||(e=v({src:e,async:!0},t),(t=Nn.get(o))&&kf(e,t),f=a.createElement("script"),lt(f),St(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(o,f))}}function l2(e,t){Ca.M(e,t);var a=Bs;if(a&&e){var s=Ha(a).hoistableScripts,o=Qs(e),f=s.get(o);f||(f=a.querySelector(tr(o)),f||(e=v({src:e,async:!0,type:"module"},t),(t=Nn.get(o))&&kf(e,t),f=a.createElement("script"),lt(f),St(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(o,f))}}function A0(e,t,a,s){var o=(o=oe.current)?zo(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Hs(a.href),a=Ha(o).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Hs(a.href);var f=Ha(o).hoistableStyles,g=f.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=o.querySelector(er(e)))&&!f._p&&(g.instance=f,g.state.loading=5),Nn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Nn.set(e,a),f||s2(o,e,a,g.state))),t&&s===null)throw Error(r(528,""));return g}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Qs(a),a=Ha(o).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Hs(e){return'href="'+bn(e)+'"'}function er(e){return'link[rel="stylesheet"]['+e+"]"}function R0(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function s2(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),St(t,"link",a),lt(t),e.head.appendChild(t))}function Qs(e){return'[src="'+bn(e)+'"]'}function tr(e){return"script[async]"+e}function O0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+bn(a.href)+'"]');if(s)return t.instance=s,lt(s),s;var o=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),lt(s),St(s,"style",o),qo(s,a.precedence,e),t.instance=s;case"stylesheet":o=Hs(a.href);var f=e.querySelector(er(o));if(f)return t.state.loading|=4,t.instance=f,lt(f),f;s=R0(a),(o=Nn.get(o))&&Uf(s,o),f=(e.ownerDocument||e).createElement("link"),lt(f);var g=f;return g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),St(f,"link",s),t.state.loading|=4,qo(f,a.precedence,e),t.instance=f;case"script":return f=Qs(a.src),(o=e.querySelector(tr(f)))?(t.instance=o,lt(o),o):(s=a,(o=Nn.get(f))&&(s=v({},a),kf(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),lt(o),St(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,qo(s,a.precedence,e));return t.instance}function qo(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,f=o,g=0;g<s.length;g++){var S=s[g];if(S.dataset.precedence===t)f=S;else if(f!==o)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Uf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function kf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Bo=null;function M0(e,t,a){if(Bo===null){var s=new Map,o=Bo=new Map;o.set(a,s)}else o=Bo,s=o.get(a),s||(s=new Map,o.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var f=a[o];if(!(f[at]||f[Z]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(t)||"";g=e+g;var S=s.get(g);S?S.push(f):s.set(g,[f])}}return s}function D0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function i2(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function L0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var nr=null;function r2(){}function o2(e,t,a){if(nr===null)throw Error(r(475));var s=nr;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=Hs(a.href),f=e.querySelector(er(o));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(s.count++,s=Ho.bind(s),e.then(s,s)),t.state.loading|=4,t.instance=f,lt(f);return}f=e.ownerDocument||e,a=R0(a),(o=Nn.get(o))&&Uf(a,o),f=f.createElement("link"),lt(f);var g=f;g._p=new Promise(function(S,A){g.onload=S,g.onerror=A}),St(f,"link",a),t.instance=f}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(s.count++,t=Ho.bind(s),e.addEventListener("load",t),e.addEventListener("error",t))}}function u2(){if(nr===null)throw Error(r(475));var e=nr;return e.stylesheets&&e.count===0&&zf(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&zf(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Ho(){if(this.count--,this.count===0){if(this.stylesheets)zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qo=null;function zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qo=new Map,t.forEach(c2,e),Qo=null,Ho.call(e))}function c2(e,t){if(!(t.state.loading&4)){var a=Qo.get(e);if(a)var s=a.get(null);else{a=new Map,Qo.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<o.length;f++){var g=o[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),s=g)}s&&a.set(null,s)}o=t.instance,g=o.getAttribute("data-precedence"),f=a.get(g)||s,f===s&&a.set(null,o),a.set(g,o),this.count++,s=Ho.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),f?f.parentNode.insertBefore(o,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ar={$$typeof:D,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function f2(e,t,a,s,o,f,g,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Yn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yn(0),this.hiddenUpdates=Yn(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function U0(e,t,a,s,o,f,g,S,A,U,$,K){return e=new f2(e,t,a,g,S,A,U,K),t=1,f===!0&&(t|=24),f=en(3,null,null,t),e.current=f,f.stateNode=e,t=gc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:s,isDehydrated:a,cache:t},Sc(f),e}function k0(e){return e?(e=vs,e):vs}function z0(e,t,a,s,o,f){o=k0(o),s.context===null?s.context=o:s.pendingContext=o,s=Ka(t),s.payload={element:a},f=f===void 0?null:f,f!==null&&(s.callback=f),a=Ga(e,s,t),a!==null&&(sn(a,e,t),Di(a,e,t))}function q0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function qf(e,t){q0(e,t),(e=e.alternate)&&q0(e,t)}function B0(e){if(e.tag===13){var t=gs(e,67108864);t!==null&&sn(t,e,67108864),qf(e,67108864)}}var $o=!0;function d2(e,t,a,s){var o=q.T;q.T=null;var f=F.p;try{F.p=2,Bf(e,t,a,s)}finally{F.p=f,q.T=o}}function h2(e,t,a,s){var o=q.T;q.T=null;var f=F.p;try{F.p=8,Bf(e,t,a,s)}finally{F.p=f,q.T=o}}function Bf(e,t,a,s){if($o){var o=Hf(s);if(o===null)Nf(e,t,s,Yo,a),Q0(e,s);else if(p2(o,e,t,a,s))s.stopPropagation();else if(Q0(e,s),t&4&&-1<m2.indexOf(e)){for(;o!==null;){var f=It(o);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=ze(f.pendingLanes);if(g!==0){var S=f;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var A=1<<31-tt(g);S.entanglements[1]|=A,g&=~A}Zn(f),(Le&6)===0&&(No=Dt()+500,Pi(0))}}break;case 13:S=gs(f,2),S!==null&&sn(S,f,2),To(),qf(f,2)}if(f=Hf(s),f===null&&Nf(e,t,s,Yo,a),f===o)break;o=f}o!==null&&s.stopPropagation()}else Nf(e,t,s,null,a)}}function Hf(e){return e=Vu(e),Qf(e)}var Yo=null;function Qf(e){if(Yo=null,e=Re(e),e!==null){var t=c(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Yo=e,null}function H0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ia()){case Qn:return 2;case Ye:return 8;case $n:case xl:return 32;case Ua:return 268435456;default:return 32}default:return 32}}var $f=!1,sl=null,il=null,rl=null,lr=new Map,sr=new Map,ol=[],m2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Q0(e,t){switch(e){case"focusin":case"focusout":sl=null;break;case"dragenter":case"dragleave":il=null;break;case"mouseover":case"mouseout":rl=null;break;case"pointerover":case"pointerout":lr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sr.delete(t.pointerId)}}function ir(e,t,a,s,o,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:f,targetContainers:[o]},t!==null&&(t=It(t),t!==null&&B0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function p2(e,t,a,s,o){switch(t){case"focusin":return sl=ir(sl,e,t,a,s,o),!0;case"dragenter":return il=ir(il,e,t,a,s,o),!0;case"mouseover":return rl=ir(rl,e,t,a,s,o),!0;case"pointerover":var f=o.pointerId;return lr.set(f,ir(lr.get(f)||null,e,t,a,s,o)),!0;case"gotpointercapture":return f=o.pointerId,sr.set(f,ir(sr.get(f)||null,e,t,a,s,o)),!0}return!1}function $0(e){var t=Re(e.target);if(t!==null){var a=c(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,Lt(e.priority,function(){if(a.tag===13){var s=ln();s=_t(s);var o=gs(a,s);o!==null&&sn(o,a,s),qf(a,s)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Hf(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Yu=s,a.target.dispatchEvent(s),Yu=null}else return t=It(a),t!==null&&B0(t),e.blockedOn=a,!1;t.shift()}return!0}function Y0(e,t,a){Vo(e)&&a.delete(t)}function y2(){$f=!1,sl!==null&&Vo(sl)&&(sl=null),il!==null&&Vo(il)&&(il=null),rl!==null&&Vo(rl)&&(rl=null),lr.forEach(Y0),sr.forEach(Y0)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,$f||($f=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,y2)))}var Go=null;function V0(e){Go!==e&&(Go=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Go===e&&(Go=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if(Qf(s||a)===null)continue;break}var f=It(a);f!==null&&(e.splice(t,3),t-=3,Hc(f,{pending:!0,data:o,method:a.method,action:s},s,o))}}))}function rr(e){function t(A){return Ko(A,e)}sl!==null&&Ko(sl,e),il!==null&&Ko(il,e),rl!==null&&Ko(rl,e),lr.forEach(t),sr.forEach(t);for(var a=0;a<ol.length;a++){var s=ol[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ol.length&&(a=ol[0],a.blockedOn===null);)$0(a),a.blockedOn===null&&ol.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var o=a[s],f=a[s+1],g=o[te]||null;if(typeof f=="function")g||V0(a);else if(g){var S=null;if(f&&f.hasAttribute("formAction")){if(o=f,g=f[te]||null)S=g.formAction;else if(Qf(o)!==null)continue}else S=g.action;typeof S=="function"?a[s+1]=S:(a.splice(s,3),s-=3),V0(a)}}}function Yf(e){this._internalRoot=e}Fo.prototype.render=Yf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,s=ln();z0(a,s,e,t,null,null)},Fo.prototype.unmount=Yf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;z0(e.current,2,null,e,null,null),To(),t[ce]=null}};function Fo(e){this._internalRoot=e}Fo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Se();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ol.length&&t!==0&&t<ol[a].priority;a++);ol.splice(a,0,e),a===0&&$0(e)}};var K0=l.version;if(K0!=="19.1.0")throw Error(r(527,K0,"19.1.0"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var g2={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xo.isDisabled&&Xo.supportsFiber)try{hn=Xo.inject(g2),Je=Xo}catch{}}return ur.createRoot=function(e,t){if(!u(e))throw Error(r(299));var a=!1,s="",o=rp,f=op,g=up,S=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(S=t.unstable_transitionCallbacks)),t=U0(e,1,!1,null,null,a,s,o,f,g,S,null),e[ce]=t.current,_f(e),new Yf(t)},ur.hydrateRoot=function(e,t,a){if(!u(e))throw Error(r(299));var s=!1,o="",f=rp,g=op,S=up,A=null,U=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(A=a.unstable_transitionCallbacks),a.formState!==void 0&&(U=a.formState)),t=U0(e,1,!0,t,a??null,s,o,f,g,S,A,U),t.context=k0(null),a=t.current,s=ln(),s=_t(s),o=Ka(s),o.callback=null,Ga(a,o,s),a=s,t.current.lanes=a,pn(t,a),Zn(t),e[ce]=t.current,_f(e),new Fo(t)},ur.version="19.1.0",ur}var ty;function N2(){if(ty)return Gf.exports;ty=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Gf.exports=_2(),Gf.exports}var j2=N2();const T2=Dd(j2);var cr={},ny;function A2(){if(ny)return cr;ny=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.parse=d,cr.serialize=y;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,l=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,u=Object.prototype.toString,c=(()=>{const E=function(){};return E.prototype=Object.create(null),E})();function d(E,j){const w=new c,C=E.length;if(C<2)return w;const N=j?.decode||v;let T=0;do{const _=E.indexOf("=",T);if(_===-1)break;const D=E.indexOf(";",T),H=D===-1?C:D;if(_>H){T=E.lastIndexOf(";",_-1)+1;continue}const V=m(E,T,_),X=p(E,_,V),G=E.slice(V,X);if(w[G]===void 0){let P=m(E,_+1,H),ae=p(E,H,P);const ye=N(E.slice(P,ae));w[G]=ye}T=H+1}while(T<C);return w}function m(E,j,w){do{const C=E.charCodeAt(j);if(C!==32&&C!==9)return j}while(++j<w);return w}function p(E,j,w){for(;j>w;){const C=E.charCodeAt(--j);if(C!==32&&C!==9)return j+1}return w}function y(E,j,w){const C=w?.encode||encodeURIComponent;if(!n.test(E))throw new TypeError(`argument name is invalid: ${E}`);const N=C(j);if(!l.test(N))throw new TypeError(`argument val is invalid: ${j}`);let T=E+"="+N;if(!w)return T;if(w.maxAge!==void 0){if(!Number.isInteger(w.maxAge))throw new TypeError(`option maxAge is invalid: ${w.maxAge}`);T+="; Max-Age="+w.maxAge}if(w.domain){if(!i.test(w.domain))throw new TypeError(`option domain is invalid: ${w.domain}`);T+="; Domain="+w.domain}if(w.path){if(!r.test(w.path))throw new TypeError(`option path is invalid: ${w.path}`);T+="; Path="+w.path}if(w.expires){if(!x(w.expires)||!Number.isFinite(w.expires.valueOf()))throw new TypeError(`option expires is invalid: ${w.expires}`);T+="; Expires="+w.expires.toUTCString()}if(w.httpOnly&&(T+="; HttpOnly"),w.secure&&(T+="; Secure"),w.partitioned&&(T+="; Partitioned"),w.priority)switch(typeof w.priority=="string"?w.priority.toLowerCase():void 0){case"low":T+="; Priority=Low";break;case"medium":T+="; Priority=Medium";break;case"high":T+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${w.priority}`)}if(w.sameSite)switch(typeof w.sameSite=="string"?w.sameSite.toLowerCase():w.sameSite){case!0:case"strict":T+="; SameSite=Strict";break;case"lax":T+="; SameSite=Lax";break;case"none":T+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${w.sameSite}`)}return T}function v(E){if(E.indexOf("%")===-1)return E;try{return decodeURIComponent(E)}catch{return E}}function x(E){return u.call(E)==="[object Date]"}return cr}A2();var ay="popstate";function R2(n={}){function l(r,u){let{pathname:c,search:d,hash:m}=r.location;return fd("",{pathname:c,search:d,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(r,u){return typeof u=="string"?u:br(u)}return M2(l,i,null,n)}function Pe(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function Ln(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function O2(){return Math.random().toString(36).substring(2,10)}function ly(n,l){return{usr:n.state,key:n.key,idx:l}}function fd(n,l,i=null,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?ti(l):l,state:i,key:l&&l.key||r||O2()}}function br({pathname:n="/",search:l="",hash:i=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function ti(n){let l={};if(n){let i=n.indexOf("#");i>=0&&(l.hash=n.substring(i),n=n.substring(0,i));let r=n.indexOf("?");r>=0&&(l.search=n.substring(r),n=n.substring(0,r)),n&&(l.pathname=n)}return l}function M2(n,l,i,r={}){let{window:u=document.defaultView,v5Compat:c=!1}=r,d=u.history,m="POP",p=null,y=v();y==null&&(y=0,d.replaceState({...d.state,idx:y},""));function v(){return(d.state||{idx:null}).idx}function x(){m="POP";let N=v(),T=N==null?null:N-y;y=N,p&&p({action:m,location:C.location,delta:T})}function E(N,T){m="PUSH";let _=fd(C.location,N,T);y=v()+1;let D=ly(_,y),H=C.createHref(_);try{d.pushState(D,"",H)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;u.location.assign(H)}c&&p&&p({action:m,location:C.location,delta:1})}function j(N,T){m="REPLACE";let _=fd(C.location,N,T);y=v();let D=ly(_,y),H=C.createHref(_);d.replaceState(D,"",H),c&&p&&p({action:m,location:C.location,delta:0})}function w(N){return D2(N)}let C={get action(){return m},get location(){return n(u,d)},listen(N){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(ay,x),p=N,()=>{u.removeEventListener(ay,x),p=null}},createHref(N){return l(u,N)},createURL:w,encodeLocation(N){let T=w(N);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:E,replace:j,go(N){return d.go(N)}};return C}function D2(n,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(i,"No window.location.(origin|href) available to create URL");let r=typeof n=="string"?n:br(n);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=i+r),new URL(r,i)}function s1(n,l,i="/"){return L2(n,l,i,!1)}function L2(n,l,i,r){let u=typeof l=="string"?ti(l):l,c=Aa(u.pathname||"/",i);if(c==null)return null;let d=i1(n);U2(d);let m=null;for(let p=0;m==null&&p<d.length;++p){let y=G2(c);m=V2(d[p],y,r)}return m}function i1(n,l=[],i=[],r=""){let u=(c,d,m)=>{let p={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};p.relativePath.startsWith("/")&&(Pe(p.relativePath.startsWith(r),`Absolute route path "${p.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(r.length));let y=ja([r,p.relativePath]),v=i.concat(p);c.children&&c.children.length>0&&(Pe(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),i1(c.children,l,v,y)),!(c.path==null&&!c.index)&&l.push({path:y,score:$2(y,c.index),routesMeta:v})};return n.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))u(c,d);else for(let m of r1(c.path))u(c,d,m)}),l}function r1(n){let l=n.split("/");if(l.length===0)return[];let[i,...r]=l,u=i.endsWith("?"),c=i.replace(/\?$/,"");if(r.length===0)return u?[c,""]:[c];let d=r1(r.join("/")),m=[];return m.push(...d.map(p=>p===""?c:[c,p].join("/"))),u&&m.push(...d),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function U2(n){n.sort((l,i)=>l.score!==i.score?i.score-l.score:Y2(l.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var k2=/^:[\w-]+$/,z2=3,q2=2,B2=1,H2=10,Q2=-2,sy=n=>n==="*";function $2(n,l){let i=n.split("/"),r=i.length;return i.some(sy)&&(r+=Q2),l&&(r+=q2),i.filter(u=>!sy(u)).reduce((u,c)=>u+(k2.test(c)?z2:c===""?B2:H2),r)}function Y2(n,l){return n.length===l.length&&n.slice(0,-1).every((r,u)=>r===l[u])?n[n.length-1]-l[l.length-1]:0}function V2(n,l,i=!1){let{routesMeta:r}=n,u={},c="/",d=[];for(let m=0;m<r.length;++m){let p=r[m],y=m===r.length-1,v=c==="/"?l:l.slice(c.length)||"/",x=xr({path:p.relativePath,caseSensitive:p.caseSensitive,end:y},v),E=p.route;if(!x&&y&&i&&!r[r.length-1].route.index&&(x=xr({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!x)return null;Object.assign(u,x.params),d.push({params:u,pathname:ja([c,x.pathname]),pathnameBase:P2(ja([c,x.pathnameBase])),route:E}),x.pathnameBase!=="/"&&(c=ja([c,x.pathnameBase]))}return d}function xr(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,r]=K2(n.path,n.caseSensitive,n.end),u=l.match(i);if(!u)return null;let c=u[0],d=c.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:r.reduce((y,{paramName:v,isOptional:x},E)=>{if(v==="*"){let w=m[E]||"";d=c.slice(0,c.length-w.length).replace(/(.)\/+$/,"$1")}const j=m[E];return x&&!j?y[v]=void 0:y[v]=(j||"").replace(/%2F/g,"/"),y},{}),pathname:c,pathnameBase:d,pattern:n}}function K2(n,l=!1,i=!0){Ln(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let r=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,p)=>(r.push({paramName:m,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,l?void 0:"i"),r]}function G2(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Ln(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),n}}function Aa(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,r=n.charAt(i);return r&&r!=="/"?null:n.slice(i)||"/"}function F2(n,l="/"){let{pathname:i,search:r="",hash:u=""}=typeof n=="string"?ti(n):n;return{pathname:i?i.startsWith("/")?i:X2(i,l):l,search:J2(r),hash:I2(u)}}function X2(n,l){let i=l.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?i.length>1&&i.pop():u!=="."&&i.push(u)}),i.length>1?i.join("/"):"/"}function Pf(n,l,i,r){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Z2(n){return n.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function o1(n){let l=Z2(n);return l.map((i,r)=>r===l.length-1?i.pathname:i.pathnameBase)}function u1(n,l,i,r=!1){let u;typeof n=="string"?u=ti(n):(u={...n},Pe(!u.pathname||!u.pathname.includes("?"),Pf("?","pathname","search",u)),Pe(!u.pathname||!u.pathname.includes("#"),Pf("#","pathname","hash",u)),Pe(!u.search||!u.search.includes("#"),Pf("#","search","hash",u)));let c=n===""||u.pathname==="",d=c?"/":u.pathname,m;if(d==null)m=i;else{let x=l.length-1;if(!r&&d.startsWith("..")){let E=d.split("/");for(;E[0]==="..";)E.shift(),x-=1;u.pathname=E.join("/")}m=x>=0?l[x]:"/"}let p=F2(u,m),y=d&&d!=="/"&&d.endsWith("/"),v=(c||d===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(y||v)&&(p.pathname+="/"),p}var ja=n=>n.join("/").replace(/\/\/+/g,"/"),P2=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),J2=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,I2=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function W2(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var c1=["POST","PUT","PATCH","DELETE"];new Set(c1);var ex=["GET",...c1];new Set(ex);var ni=b.createContext(null);ni.displayName="DataRouter";var Eu=b.createContext(null);Eu.displayName="DataRouterState";var f1=b.createContext({isTransitioning:!1});f1.displayName="ViewTransition";var tx=b.createContext(new Map);tx.displayName="Fetchers";var nx=b.createContext(null);nx.displayName="Await";var ta=b.createContext(null);ta.displayName="Navigation";var Er=b.createContext(null);Er.displayName="Location";var na=b.createContext({outlet:null,matches:[],isDataRoute:!1});na.displayName="Route";var Ud=b.createContext(null);Ud.displayName="RouteError";function ax(n,{relative:l}={}){Pe(Cr(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=b.useContext(ta),{hash:u,pathname:c,search:d}=_r(n,{relative:l}),m=c;return i!=="/"&&(m=c==="/"?i:ja([i,c])),r.createHref({pathname:m,search:d,hash:u})}function Cr(){return b.useContext(Er)!=null}function qt(){return Pe(Cr(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Er).location}var d1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function h1(n){b.useContext(ta).static||b.useLayoutEffect(n)}function wt(){let{isDataRoute:n}=b.useContext(na);return n?gx():lx()}function lx(){Pe(Cr(),"useNavigate() may be used only in the context of a <Router> component.");let n=b.useContext(ni),{basename:l,navigator:i}=b.useContext(ta),{matches:r}=b.useContext(na),{pathname:u}=qt(),c=JSON.stringify(o1(r)),d=b.useRef(!1);return h1(()=>{d.current=!0}),b.useCallback((p,y={})=>{if(Ln(d.current,d1),!d.current)return;if(typeof p=="number"){i.go(p);return}let v=u1(p,JSON.parse(c),u,y.relative==="path");n==null&&l!=="/"&&(v.pathname=v.pathname==="/"?l:ja([l,v.pathname])),(y.replace?i.replace:i.push)(v,y.state,y)},[l,i,c,u,n])}b.createContext(null);function sx(){let{matches:n}=b.useContext(na),l=n[n.length-1];return l?l.params:{}}function _r(n,{relative:l}={}){let{matches:i}=b.useContext(na),{pathname:r}=qt(),u=JSON.stringify(o1(i));return b.useMemo(()=>u1(n,JSON.parse(u),r,l==="path"),[n,u,r,l])}function ix(n,l){return m1(n,l)}function m1(n,l,i,r){Pe(Cr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u,static:c}=b.useContext(ta),{matches:d}=b.useContext(na),m=d[d.length-1],p=m?m.params:{},y=m?m.pathname:"/",v=m?m.pathnameBase:"/",x=m&&m.route;{let _=x&&x.path||"";p1(y,!x||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${_}">) 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.
10
10
 
11
- Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let E=qt(),j;if(l){let _=typeof l=="string"?ti(l):l;Pe(g==="/"||_.pathname?.startsWith(g),`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 "${g}" but pathname "${_.pathname}" was given in the \`location\` prop.`),j=_}else j=E;let w=j.pathname||"/",C=w;if(g!=="/"){let _=g.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(_.length).join("/")}let N=!c&&i&&i.matches&&i.matches.length>0?i.matches:s1(n,{pathname:C});Ln(x||N!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),Ln(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${j.pathname}${j.search}${j.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 T=fx(N&&N.map(_=>Object.assign({},_,{params:Object.assign({},p,_.params),pathname:ja([g,u.encodeLocation?u.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?g:ja([g,u.encodeLocation?u.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),d,i,r);return l&&T?b.createElement(Er.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...j},navigationType:"POP"}},T):T}function rx(){let n=yx(),l=W2(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,r="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:r},c={padding:"2px 4px",backgroundColor:r},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=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:c},"ErrorBoundary")," or"," ",b.createElement("code",{style:c},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},l),i?b.createElement("pre",{style:u},i):null,d)}var ox=b.createElement(rx,null),ux=class extends b.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){console.error("React Router caught the following error during render",n,l)}render(){return this.state.error!==void 0?b.createElement(na.Provider,{value:this.props.routeContext},b.createElement(kd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function cx({routeContext:n,match:l,children:i}){let r=b.useContext(ni);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),b.createElement(na.Provider,{value:n},i)}function fx(n,l=[],i=null,r=null){if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let u=n,c=i?.errors;if(c!=null){let p=u.findIndex(y=>y.route.id&&c?.[y.route.id]!==void 0);Pe(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),u=u.slice(0,Math.min(u.length,p+1))}let d=!1,m=-1;if(i)for(let p=0;p<u.length;p++){let y=u[p];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(m=p),y.route.id){let{loaderData:g,errors:x}=i,E=y.route.loader&&!g.hasOwnProperty(y.route.id)&&(!x||x[y.route.id]===void 0);if(y.route.lazy||E){d=!0,m>=0?u=u.slice(0,m+1):u=[u[0]];break}}}return u.reduceRight((p,y,g)=>{let x,E=!1,j=null,w=null;i&&(x=c&&y.route.id?c[y.route.id]:void 0,j=y.route.errorElement||ox,d&&(m<0&&g===0?(p1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,w=null):m===g&&(E=!0,w=y.route.hydrateFallbackElement||null)));let C=l.concat(u.slice(0,g+1)),N=()=>{let T;return x?T=j:E?T=w:y.route.Component?T=b.createElement(y.route.Component,null):y.route.element?T=y.route.element:T=p,b.createElement(cx,{match:y,routeContext:{outlet:p,matches:C,isDataRoute:i!=null},children:T})};return i&&(y.route.ErrorBoundary||y.route.errorElement||g===0)?b.createElement(ux,{location:i.location,revalidation:i.revalidation,component:j,error:x,children:N(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):N()},null)}function Ud(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dx(n){let l=b.useContext(ni);return Pe(l,Ud(n)),l}function hx(n){let l=b.useContext(Eu);return Pe(l,Ud(n)),l}function mx(n){let l=b.useContext(na);return Pe(l,Ud(n)),l}function zd(n){let l=mx(n),i=l.matches[l.matches.length-1];return Pe(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function px(){return zd("useRouteId")}function yx(){let n=b.useContext(kd),l=hx("useRouteError"),i=zd("useRouteError");return n!==void 0?n:l.errors?.[i]}function vx(){let{router:n}=dx("useNavigate"),l=zd("useNavigate"),i=b.useRef(!1);return h1(()=>{i.current=!0}),b.useCallback(async(u,c={})=>{Ln(i.current,d1),i.current&&(typeof u=="number"?n.navigate(u):await n.navigate(u,{fromRouteId:l,...c}))},[n,l])}var iy={};function p1(n,l,i){!l&&!iy[n]&&(iy[n]=!0,Ln(!1,i))}b.memo(gx);function gx({routes:n,future:l,state:i}){return m1(n,void 0,i,l)}function yr(n){Pe(!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 bx({basename:n="/",children:l=null,location:i,navigationType:r="POP",navigator:u,static:c=!1}){Pe(!Cr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=n.replace(/^\/*/,"/"),m=b.useMemo(()=>({basename:d,navigator:u,static:c,future:{}}),[d,u,c]);typeof i=="string"&&(i=ti(i));let{pathname:p="/",search:y="",hash:g="",state:x=null,key:E="default"}=i,j=b.useMemo(()=>{let w=Aa(p,d);return w==null?null:{location:{pathname:w,search:y,hash:g,state:x,key:E},navigationType:r}},[d,p,y,g,x,E,r]);return Ln(j!=null,`<Router basename="${d}"> is not able to match the URL "${p}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:b.createElement(ta.Provider,{value:m},b.createElement(Er.Provider,{children:l,value:j}))}function xx({children:n,location:l}){return ix(dd(n),l)}function dd(n,l=[]){let i=[];return b.Children.forEach(n,(r,u)=>{if(!b.isValidElement(r))return;let c=[...l,u];if(r.type===b.Fragment){i.push.apply(i,dd(r.props.children,c));return}Pe(r.type===yr,`[${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>`),Pe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let d={id:r.props.id||c.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,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&&(d.children=dd(r.props.children,c)),i.push(d)}),i}var au="get",lu="application/x-www-form-urlencoded";function Cu(n){return n!=null&&typeof n.tagName=="string"}function Sx(n){return Cu(n)&&n.tagName.toLowerCase()==="button"}function wx(n){return Cu(n)&&n.tagName.toLowerCase()==="form"}function Ex(n){return Cu(n)&&n.tagName.toLowerCase()==="input"}function Cx(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function _x(n,l){return n.button===0&&(!l||l==="_self")&&!Cx(n)}function hd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,i)=>{let r=n[i];return l.concat(Array.isArray(r)?r.map(u=>[i,u]):[[i,r]])},[]))}function Nx(n,l){let i=hd(n);return l&&l.forEach((r,u)=>{i.has(u)||l.getAll(u).forEach(c=>{i.append(u,c)})}),i}var Zo=null;function jx(){if(Zo===null)try{new FormData(document.createElement("form"),0),Zo=!1}catch{Zo=!0}return Zo}var Tx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jf(n){return n!=null&&!Tx.has(n)?(Ln(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lu}"`),null):n}function Ax(n,l){let i,r,u,c,d;if(wx(n)){let m=n.getAttribute("action");r=m?Aa(m,l):null,i=n.getAttribute("method")||au,u=Jf(n.getAttribute("enctype"))||lu,c=new FormData(n)}else if(Sx(n)||Ex(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||m.getAttribute("action");if(r=p?Aa(p,l):null,i=n.getAttribute("formmethod")||m.getAttribute("method")||au,u=Jf(n.getAttribute("formenctype"))||Jf(m.getAttribute("enctype"))||lu,c=new FormData(m,n),!jx()){let{name:y,type:g,value:x}=n;if(g==="image"){let E=y?`${y}.`:"";c.append(`${E}x`,"0"),c.append(`${E}y`,"0")}else y&&c.append(y,x)}}else{if(Cu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=au,r=null,u=lu,d=n}return c&&u==="text/plain"&&(d=c,c=void 0),{action:r,method:i.toLowerCase(),encType:u,formData:c,body:d}}function qd(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}async function Rx(n,l){if(n.id in l)return l[n.id];try{let i=await import(n.module);return l[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ox(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Mx(n,l,i){let r=await Promise.all(n.map(async u=>{let c=l.routes[u.route.id];if(c){let d=await Rx(c,i);return d.links?d.links():[]}return[]}));return Ux(r.flat(1).filter(Ox).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function ry(n,l,i,r,u,c){let d=(p,y)=>i[y]?p.route.id!==i[y].route.id:!0,m=(p,y)=>i[y].pathname!==p.pathname||i[y].route.path?.endsWith("*")&&i[y].params["*"]!==p.params["*"];return c==="assets"?l.filter((p,y)=>d(p,y)||m(p,y)):c==="data"?l.filter((p,y)=>{let g=r.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(d(p,y)||m(p,y))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function Dx(n,l,{includeHydrateFallback:i}={}){return Lx(n.map(r=>{let u=l.routes[r.route.id];if(!u)return[];let c=[u.module];return u.clientActionModule&&(c=c.concat(u.clientActionModule)),u.clientLoaderModule&&(c=c.concat(u.clientLoaderModule)),i&&u.hydrateFallbackModule&&(c=c.concat(u.hydrateFallbackModule)),u.imports&&(c=c.concat(u.imports)),c}).flat(1))}function Lx(n){return[...new Set(n)]}function kx(n){let l={},i=Object.keys(n).sort();for(let r of i)l[r]=n[r];return l}function Ux(n,l){let i=new Set;return new Set(l),n.reduce((r,u)=>{let c=JSON.stringify(kx(u));return i.has(c)||(i.add(c),r.push({key:c,link:u})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zx=new Set([100,101,204,205]);function qx(n,l){let i=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i.pathname==="/"?i.pathname="_root.data":l&&Aa(i.pathname,l)==="/"?i.pathname=`${l.replace(/\/$/,"")}/_root.data`:i.pathname=`${i.pathname.replace(/\/$/,"")}.data`,i}function y1(){let n=b.useContext(ni);return qd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Bx(){let n=b.useContext(Eu);return qd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Bd=b.createContext(void 0);Bd.displayName="FrameworkContext";function v1(){let n=b.useContext(Bd);return qd(n,"You must render this element inside a <HydratedRouter> element"),n}function Hx(n,l){let i=b.useContext(Bd),[r,u]=b.useState(!1),[c,d]=b.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:y,onMouseLeave:g,onTouchStart:x}=l,E=b.useRef(null);b.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let C=T=>{T.forEach(_=>{d(_.isIntersecting)})},N=new IntersectionObserver(C,{threshold:.5});return E.current&&N.observe(E.current),()=>{N.disconnect()}}},[n]),b.useEffect(()=>{if(r){let C=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(C)}}},[r]);let j=()=>{u(!0)},w=()=>{u(!1),d(!1)};return i?n!=="intent"?[c,E,{}]:[c,E,{onFocus:fr(m,j),onBlur:fr(p,w),onMouseEnter:fr(y,j),onMouseLeave:fr(g,w),onTouchStart:fr(x,j)}]:[!1,E,{}]}function fr(n,l){return i=>{n&&n(i),i.defaultPrevented||l(i)}}function Qx({page:n,...l}){let{router:i}=y1(),r=b.useMemo(()=>s1(i.routes,n,i.basename),[i.routes,n,i.basename]);return r?b.createElement(Yx,{page:n,matches:r,...l}):null}function $x(n){let{manifest:l,routeModules:i}=v1(),[r,u]=b.useState([]);return b.useEffect(()=>{let c=!1;return Mx(n,l,i).then(d=>{c||u(d)}),()=>{c=!0}},[n,l,i]),r}function Yx({page:n,matches:l,...i}){let r=qt(),{manifest:u,routeModules:c}=v1(),{basename:d}=y1(),{loaderData:m,matches:p}=Bx(),y=b.useMemo(()=>ry(n,l,p,u,r,"data"),[n,l,p,u,r]),g=b.useMemo(()=>ry(n,l,p,u,r,"assets"),[n,l,p,u,r]),x=b.useMemo(()=>{if(n===r.pathname+r.search+r.hash)return[];let w=new Set,C=!1;if(l.forEach(T=>{let _=u.routes[T.route.id];!_||!_.hasLoader||(!y.some(D=>D.route.id===T.route.id)&&T.route.id in m&&c[T.route.id]?.shouldRevalidate||_.hasClientLoader?C=!0:w.add(T.route.id))}),w.size===0)return[];let N=qx(n,d);return C&&w.size>0&&N.searchParams.set("_routes",l.filter(T=>w.has(T.route.id)).map(T=>T.route.id).join(",")),[N.pathname+N.search]},[d,m,r,u,y,l,n,c]),E=b.useMemo(()=>Dx(g,u),[g,u]),j=$x(g);return b.createElement(b.Fragment,null,x.map(w=>b.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),E.map(w=>b.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),j.map(({key:w,link:C})=>b.createElement("link",{key:w,...C})))}function Vx(...n){return l=>{n.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var g1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{g1&&(window.__reactRouterVersion="7.6.0")}catch{}function Kx({basename:n,children:l,window:i}){let r=b.useRef();r.current==null&&(r.current=R2({window:i,v5Compat:!0}));let u=r.current,[c,d]=b.useState({action:u.action,location:u.location}),m=b.useCallback(p=>{b.startTransition(()=>d(p))},[d]);return b.useLayoutEffect(()=>u.listen(m),[u,m]),b.createElement(bx,{basename:n,children:l,location:c.location,navigationType:c.action,navigator:u})}var b1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,x1=b.forwardRef(function({onClick:l,discover:i="render",prefetch:r="none",relative:u,reloadDocument:c,replace:d,state:m,target:p,to:y,preventScrollReset:g,viewTransition:x,...E},j){let{basename:w}=b.useContext(ta),C=typeof y=="string"&&b1.test(y),N,T=!1;if(typeof y=="string"&&C&&(N=y,g1))try{let ae=new URL(window.location.href),ye=y.startsWith("//")?new URL(ae.protocol+y):new URL(y),Ae=Aa(ye.pathname,w);ye.origin===ae.origin&&Ae!=null?y=Ae+ye.search+ye.hash:T=!0}catch{Ln(!1,`<Link to="${y}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=ax(y,{relative:u}),[D,H,V]=Hx(r,E),X=Zx(y,{replace:d,state:m,target:p,preventScrollReset:g,relative:u,viewTransition:x});function G(ae){l&&l(ae),ae.defaultPrevented||X(ae)}let P=b.createElement("a",{...E,...V,href:N||_,onClick:T||c?l:G,ref:Vx(j,H),target:p,"data-discover":!C&&i==="render"?"true":void 0});return D&&!C?b.createElement(b.Fragment,null,P,b.createElement(Qx,{page:_})):P});x1.displayName="Link";var Gx=b.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:r="",end:u=!1,style:c,to:d,viewTransition:m,children:p,...y},g){let x=_r(d,{relative:y.relative}),E=qt(),j=b.useContext(Eu),{navigator:w,basename:C}=b.useContext(ta),N=j!=null&&tS(x)&&m===!0,T=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,_=E.pathname,D=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;i||(_=_.toLowerCase(),D=D?D.toLowerCase():null,T=T.toLowerCase()),D&&C&&(D=Aa(D,C)||D);const H=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let V=_===T||!u&&_.startsWith(T)&&_.charAt(H)==="/",X=D!=null&&(D===T||!u&&D.startsWith(T)&&D.charAt(T.length)==="/"),G={isActive:V,isPending:X,isTransitioning:N},P=V?l:void 0,ae;typeof r=="function"?ae=r(G):ae=[r,V?"active":null,X?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let ye=typeof c=="function"?c(G):c;return b.createElement(x1,{...y,"aria-current":P,className:ae,ref:g,style:ye,to:d,viewTransition:m},typeof p=="function"?p(G):p)});Gx.displayName="NavLink";var Fx=b.forwardRef(({discover:n="render",fetcherKey:l,navigate:i,reloadDocument:r,replace:u,state:c,method:d=au,action:m,onSubmit:p,relative:y,preventScrollReset:g,viewTransition:x,...E},j)=>{let w=Wx(),C=eS(m,{relative:y}),N=d.toLowerCase()==="get"?"get":"post",T=typeof m=="string"&&b1.test(m),_=D=>{if(p&&p(D),D.defaultPrevented)return;D.preventDefault();let H=D.nativeEvent.submitter,V=H?.getAttribute("formmethod")||d;w(H||D.currentTarget,{fetcherKey:l,method:V,navigate:i,replace:u,state:c,relative:y,preventScrollReset:g,viewTransition:x})};return b.createElement("form",{ref:j,method:N,action:C,onSubmit:r?p:_,...E,"data-discover":!T&&n==="render"?"true":void 0})});Fx.displayName="Form";function Xx(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function S1(n){let l=b.useContext(ni);return Pe(l,Xx(n)),l}function Zx(n,{target:l,replace:i,state:r,preventScrollReset:u,relative:c,viewTransition:d}={}){let m=wt(),p=qt(),y=_r(n,{relative:c});return b.useCallback(g=>{if(_x(g,l)){g.preventDefault();let x=i!==void 0?i:br(p)===br(y);m(n,{replace:x,state:r,preventScrollReset:u,relative:c,viewTransition:d})}},[p,m,y,i,r,l,n,u,c,d])}function Px(n){Ln(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=b.useRef(hd(n)),i=b.useRef(!1),r=qt(),u=b.useMemo(()=>Nx(r.search,i.current?null:l.current),[r.search]),c=wt(),d=b.useCallback((m,p)=>{const y=hd(typeof m=="function"?m(u):m);i.current=!0,c("?"+y,p)},[c,u]);return[u,d]}var Jx=0,Ix=()=>`__${String(++Jx)}__`;function Wx(){let{router:n}=S1("useSubmit"),{basename:l}=b.useContext(ta),i=px();return b.useCallback(async(r,u={})=>{let{action:c,method:d,encType:m,formData:p,body:y}=Ax(r,l);if(u.navigate===!1){let g=u.fetcherKey||Ix();await n.fetch(g,i,u.action||c,{preventScrollReset:u.preventScrollReset,formData:p,body:y,formMethod:u.method||d,formEncType:u.encType||m,flushSync:u.flushSync})}else await n.navigate(u.action||c,{preventScrollReset:u.preventScrollReset,formData:p,body:y,formMethod:u.method||d,formEncType:u.encType||m,replace:u.replace,state:u.state,fromRouteId:i,flushSync:u.flushSync,viewTransition:u.viewTransition})},[n,l,i])}function eS(n,{relative:l}={}){let{basename:i}=b.useContext(ta),r=b.useContext(na);Pe(r,"useFormAction must be used inside a RouteContext");let[u]=r.matches.slice(-1),c={..._r(n||".",{relative:l})},d=qt();if(n==null){c.search=d.search;let m=new URLSearchParams(c.search),p=m.getAll("index");if(p.some(g=>g==="")){m.delete("index"),p.filter(x=>x).forEach(x=>m.append("index",x));let g=m.toString();c.search=g?`?${g}`:""}}return(!n||n===".")&&u.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(c.pathname=c.pathname==="/"?i:ja([i,c.pathname])),br(c)}function tS(n,l={}){let i=b.useContext(f1);Pe(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=S1("useViewTransitionState"),u=_r(n,{relative:l.relative});if(!i.isTransitioning)return!1;let c=Aa(i.currentLocation.pathname,r)||i.currentLocation.pathname,d=Aa(i.nextLocation.pathname,r)||i.nextLocation.pathname;return xr(u.pathname,d)!=null||xr(u.pathname,c)!=null}[...zx];var nS=l1(),ai=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},aS={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},lS=class{#e=aS;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,l){return this.#e.setTimeout(n,l)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,l){return this.#e.setInterval(n,l)}clearInterval(n){this.#e.clearInterval(n)}},Gl=new lS;function sS(n){setTimeout(n,0)}var Il=typeof window>"u"||"Deno"in globalThis;function Ut(){}function iS(n,l){return typeof n=="function"?n(l):n}function md(n){return typeof n=="number"&&n>=0&&n!==1/0}function w1(n,l){return Math.max(n+(l||0)-Date.now(),0)}function ml(n,l){return typeof n=="function"?n(l):n}function Tn(n,l){return typeof n=="function"?n(l):n}function oy(n,l){const{type:i="all",exact:r,fetchStatus:u,predicate:c,queryKey:d,stale:m}=n;if(d){if(r){if(l.queryHash!==Hd(d,l.options))return!1}else if(!Sr(l.queryKey,d))return!1}if(i!=="all"){const p=l.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof m=="boolean"&&l.isStale()!==m||u&&u!==l.state.fetchStatus||c&&!c(l))}function uy(n,l){const{exact:i,status:r,predicate:u,mutationKey:c}=n;if(c){if(!l.options.mutationKey)return!1;if(i){if(Wl(l.options.mutationKey)!==Wl(c))return!1}else if(!Sr(l.options.mutationKey,c))return!1}return!(r&&l.state.status!==r||u&&!u(l))}function Hd(n,l){return(l?.queryKeyHashFn||Wl)(n)}function Wl(n){return JSON.stringify(n,(l,i)=>pd(i)?Object.keys(i).sort().reduce((r,u)=>(r[u]=i[u],r),{}):i)}function Sr(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(l).every(i=>Sr(n[i],l[i])):!1}var rS=Object.prototype.hasOwnProperty;function E1(n,l){if(n===l)return n;const i=cy(n)&&cy(l);if(!i&&!(pd(n)&&pd(l)))return l;const u=(i?n:Object.keys(n)).length,c=i?l:Object.keys(l),d=c.length,m=i?new Array(d):{};let p=0;for(let y=0;y<d;y++){const g=i?y:c[y],x=n[g],E=l[g];if(x===E){m[g]=x,(i?y<u:rS.call(n,g))&&p++;continue}if(x===null||E===null||typeof x!="object"||typeof E!="object"){m[g]=E;continue}const j=E1(x,E);m[g]=j,j===x&&p++}return u===d&&p===u?n:m}function du(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const i in n)if(n[i]!==l[i])return!1;return!0}function cy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function pd(n){if(!fy(n))return!1;const l=n.constructor;if(l===void 0)return!0;const i=l.prototype;return!(!fy(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function fy(n){return Object.prototype.toString.call(n)==="[object Object]"}function oS(n){return new Promise(l=>{Gl.setTimeout(l,n)})}function yd(n,l,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,l):i.structuralSharing!==!1?E1(n,l):l}function uS(n,l,i=0){const r=[...n,l];return i&&r.length>i?r.slice(1):r}function cS(n,l,i=0){const r=[l,...n];return i&&r.length>i?r.slice(0,-1):r}var Qd=Symbol();function C1(n,l){return!n.queryFn&&l?.initialPromise?()=>l.initialPromise:!n.queryFn||n.queryFn===Qd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function _1(n,l){return typeof n=="function"?n(...l):!!n}var fS=class extends ai{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Il&&window.addEventListener){const l=()=>n();return window.addEventListener("visibilitychange",l,!1),()=>{window.removeEventListener("visibilitychange",l)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(l=>{typeof l=="boolean"?this.setFocused(l):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(l=>{l(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},$d=new fS;function vd(){let n,l;const i=new Promise((u,c)=>{n=u,l=c});i.status="pending",i.catch(()=>{});function r(u){Object.assign(i,u),delete i.resolve,delete i.reject}return i.resolve=u=>{r({status:"fulfilled",value:u}),n(u)},i.reject=u=>{r({status:"rejected",reason:u}),l(u)},i}var dS=sS;function hS(){let n=[],l=0,i=m=>{m()},r=m=>{m()},u=dS;const c=m=>{l?n.push(m):u(()=>{i(m)})},d=()=>{const m=n;n=[],m.length&&u(()=>{r(()=>{m.forEach(p=>{i(p)})})})};return{batch:m=>{let p;l++;try{p=m()}finally{l--,l||d()}return p},batchCalls:m=>(...p)=>{c(()=>{m(...p)})},schedule:c,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{u=m}}}var dt=hS(),mS=class extends ai{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Il&&window.addEventListener){const l=()=>n(!0),i=()=>n(!1);return window.addEventListener("online",l,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",l),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(i=>{i(n)}))}isOnline(){return this.#e}},hu=new mS;function pS(n){return Math.min(1e3*2**n,3e4)}function N1(n){return(n??"online")==="online"?hu.isOnline():!0}var gd=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function j1(n){let l=!1,i=0,r;const u=vd(),c=()=>u.status!=="pending",d=C=>{if(!c()){const N=new gd(C);E(N),n.onCancel?.(N)}},m=()=>{l=!0},p=()=>{l=!1},y=()=>$d.isFocused()&&(n.networkMode==="always"||hu.isOnline())&&n.canRun(),g=()=>N1(n.networkMode)&&n.canRun(),x=C=>{c()||(r?.(),u.resolve(C))},E=C=>{c()||(r?.(),u.reject(C))},j=()=>new Promise(C=>{r=N=>{(c()||y())&&C(N)},n.onPause?.()}).then(()=>{r=void 0,c()||n.onContinue?.()}),w=()=>{if(c())return;let C;const N=i===0?n.initialPromise:void 0;try{C=N??n.fn()}catch(T){C=Promise.reject(T)}Promise.resolve(C).then(x).catch(T=>{if(c())return;const _=n.retry??(Il?0:3),D=n.retryDelay??pS,H=typeof D=="function"?D(i,T):D,V=_===!0||typeof _=="number"&&i<_||typeof _=="function"&&_(i,T);if(l||!V){E(T);return}i++,n.onFail?.(i,T),oS(H).then(()=>y()?void 0:j()).then(()=>{l?E(T):w()})})};return{promise:u,status:()=>u.status,cancel:d,continue:()=>(r?.(),u),cancelRetry:m,continueRetry:p,canStart:g,start:()=>(g()?w():j().then(w),u)}}var T1=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),md(this.gcTime)&&(this.#e=Gl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Il?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(Gl.clearTimeout(this.#e),this.#e=void 0)}},yS=class extends T1{#e;#t;#n;#l;#a;#i;#r;constructor(l){super(),this.#r=!1,this.#i=l.defaultOptions,this.setOptions(l.options),this.observers=[],this.#l=l.client,this.#n=this.#l.getQueryCache(),this.queryKey=l.queryKey,this.queryHash=l.queryHash,this.#e=hy(this.options),this.state=l.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(l){if(this.options={...this.#i,...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=hy(this.options);i.data!==void 0&&(this.setState(dy(i.data,i.dataUpdatedAt)),this.#e=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(l,i){const r=yd(this.state.data,l,this.options);return this.#s({data:r,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),r}setState(l,i){this.#s({type:"setState",state:l,setStateOptions:i})}cancel(l){const i=this.#a?.promise;return this.#a?.cancel(l),i?i.then(Ut).catch(Ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(l=>Tn(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>ml(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!w1(this.state.dataUpdatedAt,l)}onFocus(){this.observers.find(i=>i.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(i=>i.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(this.#a&&(this.#r?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(l,i){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(l&&this.setOptions(l),!this.options.queryFn){const p=this.observers.find(y=>y.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,u=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#r=!0,r.signal)})},c=()=>{const p=C1(this.options,i),g=(()=>{const x={client:this.#l,queryKey:this.queryKey,meta:this.meta};return u(x),x})();return this.#r=!1,this.options.persister?this.options.persister(p,g,this):p(g)},m=(()=>{const p={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:c};return u(p),p})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#s({type:"fetch",meta:m.fetchOptions?.meta}),this.#a=j1({initialPromise:i?.initialPromise,fn:m.fetchFn,onCancel:p=>{p instanceof gd&&p.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(p,y)=>{this.#s({type:"failed",failureCount:p,error:y})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const p=await this.#a.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#n.config.onSuccess?.(p,this),this.#n.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof gd){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#s({type:"error",error:p}),this.#n.config.onError?.(p,this),this.#n.config.onSettled?.(this.state.data,p,this),p}finally{this.scheduleGc()}}#s(l){const i=r=>{switch(l.type){case"failed":return{...r,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...A1(r.data,this.options),fetchMeta:l.meta??null};case"success":const u={...r,...dy(l.data,l.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=l.manual?u:void 0,u;case"error":const c=l.error;return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...l.state}}};this.state=i(this.state),dt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:l})})}};function A1(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N1(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function dy(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function hy(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,i=l!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var R1=class extends ai{constructor(n,l){super(),this.options=l,this.#e=n,this.#s=null,this.#r=vd(),this.bindMethods(),this.setOptions(l)}#e;#t=void 0;#n=void 0;#l=void 0;#a;#i;#r;#s;#p;#d;#h;#u;#c;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),my(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const l=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),l._defaulted&&!du(this.options,l)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&py(this.#t,i,this.options,l)&&this.#f(),this.updateResult(),r&&(this.#t!==i||Tn(this.options.enabled,this.#t)!==Tn(l.enabled,this.#t)||ml(this.options.staleTime,this.#t)!==ml(l.staleTime,this.#t))&&this.#y();const u=this.#v();r&&(this.#t!==i||Tn(this.options.enabled,this.#t)!==Tn(l.enabled,this.#t)||u!==this.#o)&&this.#g(u)}getOptimisticResult(n){const l=this.#e.getQueryCache().build(this.#e,n),i=this.createResult(l,n);return gS(this,i)&&(this.#l=i,this.#i=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#l}trackResult(n,l){return new Proxy(n,{get:(i,r)=>(this.trackProp(r),l?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,r))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const l=this.#e.defaultQueryOptions(n),i=this.#e.getQueryCache().build(this.#e,l);return i.fetch().then(()=>this.createResult(i,l))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#l))}#f(n){this.#w();let l=this.#t.fetch(this.options,n);return n?.throwOnError||(l=l.catch(Ut)),l}#y(){this.#x();const n=ml(this.options.staleTime,this.#t);if(Il||this.#l.isStale||!md(n))return;const i=w1(this.#l.dataUpdatedAt,n)+1;this.#u=Gl.setTimeout(()=>{this.#l.isStale||this.updateResult()},i)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(n){this.#S(),this.#o=n,!(Il||Tn(this.options.enabled,this.#t)===!1||!md(this.#o)||this.#o===0)&&(this.#c=Gl.setInterval(()=>{(this.options.refetchIntervalInBackground||$d.isFocused())&&this.#f()},this.#o))}#b(){this.#y(),this.#g(this.#v())}#x(){this.#u&&(Gl.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(Gl.clearInterval(this.#c),this.#c=void 0)}createResult(n,l){const i=this.#t,r=this.options,u=this.#l,c=this.#a,d=this.#i,p=n!==i?n.state:this.#n,{state:y}=n;let g={...y},x=!1,E;if(l._optimisticResults){const P=this.hasListeners(),ae=!P&&my(n,l),ye=P&&py(n,i,l,r);(ae||ye)&&(g={...g,...A1(y.data,n.options)}),l._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:j,errorUpdatedAt:w,status:C}=g;E=g.data;let N=!1;if(l.placeholderData!==void 0&&E===void 0&&C==="pending"){let P;u?.isPlaceholderData&&l.placeholderData===d?.placeholderData?(P=u.data,N=!0):P=typeof l.placeholderData=="function"?l.placeholderData(this.#h?.state.data,this.#h):l.placeholderData,P!==void 0&&(C="success",E=yd(u?.data,P,l),x=!0)}if(l.select&&E!==void 0&&!N)if(u&&E===c?.data&&l.select===this.#p)E=this.#d;else try{this.#p=l.select,E=l.select(E),E=yd(u?.data,E,l),this.#d=E,this.#s=null}catch(P){this.#s=P}this.#s&&(j=this.#s,E=this.#d,w=Date.now(),C="error");const T=g.fetchStatus==="fetching",_=C==="pending",D=C==="error",H=_&&T,V=E!==void 0,G={status:C,fetchStatus:g.fetchStatus,isPending:_,isSuccess:C==="success",isError:D,isInitialLoading:H,isLoading:H,data:E,dataUpdatedAt:g.dataUpdatedAt,error:j,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:T,isRefetching:T&&!_,isLoadingError:D&&!V,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:D&&V,isStale:Yd(n,l),refetch:this.refetch,promise:this.#r,isEnabled:Tn(l.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const P=Ae=>{G.status==="error"?Ae.reject(G.error):G.data!==void 0&&Ae.resolve(G.data)},ae=()=>{const Ae=this.#r=G.promise=vd();P(Ae)},ye=this.#r;switch(ye.status){case"pending":n.queryHash===i.queryHash&&P(ye);break;case"fulfilled":(G.status==="error"||G.data!==ye.value)&&ae();break;case"rejected":(G.status!=="error"||G.error!==ye.reason)&&ae();break}}return G}updateResult(){const n=this.#l,l=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#i=this.options,this.#a.data!==void 0&&(this.#h=this.#t),du(l,n))return;this.#l=l;const i=()=>{if(!n)return!0;const{notifyOnChangeProps:r}=this.options,u=typeof r=="function"?r():r;if(u==="all"||!u&&!this.#m.size)return!0;const c=new Set(u??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#l).some(d=>{const m=d;return this.#l[m]!==n[m]&&c.has(m)})};this.#E({listeners:i()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const l=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(l?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(n){dt.batch(()=>{n.listeners&&this.listeners.forEach(l=>{l(this.#l)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function vS(n,l){return Tn(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&l.retryOnMount===!1)}function my(n,l){return vS(n,l)||n.state.data!==void 0&&bd(n,l,l.refetchOnMount)}function bd(n,l,i){if(Tn(l.enabled,n)!==!1&&ml(l.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&Yd(n,l)}return!1}function py(n,l,i,r){return(n!==l||Tn(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Yd(n,i)}function Yd(n,l){return Tn(l.enabled,n)!==!1&&n.isStaleByTime(ml(l.staleTime,n))}function gS(n,l){return!du(n.getCurrentResult(),l)}function mu(n){return{onFetch:(l,i)=>{const r=l.options,u=l.fetchOptions?.meta?.fetchMore?.direction,c=l.state.data?.pages||[],d=l.state.data?.pageParams||[];let m={pages:[],pageParams:[]},p=0;const y=async()=>{let g=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(l.signal.aborted?g=!0:l.signal.addEventListener("abort",()=>{g=!0}),l.signal)})},E=C1(l.options,l.fetchOptions),j=async(w,C,N)=>{if(g)return Promise.reject();if(C==null&&w.pages.length)return Promise.resolve(w);const _=(()=>{const X={client:l.client,queryKey:l.queryKey,pageParam:C,direction:N?"backward":"forward",meta:l.options.meta};return x(X),X})(),D=await E(_),{maxPages:H}=l.options,V=N?cS:uS;return{pages:V(w.pages,D,H),pageParams:V(w.pageParams,C,H)}};if(u&&c.length){const w=u==="backward",C=w?O1:xd,N={pages:c,pageParams:d},T=C(r,N);m=await j(N,T,w)}else{const w=n??c.length;do{const C=p===0?d[0]??r.initialPageParam:xd(r,m);if(p>0&&C==null)break;m=await j(m,C),p++}while(p<w)}return m};l.options.persister?l.fetchFn=()=>l.options.persister?.(y,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},i):l.fetchFn=y}}}function xd(n,{pages:l,pageParams:i}){const r=l.length-1;return l.length>0?n.getNextPageParam(l[r],l,i[r],i):void 0}function O1(n,{pages:l,pageParams:i}){return l.length>0?n.getPreviousPageParam?.(l[0],l,i[0],i):void 0}function bS(n,l){return l?xd(n,l)!=null:!1}function xS(n,l){return!l||!n.getPreviousPageParam?!1:O1(n,l)!=null}var SS=class extends R1{constructor(n,l){super(n,l)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){super.setOptions({...n,behavior:mu()})}getOptimisticResult(n){return n.behavior=mu(),super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,l){const{state:i}=n,r=super.createResult(n,l),{isFetching:u,isRefetching:c,isError:d,isRefetchError:m}=r,p=i.fetchMeta?.fetchMore?.direction,y=d&&p==="forward",g=u&&p==="forward",x=d&&p==="backward",E=u&&p==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:bS(l,i.data),hasPreviousPage:xS(l,i.data),isFetchNextPageError:y,isFetchingNextPage:g,isFetchPreviousPageError:x,isFetchingPreviousPage:E,isRefetchError:m&&!y&&!x,isRefetching:c&&!g&&!E}}},wS=class extends T1{#e;#t;#n;#l;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||M1(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(l=>l!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(n){const l=()=>{this.#a({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#l=j1({fn:()=>this.options.mutationFn?this.options.mutationFn(n,i):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#a({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:l,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",u=!this.#l.canStart();try{if(r)l();else{this.#a({type:"pending",variables:n,isPaused:u}),await this.#n.config.onMutate?.(n,this,i);const d=await this.options.onMutate?.(n,i);d!==this.state.context&&this.#a({type:"pending",context:d,variables:n,isPaused:u})}const c=await this.#l.start();return await this.#n.config.onSuccess?.(c,n,this.state.context,this,i),await this.options.onSuccess?.(c,n,this.state.context,i),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(c,null,n,this.state.context,i),this.#a({type:"success",data:c}),c}catch(c){try{throw await this.#n.config.onError?.(c,n,this.state.context,this,i),await this.options.onError?.(c,n,this.state.context,i),await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(void 0,c,n,this.state.context,i),c}finally{this.#a({type:"error",error:c})}}finally{this.#n.runNext(this)}}#a(n){const l=i=>{switch(n.type){case"failed":return{...i,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...i,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:n.error,failureCount:i.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=l(this.state),dt.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function M1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var D1=class extends ai{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,l,i){const r=new wS({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(l),state:i});return this.add(r),r}add(n){this.#e.add(n);const l=Po(n);if(typeof l=="string"){const i=this.#t.get(l);i?i.push(n):this.#t.set(l,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const l=Po(n);if(typeof l=="string"){const i=this.#t.get(l);if(i)if(i.length>1){const r=i.indexOf(n);r!==-1&&i.splice(r,1)}else i[0]===n&&this.#t.delete(l)}}this.notify({type:"removed",mutation:n})}canRun(n){const l=Po(n);if(typeof l=="string"){const r=this.#t.get(l)?.find(u=>u.state.status==="pending");return!r||r===n}else return!0}runNext(n){const l=Po(n);return typeof l=="string"?this.#t.get(l)?.find(r=>r!==n&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){dt.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const l={exact:!0,...n};return this.getAll().find(i=>uy(l,i))}findAll(n={}){return this.getAll().filter(l=>uy(n,l))}notify(n){dt.batch(()=>{this.listeners.forEach(l=>{l(n)})})}resumePausedMutations(){const n=this.getAll().filter(l=>l.state.isPaused);return dt.batch(()=>Promise.all(n.map(l=>l.continue().catch(Ut))))}};function Po(n){return n.options.scope?.id}var ES=class extends ai{#e;#t=void 0;#n;#l;constructor(l,i){super(),this.#e=l,this.setOptions(i),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(l){const i=this.options;this.options=this.#e.defaultMutationOptions(l),du(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&Wl(i.mutationKey)!==Wl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(l){this.#a(),this.#i(l)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#i()}mutate(l,i){return this.#l=i,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(l)}#a(){const l=this.#n?.state??M1();this.#t={...l,isPending:l.status==="pending",isSuccess:l.status==="success",isError:l.status==="error",isIdle:l.status==="idle",mutate:this.mutate,reset:this.reset}}#i(l){dt.batch(()=>{if(this.#l&&this.hasListeners()){const i=this.#t.variables,r=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};l?.type==="success"?(this.#l.onSuccess?.(l.data,i,r,u),this.#l.onSettled?.(l.data,null,i,r,u)):l?.type==="error"&&(this.#l.onError?.(l.error,i,r,u),this.#l.onSettled?.(void 0,l.error,i,r,u))}this.listeners.forEach(i=>{i(this.#t)})})}},CS=class extends ai{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,l,i){const r=l.queryKey,u=l.queryHash??Hd(r,l);let c=this.get(u);return c||(c=new yS({client:n,queryKey:r,queryHash:u,options:n.defaultQueryOptions(l),state:i,defaultOptions:n.getQueryDefaults(r)}),this.add(c)),c}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const l=this.#e.get(n.queryHash);l&&(n.destroy(),l===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){dt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const l={exact:!0,...n};return this.getAll().find(i=>oy(l,i))}findAll(n={}){const l=this.getAll();return Object.keys(n).length>0?l.filter(i=>oy(n,i)):l}notify(n){dt.batch(()=>{this.listeners.forEach(l=>{l(n)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},_S=class{#e;#t;#n;#l;#a;#i;#r;#s;constructor(n={}){this.#e=n.queryCache||new CS,this.#t=n.mutationCache||new D1,this.#n=n.defaultOptions||{},this.#l=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#r=$d.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=hu.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#r?.(),this.#r=void 0,this.#s?.(),this.#s=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const l=this.defaultQueryOptions({queryKey:n});return this.#e.get(l.queryHash)?.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),i=this.#e.build(this,l),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ml(l.staleTime,i))&&this.prefetchQuery(l),Promise.resolve(r))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:l,state:i})=>{const r=i.data;return[l,r]})}setQueryData(n,l,i){const r=this.defaultQueryOptions({queryKey:n}),c=this.#e.get(r.queryHash)?.state.data,d=iS(l,c);if(d!==void 0)return this.#e.build(this,r).setData(d,{...i,manual:!0})}setQueriesData(n,l,i){return dt.batch(()=>this.#e.findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,l,i)]))}getQueryState(n){const l=this.defaultQueryOptions({queryKey:n});return this.#e.get(l.queryHash)?.state}removeQueries(n){const l=this.#e;dt.batch(()=>{l.findAll(n).forEach(i=>{l.remove(i)})})}resetQueries(n,l){const i=this.#e;return dt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const i={revert:!0,...l},r=dt.batch(()=>this.#e.findAll(n).map(u=>u.cancel(i)));return Promise.all(r).then(Ut).catch(Ut)}invalidateQueries(n,l={}){return dt.batch(()=>(this.#e.findAll(n).forEach(i=>{i.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},l)))}refetchQueries(n,l={}){const i={...l,cancelRefetch:l.cancelRefetch??!0},r=dt.batch(()=>this.#e.findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let c=u.fetch(void 0,i);return i.throwOnError||(c=c.catch(Ut)),u.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(Ut)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const i=this.#e.build(this,l);return i.isStaleByTime(ml(l.staleTime,i))?i.fetch(l):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ut).catch(Ut)}fetchInfiniteQuery(n){return n.behavior=mu(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ut).catch(Ut)}ensureInfiniteQueryData(n){return n.behavior=mu(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return hu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,l){this.#l.set(Wl(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[...this.#l.values()],i={};return l.forEach(r=>{Sr(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,l){this.#a.set(Wl(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[...this.#a.values()],i={};return l.forEach(r=>{Sr(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const l={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=Hd(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===Qd&&(l.enabled=!1),l}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},L1=b.createContext(void 0),k1=n=>{const l=b.useContext(L1);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},NS=({client:n,children:l})=>(b.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),h.jsx(L1.Provider,{value:n,children:l})),U1=b.createContext(!1),jS=()=>b.useContext(U1);U1.Provider;function TS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var AS=b.createContext(TS()),RS=()=>b.useContext(AS),OS=(n,l)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(l.isReset()||(n.retryOnMount=!1))},MS=n=>{b.useEffect(()=>{n.clearReset()},[n])},DS=({result:n,errorResetBoundary:l,throwOnError:i,query:r,suspense:u})=>n.isError&&!l.isReset()&&!n.isFetching&&r&&(u&&n.data===void 0||_1(i,[n.error,r])),LS=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...u)=>i(r(...u)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},kS=(n,l)=>n.isLoading&&n.isFetching&&!l,US=(n,l)=>n?.suspense&&l.isPending,yy=(n,l,i)=>l.fetchOptimistic(n).catch(()=>{i.clearReset()});function z1(n,l,i){const r=jS(),u=RS(),c=k1(),d=c.defaultQueryOptions(n);c.getDefaultOptions().queries?._experimental_beforeQuery?.(d),d._optimisticResults=r?"isRestoring":"optimistic",LS(d),OS(d,u),MS(u);const m=!c.getQueryCache().get(d.queryHash),[p]=b.useState(()=>new l(c,d)),y=p.getOptimisticResult(d),g=!r&&n.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(x=>{const E=g?p.subscribe(dt.batchCalls(x)):Ut;return p.updateResult(),E},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),b.useEffect(()=>{p.setOptions(d)},[d,p]),US(d,y))throw yy(d,p,u);if(DS({result:y,errorResetBoundary:u,throwOnError:d.throwOnError,query:c.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw y.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(d,y),d.experimental_prefetchInRender&&!Il&&kS(y,r)&&(m?yy(d,p,u):c.getQueryCache().get(d.queryHash)?.promise)?.catch(Ut).finally(()=>{p.updateResult()}),d.notifyOnChangeProps?y:p.trackResult(y)}function Zt(n,l){return z1(n,R1)}function vt(n,l){const i=k1(),[r]=b.useState(()=>new ES(i,n));b.useEffect(()=>{r.setOptions(n)},[r,n]);const u=b.useSyncExternalStore(b.useCallback(d=>r.subscribe(dt.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=b.useCallback((d,m)=>{r.mutate(d,m).catch(Ut)},[r]);if(u.error&&_1(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:c,mutateAsync:u.mutate}}function zS(n,l){return z1(n,SS)}function q1(n,l){return function(){return n.apply(l,arguments)}}const{toString:qS}=Object.prototype,{getPrototypeOf:Vd}=Object,{iterator:_u,toStringTag:B1}=Symbol,Nu=(n=>l=>{const i=qS.call(l);return n[i]||(n[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),zn=n=>(n=n.toLowerCase(),l=>Nu(l)===n),ju=n=>l=>typeof l===n,{isArray:li}=Array,Zs=ju("undefined");function Nr(n){return n!==null&&!Zs(n)&&n.constructor!==null&&!Zs(n.constructor)&&Ft(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const H1=zn("ArrayBuffer");function BS(n){let l;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?l=ArrayBuffer.isView(n):l=n&&n.buffer&&H1(n.buffer),l}const HS=ju("string"),Ft=ju("function"),Q1=ju("number"),jr=n=>n!==null&&typeof n=="object",QS=n=>n===!0||n===!1,su=n=>{if(Nu(n)!=="object")return!1;const l=Vd(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(B1 in n)&&!(_u in n)},$S=n=>{if(!jr(n)||Nr(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},YS=zn("Date"),VS=zn("File"),KS=zn("Blob"),GS=zn("FileList"),FS=n=>jr(n)&&Ft(n.pipe),XS=n=>{let l;return n&&(typeof FormData=="function"&&n instanceof FormData||Ft(n.append)&&((l=Nu(n))==="formdata"||l==="object"&&Ft(n.toString)&&n.toString()==="[object FormData]"))},ZS=zn("URLSearchParams"),[PS,JS,IS,WS]=["ReadableStream","Request","Response","Headers"].map(zn),ew=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tr(n,l,{allOwnKeys:i=!1}={}){if(n===null||typeof n>"u")return;let r,u;if(typeof n!="object"&&(n=[n]),li(n))for(r=0,u=n.length;r<u;r++)l.call(null,n[r],r,n);else{if(Nr(n))return;const c=i?Object.getOwnPropertyNames(n):Object.keys(n),d=c.length;let m;for(r=0;r<d;r++)m=c[r],l.call(null,n[m],m,n)}}function $1(n,l){if(Nr(n))return null;l=l.toLowerCase();const i=Object.keys(n);let r=i.length,u;for(;r-- >0;)if(u=i[r],l===u.toLowerCase())return u;return null}const Fl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Y1=n=>!Zs(n)&&n!==Fl;function Sd(){const{caseless:n,skipUndefined:l}=Y1(this)&&this||{},i={},r=(u,c)=>{const d=n&&$1(i,c)||c;su(i[d])&&su(u)?i[d]=Sd(i[d],u):su(u)?i[d]=Sd({},u):li(u)?i[d]=u.slice():(!l||!Zs(u))&&(i[d]=u)};for(let u=0,c=arguments.length;u<c;u++)arguments[u]&&Tr(arguments[u],r);return i}const tw=(n,l,i,{allOwnKeys:r}={})=>(Tr(l,(u,c)=>{i&&Ft(u)?n[c]=q1(u,i):n[c]=u},{allOwnKeys:r}),n),nw=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),aw=(n,l,i,r)=>{n.prototype=Object.create(l.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:l.prototype}),i&&Object.assign(n.prototype,i)},lw=(n,l,i,r)=>{let u,c,d;const m={};if(l=l||{},n==null)return l;do{for(u=Object.getOwnPropertyNames(n),c=u.length;c-- >0;)d=u[c],(!r||r(d,n,l))&&!m[d]&&(l[d]=n[d],m[d]=!0);n=i!==!1&&Vd(n)}while(n&&(!i||i(n,l))&&n!==Object.prototype);return l},sw=(n,l,i)=>{n=String(n),(i===void 0||i>n.length)&&(i=n.length),i-=l.length;const r=n.indexOf(l,i);return r!==-1&&r===i},iw=n=>{if(!n)return null;if(li(n))return n;let l=n.length;if(!Q1(l))return null;const i=new Array(l);for(;l-- >0;)i[l]=n[l];return i},rw=(n=>l=>n&&l instanceof n)(typeof Uint8Array<"u"&&Vd(Uint8Array)),ow=(n,l)=>{const r=(n&&n[_u]).call(n);let u;for(;(u=r.next())&&!u.done;){const c=u.value;l.call(n,c[0],c[1])}},uw=(n,l)=>{let i;const r=[];for(;(i=n.exec(l))!==null;)r.push(i);return r},cw=zn("HTMLFormElement"),fw=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,r,u){return r.toUpperCase()+u}),vy=(({hasOwnProperty:n})=>(l,i)=>n.call(l,i))(Object.prototype),dw=zn("RegExp"),V1=(n,l)=>{const i=Object.getOwnPropertyDescriptors(n),r={};Tr(i,(u,c)=>{let d;(d=l(u,c,n))!==!1&&(r[c]=d||u)}),Object.defineProperties(n,r)},hw=n=>{V1(n,(l,i)=>{if(Ft(n)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=n[i];if(Ft(r)){if(l.enumerable=!1,"writable"in l){l.writable=!1;return}l.set||(l.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},mw=(n,l)=>{const i={},r=u=>{u.forEach(c=>{i[c]=!0})};return li(n)?r(n):r(String(n).split(l)),i},pw=()=>{},yw=(n,l)=>n!=null&&Number.isFinite(n=+n)?n:l;function vw(n){return!!(n&&Ft(n.append)&&n[B1]==="FormData"&&n[_u])}const gw=n=>{const l=new Array(10),i=(r,u)=>{if(jr(r)){if(l.indexOf(r)>=0)return;if(Nr(r))return r;if(!("toJSON"in r)){l[u]=r;const c=li(r)?[]:{};return Tr(r,(d,m)=>{const p=i(d,u+1);!Zs(p)&&(c[m]=p)}),l[u]=void 0,c}}return r};return i(n,0)},bw=zn("AsyncFunction"),xw=n=>n&&(jr(n)||Ft(n))&&Ft(n.then)&&Ft(n.catch),K1=((n,l)=>n?setImmediate:l?((i,r)=>(Fl.addEventListener("message",({source:u,data:c})=>{u===Fl&&c===i&&r.length&&r.shift()()},!1),u=>{r.push(u),Fl.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ft(Fl.postMessage)),Sw=typeof queueMicrotask<"u"?queueMicrotask.bind(Fl):typeof process<"u"&&process.nextTick||K1,ww=n=>n!=null&&Ft(n[_u]),B={isArray:li,isArrayBuffer:H1,isBuffer:Nr,isFormData:XS,isArrayBufferView:BS,isString:HS,isNumber:Q1,isBoolean:QS,isObject:jr,isPlainObject:su,isEmptyObject:$S,isReadableStream:PS,isRequest:JS,isResponse:IS,isHeaders:WS,isUndefined:Zs,isDate:YS,isFile:VS,isBlob:KS,isRegExp:dw,isFunction:Ft,isStream:FS,isURLSearchParams:ZS,isTypedArray:rw,isFileList:GS,forEach:Tr,merge:Sd,extend:tw,trim:ew,stripBOM:nw,inherits:aw,toFlatObject:lw,kindOf:Nu,kindOfTest:zn,endsWith:sw,toArray:iw,forEachEntry:ow,matchAll:uw,isHTMLForm:cw,hasOwnProperty:vy,hasOwnProp:vy,reduceDescriptors:V1,freezeMethods:hw,toObjectSet:mw,toCamelCase:fw,noop:pw,toFiniteNumber:yw,findKey:$1,global:Fl,isContextDefined:Y1,isSpecCompliantForm:vw,toJSONObject:gw,isAsyncFn:bw,isThenable:xw,setImmediate:K1,asap:Sw,isIterable:ww};function pe(n,l,i,r,u){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",l&&(this.code=l),i&&(this.config=i),r&&(this.request=r),u&&(this.response=u,this.status=u.status?u.status:null)}B.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.status}}});const G1=pe.prototype,F1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{F1[n]={value:n}});Object.defineProperties(pe,F1);Object.defineProperty(G1,"isAxiosError",{value:!0});pe.from=(n,l,i,r,u,c)=>{const d=Object.create(G1);B.toFlatObject(n,d,function(g){return g!==Error.prototype},y=>y!=="isAxiosError");const m=n&&n.message?n.message:"Error",p=l==null&&n?n.code:l;return pe.call(d,m,p,i,r,u),n&&d.cause==null&&Object.defineProperty(d,"cause",{value:n,configurable:!0}),d.name=n&&n.name||"Error",c&&Object.assign(d,c),d};const Ew=null;function wd(n){return B.isPlainObject(n)||B.isArray(n)}function X1(n){return B.endsWith(n,"[]")?n.slice(0,-2):n}function gy(n,l,i){return n?n.concat(l).map(function(u,c){return u=X1(u),!i&&c?"["+u+"]":u}).join(i?".":""):l}function Cw(n){return B.isArray(n)&&!n.some(wd)}const _w=B.toFlatObject(B,{},null,function(l){return/^is[A-Z]/.test(l)});function Tu(n,l,i){if(!B.isObject(n))throw new TypeError("target must be an object");l=l||new FormData,i=B.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,N){return!B.isUndefined(N[C])});const r=i.metaTokens,u=i.visitor||g,c=i.dots,d=i.indexes,p=(i.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(l);if(!B.isFunction(u))throw new TypeError("visitor must be a function");function y(w){if(w===null)return"";if(B.isDate(w))return w.toISOString();if(B.isBoolean(w))return w.toString();if(!p&&B.isBlob(w))throw new pe("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(w)||B.isTypedArray(w)?p&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function g(w,C,N){let T=w;if(w&&!N&&typeof w=="object"){if(B.endsWith(C,"{}"))C=r?C:C.slice(0,-2),w=JSON.stringify(w);else if(B.isArray(w)&&Cw(w)||(B.isFileList(w)||B.endsWith(C,"[]"))&&(T=B.toArray(w)))return C=X1(C),T.forEach(function(D,H){!(B.isUndefined(D)||D===null)&&l.append(d===!0?gy([C],H,c):d===null?C:C+"[]",y(D))}),!1}return wd(w)?!0:(l.append(gy(N,C,c),y(w)),!1)}const x=[],E=Object.assign(_w,{defaultVisitor:g,convertValue:y,isVisitable:wd});function j(w,C){if(!B.isUndefined(w)){if(x.indexOf(w)!==-1)throw Error("Circular reference detected in "+C.join("."));x.push(w),B.forEach(w,function(T,_){(!(B.isUndefined(T)||T===null)&&u.call(l,T,B.isString(_)?_.trim():_,C,E))===!0&&j(T,C?C.concat(_):[_])}),x.pop()}}if(!B.isObject(n))throw new TypeError("data must be an object");return j(n),l}function by(n){const l={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return l[r]})}function Kd(n,l){this._pairs=[],n&&Tu(n,this,l)}const Z1=Kd.prototype;Z1.append=function(l,i){this._pairs.push([l,i])};Z1.toString=function(l){const i=l?function(r){return l.call(this,r,by)}:by;return this._pairs.map(function(u){return i(u[0])+"="+i(u[1])},"").join("&")};function Nw(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function P1(n,l,i){if(!l)return n;const r=i&&i.encode||Nw;B.isFunction(i)&&(i={serialize:i});const u=i&&i.serialize;let c;if(u?c=u(l,i):c=B.isURLSearchParams(l)?l.toString():new Kd(l,i).toString(r),c){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+c}return n}class xy{constructor(){this.handlers=[]}use(l,i,r){return this.handlers.push({fulfilled:l,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(l){this.handlers[l]&&(this.handlers[l]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(l){B.forEach(this.handlers,function(r){r!==null&&l(r)})}}const J1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jw=typeof URLSearchParams<"u"?URLSearchParams:Kd,Tw=typeof FormData<"u"?FormData:null,Aw=typeof Blob<"u"?Blob:null,Rw={isBrowser:!0,classes:{URLSearchParams:jw,FormData:Tw,Blob:Aw},protocols:["http","https","file","blob","url","data"]},Gd=typeof window<"u"&&typeof document<"u",Ed=typeof navigator=="object"&&navigator||void 0,Ow=Gd&&(!Ed||["ReactNative","NativeScript","NS"].indexOf(Ed.product)<0),Mw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dw=Gd&&window.location.href||"http://localhost",Lw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Gd,hasStandardBrowserEnv:Ow,hasStandardBrowserWebWorkerEnv:Mw,navigator:Ed,origin:Dw},Symbol.toStringTag,{value:"Module"})),Rt={...Lw,...Rw};function kw(n,l){return Tu(n,new Rt.classes.URLSearchParams,{visitor:function(i,r,u,c){return Rt.isNode&&B.isBuffer(i)?(this.append(r,i.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...l})}function Uw(n){return B.matchAll(/\w+|\[(\w*)]/g,n).map(l=>l[0]==="[]"?"":l[1]||l[0])}function zw(n){const l={},i=Object.keys(n);let r;const u=i.length;let c;for(r=0;r<u;r++)c=i[r],l[c]=n[c];return l}function I1(n){function l(i,r,u,c){let d=i[c++];if(d==="__proto__")return!0;const m=Number.isFinite(+d),p=c>=i.length;return d=!d&&B.isArray(u)?u.length:d,p?(B.hasOwnProp(u,d)?u[d]=[u[d],r]:u[d]=r,!m):((!u[d]||!B.isObject(u[d]))&&(u[d]=[]),l(i,r,u[d],c)&&B.isArray(u[d])&&(u[d]=zw(u[d])),!m)}if(B.isFormData(n)&&B.isFunction(n.entries)){const i={};return B.forEachEntry(n,(r,u)=>{l(Uw(r),u,i,0)}),i}return null}function qw(n,l,i){if(B.isString(n))try{return(l||JSON.parse)(n),B.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(i||JSON.stringify)(n)}const Ar={transitional:J1,adapter:["xhr","http","fetch"],transformRequest:[function(l,i){const r=i.getContentType()||"",u=r.indexOf("application/json")>-1,c=B.isObject(l);if(c&&B.isHTMLForm(l)&&(l=new FormData(l)),B.isFormData(l))return u?JSON.stringify(I1(l)):l;if(B.isArrayBuffer(l)||B.isBuffer(l)||B.isStream(l)||B.isFile(l)||B.isBlob(l)||B.isReadableStream(l))return l;if(B.isArrayBufferView(l))return l.buffer;if(B.isURLSearchParams(l))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let m;if(c){if(r.indexOf("application/x-www-form-urlencoded")>-1)return kw(l,this.formSerializer).toString();if((m=B.isFileList(l))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Tu(m?{"files[]":l}:l,p&&new p,this.formSerializer)}}return c||u?(i.setContentType("application/json",!1),qw(l)):l}],transformResponse:[function(l){const i=this.transitional||Ar.transitional,r=i&&i.forcedJSONParsing,u=this.responseType==="json";if(B.isResponse(l)||B.isReadableStream(l))return l;if(l&&B.isString(l)&&(r&&!this.responseType||u)){const d=!(i&&i.silentJSONParsing)&&u;try{return JSON.parse(l,this.parseReviver)}catch(m){if(d)throw m.name==="SyntaxError"?pe.from(m,pe.ERR_BAD_RESPONSE,this,null,this.response):m}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],n=>{Ar.headers[n]={}});const Bw=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Hw=n=>{const l={};let i,r,u;return n&&n.split(`
12
- `).forEach(function(d){u=d.indexOf(":"),i=d.substring(0,u).trim().toLowerCase(),r=d.substring(u+1).trim(),!(!i||l[i]&&Bw[i])&&(i==="set-cookie"?l[i]?l[i].push(r):l[i]=[r]:l[i]=l[i]?l[i]+", "+r:r)}),l},Sy=Symbol("internals");function dr(n){return n&&String(n).trim().toLowerCase()}function iu(n){return n===!1||n==null?n:B.isArray(n)?n.map(iu):String(n)}function Qw(n){const l=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(n);)l[r[1]]=r[2];return l}const $w=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function If(n,l,i,r,u){if(B.isFunction(r))return r.call(this,l,i);if(u&&(l=i),!!B.isString(l)){if(B.isString(r))return l.indexOf(r)!==-1;if(B.isRegExp(r))return r.test(l)}}function Yw(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(l,i,r)=>i.toUpperCase()+r)}function Vw(n,l){const i=B.toCamelCase(" "+l);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+i,{value:function(u,c,d){return this[r].call(this,l,u,c,d)},configurable:!0})})}let Xt=class{constructor(l){l&&this.set(l)}set(l,i,r){const u=this;function c(m,p,y){const g=dr(p);if(!g)throw new Error("header name must be a non-empty string");const x=B.findKey(u,g);(!x||u[x]===void 0||y===!0||y===void 0&&u[x]!==!1)&&(u[x||p]=iu(m))}const d=(m,p)=>B.forEach(m,(y,g)=>c(y,g,p));if(B.isPlainObject(l)||l instanceof this.constructor)d(l,i);else if(B.isString(l)&&(l=l.trim())&&!$w(l))d(Hw(l),i);else if(B.isObject(l)&&B.isIterable(l)){let m={},p,y;for(const g of l){if(!B.isArray(g))throw TypeError("Object iterator must return a key-value pair");m[y=g[0]]=(p=m[y])?B.isArray(p)?[...p,g[1]]:[p,g[1]]:g[1]}d(m,i)}else l!=null&&c(i,l,r);return this}get(l,i){if(l=dr(l),l){const r=B.findKey(this,l);if(r){const u=this[r];if(!i)return u;if(i===!0)return Qw(u);if(B.isFunction(i))return i.call(this,u,r);if(B.isRegExp(i))return i.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,i){if(l=dr(l),l){const r=B.findKey(this,l);return!!(r&&this[r]!==void 0&&(!i||If(this,this[r],r,i)))}return!1}delete(l,i){const r=this;let u=!1;function c(d){if(d=dr(d),d){const m=B.findKey(r,d);m&&(!i||If(r,r[m],m,i))&&(delete r[m],u=!0)}}return B.isArray(l)?l.forEach(c):c(l),u}clear(l){const i=Object.keys(this);let r=i.length,u=!1;for(;r--;){const c=i[r];(!l||If(this,this[c],c,l,!0))&&(delete this[c],u=!0)}return u}normalize(l){const i=this,r={};return B.forEach(this,(u,c)=>{const d=B.findKey(r,c);if(d){i[d]=iu(u),delete i[c];return}const m=l?Yw(c):String(c).trim();m!==c&&delete i[c],i[m]=iu(u),r[m]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const i=Object.create(null);return B.forEach(this,(r,u)=>{r!=null&&r!==!1&&(i[u]=l&&B.isArray(r)?r.join(", "):r)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([l,i])=>l+": "+i).join(`
13
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...i){const r=new this(l);return i.forEach(u=>r.set(u)),r}static accessor(l){const r=(this[Sy]=this[Sy]={accessors:{}}).accessors,u=this.prototype;function c(d){const m=dr(d);r[m]||(Vw(u,d),r[m]=!0)}return B.isArray(l)?l.forEach(c):c(l),this}};Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(Xt.prototype,({value:n},l)=>{let i=l[0].toUpperCase()+l.slice(1);return{get:()=>n,set(r){this[i]=r}}});B.freezeMethods(Xt);function Wf(n,l){const i=this||Ar,r=l||i,u=Xt.from(r.headers);let c=r.data;return B.forEach(n,function(m){c=m.call(i,c,u.normalize(),l?l.status:void 0)}),u.normalize(),c}function W1(n){return!!(n&&n.__CANCEL__)}function si(n,l,i){pe.call(this,n??"canceled",pe.ERR_CANCELED,l,i),this.name="CanceledError"}B.inherits(si,pe,{__CANCEL__:!0});function ev(n,l,i){const r=i.config.validateStatus;!i.status||!r||r(i.status)?n(i):l(new pe("Request failed with status code "+i.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function Kw(n){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return l&&l[1]||""}function Gw(n,l){n=n||10;const i=new Array(n),r=new Array(n);let u=0,c=0,d;return l=l!==void 0?l:1e3,function(p){const y=Date.now(),g=r[c];d||(d=y),i[u]=p,r[u]=y;let x=c,E=0;for(;x!==u;)E+=i[x++],x=x%n;if(u=(u+1)%n,u===c&&(c=(c+1)%n),y-d<l)return;const j=g&&y-g;return j?Math.round(E*1e3/j):void 0}}function Fw(n,l){let i=0,r=1e3/l,u,c;const d=(y,g=Date.now())=>{i=g,u=null,c&&(clearTimeout(c),c=null),n(...y)};return[(...y)=>{const g=Date.now(),x=g-i;x>=r?d(y,g):(u=y,c||(c=setTimeout(()=>{c=null,d(u)},r-x)))},()=>u&&d(u)]}const pu=(n,l,i=3)=>{let r=0;const u=Gw(50,250);return Fw(c=>{const d=c.loaded,m=c.lengthComputable?c.total:void 0,p=d-r,y=u(p),g=d<=m;r=d;const x={loaded:d,total:m,progress:m?d/m:void 0,bytes:p,rate:y||void 0,estimated:y&&m&&g?(m-d)/y:void 0,event:c,lengthComputable:m!=null,[l?"download":"upload"]:!0};n(x)},i)},wy=(n,l)=>{const i=n!=null;return[r=>l[0]({lengthComputable:i,total:n,loaded:r}),l[1]]},Ey=n=>(...l)=>B.asap(()=>n(...l)),Xw=Rt.hasStandardBrowserEnv?((n,l)=>i=>(i=new URL(i,Rt.origin),n.protocol===i.protocol&&n.host===i.host&&(l||n.port===i.port)))(new URL(Rt.origin),Rt.navigator&&/(msie|trident)/i.test(Rt.navigator.userAgent)):()=>!0,Zw=Rt.hasStandardBrowserEnv?{write(n,l,i,r,u,c,d){if(typeof document>"u")return;const m=[`${n}=${encodeURIComponent(l)}`];B.isNumber(i)&&m.push(`expires=${new Date(i).toUTCString()}`),B.isString(r)&&m.push(`path=${r}`),B.isString(u)&&m.push(`domain=${u}`),c===!0&&m.push("secure"),B.isString(d)&&m.push(`SameSite=${d}`),document.cookie=m.join("; ")},read(n){if(typeof document>"u")return null;const l=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return l?decodeURIComponent(l[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Pw(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Jw(n,l){return l?n.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):n}function tv(n,l,i){let r=!Pw(l);return n&&(r||i==!1)?Jw(n,l):l}const Cy=n=>n instanceof Xt?{...n}:n;function es(n,l){l=l||{};const i={};function r(y,g,x,E){return B.isPlainObject(y)&&B.isPlainObject(g)?B.merge.call({caseless:E},y,g):B.isPlainObject(g)?B.merge({},g):B.isArray(g)?g.slice():g}function u(y,g,x,E){if(B.isUndefined(g)){if(!B.isUndefined(y))return r(void 0,y,x,E)}else return r(y,g,x,E)}function c(y,g){if(!B.isUndefined(g))return r(void 0,g)}function d(y,g){if(B.isUndefined(g)){if(!B.isUndefined(y))return r(void 0,y)}else return r(void 0,g)}function m(y,g,x){if(x in l)return r(y,g);if(x in n)return r(void 0,y)}const p={url:c,method:c,data:c,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:m,headers:(y,g,x)=>u(Cy(y),Cy(g),x,!0)};return B.forEach(Object.keys({...n,...l}),function(g){const x=p[g]||u,E=x(n[g],l[g],g);B.isUndefined(E)&&x!==m||(i[g]=E)}),i}const nv=n=>{const l=es({},n);let{data:i,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:c,headers:d,auth:m}=l;if(l.headers=d=Xt.from(d),l.url=P1(tv(l.baseURL,l.url,l.allowAbsoluteUrls),n.params,n.paramsSerializer),m&&d.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):""))),B.isFormData(i)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(B.isFunction(i.getHeaders)){const p=i.getHeaders(),y=["content-type","content-length"];Object.entries(p).forEach(([g,x])=>{y.includes(g.toLowerCase())&&d.set(g,x)})}}if(Rt.hasStandardBrowserEnv&&(r&&B.isFunction(r)&&(r=r(l)),r||r!==!1&&Xw(l.url))){const p=u&&c&&Zw.read(c);p&&d.set(u,p)}return l},Iw=typeof XMLHttpRequest<"u",Ww=Iw&&function(n){return new Promise(function(i,r){const u=nv(n);let c=u.data;const d=Xt.from(u.headers).normalize();let{responseType:m,onUploadProgress:p,onDownloadProgress:y}=u,g,x,E,j,w;function C(){j&&j(),w&&w(),u.cancelToken&&u.cancelToken.unsubscribe(g),u.signal&&u.signal.removeEventListener("abort",g)}let N=new XMLHttpRequest;N.open(u.method.toUpperCase(),u.url,!0),N.timeout=u.timeout;function T(){if(!N)return;const D=Xt.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),V={data:!m||m==="text"||m==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:D,config:n,request:N};ev(function(G){i(G),C()},function(G){r(G),C()},V),N=null}"onloadend"in N?N.onloadend=T:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.indexOf("file:")===0)||setTimeout(T)},N.onabort=function(){N&&(r(new pe("Request aborted",pe.ECONNABORTED,n,N)),N=null)},N.onerror=function(H){const V=H&&H.message?H.message:"Network Error",X=new pe(V,pe.ERR_NETWORK,n,N);X.event=H||null,r(X),N=null},N.ontimeout=function(){let H=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const V=u.transitional||J1;u.timeoutErrorMessage&&(H=u.timeoutErrorMessage),r(new pe(H,V.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,n,N)),N=null},c===void 0&&d.setContentType(null),"setRequestHeader"in N&&B.forEach(d.toJSON(),function(H,V){N.setRequestHeader(V,H)}),B.isUndefined(u.withCredentials)||(N.withCredentials=!!u.withCredentials),m&&m!=="json"&&(N.responseType=u.responseType),y&&([E,w]=pu(y,!0),N.addEventListener("progress",E)),p&&N.upload&&([x,j]=pu(p),N.upload.addEventListener("progress",x),N.upload.addEventListener("loadend",j)),(u.cancelToken||u.signal)&&(g=D=>{N&&(r(!D||D.type?new si(null,n,N):D),N.abort(),N=null)},u.cancelToken&&u.cancelToken.subscribe(g),u.signal&&(u.signal.aborted?g():u.signal.addEventListener("abort",g)));const _=Kw(u.url);if(_&&Rt.protocols.indexOf(_)===-1){r(new pe("Unsupported protocol "+_+":",pe.ERR_BAD_REQUEST,n));return}N.send(c||null)})},e3=(n,l)=>{const{length:i}=n=n?n.filter(Boolean):[];if(l||i){let r=new AbortController,u;const c=function(y){if(!u){u=!0,m();const g=y instanceof Error?y:this.reason;r.abort(g instanceof pe?g:new si(g instanceof Error?g.message:g))}};let d=l&&setTimeout(()=>{d=null,c(new pe(`timeout ${l} of ms exceeded`,pe.ETIMEDOUT))},l);const m=()=>{n&&(d&&clearTimeout(d),d=null,n.forEach(y=>{y.unsubscribe?y.unsubscribe(c):y.removeEventListener("abort",c)}),n=null)};n.forEach(y=>y.addEventListener("abort",c));const{signal:p}=r;return p.unsubscribe=()=>B.asap(m),p}},t3=function*(n,l){let i=n.byteLength;if(i<l){yield n;return}let r=0,u;for(;r<i;)u=r+l,yield n.slice(r,u),r=u},n3=async function*(n,l){for await(const i of a3(n))yield*t3(i,l)},a3=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const l=n.getReader();try{for(;;){const{done:i,value:r}=await l.read();if(i)break;yield r}}finally{await l.cancel()}},_y=(n,l,i,r)=>{const u=n3(n,l);let c=0,d,m=p=>{d||(d=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:y,value:g}=await u.next();if(y){m(),p.close();return}let x=g.byteLength;if(i){let E=c+=x;i(E)}p.enqueue(new Uint8Array(g))}catch(y){throw m(y),y}},cancel(p){return m(p),u.return()}},{highWaterMark:2})},Ny=64*1024,{isFunction:Jo}=B,l3=(({Request:n,Response:l})=>({Request:n,Response:l}))(B.global),{ReadableStream:jy,TextEncoder:Ty}=B.global,Ay=(n,...l)=>{try{return!!n(...l)}catch{return!1}},s3=n=>{n=B.merge.call({skipUndefined:!0},l3,n);const{fetch:l,Request:i,Response:r}=n,u=l?Jo(l):typeof fetch=="function",c=Jo(i),d=Jo(r);if(!u)return!1;const m=u&&Jo(jy),p=u&&(typeof Ty=="function"?(w=>C=>w.encode(C))(new Ty):async w=>new Uint8Array(await new i(w).arrayBuffer())),y=c&&m&&Ay(()=>{let w=!1;const C=new i(Rt.origin,{body:new jy,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!C}),g=d&&m&&Ay(()=>B.isReadableStream(new r("").body)),x={stream:g&&(w=>w.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!x[w]&&(x[w]=(C,N)=>{let T=C&&C[w];if(T)return T.call(C);throw new pe(`Response type '${w}' is not supported`,pe.ERR_NOT_SUPPORT,N)})});const E=async w=>{if(w==null)return 0;if(B.isBlob(w))return w.size;if(B.isSpecCompliantForm(w))return(await new i(Rt.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(B.isArrayBufferView(w)||B.isArrayBuffer(w))return w.byteLength;if(B.isURLSearchParams(w)&&(w=w+""),B.isString(w))return(await p(w)).byteLength},j=async(w,C)=>{const N=B.toFiniteNumber(w.getContentLength());return N??E(C)};return async w=>{let{url:C,method:N,data:T,signal:_,cancelToken:D,timeout:H,onDownloadProgress:V,onUploadProgress:X,responseType:G,headers:P,withCredentials:ae="same-origin",fetchOptions:ye}=nv(w),Ae=l||fetch;G=G?(G+"").toLowerCase():"text";let Ce=e3([_,D&&D.toAbortSignal()],H),Ke=null;const me=Ce&&Ce.unsubscribe&&(()=>{Ce.unsubscribe()});let _e;try{if(X&&y&&N!=="get"&&N!=="head"&&(_e=await j(P,T))!==0){let Q=new i(C,{method:"POST",body:T,duplex:"half"}),I;if(B.isFormData(T)&&(I=Q.headers.get("content-type"))&&P.setContentType(I),Q.body){const[W,ne]=wy(_e,pu(Ey(X)));T=_y(Q.body,Ny,W,ne)}}B.isString(ae)||(ae=ae?"include":"omit");const q=c&&"credentials"in i.prototype,F={...ye,signal:Ce,method:N.toUpperCase(),headers:P.normalize().toJSON(),body:T,duplex:"half",credentials:q?ae:void 0};Ke=c&&new i(C,F);let J=await(c?Ae(Ke,ye):Ae(C,F));const he=g&&(G==="stream"||G==="response");if(g&&(V||he&&me)){const Q={};["status","statusText","headers"].forEach(ge=>{Q[ge]=J[ge]});const I=B.toFiniteNumber(J.headers.get("content-length")),[W,ne]=V&&wy(I,pu(Ey(V),!0))||[];J=new r(_y(J.body,Ny,W,()=>{ne&&ne(),me&&me()}),Q)}G=G||"text";let R=await x[B.findKey(x,G)||"text"](J,w);return!he&&me&&me(),await new Promise((Q,I)=>{ev(Q,I,{data:R,headers:Xt.from(J.headers),status:J.status,statusText:J.statusText,config:w,request:Ke})})}catch(q){throw me&&me(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,w,Ke),{cause:q.cause||q}):pe.from(q,q&&q.code,w,Ke)}}},i3=new Map,av=n=>{let l=n&&n.env||{};const{fetch:i,Request:r,Response:u}=l,c=[r,u,i];let d=c.length,m=d,p,y,g=i3;for(;m--;)p=c[m],y=g.get(p),y===void 0&&g.set(p,y=m?new Map:s3(l)),g=y;return y};av();const Fd={http:Ew,xhr:Ww,fetch:{get:av}};B.forEach(Fd,(n,l)=>{if(n){try{Object.defineProperty(n,"name",{value:l})}catch{}Object.defineProperty(n,"adapterName",{value:l})}});const Ry=n=>`- ${n}`,r3=n=>B.isFunction(n)||n===null||n===!1;function o3(n,l){n=B.isArray(n)?n:[n];const{length:i}=n;let r,u;const c={};for(let d=0;d<i;d++){r=n[d];let m;if(u=r,!r3(r)&&(u=Fd[(m=String(r)).toLowerCase()],u===void 0))throw new pe(`Unknown adapter '${m}'`);if(u&&(B.isFunction(u)||(u=u.get(l))))break;c[m||"#"+d]=u}if(!u){const d=Object.entries(c).map(([p,y])=>`adapter ${p} `+(y===!1?"is not supported by the environment":"is not available in the build"));let m=i?d.length>1?`since :
11
+ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let E=qt(),j;if(l){let _=typeof l=="string"?ti(l):l;Pe(v==="/"||_.pathname?.startsWith(v),`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 "${v}" but pathname "${_.pathname}" was given in the \`location\` prop.`),j=_}else j=E;let w=j.pathname||"/",C=w;if(v!=="/"){let _=v.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(_.length).join("/")}let N=!c&&i&&i.matches&&i.matches.length>0?i.matches:s1(n,{pathname:C});Ln(x||N!=null,`No routes matched location "${j.pathname}${j.search}${j.hash}" `),Ln(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${j.pathname}${j.search}${j.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 T=fx(N&&N.map(_=>Object.assign({},_,{params:Object.assign({},p,_.params),pathname:ja([v,u.encodeLocation?u.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?v:ja([v,u.encodeLocation?u.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),d,i,r);return l&&T?b.createElement(Er.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...j},navigationType:"POP"}},T):T}function rx(){let n=yx(),l=W2(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,r="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:r},c={padding:"2px 4px",backgroundColor:r},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=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:c},"ErrorBoundary")," or"," ",b.createElement("code",{style:c},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},l),i?b.createElement("pre",{style:u},i):null,d)}var ox=b.createElement(rx,null),ux=class extends b.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){console.error("React Router caught the following error during render",n,l)}render(){return this.state.error!==void 0?b.createElement(na.Provider,{value:this.props.routeContext},b.createElement(Ud.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function cx({routeContext:n,match:l,children:i}){let r=b.useContext(ni);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),b.createElement(na.Provider,{value:n},i)}function fx(n,l=[],i=null,r=null){if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let u=n,c=i?.errors;if(c!=null){let p=u.findIndex(y=>y.route.id&&c?.[y.route.id]!==void 0);Pe(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),u=u.slice(0,Math.min(u.length,p+1))}let d=!1,m=-1;if(i)for(let p=0;p<u.length;p++){let y=u[p];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(m=p),y.route.id){let{loaderData:v,errors:x}=i,E=y.route.loader&&!v.hasOwnProperty(y.route.id)&&(!x||x[y.route.id]===void 0);if(y.route.lazy||E){d=!0,m>=0?u=u.slice(0,m+1):u=[u[0]];break}}}return u.reduceRight((p,y,v)=>{let x,E=!1,j=null,w=null;i&&(x=c&&y.route.id?c[y.route.id]:void 0,j=y.route.errorElement||ox,d&&(m<0&&v===0?(p1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,w=null):m===v&&(E=!0,w=y.route.hydrateFallbackElement||null)));let C=l.concat(u.slice(0,v+1)),N=()=>{let T;return x?T=j:E?T=w:y.route.Component?T=b.createElement(y.route.Component,null):y.route.element?T=y.route.element:T=p,b.createElement(cx,{match:y,routeContext:{outlet:p,matches:C,isDataRoute:i!=null},children:T})};return i&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?b.createElement(ux,{location:i.location,revalidation:i.revalidation,component:j,error:x,children:N(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):N()},null)}function kd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dx(n){let l=b.useContext(ni);return Pe(l,kd(n)),l}function hx(n){let l=b.useContext(Eu);return Pe(l,kd(n)),l}function mx(n){let l=b.useContext(na);return Pe(l,kd(n)),l}function zd(n){let l=mx(n),i=l.matches[l.matches.length-1];return Pe(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function px(){return zd("useRouteId")}function yx(){let n=b.useContext(Ud),l=hx("useRouteError"),i=zd("useRouteError");return n!==void 0?n:l.errors?.[i]}function gx(){let{router:n}=dx("useNavigate"),l=zd("useNavigate"),i=b.useRef(!1);return h1(()=>{i.current=!0}),b.useCallback(async(u,c={})=>{Ln(i.current,d1),i.current&&(typeof u=="number"?n.navigate(u):await n.navigate(u,{fromRouteId:l,...c}))},[n,l])}var iy={};function p1(n,l,i){!l&&!iy[n]&&(iy[n]=!0,Ln(!1,i))}b.memo(vx);function vx({routes:n,future:l,state:i}){return m1(n,void 0,i,l)}function yr(n){Pe(!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 bx({basename:n="/",children:l=null,location:i,navigationType:r="POP",navigator:u,static:c=!1}){Pe(!Cr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=n.replace(/^\/*/,"/"),m=b.useMemo(()=>({basename:d,navigator:u,static:c,future:{}}),[d,u,c]);typeof i=="string"&&(i=ti(i));let{pathname:p="/",search:y="",hash:v="",state:x=null,key:E="default"}=i,j=b.useMemo(()=>{let w=Aa(p,d);return w==null?null:{location:{pathname:w,search:y,hash:v,state:x,key:E},navigationType:r}},[d,p,y,v,x,E,r]);return Ln(j!=null,`<Router basename="${d}"> is not able to match the URL "${p}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:b.createElement(ta.Provider,{value:m},b.createElement(Er.Provider,{children:l,value:j}))}function xx({children:n,location:l}){return ix(dd(n),l)}function dd(n,l=[]){let i=[];return b.Children.forEach(n,(r,u)=>{if(!b.isValidElement(r))return;let c=[...l,u];if(r.type===b.Fragment){i.push.apply(i,dd(r.props.children,c));return}Pe(r.type===yr,`[${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>`),Pe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let d={id:r.props.id||c.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,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&&(d.children=dd(r.props.children,c)),i.push(d)}),i}var au="get",lu="application/x-www-form-urlencoded";function Cu(n){return n!=null&&typeof n.tagName=="string"}function Sx(n){return Cu(n)&&n.tagName.toLowerCase()==="button"}function wx(n){return Cu(n)&&n.tagName.toLowerCase()==="form"}function Ex(n){return Cu(n)&&n.tagName.toLowerCase()==="input"}function Cx(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function _x(n,l){return n.button===0&&(!l||l==="_self")&&!Cx(n)}function hd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,i)=>{let r=n[i];return l.concat(Array.isArray(r)?r.map(u=>[i,u]):[[i,r]])},[]))}function Nx(n,l){let i=hd(n);return l&&l.forEach((r,u)=>{i.has(u)||l.getAll(u).forEach(c=>{i.append(u,c)})}),i}var Zo=null;function jx(){if(Zo===null)try{new FormData(document.createElement("form"),0),Zo=!1}catch{Zo=!0}return Zo}var Tx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jf(n){return n!=null&&!Tx.has(n)?(Ln(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lu}"`),null):n}function Ax(n,l){let i,r,u,c,d;if(wx(n)){let m=n.getAttribute("action");r=m?Aa(m,l):null,i=n.getAttribute("method")||au,u=Jf(n.getAttribute("enctype"))||lu,c=new FormData(n)}else if(Sx(n)||Ex(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||m.getAttribute("action");if(r=p?Aa(p,l):null,i=n.getAttribute("formmethod")||m.getAttribute("method")||au,u=Jf(n.getAttribute("formenctype"))||Jf(m.getAttribute("enctype"))||lu,c=new FormData(m,n),!jx()){let{name:y,type:v,value:x}=n;if(v==="image"){let E=y?`${y}.`:"";c.append(`${E}x`,"0"),c.append(`${E}y`,"0")}else y&&c.append(y,x)}}else{if(Cu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=au,r=null,u=lu,d=n}return c&&u==="text/plain"&&(d=c,c=void 0),{action:r,method:i.toLowerCase(),encType:u,formData:c,body:d}}function qd(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}async function Rx(n,l){if(n.id in l)return l[n.id];try{let i=await import(n.module);return l[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ox(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Mx(n,l,i){let r=await Promise.all(n.map(async u=>{let c=l.routes[u.route.id];if(c){let d=await Rx(c,i);return d.links?d.links():[]}return[]}));return kx(r.flat(1).filter(Ox).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function ry(n,l,i,r,u,c){let d=(p,y)=>i[y]?p.route.id!==i[y].route.id:!0,m=(p,y)=>i[y].pathname!==p.pathname||i[y].route.path?.endsWith("*")&&i[y].params["*"]!==p.params["*"];return c==="assets"?l.filter((p,y)=>d(p,y)||m(p,y)):c==="data"?l.filter((p,y)=>{let v=r.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(d(p,y)||m(p,y))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function Dx(n,l,{includeHydrateFallback:i}={}){return Lx(n.map(r=>{let u=l.routes[r.route.id];if(!u)return[];let c=[u.module];return u.clientActionModule&&(c=c.concat(u.clientActionModule)),u.clientLoaderModule&&(c=c.concat(u.clientLoaderModule)),i&&u.hydrateFallbackModule&&(c=c.concat(u.hydrateFallbackModule)),u.imports&&(c=c.concat(u.imports)),c}).flat(1))}function Lx(n){return[...new Set(n)]}function Ux(n){let l={},i=Object.keys(n).sort();for(let r of i)l[r]=n[r];return l}function kx(n,l){let i=new Set;return new Set(l),n.reduce((r,u)=>{let c=JSON.stringify(Ux(u));return i.has(c)||(i.add(c),r.push({key:c,link:u})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zx=new Set([100,101,204,205]);function qx(n,l){let i=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i.pathname==="/"?i.pathname="_root.data":l&&Aa(i.pathname,l)==="/"?i.pathname=`${l.replace(/\/$/,"")}/_root.data`:i.pathname=`${i.pathname.replace(/\/$/,"")}.data`,i}function y1(){let n=b.useContext(ni);return qd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Bx(){let n=b.useContext(Eu);return qd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Bd=b.createContext(void 0);Bd.displayName="FrameworkContext";function g1(){let n=b.useContext(Bd);return qd(n,"You must render this element inside a <HydratedRouter> element"),n}function Hx(n,l){let i=b.useContext(Bd),[r,u]=b.useState(!1),[c,d]=b.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:y,onMouseLeave:v,onTouchStart:x}=l,E=b.useRef(null);b.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let C=T=>{T.forEach(_=>{d(_.isIntersecting)})},N=new IntersectionObserver(C,{threshold:.5});return E.current&&N.observe(E.current),()=>{N.disconnect()}}},[n]),b.useEffect(()=>{if(r){let C=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(C)}}},[r]);let j=()=>{u(!0)},w=()=>{u(!1),d(!1)};return i?n!=="intent"?[c,E,{}]:[c,E,{onFocus:fr(m,j),onBlur:fr(p,w),onMouseEnter:fr(y,j),onMouseLeave:fr(v,w),onTouchStart:fr(x,j)}]:[!1,E,{}]}function fr(n,l){return i=>{n&&n(i),i.defaultPrevented||l(i)}}function Qx({page:n,...l}){let{router:i}=y1(),r=b.useMemo(()=>s1(i.routes,n,i.basename),[i.routes,n,i.basename]);return r?b.createElement(Yx,{page:n,matches:r,...l}):null}function $x(n){let{manifest:l,routeModules:i}=g1(),[r,u]=b.useState([]);return b.useEffect(()=>{let c=!1;return Mx(n,l,i).then(d=>{c||u(d)}),()=>{c=!0}},[n,l,i]),r}function Yx({page:n,matches:l,...i}){let r=qt(),{manifest:u,routeModules:c}=g1(),{basename:d}=y1(),{loaderData:m,matches:p}=Bx(),y=b.useMemo(()=>ry(n,l,p,u,r,"data"),[n,l,p,u,r]),v=b.useMemo(()=>ry(n,l,p,u,r,"assets"),[n,l,p,u,r]),x=b.useMemo(()=>{if(n===r.pathname+r.search+r.hash)return[];let w=new Set,C=!1;if(l.forEach(T=>{let _=u.routes[T.route.id];!_||!_.hasLoader||(!y.some(D=>D.route.id===T.route.id)&&T.route.id in m&&c[T.route.id]?.shouldRevalidate||_.hasClientLoader?C=!0:w.add(T.route.id))}),w.size===0)return[];let N=qx(n,d);return C&&w.size>0&&N.searchParams.set("_routes",l.filter(T=>w.has(T.route.id)).map(T=>T.route.id).join(",")),[N.pathname+N.search]},[d,m,r,u,y,l,n,c]),E=b.useMemo(()=>Dx(v,u),[v,u]),j=$x(v);return b.createElement(b.Fragment,null,x.map(w=>b.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),E.map(w=>b.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),j.map(({key:w,link:C})=>b.createElement("link",{key:w,...C})))}function Vx(...n){return l=>{n.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var v1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{v1&&(window.__reactRouterVersion="7.6.0")}catch{}function Kx({basename:n,children:l,window:i}){let r=b.useRef();r.current==null&&(r.current=R2({window:i,v5Compat:!0}));let u=r.current,[c,d]=b.useState({action:u.action,location:u.location}),m=b.useCallback(p=>{b.startTransition(()=>d(p))},[d]);return b.useLayoutEffect(()=>u.listen(m),[u,m]),b.createElement(bx,{basename:n,children:l,location:c.location,navigationType:c.action,navigator:u})}var b1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,x1=b.forwardRef(function({onClick:l,discover:i="render",prefetch:r="none",relative:u,reloadDocument:c,replace:d,state:m,target:p,to:y,preventScrollReset:v,viewTransition:x,...E},j){let{basename:w}=b.useContext(ta),C=typeof y=="string"&&b1.test(y),N,T=!1;if(typeof y=="string"&&C&&(N=y,v1))try{let ae=new URL(window.location.href),ye=y.startsWith("//")?new URL(ae.protocol+y):new URL(y),Ae=Aa(ye.pathname,w);ye.origin===ae.origin&&Ae!=null?y=Ae+ye.search+ye.hash:T=!0}catch{Ln(!1,`<Link to="${y}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=ax(y,{relative:u}),[D,H,V]=Hx(r,E),X=Zx(y,{replace:d,state:m,target:p,preventScrollReset:v,relative:u,viewTransition:x});function G(ae){l&&l(ae),ae.defaultPrevented||X(ae)}let P=b.createElement("a",{...E,...V,href:N||_,onClick:T||c?l:G,ref:Vx(j,H),target:p,"data-discover":!C&&i==="render"?"true":void 0});return D&&!C?b.createElement(b.Fragment,null,P,b.createElement(Qx,{page:_})):P});x1.displayName="Link";var Gx=b.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:r="",end:u=!1,style:c,to:d,viewTransition:m,children:p,...y},v){let x=_r(d,{relative:y.relative}),E=qt(),j=b.useContext(Eu),{navigator:w,basename:C}=b.useContext(ta),N=j!=null&&tS(x)&&m===!0,T=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,_=E.pathname,D=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;i||(_=_.toLowerCase(),D=D?D.toLowerCase():null,T=T.toLowerCase()),D&&C&&(D=Aa(D,C)||D);const H=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let V=_===T||!u&&_.startsWith(T)&&_.charAt(H)==="/",X=D!=null&&(D===T||!u&&D.startsWith(T)&&D.charAt(T.length)==="/"),G={isActive:V,isPending:X,isTransitioning:N},P=V?l:void 0,ae;typeof r=="function"?ae=r(G):ae=[r,V?"active":null,X?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let ye=typeof c=="function"?c(G):c;return b.createElement(x1,{...y,"aria-current":P,className:ae,ref:v,style:ye,to:d,viewTransition:m},typeof p=="function"?p(G):p)});Gx.displayName="NavLink";var Fx=b.forwardRef(({discover:n="render",fetcherKey:l,navigate:i,reloadDocument:r,replace:u,state:c,method:d=au,action:m,onSubmit:p,relative:y,preventScrollReset:v,viewTransition:x,...E},j)=>{let w=Wx(),C=eS(m,{relative:y}),N=d.toLowerCase()==="get"?"get":"post",T=typeof m=="string"&&b1.test(m),_=D=>{if(p&&p(D),D.defaultPrevented)return;D.preventDefault();let H=D.nativeEvent.submitter,V=H?.getAttribute("formmethod")||d;w(H||D.currentTarget,{fetcherKey:l,method:V,navigate:i,replace:u,state:c,relative:y,preventScrollReset:v,viewTransition:x})};return b.createElement("form",{ref:j,method:N,action:C,onSubmit:r?p:_,...E,"data-discover":!T&&n==="render"?"true":void 0})});Fx.displayName="Form";function Xx(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function S1(n){let l=b.useContext(ni);return Pe(l,Xx(n)),l}function Zx(n,{target:l,replace:i,state:r,preventScrollReset:u,relative:c,viewTransition:d}={}){let m=wt(),p=qt(),y=_r(n,{relative:c});return b.useCallback(v=>{if(_x(v,l)){v.preventDefault();let x=i!==void 0?i:br(p)===br(y);m(n,{replace:x,state:r,preventScrollReset:u,relative:c,viewTransition:d})}},[p,m,y,i,r,l,n,u,c,d])}function Px(n){Ln(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=b.useRef(hd(n)),i=b.useRef(!1),r=qt(),u=b.useMemo(()=>Nx(r.search,i.current?null:l.current),[r.search]),c=wt(),d=b.useCallback((m,p)=>{const y=hd(typeof m=="function"?m(u):m);i.current=!0,c("?"+y,p)},[c,u]);return[u,d]}var Jx=0,Ix=()=>`__${String(++Jx)}__`;function Wx(){let{router:n}=S1("useSubmit"),{basename:l}=b.useContext(ta),i=px();return b.useCallback(async(r,u={})=>{let{action:c,method:d,encType:m,formData:p,body:y}=Ax(r,l);if(u.navigate===!1){let v=u.fetcherKey||Ix();await n.fetch(v,i,u.action||c,{preventScrollReset:u.preventScrollReset,formData:p,body:y,formMethod:u.method||d,formEncType:u.encType||m,flushSync:u.flushSync})}else await n.navigate(u.action||c,{preventScrollReset:u.preventScrollReset,formData:p,body:y,formMethod:u.method||d,formEncType:u.encType||m,replace:u.replace,state:u.state,fromRouteId:i,flushSync:u.flushSync,viewTransition:u.viewTransition})},[n,l,i])}function eS(n,{relative:l}={}){let{basename:i}=b.useContext(ta),r=b.useContext(na);Pe(r,"useFormAction must be used inside a RouteContext");let[u]=r.matches.slice(-1),c={..._r(n||".",{relative:l})},d=qt();if(n==null){c.search=d.search;let m=new URLSearchParams(c.search),p=m.getAll("index");if(p.some(v=>v==="")){m.delete("index"),p.filter(x=>x).forEach(x=>m.append("index",x));let v=m.toString();c.search=v?`?${v}`:""}}return(!n||n===".")&&u.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(c.pathname=c.pathname==="/"?i:ja([i,c.pathname])),br(c)}function tS(n,l={}){let i=b.useContext(f1);Pe(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=S1("useViewTransitionState"),u=_r(n,{relative:l.relative});if(!i.isTransitioning)return!1;let c=Aa(i.currentLocation.pathname,r)||i.currentLocation.pathname,d=Aa(i.nextLocation.pathname,r)||i.nextLocation.pathname;return xr(u.pathname,d)!=null||xr(u.pathname,c)!=null}[...zx];var nS=l1(),ai=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},aS={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},lS=class{#e=aS;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,l){return this.#e.setTimeout(n,l)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,l){return this.#e.setInterval(n,l)}clearInterval(n){this.#e.clearInterval(n)}},Gl=new lS;function sS(n){setTimeout(n,0)}var Il=typeof window>"u"||"Deno"in globalThis;function kt(){}function iS(n,l){return typeof n=="function"?n(l):n}function md(n){return typeof n=="number"&&n>=0&&n!==1/0}function w1(n,l){return Math.max(n+(l||0)-Date.now(),0)}function ml(n,l){return typeof n=="function"?n(l):n}function Tn(n,l){return typeof n=="function"?n(l):n}function oy(n,l){const{type:i="all",exact:r,fetchStatus:u,predicate:c,queryKey:d,stale:m}=n;if(d){if(r){if(l.queryHash!==Hd(d,l.options))return!1}else if(!Sr(l.queryKey,d))return!1}if(i!=="all"){const p=l.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof m=="boolean"&&l.isStale()!==m||u&&u!==l.state.fetchStatus||c&&!c(l))}function uy(n,l){const{exact:i,status:r,predicate:u,mutationKey:c}=n;if(c){if(!l.options.mutationKey)return!1;if(i){if(Wl(l.options.mutationKey)!==Wl(c))return!1}else if(!Sr(l.options.mutationKey,c))return!1}return!(r&&l.state.status!==r||u&&!u(l))}function Hd(n,l){return(l?.queryKeyHashFn||Wl)(n)}function Wl(n){return JSON.stringify(n,(l,i)=>pd(i)?Object.keys(i).sort().reduce((r,u)=>(r[u]=i[u],r),{}):i)}function Sr(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(l).every(i=>Sr(n[i],l[i])):!1}var rS=Object.prototype.hasOwnProperty;function E1(n,l){if(n===l)return n;const i=cy(n)&&cy(l);if(!i&&!(pd(n)&&pd(l)))return l;const u=(i?n:Object.keys(n)).length,c=i?l:Object.keys(l),d=c.length,m=i?new Array(d):{};let p=0;for(let y=0;y<d;y++){const v=i?y:c[y],x=n[v],E=l[v];if(x===E){m[v]=x,(i?y<u:rS.call(n,v))&&p++;continue}if(x===null||E===null||typeof x!="object"||typeof E!="object"){m[v]=E;continue}const j=E1(x,E);m[v]=j,j===x&&p++}return u===d&&p===u?n:m}function du(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const i in n)if(n[i]!==l[i])return!1;return!0}function cy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function pd(n){if(!fy(n))return!1;const l=n.constructor;if(l===void 0)return!0;const i=l.prototype;return!(!fy(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function fy(n){return Object.prototype.toString.call(n)==="[object Object]"}function oS(n){return new Promise(l=>{Gl.setTimeout(l,n)})}function yd(n,l,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,l):i.structuralSharing!==!1?E1(n,l):l}function uS(n,l,i=0){const r=[...n,l];return i&&r.length>i?r.slice(1):r}function cS(n,l,i=0){const r=[l,...n];return i&&r.length>i?r.slice(0,-1):r}var Qd=Symbol();function C1(n,l){return!n.queryFn&&l?.initialPromise?()=>l.initialPromise:!n.queryFn||n.queryFn===Qd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function _1(n,l){return typeof n=="function"?n(...l):!!n}var fS=class extends ai{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Il&&window.addEventListener){const l=()=>n();return window.addEventListener("visibilitychange",l,!1),()=>{window.removeEventListener("visibilitychange",l)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(l=>{typeof l=="boolean"?this.setFocused(l):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(l=>{l(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},$d=new fS;function gd(){let n,l;const i=new Promise((u,c)=>{n=u,l=c});i.status="pending",i.catch(()=>{});function r(u){Object.assign(i,u),delete i.resolve,delete i.reject}return i.resolve=u=>{r({status:"fulfilled",value:u}),n(u)},i.reject=u=>{r({status:"rejected",reason:u}),l(u)},i}var dS=sS;function hS(){let n=[],l=0,i=m=>{m()},r=m=>{m()},u=dS;const c=m=>{l?n.push(m):u(()=>{i(m)})},d=()=>{const m=n;n=[],m.length&&u(()=>{r(()=>{m.forEach(p=>{i(p)})})})};return{batch:m=>{let p;l++;try{p=m()}finally{l--,l||d()}return p},batchCalls:m=>(...p)=>{c(()=>{m(...p)})},schedule:c,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{u=m}}}var dt=hS(),mS=class extends ai{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Il&&window.addEventListener){const l=()=>n(!0),i=()=>n(!1);return window.addEventListener("online",l,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",l),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(i=>{i(n)}))}isOnline(){return this.#e}},hu=new mS;function pS(n){return Math.min(1e3*2**n,3e4)}function N1(n){return(n??"online")==="online"?hu.isOnline():!0}var vd=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function j1(n){let l=!1,i=0,r;const u=gd(),c=()=>u.status!=="pending",d=C=>{if(!c()){const N=new vd(C);E(N),n.onCancel?.(N)}},m=()=>{l=!0},p=()=>{l=!1},y=()=>$d.isFocused()&&(n.networkMode==="always"||hu.isOnline())&&n.canRun(),v=()=>N1(n.networkMode)&&n.canRun(),x=C=>{c()||(r?.(),u.resolve(C))},E=C=>{c()||(r?.(),u.reject(C))},j=()=>new Promise(C=>{r=N=>{(c()||y())&&C(N)},n.onPause?.()}).then(()=>{r=void 0,c()||n.onContinue?.()}),w=()=>{if(c())return;let C;const N=i===0?n.initialPromise:void 0;try{C=N??n.fn()}catch(T){C=Promise.reject(T)}Promise.resolve(C).then(x).catch(T=>{if(c())return;const _=n.retry??(Il?0:3),D=n.retryDelay??pS,H=typeof D=="function"?D(i,T):D,V=_===!0||typeof _=="number"&&i<_||typeof _=="function"&&_(i,T);if(l||!V){E(T);return}i++,n.onFail?.(i,T),oS(H).then(()=>y()?void 0:j()).then(()=>{l?E(T):w()})})};return{promise:u,status:()=>u.status,cancel:d,continue:()=>(r?.(),u),cancelRetry:m,continueRetry:p,canStart:v,start:()=>(v()?w():j().then(w),u)}}var T1=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),md(this.gcTime)&&(this.#e=Gl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Il?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(Gl.clearTimeout(this.#e),this.#e=void 0)}},yS=class extends T1{#e;#t;#n;#l;#a;#i;#r;constructor(l){super(),this.#r=!1,this.#i=l.defaultOptions,this.setOptions(l.options),this.observers=[],this.#l=l.client,this.#n=this.#l.getQueryCache(),this.queryKey=l.queryKey,this.queryHash=l.queryHash,this.#e=hy(this.options),this.state=l.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(l){if(this.options={...this.#i,...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=hy(this.options);i.data!==void 0&&(this.setState(dy(i.data,i.dataUpdatedAt)),this.#e=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(l,i){const r=yd(this.state.data,l,this.options);return this.#s({data:r,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),r}setState(l,i){this.#s({type:"setState",state:l,setStateOptions:i})}cancel(l){const i=this.#a?.promise;return this.#a?.cancel(l),i?i.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(l=>Tn(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>ml(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!w1(this.state.dataUpdatedAt,l)}onFocus(){this.observers.find(i=>i.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(i=>i.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(this.#a&&(this.#r?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(l,i){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(l&&this.setOptions(l),!this.options.queryFn){const p=this.observers.find(y=>y.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,u=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#r=!0,r.signal)})},c=()=>{const p=C1(this.options,i),v=(()=>{const x={client:this.#l,queryKey:this.queryKey,meta:this.meta};return u(x),x})();return this.#r=!1,this.options.persister?this.options.persister(p,v,this):p(v)},m=(()=>{const p={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:c};return u(p),p})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#s({type:"fetch",meta:m.fetchOptions?.meta}),this.#a=j1({initialPromise:i?.initialPromise,fn:m.fetchFn,onCancel:p=>{p instanceof vd&&p.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(p,y)=>{this.#s({type:"failed",failureCount:p,error:y})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const p=await this.#a.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#n.config.onSuccess?.(p,this),this.#n.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof vd){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#s({type:"error",error:p}),this.#n.config.onError?.(p,this),this.#n.config.onSettled?.(this.state.data,p,this),p}finally{this.scheduleGc()}}#s(l){const i=r=>{switch(l.type){case"failed":return{...r,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...A1(r.data,this.options),fetchMeta:l.meta??null};case"success":const u={...r,...dy(l.data,l.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=l.manual?u:void 0,u;case"error":const c=l.error;return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...l.state}}};this.state=i(this.state),dt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:l})})}};function A1(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N1(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function dy(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function hy(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,i=l!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var R1=class extends ai{constructor(n,l){super(),this.options=l,this.#e=n,this.#s=null,this.#r=gd(),this.bindMethods(),this.setOptions(l)}#e;#t=void 0;#n=void 0;#l=void 0;#a;#i;#r;#s;#p;#d;#h;#u;#c;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),my(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const l=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),l._defaulted&&!du(this.options,l)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&py(this.#t,i,this.options,l)&&this.#f(),this.updateResult(),r&&(this.#t!==i||Tn(this.options.enabled,this.#t)!==Tn(l.enabled,this.#t)||ml(this.options.staleTime,this.#t)!==ml(l.staleTime,this.#t))&&this.#y();const u=this.#g();r&&(this.#t!==i||Tn(this.options.enabled,this.#t)!==Tn(l.enabled,this.#t)||u!==this.#o)&&this.#v(u)}getOptimisticResult(n){const l=this.#e.getQueryCache().build(this.#e,n),i=this.createResult(l,n);return vS(this,i)&&(this.#l=i,this.#i=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#l}trackResult(n,l){return new Proxy(n,{get:(i,r)=>(this.trackProp(r),l?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,r))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const l=this.#e.defaultQueryOptions(n),i=this.#e.getQueryCache().build(this.#e,l);return i.fetch().then(()=>this.createResult(i,l))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#l))}#f(n){this.#w();let l=this.#t.fetch(this.options,n);return n?.throwOnError||(l=l.catch(kt)),l}#y(){this.#x();const n=ml(this.options.staleTime,this.#t);if(Il||this.#l.isStale||!md(n))return;const i=w1(this.#l.dataUpdatedAt,n)+1;this.#u=Gl.setTimeout(()=>{this.#l.isStale||this.updateResult()},i)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(n){this.#S(),this.#o=n,!(Il||Tn(this.options.enabled,this.#t)===!1||!md(this.#o)||this.#o===0)&&(this.#c=Gl.setInterval(()=>{(this.options.refetchIntervalInBackground||$d.isFocused())&&this.#f()},this.#o))}#b(){this.#y(),this.#v(this.#g())}#x(){this.#u&&(Gl.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(Gl.clearInterval(this.#c),this.#c=void 0)}createResult(n,l){const i=this.#t,r=this.options,u=this.#l,c=this.#a,d=this.#i,p=n!==i?n.state:this.#n,{state:y}=n;let v={...y},x=!1,E;if(l._optimisticResults){const P=this.hasListeners(),ae=!P&&my(n,l),ye=P&&py(n,i,l,r);(ae||ye)&&(v={...v,...A1(y.data,n.options)}),l._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:j,errorUpdatedAt:w,status:C}=v;E=v.data;let N=!1;if(l.placeholderData!==void 0&&E===void 0&&C==="pending"){let P;u?.isPlaceholderData&&l.placeholderData===d?.placeholderData?(P=u.data,N=!0):P=typeof l.placeholderData=="function"?l.placeholderData(this.#h?.state.data,this.#h):l.placeholderData,P!==void 0&&(C="success",E=yd(u?.data,P,l),x=!0)}if(l.select&&E!==void 0&&!N)if(u&&E===c?.data&&l.select===this.#p)E=this.#d;else try{this.#p=l.select,E=l.select(E),E=yd(u?.data,E,l),this.#d=E,this.#s=null}catch(P){this.#s=P}this.#s&&(j=this.#s,E=this.#d,w=Date.now(),C="error");const T=v.fetchStatus==="fetching",_=C==="pending",D=C==="error",H=_&&T,V=E!==void 0,G={status:C,fetchStatus:v.fetchStatus,isPending:_,isSuccess:C==="success",isError:D,isInitialLoading:H,isLoading:H,data:E,dataUpdatedAt:v.dataUpdatedAt,error:j,errorUpdatedAt:w,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>p.dataUpdateCount||v.errorUpdateCount>p.errorUpdateCount,isFetching:T,isRefetching:T&&!_,isLoadingError:D&&!V,isPaused:v.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:D&&V,isStale:Yd(n,l),refetch:this.refetch,promise:this.#r,isEnabled:Tn(l.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const P=Ae=>{G.status==="error"?Ae.reject(G.error):G.data!==void 0&&Ae.resolve(G.data)},ae=()=>{const Ae=this.#r=G.promise=gd();P(Ae)},ye=this.#r;switch(ye.status){case"pending":n.queryHash===i.queryHash&&P(ye);break;case"fulfilled":(G.status==="error"||G.data!==ye.value)&&ae();break;case"rejected":(G.status!=="error"||G.error!==ye.reason)&&ae();break}}return G}updateResult(){const n=this.#l,l=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#i=this.options,this.#a.data!==void 0&&(this.#h=this.#t),du(l,n))return;this.#l=l;const i=()=>{if(!n)return!0;const{notifyOnChangeProps:r}=this.options,u=typeof r=="function"?r():r;if(u==="all"||!u&&!this.#m.size)return!0;const c=new Set(u??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#l).some(d=>{const m=d;return this.#l[m]!==n[m]&&c.has(m)})};this.#E({listeners:i()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const l=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(l?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(n){dt.batch(()=>{n.listeners&&this.listeners.forEach(l=>{l(this.#l)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function gS(n,l){return Tn(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&l.retryOnMount===!1)}function my(n,l){return gS(n,l)||n.state.data!==void 0&&bd(n,l,l.refetchOnMount)}function bd(n,l,i){if(Tn(l.enabled,n)!==!1&&ml(l.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&Yd(n,l)}return!1}function py(n,l,i,r){return(n!==l||Tn(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Yd(n,i)}function Yd(n,l){return Tn(l.enabled,n)!==!1&&n.isStaleByTime(ml(l.staleTime,n))}function vS(n,l){return!du(n.getCurrentResult(),l)}function mu(n){return{onFetch:(l,i)=>{const r=l.options,u=l.fetchOptions?.meta?.fetchMore?.direction,c=l.state.data?.pages||[],d=l.state.data?.pageParams||[];let m={pages:[],pageParams:[]},p=0;const y=async()=>{let v=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(l.signal.aborted?v=!0:l.signal.addEventListener("abort",()=>{v=!0}),l.signal)})},E=C1(l.options,l.fetchOptions),j=async(w,C,N)=>{if(v)return Promise.reject();if(C==null&&w.pages.length)return Promise.resolve(w);const _=(()=>{const X={client:l.client,queryKey:l.queryKey,pageParam:C,direction:N?"backward":"forward",meta:l.options.meta};return x(X),X})(),D=await E(_),{maxPages:H}=l.options,V=N?cS:uS;return{pages:V(w.pages,D,H),pageParams:V(w.pageParams,C,H)}};if(u&&c.length){const w=u==="backward",C=w?O1:xd,N={pages:c,pageParams:d},T=C(r,N);m=await j(N,T,w)}else{const w=n??c.length;do{const C=p===0?d[0]??r.initialPageParam:xd(r,m);if(p>0&&C==null)break;m=await j(m,C),p++}while(p<w)}return m};l.options.persister?l.fetchFn=()=>l.options.persister?.(y,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},i):l.fetchFn=y}}}function xd(n,{pages:l,pageParams:i}){const r=l.length-1;return l.length>0?n.getNextPageParam(l[r],l,i[r],i):void 0}function O1(n,{pages:l,pageParams:i}){return l.length>0?n.getPreviousPageParam?.(l[0],l,i[0],i):void 0}function bS(n,l){return l?xd(n,l)!=null:!1}function xS(n,l){return!l||!n.getPreviousPageParam?!1:O1(n,l)!=null}var SS=class extends R1{constructor(n,l){super(n,l)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){super.setOptions({...n,behavior:mu()})}getOptimisticResult(n){return n.behavior=mu(),super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,l){const{state:i}=n,r=super.createResult(n,l),{isFetching:u,isRefetching:c,isError:d,isRefetchError:m}=r,p=i.fetchMeta?.fetchMore?.direction,y=d&&p==="forward",v=u&&p==="forward",x=d&&p==="backward",E=u&&p==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:bS(l,i.data),hasPreviousPage:xS(l,i.data),isFetchNextPageError:y,isFetchingNextPage:v,isFetchPreviousPageError:x,isFetchingPreviousPage:E,isRefetchError:m&&!y&&!x,isRefetching:c&&!v&&!E}}},wS=class extends T1{#e;#t;#n;#l;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||M1(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(l=>l!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(n){const l=()=>{this.#a({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#l=j1({fn:()=>this.options.mutationFn?this.options.mutationFn(n,i):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#a({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:l,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",u=!this.#l.canStart();try{if(r)l();else{this.#a({type:"pending",variables:n,isPaused:u}),await this.#n.config.onMutate?.(n,this,i);const d=await this.options.onMutate?.(n,i);d!==this.state.context&&this.#a({type:"pending",context:d,variables:n,isPaused:u})}const c=await this.#l.start();return await this.#n.config.onSuccess?.(c,n,this.state.context,this,i),await this.options.onSuccess?.(c,n,this.state.context,i),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(c,null,n,this.state.context,i),this.#a({type:"success",data:c}),c}catch(c){try{throw await this.#n.config.onError?.(c,n,this.state.context,this,i),await this.options.onError?.(c,n,this.state.context,i),await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(void 0,c,n,this.state.context,i),c}finally{this.#a({type:"error",error:c})}}finally{this.#n.runNext(this)}}#a(n){const l=i=>{switch(n.type){case"failed":return{...i,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...i,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:n.error,failureCount:i.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=l(this.state),dt.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function M1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var D1=class extends ai{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,l,i){const r=new wS({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(l),state:i});return this.add(r),r}add(n){this.#e.add(n);const l=Po(n);if(typeof l=="string"){const i=this.#t.get(l);i?i.push(n):this.#t.set(l,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const l=Po(n);if(typeof l=="string"){const i=this.#t.get(l);if(i)if(i.length>1){const r=i.indexOf(n);r!==-1&&i.splice(r,1)}else i[0]===n&&this.#t.delete(l)}}this.notify({type:"removed",mutation:n})}canRun(n){const l=Po(n);if(typeof l=="string"){const r=this.#t.get(l)?.find(u=>u.state.status==="pending");return!r||r===n}else return!0}runNext(n){const l=Po(n);return typeof l=="string"?this.#t.get(l)?.find(r=>r!==n&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){dt.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const l={exact:!0,...n};return this.getAll().find(i=>uy(l,i))}findAll(n={}){return this.getAll().filter(l=>uy(n,l))}notify(n){dt.batch(()=>{this.listeners.forEach(l=>{l(n)})})}resumePausedMutations(){const n=this.getAll().filter(l=>l.state.isPaused);return dt.batch(()=>Promise.all(n.map(l=>l.continue().catch(kt))))}};function Po(n){return n.options.scope?.id}var ES=class extends ai{#e;#t=void 0;#n;#l;constructor(l,i){super(),this.#e=l,this.setOptions(i),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(l){const i=this.options;this.options=this.#e.defaultMutationOptions(l),du(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&Wl(i.mutationKey)!==Wl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(l){this.#a(),this.#i(l)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#i()}mutate(l,i){return this.#l=i,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(l)}#a(){const l=this.#n?.state??M1();this.#t={...l,isPending:l.status==="pending",isSuccess:l.status==="success",isError:l.status==="error",isIdle:l.status==="idle",mutate:this.mutate,reset:this.reset}}#i(l){dt.batch(()=>{if(this.#l&&this.hasListeners()){const i=this.#t.variables,r=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};l?.type==="success"?(this.#l.onSuccess?.(l.data,i,r,u),this.#l.onSettled?.(l.data,null,i,r,u)):l?.type==="error"&&(this.#l.onError?.(l.error,i,r,u),this.#l.onSettled?.(void 0,l.error,i,r,u))}this.listeners.forEach(i=>{i(this.#t)})})}},CS=class extends ai{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,l,i){const r=l.queryKey,u=l.queryHash??Hd(r,l);let c=this.get(u);return c||(c=new yS({client:n,queryKey:r,queryHash:u,options:n.defaultQueryOptions(l),state:i,defaultOptions:n.getQueryDefaults(r)}),this.add(c)),c}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const l=this.#e.get(n.queryHash);l&&(n.destroy(),l===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){dt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const l={exact:!0,...n};return this.getAll().find(i=>oy(l,i))}findAll(n={}){const l=this.getAll();return Object.keys(n).length>0?l.filter(i=>oy(n,i)):l}notify(n){dt.batch(()=>{this.listeners.forEach(l=>{l(n)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},_S=class{#e;#t;#n;#l;#a;#i;#r;#s;constructor(n={}){this.#e=n.queryCache||new CS,this.#t=n.mutationCache||new D1,this.#n=n.defaultOptions||{},this.#l=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#r=$d.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=hu.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#r?.(),this.#r=void 0,this.#s?.(),this.#s=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const l=this.defaultQueryOptions({queryKey:n});return this.#e.get(l.queryHash)?.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),i=this.#e.build(this,l),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ml(l.staleTime,i))&&this.prefetchQuery(l),Promise.resolve(r))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:l,state:i})=>{const r=i.data;return[l,r]})}setQueryData(n,l,i){const r=this.defaultQueryOptions({queryKey:n}),c=this.#e.get(r.queryHash)?.state.data,d=iS(l,c);if(d!==void 0)return this.#e.build(this,r).setData(d,{...i,manual:!0})}setQueriesData(n,l,i){return dt.batch(()=>this.#e.findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,l,i)]))}getQueryState(n){const l=this.defaultQueryOptions({queryKey:n});return this.#e.get(l.queryHash)?.state}removeQueries(n){const l=this.#e;dt.batch(()=>{l.findAll(n).forEach(i=>{l.remove(i)})})}resetQueries(n,l){const i=this.#e;return dt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const i={revert:!0,...l},r=dt.batch(()=>this.#e.findAll(n).map(u=>u.cancel(i)));return Promise.all(r).then(kt).catch(kt)}invalidateQueries(n,l={}){return dt.batch(()=>(this.#e.findAll(n).forEach(i=>{i.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},l)))}refetchQueries(n,l={}){const i={...l,cancelRefetch:l.cancelRefetch??!0},r=dt.batch(()=>this.#e.findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let c=u.fetch(void 0,i);return i.throwOnError||(c=c.catch(kt)),u.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(kt)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const i=this.#e.build(this,l);return i.isStaleByTime(ml(l.staleTime,i))?i.fetch(l):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(kt).catch(kt)}fetchInfiniteQuery(n){return n.behavior=mu(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(kt).catch(kt)}ensureInfiniteQueryData(n){return n.behavior=mu(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return hu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,l){this.#l.set(Wl(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[...this.#l.values()],i={};return l.forEach(r=>{Sr(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,l){this.#a.set(Wl(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[...this.#a.values()],i={};return l.forEach(r=>{Sr(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const l={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=Hd(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===Qd&&(l.enabled=!1),l}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},L1=b.createContext(void 0),U1=n=>{const l=b.useContext(L1);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},NS=({client:n,children:l})=>(b.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),h.jsx(L1.Provider,{value:n,children:l})),k1=b.createContext(!1),jS=()=>b.useContext(k1);k1.Provider;function TS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var AS=b.createContext(TS()),RS=()=>b.useContext(AS),OS=(n,l)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(l.isReset()||(n.retryOnMount=!1))},MS=n=>{b.useEffect(()=>{n.clearReset()},[n])},DS=({result:n,errorResetBoundary:l,throwOnError:i,query:r,suspense:u})=>n.isError&&!l.isReset()&&!n.isFetching&&r&&(u&&n.data===void 0||_1(i,[n.error,r])),LS=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...u)=>i(r(...u)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},US=(n,l)=>n.isLoading&&n.isFetching&&!l,kS=(n,l)=>n?.suspense&&l.isPending,yy=(n,l,i)=>l.fetchOptimistic(n).catch(()=>{i.clearReset()});function z1(n,l,i){const r=jS(),u=RS(),c=U1(),d=c.defaultQueryOptions(n);c.getDefaultOptions().queries?._experimental_beforeQuery?.(d),d._optimisticResults=r?"isRestoring":"optimistic",LS(d),OS(d,u),MS(u);const m=!c.getQueryCache().get(d.queryHash),[p]=b.useState(()=>new l(c,d)),y=p.getOptimisticResult(d),v=!r&&n.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(x=>{const E=v?p.subscribe(dt.batchCalls(x)):kt;return p.updateResult(),E},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),b.useEffect(()=>{p.setOptions(d)},[d,p]),kS(d,y))throw yy(d,p,u);if(DS({result:y,errorResetBoundary:u,throwOnError:d.throwOnError,query:c.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw y.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(d,y),d.experimental_prefetchInRender&&!Il&&US(y,r)&&(m?yy(d,p,u):c.getQueryCache().get(d.queryHash)?.promise)?.catch(kt).finally(()=>{p.updateResult()}),d.notifyOnChangeProps?y:p.trackResult(y)}function Zt(n,l){return z1(n,R1)}function gt(n,l){const i=U1(),[r]=b.useState(()=>new ES(i,n));b.useEffect(()=>{r.setOptions(n)},[r,n]);const u=b.useSyncExternalStore(b.useCallback(d=>r.subscribe(dt.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=b.useCallback((d,m)=>{r.mutate(d,m).catch(kt)},[r]);if(u.error&&_1(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:c,mutateAsync:u.mutate}}function zS(n,l){return z1(n,SS)}function q1(n,l){return function(){return n.apply(l,arguments)}}const{toString:qS}=Object.prototype,{getPrototypeOf:Vd}=Object,{iterator:_u,toStringTag:B1}=Symbol,Nu=(n=>l=>{const i=qS.call(l);return n[i]||(n[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),zn=n=>(n=n.toLowerCase(),l=>Nu(l)===n),ju=n=>l=>typeof l===n,{isArray:li}=Array,Zs=ju("undefined");function Nr(n){return n!==null&&!Zs(n)&&n.constructor!==null&&!Zs(n.constructor)&&Ft(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const H1=zn("ArrayBuffer");function BS(n){let l;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?l=ArrayBuffer.isView(n):l=n&&n.buffer&&H1(n.buffer),l}const HS=ju("string"),Ft=ju("function"),Q1=ju("number"),jr=n=>n!==null&&typeof n=="object",QS=n=>n===!0||n===!1,su=n=>{if(Nu(n)!=="object")return!1;const l=Vd(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(B1 in n)&&!(_u in n)},$S=n=>{if(!jr(n)||Nr(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},YS=zn("Date"),VS=zn("File"),KS=zn("Blob"),GS=zn("FileList"),FS=n=>jr(n)&&Ft(n.pipe),XS=n=>{let l;return n&&(typeof FormData=="function"&&n instanceof FormData||Ft(n.append)&&((l=Nu(n))==="formdata"||l==="object"&&Ft(n.toString)&&n.toString()==="[object FormData]"))},ZS=zn("URLSearchParams"),[PS,JS,IS,WS]=["ReadableStream","Request","Response","Headers"].map(zn),ew=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tr(n,l,{allOwnKeys:i=!1}={}){if(n===null||typeof n>"u")return;let r,u;if(typeof n!="object"&&(n=[n]),li(n))for(r=0,u=n.length;r<u;r++)l.call(null,n[r],r,n);else{if(Nr(n))return;const c=i?Object.getOwnPropertyNames(n):Object.keys(n),d=c.length;let m;for(r=0;r<d;r++)m=c[r],l.call(null,n[m],m,n)}}function $1(n,l){if(Nr(n))return null;l=l.toLowerCase();const i=Object.keys(n);let r=i.length,u;for(;r-- >0;)if(u=i[r],l===u.toLowerCase())return u;return null}const Fl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Y1=n=>!Zs(n)&&n!==Fl;function Sd(){const{caseless:n,skipUndefined:l}=Y1(this)&&this||{},i={},r=(u,c)=>{const d=n&&$1(i,c)||c;su(i[d])&&su(u)?i[d]=Sd(i[d],u):su(u)?i[d]=Sd({},u):li(u)?i[d]=u.slice():(!l||!Zs(u))&&(i[d]=u)};for(let u=0,c=arguments.length;u<c;u++)arguments[u]&&Tr(arguments[u],r);return i}const tw=(n,l,i,{allOwnKeys:r}={})=>(Tr(l,(u,c)=>{i&&Ft(u)?n[c]=q1(u,i):n[c]=u},{allOwnKeys:r}),n),nw=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),aw=(n,l,i,r)=>{n.prototype=Object.create(l.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:l.prototype}),i&&Object.assign(n.prototype,i)},lw=(n,l,i,r)=>{let u,c,d;const m={};if(l=l||{},n==null)return l;do{for(u=Object.getOwnPropertyNames(n),c=u.length;c-- >0;)d=u[c],(!r||r(d,n,l))&&!m[d]&&(l[d]=n[d],m[d]=!0);n=i!==!1&&Vd(n)}while(n&&(!i||i(n,l))&&n!==Object.prototype);return l},sw=(n,l,i)=>{n=String(n),(i===void 0||i>n.length)&&(i=n.length),i-=l.length;const r=n.indexOf(l,i);return r!==-1&&r===i},iw=n=>{if(!n)return null;if(li(n))return n;let l=n.length;if(!Q1(l))return null;const i=new Array(l);for(;l-- >0;)i[l]=n[l];return i},rw=(n=>l=>n&&l instanceof n)(typeof Uint8Array<"u"&&Vd(Uint8Array)),ow=(n,l)=>{const r=(n&&n[_u]).call(n);let u;for(;(u=r.next())&&!u.done;){const c=u.value;l.call(n,c[0],c[1])}},uw=(n,l)=>{let i;const r=[];for(;(i=n.exec(l))!==null;)r.push(i);return r},cw=zn("HTMLFormElement"),fw=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,r,u){return r.toUpperCase()+u}),gy=(({hasOwnProperty:n})=>(l,i)=>n.call(l,i))(Object.prototype),dw=zn("RegExp"),V1=(n,l)=>{const i=Object.getOwnPropertyDescriptors(n),r={};Tr(i,(u,c)=>{let d;(d=l(u,c,n))!==!1&&(r[c]=d||u)}),Object.defineProperties(n,r)},hw=n=>{V1(n,(l,i)=>{if(Ft(n)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=n[i];if(Ft(r)){if(l.enumerable=!1,"writable"in l){l.writable=!1;return}l.set||(l.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},mw=(n,l)=>{const i={},r=u=>{u.forEach(c=>{i[c]=!0})};return li(n)?r(n):r(String(n).split(l)),i},pw=()=>{},yw=(n,l)=>n!=null&&Number.isFinite(n=+n)?n:l;function gw(n){return!!(n&&Ft(n.append)&&n[B1]==="FormData"&&n[_u])}const vw=n=>{const l=new Array(10),i=(r,u)=>{if(jr(r)){if(l.indexOf(r)>=0)return;if(Nr(r))return r;if(!("toJSON"in r)){l[u]=r;const c=li(r)?[]:{};return Tr(r,(d,m)=>{const p=i(d,u+1);!Zs(p)&&(c[m]=p)}),l[u]=void 0,c}}return r};return i(n,0)},bw=zn("AsyncFunction"),xw=n=>n&&(jr(n)||Ft(n))&&Ft(n.then)&&Ft(n.catch),K1=((n,l)=>n?setImmediate:l?((i,r)=>(Fl.addEventListener("message",({source:u,data:c})=>{u===Fl&&c===i&&r.length&&r.shift()()},!1),u=>{r.push(u),Fl.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ft(Fl.postMessage)),Sw=typeof queueMicrotask<"u"?queueMicrotask.bind(Fl):typeof process<"u"&&process.nextTick||K1,ww=n=>n!=null&&Ft(n[_u]),B={isArray:li,isArrayBuffer:H1,isBuffer:Nr,isFormData:XS,isArrayBufferView:BS,isString:HS,isNumber:Q1,isBoolean:QS,isObject:jr,isPlainObject:su,isEmptyObject:$S,isReadableStream:PS,isRequest:JS,isResponse:IS,isHeaders:WS,isUndefined:Zs,isDate:YS,isFile:VS,isBlob:KS,isRegExp:dw,isFunction:Ft,isStream:FS,isURLSearchParams:ZS,isTypedArray:rw,isFileList:GS,forEach:Tr,merge:Sd,extend:tw,trim:ew,stripBOM:nw,inherits:aw,toFlatObject:lw,kindOf:Nu,kindOfTest:zn,endsWith:sw,toArray:iw,forEachEntry:ow,matchAll:uw,isHTMLForm:cw,hasOwnProperty:gy,hasOwnProp:gy,reduceDescriptors:V1,freezeMethods:hw,toObjectSet:mw,toCamelCase:fw,noop:pw,toFiniteNumber:yw,findKey:$1,global:Fl,isContextDefined:Y1,isSpecCompliantForm:gw,toJSONObject:vw,isAsyncFn:bw,isThenable:xw,setImmediate:K1,asap:Sw,isIterable:ww};function pe(n,l,i,r,u){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",l&&(this.code=l),i&&(this.config=i),r&&(this.request=r),u&&(this.response=u,this.status=u.status?u.status:null)}B.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.status}}});const G1=pe.prototype,F1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{F1[n]={value:n}});Object.defineProperties(pe,F1);Object.defineProperty(G1,"isAxiosError",{value:!0});pe.from=(n,l,i,r,u,c)=>{const d=Object.create(G1);B.toFlatObject(n,d,function(v){return v!==Error.prototype},y=>y!=="isAxiosError");const m=n&&n.message?n.message:"Error",p=l==null&&n?n.code:l;return pe.call(d,m,p,i,r,u),n&&d.cause==null&&Object.defineProperty(d,"cause",{value:n,configurable:!0}),d.name=n&&n.name||"Error",c&&Object.assign(d,c),d};const Ew=null;function wd(n){return B.isPlainObject(n)||B.isArray(n)}function X1(n){return B.endsWith(n,"[]")?n.slice(0,-2):n}function vy(n,l,i){return n?n.concat(l).map(function(u,c){return u=X1(u),!i&&c?"["+u+"]":u}).join(i?".":""):l}function Cw(n){return B.isArray(n)&&!n.some(wd)}const _w=B.toFlatObject(B,{},null,function(l){return/^is[A-Z]/.test(l)});function Tu(n,l,i){if(!B.isObject(n))throw new TypeError("target must be an object");l=l||new FormData,i=B.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,N){return!B.isUndefined(N[C])});const r=i.metaTokens,u=i.visitor||v,c=i.dots,d=i.indexes,p=(i.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(l);if(!B.isFunction(u))throw new TypeError("visitor must be a function");function y(w){if(w===null)return"";if(B.isDate(w))return w.toISOString();if(B.isBoolean(w))return w.toString();if(!p&&B.isBlob(w))throw new pe("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(w)||B.isTypedArray(w)?p&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function v(w,C,N){let T=w;if(w&&!N&&typeof w=="object"){if(B.endsWith(C,"{}"))C=r?C:C.slice(0,-2),w=JSON.stringify(w);else if(B.isArray(w)&&Cw(w)||(B.isFileList(w)||B.endsWith(C,"[]"))&&(T=B.toArray(w)))return C=X1(C),T.forEach(function(D,H){!(B.isUndefined(D)||D===null)&&l.append(d===!0?vy([C],H,c):d===null?C:C+"[]",y(D))}),!1}return wd(w)?!0:(l.append(vy(N,C,c),y(w)),!1)}const x=[],E=Object.assign(_w,{defaultVisitor:v,convertValue:y,isVisitable:wd});function j(w,C){if(!B.isUndefined(w)){if(x.indexOf(w)!==-1)throw Error("Circular reference detected in "+C.join("."));x.push(w),B.forEach(w,function(T,_){(!(B.isUndefined(T)||T===null)&&u.call(l,T,B.isString(_)?_.trim():_,C,E))===!0&&j(T,C?C.concat(_):[_])}),x.pop()}}if(!B.isObject(n))throw new TypeError("data must be an object");return j(n),l}function by(n){const l={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return l[r]})}function Kd(n,l){this._pairs=[],n&&Tu(n,this,l)}const Z1=Kd.prototype;Z1.append=function(l,i){this._pairs.push([l,i])};Z1.toString=function(l){const i=l?function(r){return l.call(this,r,by)}:by;return this._pairs.map(function(u){return i(u[0])+"="+i(u[1])},"").join("&")};function Nw(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function P1(n,l,i){if(!l)return n;const r=i&&i.encode||Nw;B.isFunction(i)&&(i={serialize:i});const u=i&&i.serialize;let c;if(u?c=u(l,i):c=B.isURLSearchParams(l)?l.toString():new Kd(l,i).toString(r),c){const d=n.indexOf("#");d!==-1&&(n=n.slice(0,d)),n+=(n.indexOf("?")===-1?"?":"&")+c}return n}class xy{constructor(){this.handlers=[]}use(l,i,r){return this.handlers.push({fulfilled:l,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(l){this.handlers[l]&&(this.handlers[l]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(l){B.forEach(this.handlers,function(r){r!==null&&l(r)})}}const J1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jw=typeof URLSearchParams<"u"?URLSearchParams:Kd,Tw=typeof FormData<"u"?FormData:null,Aw=typeof Blob<"u"?Blob:null,Rw={isBrowser:!0,classes:{URLSearchParams:jw,FormData:Tw,Blob:Aw},protocols:["http","https","file","blob","url","data"]},Gd=typeof window<"u"&&typeof document<"u",Ed=typeof navigator=="object"&&navigator||void 0,Ow=Gd&&(!Ed||["ReactNative","NativeScript","NS"].indexOf(Ed.product)<0),Mw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dw=Gd&&window.location.href||"http://localhost",Lw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Gd,hasStandardBrowserEnv:Ow,hasStandardBrowserWebWorkerEnv:Mw,navigator:Ed,origin:Dw},Symbol.toStringTag,{value:"Module"})),Rt={...Lw,...Rw};function Uw(n,l){return Tu(n,new Rt.classes.URLSearchParams,{visitor:function(i,r,u,c){return Rt.isNode&&B.isBuffer(i)?(this.append(r,i.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)},...l})}function kw(n){return B.matchAll(/\w+|\[(\w*)]/g,n).map(l=>l[0]==="[]"?"":l[1]||l[0])}function zw(n){const l={},i=Object.keys(n);let r;const u=i.length;let c;for(r=0;r<u;r++)c=i[r],l[c]=n[c];return l}function I1(n){function l(i,r,u,c){let d=i[c++];if(d==="__proto__")return!0;const m=Number.isFinite(+d),p=c>=i.length;return d=!d&&B.isArray(u)?u.length:d,p?(B.hasOwnProp(u,d)?u[d]=[u[d],r]:u[d]=r,!m):((!u[d]||!B.isObject(u[d]))&&(u[d]=[]),l(i,r,u[d],c)&&B.isArray(u[d])&&(u[d]=zw(u[d])),!m)}if(B.isFormData(n)&&B.isFunction(n.entries)){const i={};return B.forEachEntry(n,(r,u)=>{l(kw(r),u,i,0)}),i}return null}function qw(n,l,i){if(B.isString(n))try{return(l||JSON.parse)(n),B.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(i||JSON.stringify)(n)}const Ar={transitional:J1,adapter:["xhr","http","fetch"],transformRequest:[function(l,i){const r=i.getContentType()||"",u=r.indexOf("application/json")>-1,c=B.isObject(l);if(c&&B.isHTMLForm(l)&&(l=new FormData(l)),B.isFormData(l))return u?JSON.stringify(I1(l)):l;if(B.isArrayBuffer(l)||B.isBuffer(l)||B.isStream(l)||B.isFile(l)||B.isBlob(l)||B.isReadableStream(l))return l;if(B.isArrayBufferView(l))return l.buffer;if(B.isURLSearchParams(l))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let m;if(c){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Uw(l,this.formSerializer).toString();if((m=B.isFileList(l))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Tu(m?{"files[]":l}:l,p&&new p,this.formSerializer)}}return c||u?(i.setContentType("application/json",!1),qw(l)):l}],transformResponse:[function(l){const i=this.transitional||Ar.transitional,r=i&&i.forcedJSONParsing,u=this.responseType==="json";if(B.isResponse(l)||B.isReadableStream(l))return l;if(l&&B.isString(l)&&(r&&!this.responseType||u)){const d=!(i&&i.silentJSONParsing)&&u;try{return JSON.parse(l,this.parseReviver)}catch(m){if(d)throw m.name==="SyntaxError"?pe.from(m,pe.ERR_BAD_RESPONSE,this,null,this.response):m}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],n=>{Ar.headers[n]={}});const Bw=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Hw=n=>{const l={};let i,r,u;return n&&n.split(`
12
+ `).forEach(function(d){u=d.indexOf(":"),i=d.substring(0,u).trim().toLowerCase(),r=d.substring(u+1).trim(),!(!i||l[i]&&Bw[i])&&(i==="set-cookie"?l[i]?l[i].push(r):l[i]=[r]:l[i]=l[i]?l[i]+", "+r:r)}),l},Sy=Symbol("internals");function dr(n){return n&&String(n).trim().toLowerCase()}function iu(n){return n===!1||n==null?n:B.isArray(n)?n.map(iu):String(n)}function Qw(n){const l=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(n);)l[r[1]]=r[2];return l}const $w=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function If(n,l,i,r,u){if(B.isFunction(r))return r.call(this,l,i);if(u&&(l=i),!!B.isString(l)){if(B.isString(r))return l.indexOf(r)!==-1;if(B.isRegExp(r))return r.test(l)}}function Yw(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(l,i,r)=>i.toUpperCase()+r)}function Vw(n,l){const i=B.toCamelCase(" "+l);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+i,{value:function(u,c,d){return this[r].call(this,l,u,c,d)},configurable:!0})})}let Xt=class{constructor(l){l&&this.set(l)}set(l,i,r){const u=this;function c(m,p,y){const v=dr(p);if(!v)throw new Error("header name must be a non-empty string");const x=B.findKey(u,v);(!x||u[x]===void 0||y===!0||y===void 0&&u[x]!==!1)&&(u[x||p]=iu(m))}const d=(m,p)=>B.forEach(m,(y,v)=>c(y,v,p));if(B.isPlainObject(l)||l instanceof this.constructor)d(l,i);else if(B.isString(l)&&(l=l.trim())&&!$w(l))d(Hw(l),i);else if(B.isObject(l)&&B.isIterable(l)){let m={},p,y;for(const v of l){if(!B.isArray(v))throw TypeError("Object iterator must return a key-value pair");m[y=v[0]]=(p=m[y])?B.isArray(p)?[...p,v[1]]:[p,v[1]]:v[1]}d(m,i)}else l!=null&&c(i,l,r);return this}get(l,i){if(l=dr(l),l){const r=B.findKey(this,l);if(r){const u=this[r];if(!i)return u;if(i===!0)return Qw(u);if(B.isFunction(i))return i.call(this,u,r);if(B.isRegExp(i))return i.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,i){if(l=dr(l),l){const r=B.findKey(this,l);return!!(r&&this[r]!==void 0&&(!i||If(this,this[r],r,i)))}return!1}delete(l,i){const r=this;let u=!1;function c(d){if(d=dr(d),d){const m=B.findKey(r,d);m&&(!i||If(r,r[m],m,i))&&(delete r[m],u=!0)}}return B.isArray(l)?l.forEach(c):c(l),u}clear(l){const i=Object.keys(this);let r=i.length,u=!1;for(;r--;){const c=i[r];(!l||If(this,this[c],c,l,!0))&&(delete this[c],u=!0)}return u}normalize(l){const i=this,r={};return B.forEach(this,(u,c)=>{const d=B.findKey(r,c);if(d){i[d]=iu(u),delete i[c];return}const m=l?Yw(c):String(c).trim();m!==c&&delete i[c],i[m]=iu(u),r[m]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const i=Object.create(null);return B.forEach(this,(r,u)=>{r!=null&&r!==!1&&(i[u]=l&&B.isArray(r)?r.join(", "):r)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([l,i])=>l+": "+i).join(`
13
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...i){const r=new this(l);return i.forEach(u=>r.set(u)),r}static accessor(l){const r=(this[Sy]=this[Sy]={accessors:{}}).accessors,u=this.prototype;function c(d){const m=dr(d);r[m]||(Vw(u,d),r[m]=!0)}return B.isArray(l)?l.forEach(c):c(l),this}};Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(Xt.prototype,({value:n},l)=>{let i=l[0].toUpperCase()+l.slice(1);return{get:()=>n,set(r){this[i]=r}}});B.freezeMethods(Xt);function Wf(n,l){const i=this||Ar,r=l||i,u=Xt.from(r.headers);let c=r.data;return B.forEach(n,function(m){c=m.call(i,c,u.normalize(),l?l.status:void 0)}),u.normalize(),c}function W1(n){return!!(n&&n.__CANCEL__)}function si(n,l,i){pe.call(this,n??"canceled",pe.ERR_CANCELED,l,i),this.name="CanceledError"}B.inherits(si,pe,{__CANCEL__:!0});function eg(n,l,i){const r=i.config.validateStatus;!i.status||!r||r(i.status)?n(i):l(new pe("Request failed with status code "+i.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function Kw(n){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return l&&l[1]||""}function Gw(n,l){n=n||10;const i=new Array(n),r=new Array(n);let u=0,c=0,d;return l=l!==void 0?l:1e3,function(p){const y=Date.now(),v=r[c];d||(d=y),i[u]=p,r[u]=y;let x=c,E=0;for(;x!==u;)E+=i[x++],x=x%n;if(u=(u+1)%n,u===c&&(c=(c+1)%n),y-d<l)return;const j=v&&y-v;return j?Math.round(E*1e3/j):void 0}}function Fw(n,l){let i=0,r=1e3/l,u,c;const d=(y,v=Date.now())=>{i=v,u=null,c&&(clearTimeout(c),c=null),n(...y)};return[(...y)=>{const v=Date.now(),x=v-i;x>=r?d(y,v):(u=y,c||(c=setTimeout(()=>{c=null,d(u)},r-x)))},()=>u&&d(u)]}const pu=(n,l,i=3)=>{let r=0;const u=Gw(50,250);return Fw(c=>{const d=c.loaded,m=c.lengthComputable?c.total:void 0,p=d-r,y=u(p),v=d<=m;r=d;const x={loaded:d,total:m,progress:m?d/m:void 0,bytes:p,rate:y||void 0,estimated:y&&m&&v?(m-d)/y:void 0,event:c,lengthComputable:m!=null,[l?"download":"upload"]:!0};n(x)},i)},wy=(n,l)=>{const i=n!=null;return[r=>l[0]({lengthComputable:i,total:n,loaded:r}),l[1]]},Ey=n=>(...l)=>B.asap(()=>n(...l)),Xw=Rt.hasStandardBrowserEnv?((n,l)=>i=>(i=new URL(i,Rt.origin),n.protocol===i.protocol&&n.host===i.host&&(l||n.port===i.port)))(new URL(Rt.origin),Rt.navigator&&/(msie|trident)/i.test(Rt.navigator.userAgent)):()=>!0,Zw=Rt.hasStandardBrowserEnv?{write(n,l,i,r,u,c,d){if(typeof document>"u")return;const m=[`${n}=${encodeURIComponent(l)}`];B.isNumber(i)&&m.push(`expires=${new Date(i).toUTCString()}`),B.isString(r)&&m.push(`path=${r}`),B.isString(u)&&m.push(`domain=${u}`),c===!0&&m.push("secure"),B.isString(d)&&m.push(`SameSite=${d}`),document.cookie=m.join("; ")},read(n){if(typeof document>"u")return null;const l=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return l?decodeURIComponent(l[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Pw(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Jw(n,l){return l?n.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):n}function tg(n,l,i){let r=!Pw(l);return n&&(r||i==!1)?Jw(n,l):l}const Cy=n=>n instanceof Xt?{...n}:n;function es(n,l){l=l||{};const i={};function r(y,v,x,E){return B.isPlainObject(y)&&B.isPlainObject(v)?B.merge.call({caseless:E},y,v):B.isPlainObject(v)?B.merge({},v):B.isArray(v)?v.slice():v}function u(y,v,x,E){if(B.isUndefined(v)){if(!B.isUndefined(y))return r(void 0,y,x,E)}else return r(y,v,x,E)}function c(y,v){if(!B.isUndefined(v))return r(void 0,v)}function d(y,v){if(B.isUndefined(v)){if(!B.isUndefined(y))return r(void 0,y)}else return r(void 0,v)}function m(y,v,x){if(x in l)return r(y,v);if(x in n)return r(void 0,y)}const p={url:c,method:c,data:c,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:m,headers:(y,v,x)=>u(Cy(y),Cy(v),x,!0)};return B.forEach(Object.keys({...n,...l}),function(v){const x=p[v]||u,E=x(n[v],l[v],v);B.isUndefined(E)&&x!==m||(i[v]=E)}),i}const ng=n=>{const l=es({},n);let{data:i,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:c,headers:d,auth:m}=l;if(l.headers=d=Xt.from(d),l.url=P1(tg(l.baseURL,l.url,l.allowAbsoluteUrls),n.params,n.paramsSerializer),m&&d.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):""))),B.isFormData(i)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(B.isFunction(i.getHeaders)){const p=i.getHeaders(),y=["content-type","content-length"];Object.entries(p).forEach(([v,x])=>{y.includes(v.toLowerCase())&&d.set(v,x)})}}if(Rt.hasStandardBrowserEnv&&(r&&B.isFunction(r)&&(r=r(l)),r||r!==!1&&Xw(l.url))){const p=u&&c&&Zw.read(c);p&&d.set(u,p)}return l},Iw=typeof XMLHttpRequest<"u",Ww=Iw&&function(n){return new Promise(function(i,r){const u=ng(n);let c=u.data;const d=Xt.from(u.headers).normalize();let{responseType:m,onUploadProgress:p,onDownloadProgress:y}=u,v,x,E,j,w;function C(){j&&j(),w&&w(),u.cancelToken&&u.cancelToken.unsubscribe(v),u.signal&&u.signal.removeEventListener("abort",v)}let N=new XMLHttpRequest;N.open(u.method.toUpperCase(),u.url,!0),N.timeout=u.timeout;function T(){if(!N)return;const D=Xt.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),V={data:!m||m==="text"||m==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:D,config:n,request:N};eg(function(G){i(G),C()},function(G){r(G),C()},V),N=null}"onloadend"in N?N.onloadend=T:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.indexOf("file:")===0)||setTimeout(T)},N.onabort=function(){N&&(r(new pe("Request aborted",pe.ECONNABORTED,n,N)),N=null)},N.onerror=function(H){const V=H&&H.message?H.message:"Network Error",X=new pe(V,pe.ERR_NETWORK,n,N);X.event=H||null,r(X),N=null},N.ontimeout=function(){let H=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const V=u.transitional||J1;u.timeoutErrorMessage&&(H=u.timeoutErrorMessage),r(new pe(H,V.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,n,N)),N=null},c===void 0&&d.setContentType(null),"setRequestHeader"in N&&B.forEach(d.toJSON(),function(H,V){N.setRequestHeader(V,H)}),B.isUndefined(u.withCredentials)||(N.withCredentials=!!u.withCredentials),m&&m!=="json"&&(N.responseType=u.responseType),y&&([E,w]=pu(y,!0),N.addEventListener("progress",E)),p&&N.upload&&([x,j]=pu(p),N.upload.addEventListener("progress",x),N.upload.addEventListener("loadend",j)),(u.cancelToken||u.signal)&&(v=D=>{N&&(r(!D||D.type?new si(null,n,N):D),N.abort(),N=null)},u.cancelToken&&u.cancelToken.subscribe(v),u.signal&&(u.signal.aborted?v():u.signal.addEventListener("abort",v)));const _=Kw(u.url);if(_&&Rt.protocols.indexOf(_)===-1){r(new pe("Unsupported protocol "+_+":",pe.ERR_BAD_REQUEST,n));return}N.send(c||null)})},e3=(n,l)=>{const{length:i}=n=n?n.filter(Boolean):[];if(l||i){let r=new AbortController,u;const c=function(y){if(!u){u=!0,m();const v=y instanceof Error?y:this.reason;r.abort(v instanceof pe?v:new si(v instanceof Error?v.message:v))}};let d=l&&setTimeout(()=>{d=null,c(new pe(`timeout ${l} of ms exceeded`,pe.ETIMEDOUT))},l);const m=()=>{n&&(d&&clearTimeout(d),d=null,n.forEach(y=>{y.unsubscribe?y.unsubscribe(c):y.removeEventListener("abort",c)}),n=null)};n.forEach(y=>y.addEventListener("abort",c));const{signal:p}=r;return p.unsubscribe=()=>B.asap(m),p}},t3=function*(n,l){let i=n.byteLength;if(i<l){yield n;return}let r=0,u;for(;r<i;)u=r+l,yield n.slice(r,u),r=u},n3=async function*(n,l){for await(const i of a3(n))yield*t3(i,l)},a3=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const l=n.getReader();try{for(;;){const{done:i,value:r}=await l.read();if(i)break;yield r}}finally{await l.cancel()}},_y=(n,l,i,r)=>{const u=n3(n,l);let c=0,d,m=p=>{d||(d=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:y,value:v}=await u.next();if(y){m(),p.close();return}let x=v.byteLength;if(i){let E=c+=x;i(E)}p.enqueue(new Uint8Array(v))}catch(y){throw m(y),y}},cancel(p){return m(p),u.return()}},{highWaterMark:2})},Ny=64*1024,{isFunction:Jo}=B,l3=(({Request:n,Response:l})=>({Request:n,Response:l}))(B.global),{ReadableStream:jy,TextEncoder:Ty}=B.global,Ay=(n,...l)=>{try{return!!n(...l)}catch{return!1}},s3=n=>{n=B.merge.call({skipUndefined:!0},l3,n);const{fetch:l,Request:i,Response:r}=n,u=l?Jo(l):typeof fetch=="function",c=Jo(i),d=Jo(r);if(!u)return!1;const m=u&&Jo(jy),p=u&&(typeof Ty=="function"?(w=>C=>w.encode(C))(new Ty):async w=>new Uint8Array(await new i(w).arrayBuffer())),y=c&&m&&Ay(()=>{let w=!1;const C=new i(Rt.origin,{body:new jy,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!C}),v=d&&m&&Ay(()=>B.isReadableStream(new r("").body)),x={stream:v&&(w=>w.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!x[w]&&(x[w]=(C,N)=>{let T=C&&C[w];if(T)return T.call(C);throw new pe(`Response type '${w}' is not supported`,pe.ERR_NOT_SUPPORT,N)})});const E=async w=>{if(w==null)return 0;if(B.isBlob(w))return w.size;if(B.isSpecCompliantForm(w))return(await new i(Rt.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(B.isArrayBufferView(w)||B.isArrayBuffer(w))return w.byteLength;if(B.isURLSearchParams(w)&&(w=w+""),B.isString(w))return(await p(w)).byteLength},j=async(w,C)=>{const N=B.toFiniteNumber(w.getContentLength());return N??E(C)};return async w=>{let{url:C,method:N,data:T,signal:_,cancelToken:D,timeout:H,onDownloadProgress:V,onUploadProgress:X,responseType:G,headers:P,withCredentials:ae="same-origin",fetchOptions:ye}=ng(w),Ae=l||fetch;G=G?(G+"").toLowerCase():"text";let Ce=e3([_,D&&D.toAbortSignal()],H),Ke=null;const me=Ce&&Ce.unsubscribe&&(()=>{Ce.unsubscribe()});let _e;try{if(X&&y&&N!=="get"&&N!=="head"&&(_e=await j(P,T))!==0){let Q=new i(C,{method:"POST",body:T,duplex:"half"}),I;if(B.isFormData(T)&&(I=Q.headers.get("content-type"))&&P.setContentType(I),Q.body){const[W,ne]=wy(_e,pu(Ey(X)));T=_y(Q.body,Ny,W,ne)}}B.isString(ae)||(ae=ae?"include":"omit");const q=c&&"credentials"in i.prototype,F={...ye,signal:Ce,method:N.toUpperCase(),headers:P.normalize().toJSON(),body:T,duplex:"half",credentials:q?ae:void 0};Ke=c&&new i(C,F);let J=await(c?Ae(Ke,ye):Ae(C,F));const he=v&&(G==="stream"||G==="response");if(v&&(V||he&&me)){const Q={};["status","statusText","headers"].forEach(ve=>{Q[ve]=J[ve]});const I=B.toFiniteNumber(J.headers.get("content-length")),[W,ne]=V&&wy(I,pu(Ey(V),!0))||[];J=new r(_y(J.body,Ny,W,()=>{ne&&ne(),me&&me()}),Q)}G=G||"text";let R=await x[B.findKey(x,G)||"text"](J,w);return!he&&me&&me(),await new Promise((Q,I)=>{eg(Q,I,{data:R,headers:Xt.from(J.headers),status:J.status,statusText:J.statusText,config:w,request:Ke})})}catch(q){throw me&&me(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,w,Ke),{cause:q.cause||q}):pe.from(q,q&&q.code,w,Ke)}}},i3=new Map,ag=n=>{let l=n&&n.env||{};const{fetch:i,Request:r,Response:u}=l,c=[r,u,i];let d=c.length,m=d,p,y,v=i3;for(;m--;)p=c[m],y=v.get(p),y===void 0&&v.set(p,y=m?new Map:s3(l)),v=y;return y};ag();const Fd={http:Ew,xhr:Ww,fetch:{get:ag}};B.forEach(Fd,(n,l)=>{if(n){try{Object.defineProperty(n,"name",{value:l})}catch{}Object.defineProperty(n,"adapterName",{value:l})}});const Ry=n=>`- ${n}`,r3=n=>B.isFunction(n)||n===null||n===!1;function o3(n,l){n=B.isArray(n)?n:[n];const{length:i}=n;let r,u;const c={};for(let d=0;d<i;d++){r=n[d];let m;if(u=r,!r3(r)&&(u=Fd[(m=String(r)).toLowerCase()],u===void 0))throw new pe(`Unknown adapter '${m}'`);if(u&&(B.isFunction(u)||(u=u.get(l))))break;c[m||"#"+d]=u}if(!u){const d=Object.entries(c).map(([p,y])=>`adapter ${p} `+(y===!1?"is not supported by the environment":"is not available in the build"));let m=i?d.length>1?`since :
14
14
  `+d.map(Ry).join(`
15
- `):" "+Ry(d[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return u}const lv={getAdapter:o3,adapters:Fd};function ed(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new si(null,n)}function Oy(n){return ed(n),n.headers=Xt.from(n.headers),n.data=Wf.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),lv.getAdapter(n.adapter||Ar.adapter,n)(n).then(function(r){return ed(n),r.data=Wf.call(n,n.transformResponse,r),r.headers=Xt.from(r.headers),r},function(r){return W1(r)||(ed(n),r&&r.response&&(r.response.data=Wf.call(n,n.transformResponse,r.response),r.response.headers=Xt.from(r.response.headers))),Promise.reject(r)})}const sv="1.13.2",Au={};["object","boolean","number","function","string","symbol"].forEach((n,l)=>{Au[n]=function(r){return typeof r===n||"a"+(l<1?"n ":" ")+n}});const My={};Au.transitional=function(l,i,r){function u(c,d){return"[Axios v"+sv+"] Transitional option '"+c+"'"+d+(r?". "+r:"")}return(c,d,m)=>{if(l===!1)throw new pe(u(d," has been removed"+(i?" in "+i:"")),pe.ERR_DEPRECATED);return i&&!My[d]&&(My[d]=!0,console.warn(u(d," has been deprecated since v"+i+" and will be removed in the near future"))),l?l(c,d,m):!0}};Au.spelling=function(l){return(i,r)=>(console.warn(`${r} is likely a misspelling of ${l}`),!0)};function u3(n,l,i){if(typeof n!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let u=r.length;for(;u-- >0;){const c=r[u],d=l[c];if(d){const m=n[c],p=m===void 0||d(m,c,n);if(p!==!0)throw new pe("option "+c+" must be "+p,pe.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new pe("Unknown option "+c,pe.ERR_BAD_OPTION)}}const ru={assertOptions:u3,validators:Au},Pn=ru.validators;let Zl=class{constructor(l){this.defaults=l||{},this.interceptors={request:new xy,response:new xy}}async request(l,i){try{return await this._request(l,i)}catch(r){if(r instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const c=u.stack?u.stack.replace(/^.+\n/,""):"";try{r.stack?c&&!String(r.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(r.stack+=`
16
- `+c):r.stack=c}catch{}}throw r}}_request(l,i){typeof l=="string"?(i=i||{},i.url=l):i=l||{},i=es(this.defaults,i);const{transitional:r,paramsSerializer:u,headers:c}=i;r!==void 0&&ru.assertOptions(r,{silentJSONParsing:Pn.transitional(Pn.boolean),forcedJSONParsing:Pn.transitional(Pn.boolean),clarifyTimeoutError:Pn.transitional(Pn.boolean)},!1),u!=null&&(B.isFunction(u)?i.paramsSerializer={serialize:u}:ru.assertOptions(u,{encode:Pn.function,serialize:Pn.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),ru.assertOptions(i,{baseUrl:Pn.spelling("baseURL"),withXsrfToken:Pn.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let d=c&&B.merge(c.common,c[i.method]);c&&B.forEach(["delete","get","head","post","put","patch","common"],w=>{delete c[w]}),i.headers=Xt.concat(d,c);const m=[];let p=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(i)===!1||(p=p&&C.synchronous,m.unshift(C.fulfilled,C.rejected))});const y=[];this.interceptors.response.forEach(function(C){y.push(C.fulfilled,C.rejected)});let g,x=0,E;if(!p){const w=[Oy.bind(this),void 0];for(w.unshift(...m),w.push(...y),E=w.length,g=Promise.resolve(i);x<E;)g=g.then(w[x++],w[x++]);return g}E=m.length;let j=i;for(;x<E;){const w=m[x++],C=m[x++];try{j=w(j)}catch(N){C.call(this,N);break}}try{g=Oy.call(this,j)}catch(w){return Promise.reject(w)}for(x=0,E=y.length;x<E;)g=g.then(y[x++],y[x++]);return g}getUri(l){l=es(this.defaults,l);const i=tv(l.baseURL,l.url,l.allowAbsoluteUrls);return P1(i,l.params,l.paramsSerializer)}};B.forEach(["delete","get","head","options"],function(l){Zl.prototype[l]=function(i,r){return this.request(es(r||{},{method:l,url:i,data:(r||{}).data}))}});B.forEach(["post","put","patch"],function(l){function i(r){return function(c,d,m){return this.request(es(m||{},{method:l,headers:r?{"Content-Type":"multipart/form-data"}:{},url:c,data:d}))}}Zl.prototype[l]=i(),Zl.prototype[l+"Form"]=i(!0)});let c3=class iv{constructor(l){if(typeof l!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(c){i=c});const r=this;this.promise.then(u=>{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](u);r._listeners=null}),this.promise.then=u=>{let c;const d=new Promise(m=>{r.subscribe(m),c=m}).then(u);return d.cancel=function(){r.unsubscribe(c)},d},l(function(c,d,m){r.reason||(r.reason=new si(c,d,m),i(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const i=this._listeners.indexOf(l);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const l=new AbortController,i=r=>{l.abort(r)};return this.subscribe(i),l.signal.unsubscribe=()=>this.unsubscribe(i),l.signal}static source(){let l;return{token:new iv(function(u){l=u}),cancel:l}}};function f3(n){return function(i){return n.apply(null,i)}}function d3(n){return B.isObject(n)&&n.isAxiosError===!0}const Cd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cd).forEach(([n,l])=>{Cd[l]=n});function rv(n){const l=new Zl(n),i=q1(Zl.prototype.request,l);return B.extend(i,Zl.prototype,l,{allOwnKeys:!0}),B.extend(i,l,null,{allOwnKeys:!0}),i.create=function(u){return rv(es(n,u))},i}const et=rv(Ar);et.Axios=Zl;et.CanceledError=si;et.CancelToken=c3;et.isCancel=W1;et.VERSION=sv;et.toFormData=Tu;et.AxiosError=pe;et.Cancel=et.CanceledError;et.all=function(l){return Promise.all(l)};et.spread=f3;et.isAxiosError=d3;et.mergeConfig=es;et.AxiosHeaders=Xt;et.formToJSON=n=>I1(B.isHTMLForm(n)?new FormData(n):n);et.getAdapter=lv.getAdapter;et.HttpStatusCode=Cd;et.default=et;const{Axios:pj,AxiosError:h3,CanceledError:yj,isCancel:vj,CancelToken:gj,VERSION:bj,all:xj,Cancel:Sj,isAxiosError:yu,spread:wj,toFormData:Ej,AxiosHeaders:Cj,HttpStatusCode:_j,formToJSON:Nj,getAdapter:jj,mergeConfig:Tj}=et,_d="__access_token__",m3=()=>{try{const n=localStorage.getItem(_d);return n||void 0}catch{return}},Io=n=>{n?localStorage.setItem(_d,n):localStorage.removeItem(_d)};let p3={data:""},y3=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||p3,v3=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,g3=/\/\*[^]*?\*\/| +/g,Dy=/\n+/g,cl=(n,l)=>{let i="",r="",u="";for(let c in n){let d=n[c];c[0]=="@"?c[1]=="i"?i=c+" "+d+";":r+=c[1]=="f"?cl(d,c):c+"{"+cl(d,c[1]=="k"?"":l)+"}":typeof d=="object"?r+=cl(d,l?l.replace(/([^,])+/g,m=>c.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,p=>/&/.test(p)?p.replace(/&/g,m):m?m+" "+p:p)):c):d!=null&&(c=/^--/.test(c)?c:c.replace(/[A-Z]/g,"-$&").toLowerCase(),u+=cl.p?cl.p(c,d):c+":"+d+";")}return i+(l&&u?l+"{"+u+"}":u)+r},_a={},ov=n=>{if(typeof n=="object"){let l="";for(let i in n)l+=i+ov(n[i]);return l}return n},b3=(n,l,i,r,u)=>{let c=ov(n),d=_a[c]||(_a[c]=(p=>{let y=0,g=11;for(;y<p.length;)g=101*g+p.charCodeAt(y++)>>>0;return"go"+g})(c));if(!_a[d]){let p=c!==n?n:(y=>{let g,x,E=[{}];for(;g=v3.exec(y.replace(g3,""));)g[4]?E.shift():g[3]?(x=g[3].replace(Dy," ").trim(),E.unshift(E[0][x]=E[0][x]||{})):E[0][g[1]]=g[2].replace(Dy," ").trim();return E[0]})(n);_a[d]=cl(u?{["@keyframes "+d]:p}:p,i?"":"."+d)}let m=i&&_a.g?_a.g:null;return i&&(_a.g=_a[d]),((p,y,g,x)=>{x?y.data=y.data.replace(x,p):y.data.indexOf(p)===-1&&(y.data=g?p+y.data:y.data+p)})(_a[d],l,r,m),d},x3=(n,l,i)=>n.reduce((r,u,c)=>{let d=l[c];if(d&&d.call){let m=d(i),p=m&&m.props&&m.props.className||/^go/.test(m)&&m;d=p?"."+p:m&&typeof m=="object"?m.props?"":cl(m,""):m===!1?"":m}return r+u+(d??"")},"");function Ru(n){let l=this||{},i=n.call?n(l.p):n;return b3(i.unshift?i.raw?x3(i,[].slice.call(arguments,1),l.p):i.reduce((r,u)=>Object.assign(r,u&&u.call?u(l.p):u),{}):i,y3(l.target),l.g,l.o,l.k)}let uv,Nd,jd;Ru.bind({g:1});let Ra=Ru.bind({k:1});function S3(n,l,i,r){cl.p=l,uv=n,Nd=i,jd=r}function gl(n,l){let i=this||{};return function(){let r=arguments;function u(c,d){let m=Object.assign({},c),p=m.className||u.className;i.p=Object.assign({theme:Nd&&Nd()},m),i.o=/ *go\d+/.test(p),m.className=Ru.apply(i,r)+(p?" "+p:"");let y=n;return n[0]&&(y=m.as||n,delete m.as),jd&&y[0]&&jd(m),uv(y,m)}return u}}var w3=n=>typeof n=="function",vu=(n,l)=>w3(n)?n(l):n,E3=(()=>{let n=0;return()=>(++n).toString()})(),cv=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");n=!l||l.matches}return n}})(),C3=20,fv=(n,l)=>{switch(l.type){case 0:return{...n,toasts:[l.toast,...n.toasts].slice(0,C3)};case 1:return{...n,toasts:n.toasts.map(c=>c.id===l.toast.id?{...c,...l.toast}:c)};case 2:let{toast:i}=l;return fv(n,{type:n.toasts.find(c=>c.id===i.id)?1:0,toast:i});case 3:let{toastId:r}=l;return{...n,toasts:n.toasts.map(c=>c.id===r||r===void 0?{...c,dismissed:!0,visible:!1}:c)};case 4:return l.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(c=>c.id!==l.toastId)};case 5:return{...n,pausedAt:l.time};case 6:let u=l.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+u}))}}},ou=[],Xl={toasts:[],pausedAt:void 0},ls=n=>{Xl=fv(Xl,n),ou.forEach(l=>{l(Xl)})},_3={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},N3=(n={})=>{let[l,i]=b.useState(Xl),r=b.useRef(Xl);b.useEffect(()=>(r.current!==Xl&&i(Xl),ou.push(i),()=>{let c=ou.indexOf(i);c>-1&&ou.splice(c,1)}),[]);let u=l.toasts.map(c=>{var d,m,p;return{...n,...n[c.type],...c,removeDelay:c.removeDelay||((d=n[c.type])==null?void 0:d.removeDelay)||n?.removeDelay,duration:c.duration||((m=n[c.type])==null?void 0:m.duration)||n?.duration||_3[c.type],style:{...n.style,...(p=n[c.type])==null?void 0:p.style,...c.style}}});return{...l,toasts:u}},j3=(n,l="blank",i)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:n,pauseDuration:0,...i,id:i?.id||E3()}),Rr=n=>(l,i)=>{let r=j3(l,n,i);return ls({type:2,toast:r}),r.id},zt=(n,l)=>Rr("blank")(n,l);zt.error=Rr("error");zt.success=Rr("success");zt.loading=Rr("loading");zt.custom=Rr("custom");zt.dismiss=n=>{ls({type:3,toastId:n})};zt.remove=n=>ls({type:4,toastId:n});zt.promise=(n,l,i)=>{let r=zt.loading(l.loading,{...i,...i?.loading});return typeof n=="function"&&(n=n()),n.then(u=>{let c=l.success?vu(l.success,u):void 0;return c?zt.success(c,{id:r,...i,...i?.success}):zt.dismiss(r),u}).catch(u=>{let c=l.error?vu(l.error,u):void 0;c?zt.error(c,{id:r,...i,...i?.error}):zt.dismiss(r)}),n};var T3=(n,l)=>{ls({type:1,toast:{id:n,height:l}})},A3=()=>{ls({type:5,time:Date.now()})},vr=new Map,R3=1e3,O3=(n,l=R3)=>{if(vr.has(n))return;let i=setTimeout(()=>{vr.delete(n),ls({type:4,toastId:n})},l);vr.set(n,i)},M3=n=>{let{toasts:l,pausedAt:i}=N3(n);b.useEffect(()=>{if(i)return;let c=Date.now(),d=l.map(m=>{if(m.duration===1/0)return;let p=(m.duration||0)+m.pauseDuration-(c-m.createdAt);if(p<0){m.visible&&zt.dismiss(m.id);return}return setTimeout(()=>zt.dismiss(m.id),p)});return()=>{d.forEach(m=>m&&clearTimeout(m))}},[l,i]);let r=b.useCallback(()=>{i&&ls({type:6,time:Date.now()})},[i]),u=b.useCallback((c,d)=>{let{reverseOrder:m=!1,gutter:p=8,defaultPosition:y}=d||{},g=l.filter(j=>(j.position||y)===(c.position||y)&&j.height),x=g.findIndex(j=>j.id===c.id),E=g.filter((j,w)=>w<x&&j.visible).length;return g.filter(j=>j.visible).slice(...m?[E+1]:[0,E]).reduce((j,w)=>j+(w.height||0)+p,0)},[l]);return b.useEffect(()=>{l.forEach(c=>{if(c.dismissed)O3(c.id,c.removeDelay);else{let d=vr.get(c.id);d&&(clearTimeout(d),vr.delete(c.id))}})},[l]),{toasts:l,handlers:{updateHeight:T3,startPause:A3,endPause:r,calculateOffset:u}}},D3=Ra`
15
+ `):" "+Ry(d[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return u}const lg={getAdapter:o3,adapters:Fd};function ed(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new si(null,n)}function Oy(n){return ed(n),n.headers=Xt.from(n.headers),n.data=Wf.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),lg.getAdapter(n.adapter||Ar.adapter,n)(n).then(function(r){return ed(n),r.data=Wf.call(n,n.transformResponse,r),r.headers=Xt.from(r.headers),r},function(r){return W1(r)||(ed(n),r&&r.response&&(r.response.data=Wf.call(n,n.transformResponse,r.response),r.response.headers=Xt.from(r.response.headers))),Promise.reject(r)})}const sg="1.13.2",Au={};["object","boolean","number","function","string","symbol"].forEach((n,l)=>{Au[n]=function(r){return typeof r===n||"a"+(l<1?"n ":" ")+n}});const My={};Au.transitional=function(l,i,r){function u(c,d){return"[Axios v"+sg+"] Transitional option '"+c+"'"+d+(r?". "+r:"")}return(c,d,m)=>{if(l===!1)throw new pe(u(d," has been removed"+(i?" in "+i:"")),pe.ERR_DEPRECATED);return i&&!My[d]&&(My[d]=!0,console.warn(u(d," has been deprecated since v"+i+" and will be removed in the near future"))),l?l(c,d,m):!0}};Au.spelling=function(l){return(i,r)=>(console.warn(`${r} is likely a misspelling of ${l}`),!0)};function u3(n,l,i){if(typeof n!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let u=r.length;for(;u-- >0;){const c=r[u],d=l[c];if(d){const m=n[c],p=m===void 0||d(m,c,n);if(p!==!0)throw new pe("option "+c+" must be "+p,pe.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new pe("Unknown option "+c,pe.ERR_BAD_OPTION)}}const ru={assertOptions:u3,validators:Au},Pn=ru.validators;let Zl=class{constructor(l){this.defaults=l||{},this.interceptors={request:new xy,response:new xy}}async request(l,i){try{return await this._request(l,i)}catch(r){if(r instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const c=u.stack?u.stack.replace(/^.+\n/,""):"";try{r.stack?c&&!String(r.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(r.stack+=`
16
+ `+c):r.stack=c}catch{}}throw r}}_request(l,i){typeof l=="string"?(i=i||{},i.url=l):i=l||{},i=es(this.defaults,i);const{transitional:r,paramsSerializer:u,headers:c}=i;r!==void 0&&ru.assertOptions(r,{silentJSONParsing:Pn.transitional(Pn.boolean),forcedJSONParsing:Pn.transitional(Pn.boolean),clarifyTimeoutError:Pn.transitional(Pn.boolean)},!1),u!=null&&(B.isFunction(u)?i.paramsSerializer={serialize:u}:ru.assertOptions(u,{encode:Pn.function,serialize:Pn.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),ru.assertOptions(i,{baseUrl:Pn.spelling("baseURL"),withXsrfToken:Pn.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let d=c&&B.merge(c.common,c[i.method]);c&&B.forEach(["delete","get","head","post","put","patch","common"],w=>{delete c[w]}),i.headers=Xt.concat(d,c);const m=[];let p=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(i)===!1||(p=p&&C.synchronous,m.unshift(C.fulfilled,C.rejected))});const y=[];this.interceptors.response.forEach(function(C){y.push(C.fulfilled,C.rejected)});let v,x=0,E;if(!p){const w=[Oy.bind(this),void 0];for(w.unshift(...m),w.push(...y),E=w.length,v=Promise.resolve(i);x<E;)v=v.then(w[x++],w[x++]);return v}E=m.length;let j=i;for(;x<E;){const w=m[x++],C=m[x++];try{j=w(j)}catch(N){C.call(this,N);break}}try{v=Oy.call(this,j)}catch(w){return Promise.reject(w)}for(x=0,E=y.length;x<E;)v=v.then(y[x++],y[x++]);return v}getUri(l){l=es(this.defaults,l);const i=tg(l.baseURL,l.url,l.allowAbsoluteUrls);return P1(i,l.params,l.paramsSerializer)}};B.forEach(["delete","get","head","options"],function(l){Zl.prototype[l]=function(i,r){return this.request(es(r||{},{method:l,url:i,data:(r||{}).data}))}});B.forEach(["post","put","patch"],function(l){function i(r){return function(c,d,m){return this.request(es(m||{},{method:l,headers:r?{"Content-Type":"multipart/form-data"}:{},url:c,data:d}))}}Zl.prototype[l]=i(),Zl.prototype[l+"Form"]=i(!0)});let c3=class ig{constructor(l){if(typeof l!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(c){i=c});const r=this;this.promise.then(u=>{if(!r._listeners)return;let c=r._listeners.length;for(;c-- >0;)r._listeners[c](u);r._listeners=null}),this.promise.then=u=>{let c;const d=new Promise(m=>{r.subscribe(m),c=m}).then(u);return d.cancel=function(){r.unsubscribe(c)},d},l(function(c,d,m){r.reason||(r.reason=new si(c,d,m),i(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const i=this._listeners.indexOf(l);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const l=new AbortController,i=r=>{l.abort(r)};return this.subscribe(i),l.signal.unsubscribe=()=>this.unsubscribe(i),l.signal}static source(){let l;return{token:new ig(function(u){l=u}),cancel:l}}};function f3(n){return function(i){return n.apply(null,i)}}function d3(n){return B.isObject(n)&&n.isAxiosError===!0}const Cd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cd).forEach(([n,l])=>{Cd[l]=n});function rg(n){const l=new Zl(n),i=q1(Zl.prototype.request,l);return B.extend(i,Zl.prototype,l,{allOwnKeys:!0}),B.extend(i,l,null,{allOwnKeys:!0}),i.create=function(u){return rg(es(n,u))},i}const et=rg(Ar);et.Axios=Zl;et.CanceledError=si;et.CancelToken=c3;et.isCancel=W1;et.VERSION=sg;et.toFormData=Tu;et.AxiosError=pe;et.Cancel=et.CanceledError;et.all=function(l){return Promise.all(l)};et.spread=f3;et.isAxiosError=d3;et.mergeConfig=es;et.AxiosHeaders=Xt;et.formToJSON=n=>I1(B.isHTMLForm(n)?new FormData(n):n);et.getAdapter=lg.getAdapter;et.HttpStatusCode=Cd;et.default=et;const{Axios:p8,AxiosError:h3,CanceledError:y8,isCancel:g8,CancelToken:v8,VERSION:b8,all:x8,Cancel:S8,isAxiosError:yu,spread:w8,toFormData:E8,AxiosHeaders:C8,HttpStatusCode:_8,formToJSON:N8,getAdapter:j8,mergeConfig:T8}=et,_d="__access_token__",m3=()=>{try{const n=localStorage.getItem(_d);return n||void 0}catch{return}},Io=n=>{n?localStorage.setItem(_d,n):localStorage.removeItem(_d)};let p3={data:""},y3=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||p3,g3=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,v3=/\/\*[^]*?\*\/| +/g,Dy=/\n+/g,cl=(n,l)=>{let i="",r="",u="";for(let c in n){let d=n[c];c[0]=="@"?c[1]=="i"?i=c+" "+d+";":r+=c[1]=="f"?cl(d,c):c+"{"+cl(d,c[1]=="k"?"":l)+"}":typeof d=="object"?r+=cl(d,l?l.replace(/([^,])+/g,m=>c.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,p=>/&/.test(p)?p.replace(/&/g,m):m?m+" "+p:p)):c):d!=null&&(c=/^--/.test(c)?c:c.replace(/[A-Z]/g,"-$&").toLowerCase(),u+=cl.p?cl.p(c,d):c+":"+d+";")}return i+(l&&u?l+"{"+u+"}":u)+r},_a={},og=n=>{if(typeof n=="object"){let l="";for(let i in n)l+=i+og(n[i]);return l}return n},b3=(n,l,i,r,u)=>{let c=og(n),d=_a[c]||(_a[c]=(p=>{let y=0,v=11;for(;y<p.length;)v=101*v+p.charCodeAt(y++)>>>0;return"go"+v})(c));if(!_a[d]){let p=c!==n?n:(y=>{let v,x,E=[{}];for(;v=g3.exec(y.replace(v3,""));)v[4]?E.shift():v[3]?(x=v[3].replace(Dy," ").trim(),E.unshift(E[0][x]=E[0][x]||{})):E[0][v[1]]=v[2].replace(Dy," ").trim();return E[0]})(n);_a[d]=cl(u?{["@keyframes "+d]:p}:p,i?"":"."+d)}let m=i&&_a.g?_a.g:null;return i&&(_a.g=_a[d]),((p,y,v,x)=>{x?y.data=y.data.replace(x,p):y.data.indexOf(p)===-1&&(y.data=v?p+y.data:y.data+p)})(_a[d],l,r,m),d},x3=(n,l,i)=>n.reduce((r,u,c)=>{let d=l[c];if(d&&d.call){let m=d(i),p=m&&m.props&&m.props.className||/^go/.test(m)&&m;d=p?"."+p:m&&typeof m=="object"?m.props?"":cl(m,""):m===!1?"":m}return r+u+(d??"")},"");function Ru(n){let l=this||{},i=n.call?n(l.p):n;return b3(i.unshift?i.raw?x3(i,[].slice.call(arguments,1),l.p):i.reduce((r,u)=>Object.assign(r,u&&u.call?u(l.p):u),{}):i,y3(l.target),l.g,l.o,l.k)}let ug,Nd,jd;Ru.bind({g:1});let Ra=Ru.bind({k:1});function S3(n,l,i,r){cl.p=l,ug=n,Nd=i,jd=r}function vl(n,l){let i=this||{};return function(){let r=arguments;function u(c,d){let m=Object.assign({},c),p=m.className||u.className;i.p=Object.assign({theme:Nd&&Nd()},m),i.o=/ *go\d+/.test(p),m.className=Ru.apply(i,r)+(p?" "+p:"");let y=n;return n[0]&&(y=m.as||n,delete m.as),jd&&y[0]&&jd(m),ug(y,m)}return u}}var w3=n=>typeof n=="function",gu=(n,l)=>w3(n)?n(l):n,E3=(()=>{let n=0;return()=>(++n).toString()})(),cg=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");n=!l||l.matches}return n}})(),C3=20,fg=(n,l)=>{switch(l.type){case 0:return{...n,toasts:[l.toast,...n.toasts].slice(0,C3)};case 1:return{...n,toasts:n.toasts.map(c=>c.id===l.toast.id?{...c,...l.toast}:c)};case 2:let{toast:i}=l;return fg(n,{type:n.toasts.find(c=>c.id===i.id)?1:0,toast:i});case 3:let{toastId:r}=l;return{...n,toasts:n.toasts.map(c=>c.id===r||r===void 0?{...c,dismissed:!0,visible:!1}:c)};case 4:return l.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(c=>c.id!==l.toastId)};case 5:return{...n,pausedAt:l.time};case 6:let u=l.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+u}))}}},ou=[],Xl={toasts:[],pausedAt:void 0},ls=n=>{Xl=fg(Xl,n),ou.forEach(l=>{l(Xl)})},_3={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},N3=(n={})=>{let[l,i]=b.useState(Xl),r=b.useRef(Xl);b.useEffect(()=>(r.current!==Xl&&i(Xl),ou.push(i),()=>{let c=ou.indexOf(i);c>-1&&ou.splice(c,1)}),[]);let u=l.toasts.map(c=>{var d,m,p;return{...n,...n[c.type],...c,removeDelay:c.removeDelay||((d=n[c.type])==null?void 0:d.removeDelay)||n?.removeDelay,duration:c.duration||((m=n[c.type])==null?void 0:m.duration)||n?.duration||_3[c.type],style:{...n.style,...(p=n[c.type])==null?void 0:p.style,...c.style}}});return{...l,toasts:u}},j3=(n,l="blank",i)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:n,pauseDuration:0,...i,id:i?.id||E3()}),Rr=n=>(l,i)=>{let r=j3(l,n,i);return ls({type:2,toast:r}),r.id},zt=(n,l)=>Rr("blank")(n,l);zt.error=Rr("error");zt.success=Rr("success");zt.loading=Rr("loading");zt.custom=Rr("custom");zt.dismiss=n=>{ls({type:3,toastId:n})};zt.remove=n=>ls({type:4,toastId:n});zt.promise=(n,l,i)=>{let r=zt.loading(l.loading,{...i,...i?.loading});return typeof n=="function"&&(n=n()),n.then(u=>{let c=l.success?gu(l.success,u):void 0;return c?zt.success(c,{id:r,...i,...i?.success}):zt.dismiss(r),u}).catch(u=>{let c=l.error?gu(l.error,u):void 0;c?zt.error(c,{id:r,...i,...i?.error}):zt.dismiss(r)}),n};var T3=(n,l)=>{ls({type:1,toast:{id:n,height:l}})},A3=()=>{ls({type:5,time:Date.now()})},gr=new Map,R3=1e3,O3=(n,l=R3)=>{if(gr.has(n))return;let i=setTimeout(()=>{gr.delete(n),ls({type:4,toastId:n})},l);gr.set(n,i)},M3=n=>{let{toasts:l,pausedAt:i}=N3(n);b.useEffect(()=>{if(i)return;let c=Date.now(),d=l.map(m=>{if(m.duration===1/0)return;let p=(m.duration||0)+m.pauseDuration-(c-m.createdAt);if(p<0){m.visible&&zt.dismiss(m.id);return}return setTimeout(()=>zt.dismiss(m.id),p)});return()=>{d.forEach(m=>m&&clearTimeout(m))}},[l,i]);let r=b.useCallback(()=>{i&&ls({type:6,time:Date.now()})},[i]),u=b.useCallback((c,d)=>{let{reverseOrder:m=!1,gutter:p=8,defaultPosition:y}=d||{},v=l.filter(j=>(j.position||y)===(c.position||y)&&j.height),x=v.findIndex(j=>j.id===c.id),E=v.filter((j,w)=>w<x&&j.visible).length;return v.filter(j=>j.visible).slice(...m?[E+1]:[0,E]).reduce((j,w)=>j+(w.height||0)+p,0)},[l]);return b.useEffect(()=>{l.forEach(c=>{if(c.dismissed)O3(c.id,c.removeDelay);else{let d=gr.get(c.id);d&&(clearTimeout(d),gr.delete(c.id))}})},[l]),{toasts:l,handlers:{updateHeight:T3,startPause:A3,endPause:r,calculateOffset:u}}},D3=Ra`
17
17
  from {
18
18
  transform: scale(0) rotate(45deg);
19
19
  opacity: 0;
@@ -29,7 +29,7 @@ from {
29
29
  to {
30
30
  transform: scale(1);
31
31
  opacity: 1;
32
- }`,k3=Ra`
32
+ }`,U3=Ra`
33
33
  from {
34
34
  transform: scale(0) rotate(90deg);
35
35
  opacity: 0;
@@ -37,7 +37,7 @@ from {
37
37
  to {
38
38
  transform: scale(1) rotate(90deg);
39
39
  opacity: 1;
40
- }`,U3=gl("div")`
40
+ }`,k3=vl("div")`
41
41
  width: 20px;
42
42
  opacity: 0;
43
43
  height: 20px;
@@ -66,7 +66,7 @@ to {
66
66
  }
67
67
 
68
68
  &:before {
69
- animation: ${k3} 0.15s ease-out forwards;
69
+ animation: ${U3} 0.15s ease-out forwards;
70
70
  animation-delay: 180ms;
71
71
  transform: rotate(90deg);
72
72
  }
@@ -77,7 +77,7 @@ to {
77
77
  to {
78
78
  transform: rotate(360deg);
79
79
  }
80
- `,q3=gl("div")`
80
+ `,q3=vl("div")`
81
81
  width: 12px;
82
82
  height: 12px;
83
83
  box-sizing: border-box;
@@ -108,7 +108,7 @@ to {
108
108
  100% {
109
109
  opacity: 1;
110
110
  height: 10px;
111
- }`,Q3=gl("div")`
111
+ }`,Q3=vl("div")`
112
112
  width: 20px;
113
113
  opacity: 0;
114
114
  height: 20px;
@@ -135,9 +135,9 @@ to {
135
135
  height: 10px;
136
136
  width: 6px;
137
137
  }
138
- `,$3=gl("div")`
138
+ `,$3=vl("div")`
139
139
  position: absolute;
140
- `,Y3=gl("div")`
140
+ `,Y3=vl("div")`
141
141
  position: relative;
142
142
  display: flex;
143
143
  justify-content: center;
@@ -152,20 +152,20 @@ from {
152
152
  to {
153
153
  transform: scale(1);
154
154
  opacity: 1;
155
- }`,K3=gl("div")`
155
+ }`,K3=vl("div")`
156
156
  position: relative;
157
157
  transform: scale(0.6);
158
158
  opacity: 0.4;
159
159
  min-width: 20px;
160
160
  animation: ${V3} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
161
161
  forwards;
162
- `,G3=({toast:n})=>{let{icon:l,type:i,iconTheme:r}=n;return l!==void 0?typeof l=="string"?b.createElement(K3,null,l):l:i==="blank"?null:b.createElement(Y3,null,b.createElement(q3,{...r}),i!=="loading"&&b.createElement($3,null,i==="error"?b.createElement(U3,{...r}):b.createElement(Q3,{...r})))},F3=n=>`
162
+ `,G3=({toast:n})=>{let{icon:l,type:i,iconTheme:r}=n;return l!==void 0?typeof l=="string"?b.createElement(K3,null,l):l:i==="blank"?null:b.createElement(Y3,null,b.createElement(q3,{...r}),i!=="loading"&&b.createElement($3,null,i==="error"?b.createElement(k3,{...r}):b.createElement(Q3,{...r})))},F3=n=>`
163
163
  0% {transform: translate3d(0,${n*-200}%,0) scale(.6); opacity:.5;}
164
164
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
165
165
  `,X3=n=>`
166
166
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
167
167
  100% {transform: translate3d(0,${n*-150}%,-1px) scale(.6); opacity:0;}
168
- `,Z3="0%{opacity:0;} 100%{opacity:1;}",P3="0%{opacity:1;} 100%{opacity:0;}",J3=gl("div")`
168
+ `,Z3="0%{opacity:0;} 100%{opacity:1;}",P3="0%{opacity:1;} 100%{opacity:0;}",J3=vl("div")`
169
169
  display: flex;
170
170
  align-items: center;
171
171
  background: #fff;
@@ -177,17 +177,17 @@ to {
177
177
  pointer-events: auto;
178
178
  padding: 8px 10px;
179
179
  border-radius: 8px;
180
- `,I3=gl("div")`
180
+ `,I3=vl("div")`
181
181
  display: flex;
182
182
  justify-content: center;
183
183
  margin: 4px 10px;
184
184
  color: inherit;
185
185
  flex: 1 1 auto;
186
186
  white-space: pre-line;
187
- `,W3=(n,l)=>{let i=n.includes("top")?1:-1,[r,u]=cv()?[Z3,P3]:[F3(i),X3(i)];return{animation:l?`${Ra(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Ra(u)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},e4=b.memo(({toast:n,position:l,style:i,children:r})=>{let u=n.height?W3(n.position||l||"top-center",n.visible):{opacity:0},c=b.createElement(G3,{toast:n}),d=b.createElement(I3,{...n.ariaProps},vu(n.message,n));return b.createElement(J3,{className:n.className,style:{...u,...i,...n.style}},typeof r=="function"?r({icon:c,message:d}):b.createElement(b.Fragment,null,c,d))});S3(b.createElement);var t4=({id:n,className:l,style:i,onHeightUpdate:r,children:u})=>{let c=b.useCallback(d=>{if(d){let m=()=>{let p=d.getBoundingClientRect().height;r(n,p)};m(),new MutationObserver(m).observe(d,{subtree:!0,childList:!0,characterData:!0})}},[n,r]);return b.createElement("div",{ref:c,className:l,style:i},u)},n4=(n,l)=>{let i=n.includes("top"),r=i?{top:0}:{bottom:0},u=n.includes("center")?{justifyContent:"center"}:n.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:cv()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(i?1:-1)}px)`,...r,...u}},a4=Ru`
187
+ `,W3=(n,l)=>{let i=n.includes("top")?1:-1,[r,u]=cg()?[Z3,P3]:[F3(i),X3(i)];return{animation:l?`${Ra(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Ra(u)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},e4=b.memo(({toast:n,position:l,style:i,children:r})=>{let u=n.height?W3(n.position||l||"top-center",n.visible):{opacity:0},c=b.createElement(G3,{toast:n}),d=b.createElement(I3,{...n.ariaProps},gu(n.message,n));return b.createElement(J3,{className:n.className,style:{...u,...i,...n.style}},typeof r=="function"?r({icon:c,message:d}):b.createElement(b.Fragment,null,c,d))});S3(b.createElement);var t4=({id:n,className:l,style:i,onHeightUpdate:r,children:u})=>{let c=b.useCallback(d=>{if(d){let m=()=>{let p=d.getBoundingClientRect().height;r(n,p)};m(),new MutationObserver(m).observe(d,{subtree:!0,childList:!0,characterData:!0})}},[n,r]);return b.createElement("div",{ref:c,className:l,style:i},u)},n4=(n,l)=>{let i=n.includes("top"),r=i?{top:0}:{bottom:0},u=n.includes("center")?{justifyContent:"center"}:n.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:cg()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(i?1:-1)}px)`,...r,...u}},a4=Ru`
188
188
  z-index: 9999;
189
189
  > * {
190
190
  pointer-events: auto;
191
191
  }
192
- `,Wo=16,l4=({reverseOrder:n,position:l="top-center",toastOptions:i,gutter:r,children:u,containerStyle:c,containerClassName:d})=>{let{toasts:m,handlers:p}=M3(i);return b.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Wo,left:Wo,right:Wo,bottom:Wo,pointerEvents:"none",...c},className:d,onMouseEnter:p.startPause,onMouseLeave:p.endPause},m.map(y=>{let g=y.position||l,x=p.calculateOffset(y,{reverseOrder:n,gutter:r,defaultPosition:l}),E=n4(g,x);return b.createElement(t4,{id:y.id,key:y.id,onHeightUpdate:p.updateHeight,className:y.visible?a4:"",style:E},y.type==="custom"?vu(y.message,y):u?u(y):b.createElement(e4,{toast:y,position:g}))}))},rn=zt;const rt=new _S({defaultOptions:{queries:{staleTime:1e3*60*5,retry:(n,l)=>yu(l)&&l.response?.status===404?!1:n<3}},mutationCache:new D1({onError:n=>{yu(n)&&n.status&&n.status>=400&&n.status<500&&n.response?.data.error&&rn.error(n.response.data.error)}})}),s4=async()=>{const{data:n}=await Xd.post("/auth/refresh");return n.data.accessToken},i4=async n=>{const{data:l}=await Xd.post("/auth/login",n);return l.data.accessToken},Ly=()=>{rt.invalidateQueries({queryKey:["accessToken"]})},Or=(()=>{let n=Promise.resolve(m3()),l=!1;const i=async()=>{await Xd.post("/auth/logout"),Io(void 0),window.location.reload()};return{get:async()=>n,refresh:()=>(l||(l=!0,n=s4().then(d=>(Io(d),d)).catch(()=>{Io(void 0),i()}).finally(()=>{l=!1,Ly()})),n),login:d=>(l||(l=!0,n=i4(d).then(m=>(Io(m),m)).finally(()=>{l=!1,Ly()})),n),logout:i}})(),dv=location.hostname.includes("app.dataramen.xyz")?"http://localhost:4466/api":"/api",je=et.create({baseURL:dv,withCredentials:!0});je.interceptors.request.use(async n=>{const l=await Or.get();return l&&(n.headers.Authorization=`Bearer ${l}`),n});je.interceptors.response.use(n=>n,n=>(yu(n)&&n.status===401&&n?.response?.data.error!=="Missing auth token"&&Or.refresh(),Promise.reject(n)));const Xd=et.create({baseURL:dv,withCredentials:!0}),bl="data-sources",hv="auth-user",r4=n=>Zt({queryKey:["project","datasources",n],queryFn:async()=>{const{data:l}=await je.get(`/project/team/${n}/datasources`);return l.data},enabled:!!n}),o4=n=>Zt({queryKey:["project","saved-queries",n],queryFn:async()=>{const{data:l}=await je.get(`/project/team/${n}/queries`);return l.data},enabled:!!n}),ii=n=>{const l=["project","datasources"],i=["project","saved-queries"];return Promise.all([rt.invalidateQueries({queryKey:l}),rt.invalidateQueries({queryKey:i})])},u4=n=>{const l=["trash","team"];return rt.invalidateQueries({queryKey:l})},c4=(n,l)=>Zt({queryKey:["project",l.teamId,"tables",n,l.selectedDataSources],queryFn:async()=>{const{data:i}=await je.get(`/project/team/${l.teamId}/query`,{params:{size:30,search:n,selectedDataSources:l.selectedDataSources}});return i.data},enabled:!!l.teamId,staleTime:0}),f4=(n,l=30)=>zS({queryKey:["project","tabs-history",n,l],queryFn:async({pageParam:i})=>{const{data:r}=await je.get(`/project/team/${n}/tabs-history?page=${i}&size=${l}`);return r},select:({pages:i})=>i.flatMap(r=>r.data),enabled:!!n,initialPageParam:0,getNextPageParam:(i,r)=>{if(i.hasMore)return r.length},staleTime:0}),d4=()=>rt.invalidateQueries({queryKey:["project","tabs-history"]}),h4=(n,l)=>{},m4=()=>{},p4={event:h4,pageView:m4},Ou=n=>Zt({queryKey:[bl,n],queryFn:async()=>{const{data:l}=await je.get("/data-sources/"+n);return l.data},enabled:!!n}),Zd=n=>Zt({queryKey:[bl,n.teamId],queryFn:async()=>{const{data:l}=await je.get("/data-sources",{params:n});return l.data},enabled:n.teamId!==void 0}),Mr=n=>Zt({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:l}=await je.get(`/data-sources/${n}/inspections`);return l.data},enabled:!!n}),y4=()=>vt({mutationFn:async n=>{const{data:l}=await je.post("/data-sources",n);return l.data},onSuccess:()=>{rt.invalidateQueries({queryKey:[bl]}),ii()},onError:()=>{}}),v4=()=>vt({mutationFn:async({dataSource:n,id:l})=>{const{data:i}=await je.put(`/data-sources/${l}`,n);return i.data},onSuccess:()=>{rt.invalidateQueries({queryKey:[bl]}),ii()}}),mv=()=>vt({mutationFn:async n=>{await je.post(`/data-sources/${n}/inspect`)},onSuccess:()=>{rt.invalidateQueries({queryKey:[bl]})}}),g4=()=>vt({mutationFn:async n=>{await je.delete(`/data-sources/${n}`)},onSuccess:()=>{rt.invalidateQueries({queryKey:[bl]}),ii()}}),pv=()=>Zt({queryKey:["accessToken"],queryFn:Or.get}),qn=()=>{const{data:n}=pv();return Zt({queryKey:[hv],queryFn:async()=>{const{data:l}=await je.get("/users");return l.data},enabled:!!n,retry:(l,i)=>yu(i)&&i.code==="ERR_NETWORK"?!1:l<3})},b4=()=>vt({mutationFn:async n=>{const{data:l}=await je.patch("/users",n);return l.data},onSuccess:async n=>{rt.setQueryData([hv],n)}}),x4=()=>vt({mutationFn:async n=>(await je.post("/users",n),!0),onSuccess:()=>{rt.invalidateQueries({queryKey:["team-users"]})}}),S4="_alert_6qf5b_2",w4="_info_6qf5b_2",E4="_danger_6qf5b_2",C4="_success_6qf5b_2",_4="_warning_6qf5b_2",N4="_dark_6qf5b_2",$s={alert:S4,info:w4,danger:E4,success:C4,warning:_4,dark:N4};function yv(n){var l,i,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(i=yv(n[l]))&&(r&&(r+=" "),r+=i)}else for(i in n)n[i]&&(r&&(r+=" "),r+=i);return r}function se(){for(var n,l,i=0,r="",u=arguments.length;i<u;i++)(n=arguments[i])&&(l=yv(n))&&(r&&(r+=" "),r+=l);return r}const Ot=({variant:n,noRounded:l,className:i,children:r,...u})=>h.jsx("div",{className:se($s.alert,!l&&"rounded-lg",(n==="info"||!n)&&$s.info,n==="danger"&&$s.danger,n==="dark"&&$s.dark,n==="warning"&&$s.warning,n==="success"&&$s.success,i),role:"alert",...u,children:r}),un=n=>{const l=new Set;let i=n;const r=m=>(l.add(m),()=>l.delete(m)),u=m=>(l.forEach(p=>p(m)),!0),c=m=>{i=typeof m=="function"?m(i):m,u(i)},d=m=>()=>m?m(i):i;return[m=>b.useSyncExternalStore(r,d(m),d(m)),c,{get:()=>i,subscribe:m=>(m(i),r(m))}]};function j4(n){const l=[];for(const i of n)for(const r of i.columns)r.ref&&(l.push({id:`${i.tableName}->${r.ref.table}.${r.ref.field}`,name:`${i.tableName} in ${r.ref.table}`,where:`${i.tableName}.${r.name} = ${r.ref.table}.${r.ref.field}`,on:{fromTable:r.ref.table,toTable:i.tableName,fromColumn:r.ref.field,toColumn:r.name}}),l.push({id:`${r.ref.table}->${i.tableName}.${r.name}`,name:`${r.ref.table} in ${i.tableName}`,where:`${r.ref.table}.${r.ref.field} = ${i.tableName}.${r.name}`,on:{fromTable:i.tableName,toTable:r.ref.table,fromColumn:r.name,toColumn:r.ref.field}}));return l}const T4=n=>Zt({queryKey:["hooks",n],queryFn:async()=>{const l=await rt.fetchQuery({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:i}=await je.get(`/data-sources/${n}/inspections`);return i.data}});return j4(l)},enabled:!!n}),vv=[{value:"=",label:"equals"},{value:"<>",label:"not equal"},{value:">",label:"greater than"},{value:">=",label:"greater than or equal"},{value:"<",label:"less than"},{value:"<=",label:"less than or equal"},{value:"LIKE",label:"contains"},{value:"NOT LIKE",label:"not contains"},{value:"IN",label:"in list"},{value:"NOT IN",label:"not in list"},{value:"IS NULL",label:"is null"},{value:"IS NOT NULL",label:"is not null"}],A4=vv.reduce((n,l)=>(n[l.value]=l.label,n),{});vv.reduce((n,l)=>(n[l.label]=l.value,n),{});const ri=n=>n.map(l=>({label:A4[l],value:l}));ri(["=","<>",">",">=","<","<=","IN","NOT IN","IS NULL","IS NOT NULL"]);ri(["=","<>","LIKE","NOT LIKE","IN","NOT IN","IS NULL","IS NOT NULL"]);ri(["=","<>","IS NULL","IS NOT NULL"]);ri(["=","<>",">",">=","<","<=","IS NULL","IS NOT NULL"]);ri(["IS NULL","IS NOT NULL"]);ri(["IN","NOT IN"]);const R4=["char","varchar","binary","varbinary","blob","text","enum","set","character","character varying","text","citext","uuid","xml","json","jsonb"],O4=new Set(R4),M4=n=>O4.has(n),D4=["integer","smallint","decimal","numeric","float","real","double precision","int","smallint","integer","bigint","decimal","numeric","real","double precision","serial","bigserial","money"],L4=new Set(D4),k4=n=>L4.has(n),U4=["date","datetime","timestamp","timestamptz"].reduce((n,l)=>(n[l]=!0,n),{}),gv=n=>n.fn?n.distinct===!0?`${n.fn} distinct ${n.value}`:`${n.fn} ${n.value}`:n.value;var Gt=(n=>(n.OWNER="owner",n.ADMIN="admin",n.EDITOR="editor",n.READ_ONLY="read_only",n))(Gt||{});const ky={[Gt.READ_ONLY]:10,[Gt.EDITOR]:20,[Gt.ADMIN]:30,[Gt.OWNER]:40},Da=n=>n.startsWith("'")&&n.endsWith("'")||n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):n,z4={operator:"LIKE",parse:n=>{const l=n.match(/^LIKE\s*["'](.*)["']$/i);if(l)return[{value:Da(l[1])}]},stringify:(n,l)=>M4(l)?`${n.value?.[0].value}`:`LIKE "%${n.value?.[0].value}%"`},q4={operator:"NOT LIKE",parse:n=>{const l=n.match(/^NOT LIKE\s*["'](.*)["']$/i);if(l)return[{value:Da(l[1])}]},stringify:n=>`NOT LIKE "%${n.value?.[0].value}%"`};function bv(n){return n===""?[]:B4(n).map(H4)}function B4(n){const l=[];let i=0,r="",u=!1,c=!1;for(;i<n.length;){const d=n[i];if((u||c)&&d==="\\"){r+=n[i+1],i+=2;continue}if(d==="'"&&!c){u=!u,r+=d,i++;continue}if(d==='"'&&!u){c=!c,r+=d,i++;continue}if(d===","&&!u&&!c){l.push(r.trim()),r="",i++;continue}r+=d,i++}if(r.trim()!==""&&l.push(r.trim()),u||c)throw new Error("Unterminated string literal");return l}function H4(n){if(n.startsWith("'")&&n.endsWith("'"))return{value:Uy(n.slice(1,-1),"'")};if(n.startsWith('"')&&n.endsWith('"'))return{value:Uy(n.slice(1,-1),'"')};const l=Number(n);if(!Number.isNaN(l))return{value:l};throw new Error(`Invalid literal: ${n}`)}function Uy(n,l){return n.replace(/\\(.)/g,(i,r)=>r)}const Q4={operator:"IN",parse:n=>{const l=n.match(/^in\s*\((.*)\)$/i);if(l)return bv(l[1])},stringify:n=>`IN (${n.value?.map(l=>`"${l.value}"`).join(", ")})`},$4={operator:"NOT IN",parse:n=>{const l=n.match(/^not\s+in\s*\((.*)\)$/i);if(l)return bv(l[1])},stringify:n=>`NOT IN (${n.value?.map(l=>`"${l.value}"`).join(", ")})`},Y4={operator:"=",parse:n=>{const l=n.match(/^=\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:(n,l)=>k4(l)?`${n.value?.[0].value}`:`= ${n.value?.[0].value}`},V4={operator:"!=",parse:n=>{const l=n.match(/^!=\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`!= ${n.value?.[0].value}`},K4={operator:"<>",parse:n=>{const l=n.match(/^<>\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`<> ${n.value?.[0].value}`},G4={operator:">",parse:n=>{const l=n.match(/^>\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`> ${n.value?.[0].value}`},F4={operator:">=",parse:n=>{const l=n.match(/^>=\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`>= ${n.value?.[0].value}`},X4={operator:"<",parse:n=>{const l=n.match(/^<\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`< ${n.value?.[0].value}`},Z4={operator:"<=",parse:n=>{const l=n.match(/^<=\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`<= ${n.value?.[0].value}`},P4={operator:"IS NULL",parse:n=>{if(/^is\s+null$/i.test(n))return[]},stringify:()=>"IS NULL"},J4={operator:"IS NOT NULL",parse:n=>{if(/^is\s+not\s+null$/i.test(n))return[]},stringify:()=>"IS NOT NULL"},I4=[z4,q4,Q4,$4,Y4,V4,K4,F4,G4,Z4,X4,P4,J4];I4.reduce((n,l)=>(n[l.operator]=l,n),{});function W4(n,l){if(!n||!l)return{};const i=new Set;for(const u of l)u.table&&i.add(u.table);const r={};for(const u of i){const c=n.find(d=>d.tableName===u);if(c){r[u]=[];const d=c.columns.filter(m=>m.isPrimary);for(const m of d)if(l.find(y=>y.table===u&&y.column===m.name))r[u].push(m.name);else{delete r[u];break}}}return r}function eE(n,l,i,r){const{data:u}=T4(l),{data:c}=Mr(l);return b.useMemo(()=>{const d=W4(c,n?.result.columns);return{name:i,tabId:r,hooks:(()=>{const m=[];if(!u||!n||!n.result.columns)return m;for(const p of u)(n.result.tables.includes(p.on.toTable)||n.result.tables.includes(p.on.fromTable))&&m.push(p);return m})(),availableJoins:(()=>{const m=[];if(!u||!n||!n.result.columns)return m;for(const p of u)!n.result.tables.includes(p.on.toTable)&&n.result.tables.includes(p.on.fromTable)&&m.push(p);return m})(),allColumns:n?.result.allColumns||[],dataSourceId:l,entities:Object.keys(d),getValue:(m,p)=>{const y=gv(p),g=n?.result.columns?.findIndex(x=>x.full===y);if(g!=null&&g>-1)return m[g]},getEntityKey:(m,p)=>d[m].reduce((y,g)=>{const x=n?.result.columns?.findIndex(E=>E.column===g&&E.table===m);return x!=null&&x>-1&&y.push([g,p[x]]),y},[]),getColumnType:m=>{const p=n?.result.allColumns.find(y=>y.full===m);if(p)return p.type}}},[n,l,u,c,i])}function tE(n,l){return b.useMemo(()=>({state:n,setState:l}),[n,l])}function oi(n){return{dataSourceId:n.dataSourceId||"",page:n?.page||0,size:n?.size||50,table:n.table||"",filters:n?.filters||[],joins:n?.joins??[],orderBy:n?.orderBy??[],columns:n?.columns??[],groupBy:n?.groupBy??[],aggregations:n?.aggregations??[]}}const $e={home:{path:"/"},workbench:{path:"/workbench"},share:{path:"/share"},login:{path:"/login"}},Pd=n=>{rt.setQueryData(["workbench-tabs"],l=>n(l||[]))},nE=(n,l)=>{rt.setQueryData(["workbench-tabs",n],i=>i&&l(i))},Jd=()=>Zt({queryKey:["workbench-tabs"],queryFn:async()=>{const{data:n}=await je.get("/workbench-tabs");return n.data}}),aE=n=>Zt({queryKey:["workbench-tabs",n],queryFn:async()=>{const{data:l}=await je.get(`/workbench-tabs/${n}`);return l.data}}),ui=()=>vt({mutationFn:async n=>{const{data:l}=await je.post("/workbench-tabs",n);return l.data},onSuccess:async n=>{Pd(l=>[...l,n])}}),lE=()=>vt({mutationFn:async n=>(await je.patch(`/workbench-tabs/${n}`,{archived:!0}),n),onMutate:n=>{Pd(l=>l.filter(i=>i.id!==n))}}),xv=()=>vt({mutationFn:async n=>(await je.patch(`/workbench-tabs/${n}`,{archived:!1}),n),onSuccess:()=>wv()}),sE=()=>vt({mutationFn:async({id:n,payload:l})=>(await je.patch(`/workbench-tabs/${n}`,l),!0),onMutate:({id:n,payload:l})=>{nE(n,i=>({...i,...l})),Pd(i=>i.map(r=>r.id!==n?r:{...r,name:l.name||r.name}))}}),iE=(n,l)=>{const{dataSourceId:i,searchAll:r,table:u,filters:c,joins:d,orderBy:m,groupBy:p,columns:y,aggregations:g,page:x=0,size:E=20}=l;return Zt({queryKey:["workbench-tab-runner",n,i,u,x,E,c,g,d,m,p,y,r],queryFn:async()=>{const{data:j}=await je.post(`/workbench-tabs/${n}/run`,l);return j.data},retry:1,enabled:!!u&&!!i})},rE=()=>vt({mutationFn:async n=>{await je.delete(`/workbench-tabs/${n}`)},onSuccess:()=>{wv(),d4()}}),Sv=n=>rt.invalidateQueries({queryKey:["workbench-tab-runner",n]}),wv=()=>rt.invalidateQueries({queryKey:["workbench-tabs"]}),[oE,td,uE]=un(void 0),cE=async()=>new Promise(n=>{td({onCancel:()=>{td(void 0),n(void 0)},onConfirm:(l,i,r)=>{td(void 0),n({dsId:r,id:i,type:l})}})}),Dr=n=>{const l=wt(),i=ui(),r=xv();return b.useEffect(()=>{i?.data?.id&&l(`${$e.workbench.path}/tab/${i.data.id}`),r?.data&&l(`${$e.workbench.path}/tab/${r?.data}`)},[i.data,r.data]),b.useCallback(()=>{uE.get()||cE().then(c=>{c?.type==="table"?i.mutate({name:c.id,opts:oi({table:c.id,dataSourceId:c.dsId})}):c?.type==="query"?i.mutate({queryId:c.id}):c?.type==="tab"&&r.mutate(c.id)})},[l,n])},Lr=n=>{const{data:l}=qn();return b.useMemo(()=>l?ky[l.teamRole]>=ky[n]:!1,[l,n])},fE="_input_c3f2t_2",dE="_small_c3f2t_2",hE="_content_c3f2t_2",mE="_form_c3f2t_2",pE="_mode-select_c3f2t_2",Ue={input:fE,small:dE,content:hE,form:mE,switch:"_switch_c3f2t_2",modeSelect:pE},yE="_modal_v4r0k_2",vE="_modal-visible_v4r0k_2",gE="_modal-invisible_v4r0k_2",bE="_backdrop_v4r0k_2",xE="_modal-container_v4r0k_2",SE="_close-button_v4r0k_2",Fs={modal:yE,modalVisible:vE,modalInvisible:gE,backdrop:bE,modalContainer:xE,closeButton:SE},ts=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M368 368L144 144M368 144L144 368"})),cn=({children:n,backdropClose:l,isVisible:i,onClose:r,onClosed:u,noPadding:c=!1,portal:d=!1})=>{const[m,p]=b.useState(!1),y=()=>{l&&r()},g=E=>{i||getComputedStyle(E.currentTarget).opacity==="0"&&(p(!1),u&&u())};b.useEffect(()=>{i&&p(!0)},[i]);const x=h.jsxs("div",{onTransitionEnd:g,className:se(Fs.modal,i?Fs.modalVisible:Fs.modalInvisible),children:[h.jsx("div",{onClick:y,className:Fs.backdrop}),h.jsx("div",{className:se(Fs.modalContainer,c!==!0&&"p-4"),children:m&&n})]});return d?nS.createPortal(x,document.body):x},aa=({onClick:n})=>{const l=b.useRef(n);return l.current=n,b.useEffect(()=>{const i=r=>{r.key==="Escape"&&l.current?.()};return window.addEventListener("keyup",i),()=>{window.removeEventListener("keyup",i)}},[]),h.jsx("button",{className:Fs.closeButton,onClick:n,children:h.jsx(ts,{width:20,height:20})})},Ev=({children:n})=>h.jsx("h2",{className:"text-xl font-semibold",children:n}),kr=n=>{const[l,i]=b.useState(n),[r,u]=b.useState([]),c=b.useRef(n),d=b.useCallback((y,g)=>{i(x=>({...x,[y]:g}))},[]),m=b.useCallback(y=>g=>{g.target.type==="checkbox"?d(y,g.target.checked):d(y,g.target.value),u(x=>x.includes(y)?x:[...x,y])},[d]),p=b.useCallback(()=>{i(c.current),u([])},[]);return[l,{set:d,change:m,reset:p,touched:r}]},wE=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"Database port"}),h.jsx("input",{value:n.dbPort,onChange:l("dbPort"),type:"number",className:"input"})]}),h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]})]}),EE=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"Database port"}),h.jsx("input",{value:n.dbPort,onChange:l("dbPort"),type:"number",className:"input"})]}),h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]}),h.jsxs("div",{className:se(Ue.input,Ue.small),children:[h.jsx("label",{children:"Schema"}),h.jsx("input",{value:n.dbSchema,onChange:l("dbSchema"),className:"input"})]})]}),Ys=[{label:"PostgreSQL",tag:"postgres"},{label:"MySQL",tag:"mysql"}],CE=({show:n,onClose:l,dbType:i="postgres"})=>{const r=y4(),u=mv(),{data:c}=qn(),[d,{change:m,set:p}]=kr({name:"",dbType:i,dbUrl:"",dbUser:"",dbPassword:"",dbDatabase:"",dbSchema:"",dbPort:5432,teamId:"",ownerId:"",description:"",allowInsert:!1,allowUpdate:!1}),y=async()=>{const w=await r.mutateAsync({...d,dbPort:Number(d.dbPort),teamId:c.teamId,ownerId:c.id});await u.mutateAsync(w.id),l(),p4.event("Create Datasource",{dbType:d.dbType})},g=w=>{p("allowInsert",!w),p("allowUpdate",!w)},x=()=>{l()},E=r.isPending||u.isPending,j=!d.allowInsert&&!d.allowUpdate;return h.jsxs(cn,{isVisible:n,onClose:x,children:[h.jsx(aa,{onClick:x}),h.jsxs(Ot,{variant:"warning",className:"text-sm mb-2 max-w-xl",children:["DataRamen is currently under active development. In production-like environments, ",h.jsx("span",{className:"font-semibold underline",children:"it’s recommended to use read-only database credentials"}),"."]}),r.isError&&h.jsx(Ot,{variant:"danger",className:"mb-2",children:h.jsx("span",{children:"Failed to connect to the database. Please check if the data are correct and retry."})}),r.isPending&&h.jsx(Ot,{className:"mb-2",variant:"info",children:"Creating connection"}),u.isPending&&h.jsx(Ot,{className:"mb-2",variant:"info",children:"Inspecting connection"}),h.jsxs("div",{className:Ue.switch,children:[h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===Ys[0].tag,onChange:()=>p("dbType",Ys[0].tag)}),h.jsx("span",{children:Ys[0].label})]}),h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===Ys[1].tag,onChange:()=>p("dbType",Ys[1].tag)}),h.jsx("span",{children:Ys[1].label})]})]}),h.jsxs("div",{className:"overflow-y-auto mt-2",children:[h.jsx("div",{className:Ue.content,children:h.jsxs("div",{className:Ue.form,children:[h.jsxs("div",{className:se(Ue.input,"col-span-2"),children:[h.jsx("label",{children:"Name"}),h.jsx("input",{value:d.name,onChange:m("name"),className:"input"})]}),h.jsxs("div",{className:se(Ue.input,"col-span-2"),children:[h.jsx("label",{children:"Description"}),h.jsx("textarea",{value:d.description,onChange:m("description"),className:"input"})]}),d.dbType==="mysql"&&h.jsx(wE,{form:d,change:m}),d.dbType==="postgres"&&h.jsx(EE,{form:d,change:m})]})}),h.jsxs("div",{className:"mt-4",children:[h.jsxs("label",{className:Ue.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:j,onChange:()=>g(!0)}),h.jsx("span",{className:"text-sm font-semibold",children:"Production mode"})]}),h.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",h.jsx("strong",{children:"forbidden"}),". You won't be able to insert new rows or edit existing data. Tables in this data source are read-only."]})]}),h.jsxs("label",{className:Ue.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:!j,onChange:()=>g(!1)}),h.jsx("span",{className:"text-sm font-semibold",children:"Dev mode"})]}),h.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",h.jsx("strong",{children:"allowed"}),". You will be able to insert new rows and edit existing data."]})]})]})]}),h.jsxs("div",{className:"flex justify-end gap-1 mt-2",children:[h.jsx("button",{onClick:x,className:"button tertiary",disabled:E,children:"Cancel"}),h.jsx("button",{onClick:y,className:"button primary",disabled:E,children:"Create"})]})]})},_E="_data-source-entry_ramkg_2",NE="_action-title_ramkg_2",jE="_action-subtext_ramkg_2",TE="_dev-tag_ramkg_2",AE="_prod-tag_ramkg_2",Kt={dataSourceEntry:_E,actionTitle:NE,actionSubtext:jE,devTag:TE,prodTag:AE},RE=n=>b.createElement("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n},b.createElement("path",{d:"m24.129 23.412-.508-.484c-.251-.331-.518-.624-.809-.891l-.005-.004q-.448-.407-.931-.774-.387-.266-1.064-.641c-.371-.167-.661-.46-.818-.824l-.004-.01-.048-.024c.212-.021.406-.06.592-.115l-.023.006.57-.157c.236-.074.509-.122.792-.133h.006c.298-.012.579-.06.847-.139l-.025.006q.194-.048.399-.109t.351-.109v-.169q-.145-.217-.351-.496c-.131-.178-.278-.333-.443-.468l-.005-.004q-.629-.556-1.303-1.076c-.396-.309-.845-.624-1.311-.916l-.068-.04c-.246-.162-.528-.312-.825-.435l-.034-.012q-.448-.182-.883-.399c-.097-.048-.21-.09-.327-.119l-.011-.002c-.117-.024-.217-.084-.29-.169l-.001-.001c-.138-.182-.259-.389-.355-.609l-.008-.02q-.145-.339-.314-.651-.363-.702-.702-1.427t-.651-1.452q-.217-.484-.399-.967c-.134-.354-.285-.657-.461-.942l.013.023c-.432-.736-.863-1.364-1.331-1.961l.028.038c-.463-.584-.943-1.106-1.459-1.59l-.008-.007c-.509-.478-1.057-.934-1.632-1.356l-.049-.035q-.896-.651-1.96-1.282c-.285-.168-.616-.305-.965-.393l-.026-.006-1.113-.278-.629-.048q-.314-.024-.629-.024c-.148-.078-.275-.171-.387-.279-.11-.105-.229-.204-.353-.295l-.01-.007c-.605-.353-1.308-.676-2.043-.93l-.085-.026c-.193-.113-.425-.179-.672-.179-.176 0-.345.034-.499.095l.009-.003c-.38.151-.67.458-.795.84l-.003.01c-.073.172-.115.371-.115.581 0 .368.13.705.347.968l-.002-.003q.544.725.834 1.14.217.291.448.605c.141.188.266.403.367.63l.008.021c.056.119.105.261.141.407l.003.016q.048.206.121.448.217.556.411 1.14c.141.425.297.785.478 1.128l-.019-.04q.145.266.291.52t.314.496c.065.098.147.179.241.242l.003.002c.099.072.164.185.169.313v.001c-.114.168-.191.369-.217.586l-.001.006c-.035.253-.085.478-.153.695l.008-.03c-.223.666-.351 1.434-.351 2.231 0 .258.013.512.04.763l-.003-.031c.06.958.349 1.838.812 2.6l-.014-.025c.197.295.408.552.641.787.168.188.412.306.684.306.152 0 .296-.037.422-.103l-.005.002c.35-.126.599-.446.617-.827v-.002c.048-.474.12-.898.219-1.312l-.013.067c.024-.063.038-.135.038-.211 0-.015-.001-.03-.002-.045v.002q-.012-.109.133-.206v.048q.145.339.302.677t.326.677c.295.449.608.841.952 1.202l-.003-.003c.345.372.721.706 1.127 1.001l.022.015c.212.162.398.337.566.528l.004.004c.158.186.347.339.56.454l.01.005v-.024h.048c-.039-.087-.102-.157-.18-.205l-.002-.001c-.079-.044-.147-.088-.211-.136l.005.003q-.217-.217-.448-.484t-.423-.508q-.508-.702-.969-1.467t-.871-1.555q-.194-.387-.375-.798t-.351-.798c-.049-.099-.083-.213-.096-.334v-.005c-.006-.115-.072-.214-.168-.265l-.002-.001c-.121.206-.255.384-.408.545l.001-.001c-.159.167-.289.364-.382.58l-.005.013c-.141.342-.244.739-.289 1.154l-.002.019q-.072.641-.145 1.318l-.048.024-.024.024c-.26-.053-.474-.219-.59-.443l-.002-.005q-.182-.351-.326-.69c-.248-.637-.402-1.374-.423-2.144v-.009c-.009-.122-.013-.265-.013-.408 0-.666.105-1.308.299-1.91l-.012.044q.072-.266.314-.896t.097-.871c-.05-.165-.143-.304-.265-.41l-.001-.001c-.122-.106-.233-.217-.335-.335l-.003-.004q-.169-.244-.326-.52t-.278-.544c-.165-.382-.334-.861-.474-1.353l-.022-.089c-.159-.565-.336-1.043-.546-1.503l.026.064c-.111-.252-.24-.47-.39-.669l.006.008q-.244-.326-.436-.617-.244-.314-.484-.605c-.163-.197-.308-.419-.426-.657l-.009-.02c-.048-.097-.09-.21-.119-.327l-.002-.011c-.011-.035-.017-.076-.017-.117 0-.082.024-.159.066-.223l-.001.002c.011-.056.037-.105.073-.145.039-.035.089-.061.143-.072h.002c.085-.055.188-.088.3-.088.084 0 .165.019.236.053l-.003-.001c.219.062.396.124.569.195l-.036-.013q.459.194.847.375c.298.142.552.292.792.459l-.018-.012q.194.121.387.266t.411.291h.339q.387 0 .822.037c.293.023.564.078.822.164l-.024-.007c.481.143.894.312 1.286.515l-.041-.019q.593.302 1.125.641c.589.367 1.098.743 1.577 1.154l-.017-.014c.5.428.954.867 1.38 1.331l.01.012c.416.454.813.947 1.176 1.464l.031.047c.334.472.671 1.018.974 1.584l.042.085c.081.154.163.343.234.536l.011.033q.097.278.217.57.266.605.57 1.221t.57 1.198l.532 1.161c.187.406.396.756.639 1.079l-.011-.015c.203.217.474.369.778.422l.008.001c.368.092.678.196.978.319l-.047-.017c.143.065.327.134.516.195l.04.011c.212.065.396.151.565.259l-.009-.005c.327.183.604.363.868.559l-.021-.015q.411.302.822.57.194.145.651.423t.484.52c-.114-.004-.249-.007-.384-.007-.492 0-.976.032-1.45.094l.056-.006c-.536.072-1.022.203-1.479.39l.04-.014c-.113.049-.248.094-.388.129l-.019.004c-.142.021-.252.135-.266.277v.001c.061.076.11.164.143.26l.002.006c.034.102.075.19.125.272l-.003-.006c.119.211.247.393.391.561l-.004-.005c.141.174.3.325.476.454l.007.005q.244.194.508.399c.161.126.343.25.532.362l.024.013c.284.174.614.34.958.479l.046.016c.374.15.695.324.993.531l-.016-.011q.291.169.58.375t.556.399c.073.072.137.152.191.239l.003.005c.091.104.217.175.36.193h.003v-.048c-.088-.067-.153-.16-.184-.267l-.001-.004c-.025-.102-.062-.191-.112-.273l.002.004zm-18.576-19.205q-.194 0-.363.012c-.115.008-.222.029-.323.063l.009-.003v.024h.048q.097.145.244.326t.266.351l.387.798.048-.024c.113-.082.2-.192.252-.321l.002-.005c.052-.139.082-.301.082-.469 0-.018 0-.036-.001-.054v.003c-.045-.044-.082-.096-.108-.154l-.001-.003-.081-.182c-.053-.084-.127-.15-.214-.192l-.003-.001c-.094-.045-.174-.102-.244-.169z"})),OE=n=>b.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...n},b.createElement("title",null,"file_type_pgsql"),b.createElement("path",{d:"M29.507,18.773a1.378,1.378,0,0,0-1.144-.921,2.619,2.619,0,0,0-.913.051,8.2,8.2,0,0,1-1.406.185,27.125,27.125,0,0,0,2.872-6.83c.953-3.689.444-5.369-.151-6.13A8.239,8.239,0,0,0,22.121,2a11.773,11.773,0,0,0-3.453.484A12.858,12.858,0,0,0,16.648,2.3a6.565,6.565,0,0,0-3.518.867,16.039,16.039,0,0,0-2.484-.624,7.694,7.694,0,0,0-5.819.924C3.093,4.691,2.289,6.819,2.438,9.792A36.351,36.351,0,0,0,3.844,16.33a22.579,22.579,0,0,0,1.514,3.863A4.786,4.786,0,0,0,7.8,22.742a2.4,2.4,0,0,0,2.379-.516,2.08,2.08,0,0,0,.5.43,3.328,3.328,0,0,0,.944.4,5.069,5.069,0,0,0,3.3-.2c.006.171.011.335.014.477.006.229.013.454.021.665a11.641,11.641,0,0,0,.441,3.3c.016.043.037.107.059.176a3.975,3.975,0,0,0,.991,1.745,2.955,2.955,0,0,0,2.09.777,4.7,4.7,0,0,0,.977-.109A4.592,4.592,0,0,0,22.607,28.1c.811-1.155,1.206-2.894,1.277-5.635.009-.078.018-.152.026-.222l.017-.145.191.017.049,0a7.562,7.562,0,0,0,3.163-.548c.631-.293,2.654-1.361,2.177-2.8"}),b.createElement("path",{d:"M27.689,19.053c-3.163.652-3.38-.418-3.38-.418C27.648,13.68,29.044,7.39,27.839,5.851c-3.286-4.2-8.975-2.213-9.07-2.162l-.031.006a11.28,11.28,0,0,0-2.11-.22,5.212,5.212,0,0,0-3.34,1S3.14.294,3.612,9.733c.1,2.008,2.878,15.194,6.191,11.211,1.211-1.456,2.381-2.688,2.381-2.688a3.071,3.071,0,0,0,2.006.512l.057-.048a2.21,2.21,0,0,0,.023.567c-.854.954-.6,1.121-2.309,1.472-1.726.356-.712.989-.05,1.155a3.508,3.508,0,0,0,3.915-1.272l-.05.2c.334.268.569,1.742.53,3.079a8.481,8.481,0,0,0,.2,2.971c.264.717.526,2.329,2.769,1.849a3.307,3.307,0,0,0,2.98-3.179c.1-1.234.313-1.052.326-2.155l.174-.522c.2-1.673.032-2.213,1.186-1.962l.281.025a6.4,6.4,0,0,0,2.615-.44c1.406-.652,2.239-1.742.853-1.455h0",style:{fill:"#336791"}}),b.createElement("path",{d:"M13.882,10.631a.981.981,0,0,0-.674.1.247.247,0,0,0-.1.164.48.48,0,0,0,.117.314.881.881,0,0,0,.559.349.637.637,0,0,0,.09.006.725.725,0,0,0,.687-.467c.035-.248-.326-.414-.676-.463m9.442.008c-.027-.195-.374-.25-.7-.2s-.647.194-.62.389a.667.667,0,0,0,.62.411.592.592,0,0,0,.083-.006.8.8,0,0,0,.451-.247.5.5,0,0,0,.169-.343",style:{fill:"#fff"}}),b.createElement("path",{d:"M28.741,18.979c-.121-.365-.509-.482-1.154-.349-1.915.4-2.6.121-2.826-.044a26.327,26.327,0,0,0,3.373-7.565,14.374,14.374,0,0,0,.5-3.253,3.513,3.513,0,0,0-.509-2.2,7.482,7.482,0,0,0-6.049-2.825,10.363,10.363,0,0,0-3.5.551,8.717,8.717,0,0,0-1.968-.253,5.684,5.684,0,0,0-3.372.929,15.051,15.051,0,0,0-2.74-.718,6.978,6.978,0,0,0-5.242.805c-1.5,1.064-2.2,2.966-2.061,5.653a35.489,35.489,0,0,0,1.373,6.348c1.07,3.505,2.233,5.49,3.457,5.9a1.548,1.548,0,0,0,.491.081,2.049,2.049,0,0,0,1.563-.886q1.042-1.25,2.155-2.438a3.472,3.472,0,0,0,1.55.417l0,.042q-.14.166-.273.338c-.375.475-.452.574-1.658.823-.343.071-1.254.259-1.267.9-.014.7,1.077.991,1.2,1.022a5.144,5.144,0,0,0,1.249.162,3.634,3.634,0,0,0,2.5-.934,23.674,23.674,0,0,0,.381,5.684,2.854,2.854,0,0,0,2.729,2.1,4.378,4.378,0,0,0,.917-.1,3.462,3.462,0,0,0,3.156-3.212c.177-1.026.481-3.475.624-4.789a3.859,3.859,0,0,0,1.11.137,6.6,6.6,0,0,0,2.519-.48c.712-.331,2-1.141,1.763-1.846ZM24.051,10.1a7.968,7.968,0,0,1-.116,1.107,10.229,10.229,0,0,0-.14,1.3,9.859,9.859,0,0,0,.1,1.47,5.236,5.236,0,0,1-.229,2.986,3.882,3.882,0,0,1-.207-.426c-.058-.141-.185-.368-.359-.681-.68-1.22-2.274-4.078-1.458-5.244.243-.347.86-.7,2.408-.512ZM22.174,3.531a6.617,6.617,0,0,1,5.334,2.522c.975,1.245-.1,6.912-3.205,11.8l-.094-.119-.039-.049a5.524,5.524,0,0,0,.506-3.8,9.114,9.114,0,0,1-.1-1.352,9.572,9.572,0,0,1,.131-1.206,7.614,7.614,0,0,0,.123-1.493.619.619,0,0,0,.013-.21,8.381,8.381,0,0,0-1.912-3.6,8.61,8.61,0,0,0-3.039-2.284,10.246,10.246,0,0,1,2.28-.214ZM9.479,20.654c-.627.754-1.061.61-1.2.562-.928-.31-2.006-2.272-2.955-5.384a35.167,35.167,0,0,1-1.34-6.159c-.12-2.4.462-4.074,1.73-4.974,2.063-1.463,5.456-.587,6.819-.143-.02.019-.04.037-.059.057-2.237,2.259-2.184,6.119-2.178,6.355,0,.091.007.22.018.4a15.969,15.969,0,0,1-.081,3.226A4.08,4.08,0,0,0,11.3,18.007q.133.138.278.262c-.383.41-1.216,1.318-2.1,2.385Zm2.39-3.19a3.3,3.3,0,0,1-.865-2.764,16.7,16.7,0,0,0,.087-3.381c-.006-.095-.011-.178-.014-.243A4.3,4.3,0,0,1,14,10.223a1.188,1.188,0,0,1,.918,1.026c.646,2.989.085,4.234-.365,5.235-.093.206-.181.4-.255.6l-.058.156a10.218,10.218,0,0,0-.368,1.109,2.788,2.788,0,0,1-2-.887Zm.113,4.03a1.733,1.733,0,0,1-.523-.225,2.553,2.553,0,0,1,.557-.166c1.418-.292,1.637-.5,2.116-1.105.11-.139.234-.3.406-.489h0c.256-.287.374-.238.586-.15a.829.829,0,0,1,.408.525.585.585,0,0,1-.05.491A3.1,3.1,0,0,1,11.983,21.495ZM19.406,28.4a2.113,2.113,0,0,1-2.754-1.526,31.129,31.129,0,0,1-.3-6.853.392.392,0,0,0-.017-.124,1.643,1.643,0,0,0-.048-.23,1.589,1.589,0,0,0-.862-1.034,1.216,1.216,0,0,0-.793-.1,9.586,9.586,0,0,1,.342-1.022l.058-.157c.066-.177.148-.36.235-.554.471-1.047,1.117-2.482.416-5.722a2.044,2.044,0,0,0-2.468-1.669A5.694,5.694,0,0,0,11.328,10c-.078.04-.15.078-.216.115A8.244,8.244,0,0,1,13.03,5.163,4.711,4.711,0,0,1,16.6,3.827,7.567,7.567,0,0,1,22.381,6.59,8.774,8.774,0,0,1,23.963,9.3c-1.463-.149-2.458.14-2.962.861-1.1,1.568.6,4.612,1.416,6.075.15.268.279.5.319.6a5.432,5.432,0,0,0,.861,1.387c.077.1.152.189.208.271-.443.128-1.239.423-1.166,1.9-.058.74-.474,4.205-.686,5.43-.279,1.617-.874,2.22-2.548,2.579Zm7.242-8.288a5.714,5.714,0,0,1-1.931.4,2.422,2.422,0,0,1-1.3-.167c-.045-.919.3-1.015.66-1.117.057-.016.112-.032.166-.05a1.353,1.353,0,0,0,.11.08c.639.422,1.78.467,3.39.135l.018,0a4.334,4.334,0,0,1-1.116.72Z",style:{fill:"#fff"}})),ci=({size:n,type:l})=>l==="mysql"?h.jsx(RE,{width:n,height:n}):h.jsx(OE,{width:n,height:n}),[ME,Ps]=un(void 0),[DE,Js]=un({show:!1}),LE=()=>{const n=Dr("Home");return h.jsxs("div",{className:"card-white lg:col-span-2",onClick:n,children:[h.jsxs("h2",{className:Kt.actionTitle,children:[h.jsx("span",{children:"🔎 Start new query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsx("input",{className:"input mt-3 w-full",placeholder:"Search table or query to start"})]})},kE=()=>{const[n,l]=b.useState(void 0),i=Lr(Gt.EDITOR),r=u=>{i?l(u):rn.error("You don't have permission to connect new data sources in this team")};return h.jsxs("div",{children:[n&&h.jsx(CE,{show:!0,dbType:n,onClose:()=>l(void 0)}),h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:()=>r("postgres"),children:[h.jsx("p",{className:Kt.actionTitle,children:"🧙‍♂️ Connection wizard"}),h.jsx("p",{className:Kt.actionSubtext,children:"Configure new database connection."})]})]})},UE=()=>{const n=wt(),{data:l}=Jd(),i=Dr("Home"),r=()=>{l&&l.length>0?n(`${$e.workbench.path}/tab/${l[0].id}`):i()};return h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:r,children:[h.jsxs("h2",{className:Kt.actionTitle,children:[h.jsx("span",{children:"🛠️ Workbench"}),h.jsx("span",{className:"hotkey",children:"W"})]}),h.jsx("p",{className:Kt.actionSubtext,children:"Continue your work from where you left."})]})},zE=()=>{const{data:n}=qn(),{data:l}=Zd({teamId:n?.teamId}),i=r=>{Ps(r)};return!l||l.length===0?null:h.jsxs("div",{className:"mt-8",children:[h.jsx("h2",{className:"font-semibold text-gray-700",children:"Data sources"}),h.jsx("div",{className:"grid lg:grid-cols-3 gap-2 mt-4",children:l?.map(r=>h.jsxs("div",{className:Kt.dataSourceEntry,onClick:()=>i(r.id),tabIndex:0,children:[h.jsx(ci,{size:32,type:r.dbType}),h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:"font-semibold truncate text-gray-800 flex-1",children:r.name}),r.allowInsert?h.jsx("span",{className:Kt.devTag,children:"dev"}):h.jsx("span",{className:Kt.prodTag,children:"prod"})]})]},r.id))})]})},qE=()=>h.jsxs("div",{className:"mt-8",children:[h.jsx("h2",{className:"font-semibold text-gray-700",children:"Useful links"}),h.jsxs("div",{className:"grid lg:grid-cols-3 gap-2 mt-4",children:[h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"https://dataramen.xyz/",children:[h.jsx("h2",{className:Kt.actionTitle,children:"↗️ Documentation"}),h.jsx("p",{className:Kt.actionSubtext,children:"Learn how to use DataRamen"})]}),h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"https://github.com/OleksandrDemian/dataramen",children:[h.jsx("h2",{className:Kt.actionTitle,children:"↗️ Github"}),h.jsx("p",{className:Kt.actionSubtext,children:"Codebase is open source"})]}),h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"#",onClick:()=>Js({show:!0}),children:[h.jsxs("h2",{className:Kt.actionTitle,children:[h.jsx("span",{children:"⌛ Recent tabs"}),h.jsx("span",{className:"hotkey",children:"H"})]}),h.jsx("p",{className:Kt.actionSubtext,children:"Manage recent tabs"})]})]})]}),BE=()=>{const{data:n}=qn(),{data:l}=Zd({teamId:n?.teamId}),i=!!l&&l.length>0,r=!!n;return h.jsx("div",{className:"page-container h-screen max-h-screen bg-(--bg)",children:h.jsxs("div",{className:"page-content h-full pb-12 overflow-y-auto",children:[h.jsx("h2",{className:"font-semibold text-gray-700 mt-4 hidden lg:block",children:"Quick actions"}),r&&!i&&h.jsx(Ot,{variant:"warning",className:"font-semibold mt-4",children:"Connect at least one datasource to start using DataRamen"}),h.jsxs("div",{className:"grid lg:grid-cols-2 gap-2 mt-4",children:[h.jsx(LE,{}),h.jsx(kE,{}),r&&h.jsx(UE,{})]}),r&&h.jsx(zE,{}),h.jsx(qE,{})]})})},[HE,Id]=un(void 0),QE=()=>Id(void 0);function Pl(n,l){if(n==null)return"";switch(l){case"json":case"jsonb":return JSON.stringify(n,null,2)}if(n===0||n===!1)return n.toString();switch(typeof n){case"string":return n;case"number":case"boolean":return n.toString();default:return JSON.stringify(n)}}const uu=n=>n.distinct?[n.fn,"DISTINCT",n.value].join(" "):[n.fn,n.value].join(" "),dl=n=>{let l=n.replace(/[_-]+/g," ");return l=l.replace(/([a-z0-9])([A-Z])/g,"$1 $2"),l=l.toLowerCase().replace(/\b\w/g,i=>i.toUpperCase()),l},$E="_container_1v9lx_2",YE="_header_1v9lx_2",VE="_fields-container_1v9lx_2",KE="_field-label_1v9lx_2",GE="_actions_1v9lx_2",hr={container:$E,header:YE,fieldsContainer:VE,fieldLabel:KE,actions:GE},Oa=()=>Date.now().toString(36)+Math.random().toString(36).substring(2),FE=(n,l,i)=>Zt({queryKey:["entity",n,l,i],queryFn:async()=>{const r=i?i.map(([c,d])=>({id:Oa(),column:c,value:`${d}`})):[],{data:u}=await je.post("/runner/select",{datasourceId:n,opts:{table:l,filters:r,joins:[],columns:[],orderBy:[],groupBy:[],aggregations:[]},size:1,page:0,name:`Select ${l}: [${i?.join()}]`});return u.data},retry:1,enabled:!!l&&!!n&&!!i,staleTime:0}),XE=()=>vt({mutationFn:async n=>{const{data:l}=await je.post("/runner/update",n);return l.data}}),ZE=()=>vt({mutationFn:async n=>{const{data:l}=await je.post("/runner/insert",n);return l.data}}),Wd=n=>b.useMemo(()=>{if(n)return n instanceof h3?n.response?.data.error?n.response.data.error:n.response?.data?.message?n.response.data.message:n.message:n instanceof Error?n.message:"Undefined error"},[n]),eh=()=>{const{pathname:n}=qt();return b.useMemo(()=>xr({path:`${$e.workbench.path}/tab/:id`,end:!1},n)?.params.id,[n])},PE=({data:n})=>{const[l,{change:i,touched:r}]=kr({}),u=eh(),{mutateAsync:c,error:d}=ZE(),m=Wd(d),{data:p}=Mr(n.dataSourceId),[y,g]=b.useState(""),x=b.useMemo(()=>p?.find(w=>w.tableName===n.table),[p,n.table]),E=b.useMemo(()=>{if(!x)return[];if(!y)return x.columns.map(C=>({...C,label:dl(C.name)}));const w=y.toLowerCase();return x.columns.filter(C=>C.name.toLowerCase().includes(w)).map(C=>({...C,label:dl(C.name)}))},[y,x]),j=()=>{const w=[];for(const C of r)w.push({value:l[C],column:C});c({datasourceId:n.dataSourceId,table:n.table,values:w}).then(()=>{QE(),u&&Sv(u)})};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:hr.header,children:[h.jsxs("p",{className:"text-lg font-semibold",children:["Insert new row in ",h.jsx("span",{className:"underline",children:n.table})]}),m&&h.jsx(Ot,{variant:"danger",children:h.jsx("p",{children:m})})]}),h.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:h.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),h.jsx("div",{className:hr.container,children:h.jsx("div",{className:hr.fieldsContainer,children:E.map(w=>h.jsxs("label",{className:hr.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[w.isPrimary?"🔐":"🏷️"," ",w.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",w.name,": ",w.type,"]"]})]}),h.jsx("input",{className:"input w-full",value:Pl(l[w.name]),onChange:i(w.name),placeholder:w.name})]},w.name))})}),h.jsxs("div",{className:hr.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:y,onChange:w=>g(w.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{disabled:!r.length,className:"button primary",onClick:j,children:"Run insert"})]})]})},JE=()=>{const n=HE(),[l,i]=b.useState(void 0);b.useEffect(()=>{n&&i(n)},[n]);const r=()=>Id(void 0);return h.jsxs(cn,{isVisible:n!=null,onClose:r,onClosed:()=>i(void 0),noPadding:!0,children:[h.jsx(aa,{onClick:r}),l&&h.jsx(PE,{data:l})]})},[IE,th]=un(void 0),WE=()=>th(void 0),e6="_container_1pf05_2",t6="_header_1pf05_2",n6="_key_1pf05_2",a6="_fields-container_1pf05_2",l6="_field-label_1pf05_2",s6="_actions_1pf05_2",Vs={container:e6,header:t6,key:n6,fieldsContainer:a6,fieldLabel:l6,actions:s6},i6=({data:n})=>{const[l,{change:i,set:r,reset:u,touched:c}]=kr({}),d=eh(),[m,p]=b.useState(""),{data:y,isLoading:g}=FE(n.dataSourceId,n.tableName,n.entityId),{mutateAsync:x,error:E}=XE(),j=Wd(E),w=Lr(Gt.EDITOR),{data:C}=Mr(n.dataSourceId),{data:N}=Ou(n.dataSourceId),T=b.useMemo(()=>C?.find(X=>X.tableName===n.tableName),[n.tableName,C]),_=b.useMemo(()=>{if(!T)return[];if(!m)return T.columns.map(G=>({...G,label:dl(G.name)}));const X=m.toLowerCase();return T.columns.filter(G=>G.name.toLowerCase().includes(X)).map(G=>({...G,label:dl(G.name)}))},[m,T]);b.useEffect(()=>{const X=y?.rows[0];if(u(),X&&y?.columns)for(let G=0;G<y.columns.length;G++){const P=y.columns[G];r(P.column,Pl(X[G]))}},[y,r,u]);const D=()=>{const X=[];for(const G of c)X.push({value:l[G],column:G});x({datasourceId:n.dataSourceId,table:n.tableName,filters:n.entityId.map(G=>({id:Oa(),value:[{value:G[1]}],column:G[0],connector:"AND",operator:"="})),values:X}).then(()=>{WE(),d&&Sv(d)})},H=n.entityId.map(([X,G])=>`${X} = ${G}`).join(", ")||"",V=!N?.allowUpdate||!w;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Vs.header,children:[h.jsxs("p",{className:"text-lg font-semibold",children:[V?"View":"Edit"," row in ",h.jsx("span",{className:"underline",children:n?.tableName})]}),h.jsx("span",{className:Vs.key,children:H}),j&&h.jsx(Ot,{variant:"danger",children:h.jsx("p",{children:j})})]}),!V&&h.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:h.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),h.jsx("div",{className:Vs.container,children:h.jsx("div",{className:Vs.fieldsContainer,children:_.map(X=>h.jsxs("label",{className:Vs.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[X.isPrimary?"🔐":"🏷️"," ",X.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",X.name,": ",X.type,"]"]})]}),h.jsx("input",{disabled:X.isPrimary||g||V,className:"input w-full",value:Pl(l[X.name]),onChange:i(X.name),placeholder:X.name})]},X.name))})}),h.jsxs("div",{className:Vs.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:m,onChange:X=>p(X.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),!V&&h.jsx("button",{disabled:!c.length,className:"button primary",onClick:D,children:"Run update"})]})]})},r6=()=>{const n=IE(),[l,i]=b.useState(void 0);b.useEffect(()=>{n&&i(n)},[n]);const r=()=>th(void 0);return h.jsxs(cn,{isVisible:n!=null,onClose:r,onClosed:()=>i(void 0),noPadding:!0,children:[h.jsx(aa,{onClick:r}),l&&h.jsx(i6,{data:l})]})},[o6,nd]=un(void 0),Cv=async n=>new Promise(l=>{nd({message:n,onCancel:()=>{l(!1),nd(void 0)},onConfirm:()=>{l(!0),nd(void 0)}})}),u6=({confirm:n})=>h.jsxs("div",{children:[h.jsx("p",{children:n.message}),h.jsxs("div",{className:"flex gap-2 justify-end mt-4",children:[h.jsx("button",{className:"button tertiary",onClick:n.onCancel,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:n.onConfirm,children:"Confirm"})]})]}),c6=()=>{const n=o6(),[l,i]=b.useState(void 0);return b.useEffect(()=>{n&&i(n)},[n]),h.jsx(cn,{isVisible:!!n,onClose:()=>n?.onCancel(),onClosed:()=>i(void 0),children:l&&h.jsx(u6,{confirm:l})})},[f6,cu]=un(void 0),Ur=async(n,l,i)=>new Promise(r=>{cu({message:n,defaultValue:l,alert:i,onCancel:()=>{cu(void 0),r(void 0)},onConfirm:u=>{cu(void 0),r(u)}})}),d6="_root_12mtw_1",h6={root:d6},m6=({data:n})=>{const[l,i]=b.useState("");b.useEffect(()=>{n.defaultValue&&i(n.defaultValue)},[n]);const r=c=>{i(c.target.value)},u=c=>{c.key==="Enter"&&(c.preventDefault(),n.onConfirm(l)),c.key==="Escape"&&(c.preventDefault(),n.onCancel())};return h.jsxs("div",{className:h6.root,children:[h.jsx("h2",{className:"text-xl font-semibold",children:n.message}),n.alert&&h.jsx(Ot,{variant:n.alert.type,className:"mt-2",children:n.alert.message}),h.jsx("input",{autoFocus:!0,className:"w-full input my-2",value:l,onChange:r,onKeyDown:u}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx("button",{className:"button tertiary",onClick:n.onCancel,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:()=>n.onConfirm(l),children:"Confirm"})]})]})},p6=()=>{const n=f6(),[l,i]=b.useState(void 0);return b.useEffect(()=>{n&&i(n)},[n]),h.jsx(cn,{isVisible:!!n,onClose:()=>cu(void 0),onClosed:()=>i(void 0),children:l&&h.jsx(m6,{data:l})})},[y6,v6]=un(void 0),_v=n=>{v6(n)},g6="_textarea_180ok_2",b6={textarea:g6},x6=()=>{const n=y6(),l=()=>{n&&(navigator.clipboard.writeText(n.toString()),rn.success("Copied!"))},i=()=>_v(void 0);return h.jsxs(cn,{isVisible:!!n,onClose:i,backdropClose:!0,children:[h.jsx("textarea",{className:b6.textarea,readOnly:!0,defaultValue:n?.toString()}),h.jsxs("div",{className:"mt-2 flex gap-1 justify-end",children:[h.jsx("button",{className:"button primary",onClick:l,children:"Copy"}),h.jsx("button",{className:"button tertiary",onClick:i,children:"Close"})]})]})},S6="_tabs_1yc1e_2",w6="_mobile_1yc1e_2",E6="_tab_1yc1e_2",C6="_active_1yc1e_2",_6="_close-button_1yc1e_2",mr={tabs:S6,mobile:w6,tab:E6,active:C6,closeButton:_6},zy=n=>window.matchMedia(n).matches;function Nv(n,{defaultValue:l=!1,initializeWithValue:i=!0}={}){const[r,u]=b.useState(()=>i?zy(n):l);return b.useLayoutEffect(()=>{const c=window.matchMedia(n);function d(){u(()=>zy(n))}return d(),c.addListener?c.addListener(d):c.addEventListener("change",d),()=>{c.removeListener?c.removeListener(d):c.removeEventListener("change",d)}},[n]),r}const nh={laptop:"(min-width: 1024px)"},jv=()=>window.matchMedia(nh.laptop).matches,N6="_table_i1460_2",j6="_row-index-btn_i1460_2",T6="_semi-transparent_i1460_2",A6="_table-loading_i1460_2",R6="_table-empty_i1460_2",O6="_table-row-cells_i1460_2",M6="_header-cell_i1460_2",D6="_header-actions_i1460_2",L6="_cell_i1460_2",k6="_value_i1460_2",U6="_table-config_i1460_2",z6="_table-action_i1460_2",q6="_green-fixed_i1460_2",B6="_gray_i1460_2",H6="_modal_i1460_2",Q6="_selected-size_i1460_2",$6="_pagination-indicator_i1460_2",re={table:N6,rowIndexBtn:j6,semiTransparent:T6,tableLoading:A6,tableEmpty:R6,tableRowCells:O6,headerCell:M6,headerActions:D6,cell:L6,value:k6,tableConfig:U6,tableAction:z6,greenFixed:q6,gray:B6,modal:H6,selectedSize:Q6,paginationIndicator:$6},La=b.createContext({name:"No name",hooks:[],availableJoins:[],allColumns:[],dataSourceId:"",entities:[],getValue:()=>{},getColumnType:()=>{},getEntityKey:()=>[]}),Pt=b.createContext({state:oi({}),setState:()=>{}}),Bn=b.createContext({}),Tv={ON_ANIMATION_END:Symbol("ON_TRANSITION_END")},Av=()=>{const[n,l]=b.useState(),[i,r]=b.useState("hidden");return b.useMemo(()=>{const u=m=>{m.preventDefault(),r("in"),l({x:m.clientX-1,y:m.clientY-1})},c=()=>{r("out")},d=()=>{i==="in"?r("visible"):i==="out"&&(l(void 0),r("hidden"))};return{show:!!n,position:n,state:i,open:u,close:c,[Tv.ON_ANIMATION_END]:d}},[n,i])},Y6=n=>{if(n==="ASC")return"DESC";if(n!=="DESC")return"ASC"},V6=()=>{const{state:n,setState:l}=b.useContext(Pt),i=b.useCallback(r=>{l(u=>{const c=u.orderBy[0];if(c&&c.column===r){const d=Y6(c.direction);return d?{...u,orderBy:[{column:r,direction:d}]}:{...u,orderBy:[]}}return{...u,orderBy:[{column:r,direction:"ASC"}]}})},[l]);return{orderBy:n.orderBy,updateOrderBy:i}},K6="_options-container_np9q5_2",G6="_filter-input_np9q5_2",F6="_option-item_np9q5_2",X6="_list_np9q5_2",Z6="_empty-text_np9q5_2",Ta={optionsContainer:K6,filterInput:G6,optionItem:F6,list:X6,emptyText:Z6},P6="_container_ricrc_2",J6="_animate-show_ricrc_2",I6="_animate-hide_ricrc_2",W6="_content_ricrc_2",eC="_backdrop_ricrc_2",$l={container:P6,animateShow:J6,animateHide:I6,content:W6,backdrop:eC},Rv=({children:n,handler:l})=>{const i=b.useRef(l.close);i.current=l.close;const r=b.useMemo(()=>{if(!l.position)return;const u={};if(typeof window<"u"){const c=l.position.y>window.innerHeight/2,d=l.position.x>window.innerWidth/2;c?u.bottom=window.innerHeight-l.position.y:u.top=l.position.y,jv()?d?u.right=window.innerWidth-l.position.x:u.left=l.position.x:(u.right=36,u.left=36)}return u},[l.position]);return b.useEffect(()=>{const u=c=>{c.code==="Escape"&&i.current()};return window.addEventListener("keyup",u),()=>{window.removeEventListener("keyup",u)}},[]),r?h.jsxs("div",{className:se($l.container,l.state==="out"&&$l.animateHide,l.state==="in"&&$l.animateShow),onAnimationEnd:l[Tv.ON_ANIMATION_END],children:[h.jsx("div",{className:$l.backdrop,onClick:u=>{u.stopPropagation(),u.preventDefault(),l.close()}}),h.jsx("div",{className:se($l.content,l.state==="out"&&$l.animateHide,l.state==="in"&&$l.animateShow),style:r,children:n})]}):null},Ma=(n,l)=>n!=null&&n>l,tC="_root_1i9bh_2",nC="_content_1i9bh_2",aC="_table-name_1i9bh_2",lC="_sub_1i9bh_2",eu={root:tC,content:nC,tableName:aC,sub:lC},Ov=({hook:n,onClick:l})=>h.jsxs("button",{className:eu.root,onClick:l,children:[h.jsx("span",{children:"📄"}),h.jsxs("div",{className:eu.content,children:[h.jsx("span",{className:eu.tableName,children:n.on.toTable}),h.jsxs("span",{className:eu.sub,children:[n.on.toColumn," = ",n.on.fromTable,".",n.on.fromColumn]})]})]},n.where),sC=se("input",Ta.filterInput);function iC(n,l,i){return{name:`${n.on.toTable} ${n.on.toColumn} equals ${i}`,opts:oi({table:n.on.toTable,dataSourceId:l,filters:[{id:Oa(),column:`${n.on.toTable}.${n.on.toColumn}`,value:i==null?"IS NULL":`${i}`,isEnabled:!0}]})}}const Mv=({rowIndex:n,onClose:l,className:i})=>{const[r,u]=b.useState(""),{hooks:c,dataSourceId:d,getValue:m}=b.useContext(La),{state:p}=b.useContext(Pt),{data:y}=b.useContext(Bn),g=b.useMemo(()=>y?.result.rows[n],[y,n]),x=ui(),E=wt(),j=b.useMemo(()=>{if(!y)return[];const T=r.toLowerCase();return c.filter(_=>y.result.columns.some(H=>H.column===_.on.fromColumn&&H.table===_.on.fromTable)?_.on.toTable.toLowerCase().includes(T):!1)},[r,c,y]),w=T=>{g&&x.mutateAsync(iC(T,d,m(g,{value:`${T.on.fromTable}.${T.on.fromColumn}`}))).then(_=>{E(`${$e.workbench.path}/tab/${_.id}`),l?.()})},C=()=>{!g||!p||x.mutateAsync({name:`${p.table} > [${p.joins.map(T=>T.table).join()}]`,opts:oi({joins:p.joins,table:p.table,dataSourceId:p.dataSourceId,filters:[...p.filters.filter(T=>T.isEnabled),...p.groupBy.map(T=>({id:Oa(),column:T.value,value:`${m(g,T)}`,isEnabled:!0}))]})}).then(T=>{E(`${$e.workbench.path}/tab/${T.id}`),l?.()})},N=p.groupBy.length>0;return h.jsxs("div",{className:i,children:[h.jsx("input",{className:sC,placeholder:"Filter",value:r,onChange:T=>u(T.target.value)}),h.jsxs("div",{className:Ta.list,children:[N&&h.jsx("button",{onClick:C,className:Ta.optionItem,children:"🎯 Underlying rows"}),Ma(j.length,0)?j.map(T=>h.jsx(Ov,{hook:T,onClick:()=>w(T)},T.where)):h.jsx("p",{className:Ta.emptyText,children:"Empty"})]})]})},rC=({handler:n,rowIndex:l})=>h.jsx(Rv,{handler:n,children:h.jsx("div",{className:Ta.optionsContainer,children:h.jsx(Mv,{rowIndex:l,className:"p-2",onClose:()=>{n.close()}})})}),ah=()=>{const{state:n,setState:l}=b.useContext(Pt),i=b.useCallback((u,c=!1)=>{l(d=>({...d,page:c?0:d.page,filters:u}))},[l]),r=b.useCallback(u=>{l(c=>({...c,filters:c.filters.filter(d=>d.id!==u)}))},[l]);return{filters:n.filters,removeFilter:r,setFilters:i}},oC=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:48,d:"M112 244l144-144 144 144M256 120v292"})),pl=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:48,d:"M184 112l144 144-144 144"})),uC=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M464 208L352 96 240 208M352 113.13V416M48 304l112 112 112-112M160 398V96"})),Dv=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("title",null,"Search"),b.createElement("path",{d:"M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z",fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32}),b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:32,d:"M338.29 338.29L448 448"})),cC="_container_wd878_2",fC="_animate-show_wd878_2",dC="_animate-hide_wd878_2",hC="_backdrop_wd878_2",mC="_content_wd878_2",Yl={container:cC,animateShow:fC,animateHide:dC,backdrop:hC,content:mC},pC=({children:n,ref:l,onClosed:i})=>{const[r,u]=b.useState(void 0),[c,d]=b.useState("hidden"),m=b.useRef(null);if(b.useImperativeHandle(l,()=>({open:y=>{const g={},x=y.clientY>window.innerHeight/2,E=y.clientX>window.innerWidth/2;x?g.bottom=window.innerHeight-y.clientY:g.top=y.clientY,jv()?E?g.right=window.innerWidth-y.clientX:g.left=y.clientX:(g.right=36,g.left=36),u(g),d("in")},close:()=>{d("out")}}),[]),!r)return null;const p=()=>{c==="in"?d("visible"):c==="out"&&(u(void 0),d("hidden"),i?.())};return h.jsxs("div",{className:se(Yl.container,c==="out"&&Yl.animateHide,c==="in"&&Yl.animateShow),onAnimationEnd:p,children:[h.jsx("div",{className:Yl.backdrop,onClick:()=>d("out")}),h.jsx("div",{ref:m,style:r,className:se(Yl.content,c==="out"&&Yl.animateHide,c==="in"&&Yl.animateShow),children:n})]})};function ad(n,l,i){const r=n?.rows?.[l]?.[i],u=n?.columns?.[i];return{value:r,column:u}}const yC=({ref:n})=>{const{data:l}=b.useContext(Bn),{getColumnType:i}=b.useContext(La),{setState:r}=b.useContext(Pt);return{copyValue:(m,p)=>{const{value:y,column:g}=ad(l?.result,m,p);if(g){const x=Pl(y,i(g.full));navigator.clipboard.writeText(x),rn.success("Copied!"),n.current?.close()}},showValue:(m,p)=>{const{value:y,column:g}=ad(l?.result,m,p);if(g){const x=Pl(y,i(g.full));_v(x),n.current?.close()}},filterValue:(m,p)=>{const{value:y,column:g}=ad(l?.result,m,p),x=g?.full||"";if(g?.table===""){rn.error("Filtering on aggregated column is not supported yet");return}if(x){let E;if(y==null)E={id:Oa(),isEnabled:!0,column:x,value:"IS NULL"};else{const j=Pl(y,i(x));E={id:Oa(),isEnabled:!0,column:x,value:j}}r(j=>({...j,filters:[...j.filters,E]})),rn.success(`Added new filter on column ${g?.alias}`),n.current?.close()}}}},Lv=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("rect",{x:128,y:128,width:336,height:336,rx:57,ry:57,fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:32}),b.createElement("path",{d:"M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32})),vC=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 00-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 000-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("circle",{cx:256,cy:256,r:80,fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32})),gC="_section-name_1r03m_2",bC="_item_1r03m_2",Vl={sectionName:gC,item:bC},xC=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M136 208l120-104 120 104M136 304l120 104 120-104",stroke:"currentColor",fill:"none",strokeWidth:32,strokeLinecap:"round",strokeLinejoin:"round"})),SC=se("input",Ta.filterInput),wC=({onClose:n,rowIndex:l,className:i})=>{const[r,u]=b.useState(""),{entities:c,dataSourceId:d,getEntityKey:m}=b.useContext(La),{data:p}=b.useContext(Bn),y=b.useMemo(()=>p?.result.rows[l],[p,l]),g=b.useMemo(()=>r?c.filter(E=>E.includes(r)):c,[c,r]),x=E=>{if(!y)return;const j=m(E,y);th({tableName:E,dataSourceId:d,entityId:j}),n?.()};return h.jsxs("div",{className:i,children:[h.jsx("input",{className:SC,placeholder:"Filter",value:r,onChange:E=>u(E.target.value)}),h.jsx("div",{className:Ta.list,children:Ma(g.length,0)?g.map(E=>h.jsx("button",{className:Ta.optionItem,onClick:()=>x(E),children:h.jsxs("span",{children:["📄 ",E]})},E)):h.jsx("p",{className:Ta.emptyText,children:"Empty"})})]})},EC=({ref:n,row:l,col:i,onClosed:r})=>{const u=yC({ref:n}),[c,d]=b.useState("cell"),m=()=>u.copyValue(l,i),p=()=>u.showValue(l,i),y=()=>u.filterValue(l,i),g=()=>{r?.(),d("cell")};return h.jsx(pC,{ref:n,onClosed:g,children:h.jsxs("div",{className:"w-full lg:w-sm",children:[c==="cell"&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:Vl.sectionName,children:"Cell actions"}),h.jsxs("button",{className:Vl.item,onClick:m,children:[h.jsx(Lv,{width:14,height:14}),"Copy"]}),h.jsxs("button",{className:Vl.item,onClick:p,children:[h.jsx(vC,{width:14,height:14}),"View"]}),h.jsxs("button",{className:Vl.item,onClick:y,children:[h.jsx(Dv,{width:14,height:14}),"Filter"]}),h.jsx("p",{className:Vl.sectionName,children:"Row actions"}),h.jsxs("button",{className:Vl.item,onClick:()=>d("drill"),children:[h.jsx(pl,{width:14,height:14}),"Drill down"]}),h.jsxs("button",{className:Vl.item,onClick:()=>d("expand"),children:[h.jsx(xC,{width:14,height:14}),"Expand row"]})]}),c==="drill"&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"flex gap-1 items-center cursor-pointer px-2 py-1 text-sm rounded-lg bg-gray-50 hover:bg-gray-100 mb-2",onClick:()=>d("cell"),children:[h.jsx(pl,{className:"rotate-180",width:16,height:16}),"Drill down"]}),h.jsx(Mv,{rowIndex:l,onClose:()=>n.current?.close()})]}),c==="expand"&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"flex gap-1 items-center cursor-pointer px-2 py-1 text-sm rounded-lg bg-gray-50 hover:bg-gray-100 mb-2",onClick:()=>d("cell"),children:[h.jsx(pl,{className:"rotate-180",width:16,height:16}),"Expand row"]}),h.jsx(wC,{rowIndex:l,onClose:()=>n.current?.close()})]})]})})},CC={ASC:"",DESC:"rotate-180"},_C=(n,{column:l,value:i})=>{const r=n.map(u=>({...u,isEnabled:u.column===l?!1:u.isEnabled}));return r.push({id:Oa(),column:l,isEnabled:!0,value:i,isAdvanced:!1}),r},NC=()=>{const{data:n}=b.useContext(Bn),{orderBy:l,updateOrderBy:i}=V6(),{setFilters:r,filters:u}=ah(),c=n?.result.columns||[],d=l[0],m=Ma(n?.result.tables.length,1),p=y=>{Ur("Filter value","").then(g=>{g&&r(_C(u,{column:y,value:g}))})};return h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("td",{children:"🥢"}),c.map(y=>h.jsxs("td",{className:re.headerCell,children:[h.jsxs("div",{className:"overflow-hidden",children:[m&&h.jsx("p",{className:"text-xs truncate italic",children:y.table||"-"}),h.jsx("p",{className:"text-sm font-semibold truncate",children:y.column})]}),h.jsxs("div",{className:re.headerActions,children:[h.jsx("button",{onClick:()=>i(y.full),children:d?.column===y.full?h.jsx(oC,{className:CC[d.direction],width:16,height:16}):h.jsx(uC,{width:16,height:16})}),h.jsx("button",{onClick:()=>p(y.full),children:h.jsx(Dv,{width:16,height:16})})]})]},y.full))]})})};function jC({value:n}){if(n==="")return h.jsx("span",{className:"pointer-events-none text-black/30 truncate",children:"<EMPTY STRING>"});if(n==null)return h.jsx("span",{className:"pointer-events-none text-black/30",children:"<NULL>"});const l=Pl(n);return h.jsx("span",{className:re.value,children:l})}const TC=b.memo(({row:n,isLastRow:l,index:i,offset:r})=>h.jsxs("tr",{className:se(re.tableRowCells,l&&"rounded-b-lg"),children:[h.jsx("td",{children:h.jsxs("button",{"data-row-action":i,className:re.rowIndexBtn,children:[h.jsx(pl,{className:"pointer-events-none",width:16,height:16}),i+1+r]})}),n.map((u,c)=>h.jsx("td",{className:re.cell,"data-row":i,"data-col":c,children:h.jsx(jC,{value:u})},c))]})),AC=()=>{const{data:n,error:l,isLoading:i,isFetching:r}=b.useContext(Bn),{state:{page:u,size:c}}=b.useContext(Pt),d=b.useRef(null),m=Wd(l),p=Av(),[y,g]=b.useState(void 0),[x,E]=b.useState(void 0),j=N=>{const _=N.target?.dataset?.rowAction;_!=null&&(g(parseInt(_)),p.open(N))},w=N=>{const T=N.target?.dataset,_=T?.row,D=T?.col;_!=null&&D!=null&&(g(parseInt(_)),E(parseInt(D)),d.current?.open(N),N.preventDefault(),N.stopPropagation())},C=u*c;return h.jsxs(h.Fragment,{children:[y!=null&&p.show&&h.jsx(rC,{handler:p,rowIndex:y}),h.jsx(EC,{ref:d,col:x,row:y,onClosed:()=>{g(void 0),E(void 0)}}),m&&h.jsx(Ot,{variant:"danger",children:m}),i&&h.jsx("div",{className:re.tableLoading,children:"Loading data"}),n&&h.jsxs("table",{className:se(re.table,r&&re.semiTransparent),onClick:j,onContextMenu:w,children:[h.jsx(NC,{}),h.jsxs("tbody",{children:[n.result.rows?.length<1&&h.jsx("tr",{className:re.tableEmpty,children:h.jsx("td",{colSpan:n.result.columns.length+1,children:"No data"})}),n.result.rows?.map((N,T)=>h.jsx(TC,{index:T,offset:C,row:N,isLastRow:T===n.result.rows.length-1},T))]})]})]})},kv=()=>{const{state:n,setState:l}=b.useContext(Pt),i=b.useCallback(u=>{l(c=>({...c,page:u}))},[l]),r=b.useCallback((u,c=!1)=>{l(d=>({...d,size:u,page:c?0:d.page}))},[l]);return{page:n.page,size:n.size,setSize:r,setPage:i}},RC=()=>vt({mutationFn:async n=>{const{data:l}=await je.post("/saved-queries",n);return l.data},onSuccess:()=>{rt.invalidateQueries({queryKey:["queries"]}),ii()}}),OC=()=>vt({mutationFn:async n=>je.delete("/saved-queries/"+n),onSuccess:()=>{ii()}}),MC=()=>vt({mutationFn:async({id:n,payload:l})=>{const{data:i}=await je.patch("/saved-queries/"+n,l);return i.data},onSuccess:()=>{ii(),u4()}}),[Mu,lh]=un({filters:!1,joins:!1,columns:!1,groupBy:!1,aggregate:!1}),In=n=>lh(l=>({...l,[n]:!0})),Du=n=>lh(l=>({...l,[n]:!1})),gu=n=>lh(l=>({...l,[n]:!l[n]})),Is=Math.min,Jl=Math.max,bu=Math.round,tu=Math.floor,Wn=n=>({x:n,y:n}),DC={left:"right",right:"left",bottom:"top",top:"bottom"},LC={start:"end",end:"start"};function Td(n,l,i){return Jl(n,Is(l,i))}function zr(n,l){return typeof n=="function"?n(l):n}function ns(n){return n.split("-")[0]}function qr(n){return n.split("-")[1]}function Uv(n){return n==="x"?"y":"x"}function sh(n){return n==="y"?"height":"width"}function hl(n){return["top","bottom"].includes(ns(n))?"y":"x"}function ih(n){return Uv(hl(n))}function kC(n,l,i){i===void 0&&(i=!1);const r=qr(n),u=ih(n),c=sh(u);let d=u==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return l.reference[c]>l.floating[c]&&(d=xu(d)),[d,xu(d)]}function UC(n){const l=xu(n);return[Ad(n),l,Ad(l)]}function Ad(n){return n.replace(/start|end/g,l=>LC[l])}function zC(n,l,i){const r=["left","right"],u=["right","left"],c=["top","bottom"],d=["bottom","top"];switch(n){case"top":case"bottom":return i?l?u:r:l?r:u;case"left":case"right":return l?c:d;default:return[]}}function qC(n,l,i,r){const u=qr(n);let c=zC(ns(n),i==="start",r);return u&&(c=c.map(d=>d+"-"+u),l&&(c=c.concat(c.map(Ad)))),c}function xu(n){return n.replace(/left|right|bottom|top/g,l=>DC[l])}function BC(n){return{top:0,right:0,bottom:0,left:0,...n}}function zv(n){return typeof n!="number"?BC(n):{top:n,right:n,bottom:n,left:n}}function Su(n){const{x:l,y:i,width:r,height:u}=n;return{width:r,height:u,top:i,left:l,right:l+r,bottom:i+u,x:l,y:i}}function qy(n,l,i){let{reference:r,floating:u}=n;const c=hl(l),d=ih(l),m=sh(d),p=ns(l),y=c==="y",g=r.x+r.width/2-u.width/2,x=r.y+r.height/2-u.height/2,E=r[m]/2-u[m]/2;let j;switch(p){case"top":j={x:g,y:r.y-u.height};break;case"bottom":j={x:g,y:r.y+r.height};break;case"right":j={x:r.x+r.width,y:x};break;case"left":j={x:r.x-u.width,y:x};break;default:j={x:r.x,y:r.y}}switch(qr(l)){case"start":j[d]-=E*(i&&y?-1:1);break;case"end":j[d]+=E*(i&&y?-1:1);break}return j}const HC=async(n,l,i)=>{const{placement:r="bottom",strategy:u="absolute",middleware:c=[],platform:d}=i,m=c.filter(Boolean),p=await(d.isRTL==null?void 0:d.isRTL(l));let y=await d.getElementRects({reference:n,floating:l,strategy:u}),{x:g,y:x}=qy(y,r,p),E=r,j={},w=0;for(let C=0;C<m.length;C++){const{name:N,fn:T}=m[C],{x:_,y:D,data:H,reset:V}=await T({x:g,y:x,initialPlacement:r,placement:E,strategy:u,middlewareData:j,rects:y,platform:d,elements:{reference:n,floating:l}});g=_??g,x=D??x,j={...j,[N]:{...j[N],...H}},V&&w<=50&&(w++,typeof V=="object"&&(V.placement&&(E=V.placement),V.rects&&(y=V.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:u}):V.rects),{x:g,y:x}=qy(y,E,p)),C=-1)}return{x:g,y:x,placement:E,strategy:u,middlewareData:j}};async function qv(n,l){var i;l===void 0&&(l={});const{x:r,y:u,platform:c,rects:d,elements:m,strategy:p}=n,{boundary:y="clippingAncestors",rootBoundary:g="viewport",elementContext:x="floating",altBoundary:E=!1,padding:j=0}=zr(l,n),w=zv(j),N=m[E?x==="floating"?"reference":"floating":x],T=Su(await c.getClippingRect({element:(i=await(c.isElement==null?void 0:c.isElement(N)))==null||i?N:N.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(m.floating)),boundary:y,rootBoundary:g,strategy:p})),_=x==="floating"?{x:r,y:u,width:d.floating.width,height:d.floating.height}:d.reference,D=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m.floating)),H=await(c.isElement==null?void 0:c.isElement(D))?await(c.getScale==null?void 0:c.getScale(D))||{x:1,y:1}:{x:1,y:1},V=Su(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:_,offsetParent:D,strategy:p}):_);return{top:(T.top-V.top+w.top)/H.y,bottom:(V.bottom-T.bottom+w.bottom)/H.y,left:(T.left-V.left+w.left)/H.x,right:(V.right-T.right+w.right)/H.x}}const QC=n=>({name:"arrow",options:n,async fn(l){const{x:i,y:r,placement:u,rects:c,platform:d,elements:m,middlewareData:p}=l,{element:y,padding:g=0}=zr(n,l)||{};if(y==null)return{};const x=zv(g),E={x:i,y:r},j=ih(u),w=sh(j),C=await d.getDimensions(y),N=j==="y",T=N?"top":"left",_=N?"bottom":"right",D=N?"clientHeight":"clientWidth",H=c.reference[w]+c.reference[j]-E[j]-c.floating[w],V=E[j]-c.reference[j],X=await(d.getOffsetParent==null?void 0:d.getOffsetParent(y));let G=X?X[D]:0;(!G||!await(d.isElement==null?void 0:d.isElement(X)))&&(G=m.floating[D]||c.floating[w]);const P=H/2-V/2,ae=G/2-C[w]/2-1,ye=Is(x[T],ae),Ae=Is(x[_],ae),Ce=ye,Ke=G-C[w]-Ae,me=G/2-C[w]/2+P,_e=Td(Ce,me,Ke),q=!p.arrow&&qr(u)!=null&&me!==_e&&c.reference[w]/2-(me<Ce?ye:Ae)-C[w]/2<0,F=q?me<Ce?me-Ce:me-Ke:0;return{[j]:E[j]+F,data:{[j]:_e,centerOffset:me-_e-F,...q&&{alignmentOffset:F}},reset:q}}}),$C=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var i,r;const{placement:u,middlewareData:c,rects:d,initialPlacement:m,platform:p,elements:y}=l,{mainAxis:g=!0,crossAxis:x=!0,fallbackPlacements:E,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...N}=zr(n,l);if((i=c.arrow)!=null&&i.alignmentOffset)return{};const T=ns(u),_=hl(m),D=ns(m)===m,H=await(p.isRTL==null?void 0:p.isRTL(y.floating)),V=E||(D||!C?[xu(m)]:UC(m)),X=w!=="none";!E&&X&&V.push(...qC(m,C,w,H));const G=[m,...V],P=await qv(l,N),ae=[];let ye=((r=c.flip)==null?void 0:r.overflows)||[];if(g&&ae.push(P[T]),x){const me=kC(u,d,H);ae.push(P[me[0]],P[me[1]])}if(ye=[...ye,{placement:u,overflows:ae}],!ae.every(me=>me<=0)){var Ae,Ce;const me=(((Ae=c.flip)==null?void 0:Ae.index)||0)+1,_e=G[me];if(_e&&(!(x==="alignment"?_!==hl(_e):!1)||ye.every(J=>J.overflows[0]>0&&hl(J.placement)===_)))return{data:{index:me,overflows:ye},reset:{placement:_e}};let q=(Ce=ye.filter(F=>F.overflows[0]<=0).sort((F,J)=>F.overflows[1]-J.overflows[1])[0])==null?void 0:Ce.placement;if(!q)switch(j){case"bestFit":{var Ke;const F=(Ke=ye.filter(J=>{if(X){const he=hl(J.placement);return he===_||he==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(he=>he>0).reduce((he,R)=>he+R,0)]).sort((J,he)=>J[1]-he[1])[0])==null?void 0:Ke[0];F&&(q=F);break}case"initialPlacement":q=m;break}if(u!==q)return{reset:{placement:q}}}return{}}}};async function YC(n,l){const{placement:i,platform:r,elements:u}=n,c=await(r.isRTL==null?void 0:r.isRTL(u.floating)),d=ns(i),m=qr(i),p=hl(i)==="y",y=["left","top"].includes(d)?-1:1,g=c&&p?-1:1,x=zr(l,n);let{mainAxis:E,crossAxis:j,alignmentAxis:w}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return m&&typeof w=="number"&&(j=m==="end"?w*-1:w),p?{x:j*g,y:E*y}:{x:E*y,y:j*g}}const VC=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var i,r;const{x:u,y:c,placement:d,middlewareData:m}=l,p=await YC(l,n);return d===((i=m.offset)==null?void 0:i.placement)&&(r=m.arrow)!=null&&r.alignmentOffset?{}:{x:u+p.x,y:c+p.y,data:{...p,placement:d}}}}},KC=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:i,y:r,placement:u}=l,{mainAxis:c=!0,crossAxis:d=!1,limiter:m={fn:N=>{let{x:T,y:_}=N;return{x:T,y:_}}},...p}=zr(n,l),y={x:i,y:r},g=await qv(l,p),x=hl(ns(u)),E=Uv(x);let j=y[E],w=y[x];if(c){const N=E==="y"?"top":"left",T=E==="y"?"bottom":"right",_=j+g[N],D=j-g[T];j=Td(_,j,D)}if(d){const N=x==="y"?"top":"left",T=x==="y"?"bottom":"right",_=w+g[N],D=w-g[T];w=Td(_,w,D)}const C=m.fn({...l,[E]:j,[x]:w});return{...C,data:{x:C.x-i,y:C.y-r,enabled:{[E]:c,[x]:d}}}}}};function Lu(){return typeof window<"u"}function fi(n){return Bv(n)?(n.nodeName||"").toLowerCase():"#document"}function on(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function la(n){var l;return(l=(Bv(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function Bv(n){return Lu()?n instanceof Node||n instanceof on(n).Node:!1}function kn(n){return Lu()?n instanceof Element||n instanceof on(n).Element:!1}function ea(n){return Lu()?n instanceof HTMLElement||n instanceof on(n).HTMLElement:!1}function By(n){return!Lu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof on(n).ShadowRoot}function Br(n){const{overflow:l,overflowX:i,overflowY:r,display:u}=Un(n);return/auto|scroll|overlay|hidden|clip/.test(l+r+i)&&!["inline","contents"].includes(u)}function GC(n){return["table","td","th"].includes(fi(n))}function ku(n){return[":popover-open",":modal"].some(l=>{try{return n.matches(l)}catch{return!1}})}function rh(n){const l=oh(),i=kn(n)?Un(n):n;return["transform","translate","scale","rotate","perspective"].some(r=>i[r]?i[r]!=="none":!1)||(i.containerType?i.containerType!=="normal":!1)||!l&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!l&&(i.filter?i.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(i.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(i.contain||"").includes(r))}function FC(n){let l=vl(n);for(;ea(l)&&!Ws(l);){if(rh(l))return l;if(ku(l))return null;l=vl(l)}return null}function oh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ws(n){return["html","body","#document"].includes(fi(n))}function Un(n){return on(n).getComputedStyle(n)}function Uu(n){return kn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function vl(n){if(fi(n)==="html")return n;const l=n.assignedSlot||n.parentNode||By(n)&&n.host||la(n);return By(l)?l.host:l}function Hv(n){const l=vl(n);return Ws(l)?n.ownerDocument?n.ownerDocument.body:n.body:ea(l)&&Br(l)?l:Hv(l)}function wr(n,l,i){var r;l===void 0&&(l=[]),i===void 0&&(i=!0);const u=Hv(n),c=u===((r=n.ownerDocument)==null?void 0:r.body),d=on(u);if(c){const m=Rd(d);return l.concat(d,d.visualViewport||[],Br(u)?u:[],m&&i?wr(m):[])}return l.concat(u,wr(u,[],i))}function Rd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Qv(n){const l=Un(n);let i=parseFloat(l.width)||0,r=parseFloat(l.height)||0;const u=ea(n),c=u?n.offsetWidth:i,d=u?n.offsetHeight:r,m=bu(i)!==c||bu(r)!==d;return m&&(i=c,r=d),{width:i,height:r,$:m}}function uh(n){return kn(n)?n:n.contextElement}function Xs(n){const l=uh(n);if(!ea(l))return Wn(1);const i=l.getBoundingClientRect(),{width:r,height:u,$:c}=Qv(l);let d=(c?bu(i.width):i.width)/r,m=(c?bu(i.height):i.height)/u;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const XC=Wn(0);function $v(n){const l=on(n);return!oh()||!l.visualViewport?XC:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function ZC(n,l,i){return l===void 0&&(l=!1),!i||l&&i!==on(n)?!1:l}function as(n,l,i,r){l===void 0&&(l=!1),i===void 0&&(i=!1);const u=n.getBoundingClientRect(),c=uh(n);let d=Wn(1);l&&(r?kn(r)&&(d=Xs(r)):d=Xs(n));const m=ZC(c,i,r)?$v(c):Wn(0);let p=(u.left+m.x)/d.x,y=(u.top+m.y)/d.y,g=u.width/d.x,x=u.height/d.y;if(c){const E=on(c),j=r&&kn(r)?on(r):r;let w=E,C=Rd(w);for(;C&&r&&j!==w;){const N=Xs(C),T=C.getBoundingClientRect(),_=Un(C),D=T.left+(C.clientLeft+parseFloat(_.paddingLeft))*N.x,H=T.top+(C.clientTop+parseFloat(_.paddingTop))*N.y;p*=N.x,y*=N.y,g*=N.x,x*=N.y,p+=D,y+=H,w=on(C),C=Rd(w)}}return Su({width:g,height:x,x:p,y})}function ch(n,l){const i=Uu(n).scrollLeft;return l?l.left+i:as(la(n)).left+i}function Yv(n,l,i){i===void 0&&(i=!1);const r=n.getBoundingClientRect(),u=r.left+l.scrollLeft-(i?0:ch(n,r)),c=r.top+l.scrollTop;return{x:u,y:c}}function PC(n){let{elements:l,rect:i,offsetParent:r,strategy:u}=n;const c=u==="fixed",d=la(r),m=l?ku(l.floating):!1;if(r===d||m&&c)return i;let p={scrollLeft:0,scrollTop:0},y=Wn(1);const g=Wn(0),x=ea(r);if((x||!x&&!c)&&((fi(r)!=="body"||Br(d))&&(p=Uu(r)),ea(r))){const j=as(r);y=Xs(r),g.x=j.x+r.clientLeft,g.y=j.y+r.clientTop}const E=d&&!x&&!c?Yv(d,p,!0):Wn(0);return{width:i.width*y.x,height:i.height*y.y,x:i.x*y.x-p.scrollLeft*y.x+g.x+E.x,y:i.y*y.y-p.scrollTop*y.y+g.y+E.y}}function JC(n){return Array.from(n.getClientRects())}function IC(n){const l=la(n),i=Uu(n),r=n.ownerDocument.body,u=Jl(l.scrollWidth,l.clientWidth,r.scrollWidth,r.clientWidth),c=Jl(l.scrollHeight,l.clientHeight,r.scrollHeight,r.clientHeight);let d=-i.scrollLeft+ch(n);const m=-i.scrollTop;return Un(r).direction==="rtl"&&(d+=Jl(l.clientWidth,r.clientWidth)-u),{width:u,height:c,x:d,y:m}}function WC(n,l){const i=on(n),r=la(n),u=i.visualViewport;let c=r.clientWidth,d=r.clientHeight,m=0,p=0;if(u){c=u.width,d=u.height;const y=oh();(!y||y&&l==="fixed")&&(m=u.offsetLeft,p=u.offsetTop)}return{width:c,height:d,x:m,y:p}}function e5(n,l){const i=as(n,!0,l==="fixed"),r=i.top+n.clientTop,u=i.left+n.clientLeft,c=ea(n)?Xs(n):Wn(1),d=n.clientWidth*c.x,m=n.clientHeight*c.y,p=u*c.x,y=r*c.y;return{width:d,height:m,x:p,y}}function Hy(n,l,i){let r;if(l==="viewport")r=WC(n,i);else if(l==="document")r=IC(la(n));else if(kn(l))r=e5(l,i);else{const u=$v(n);r={x:l.x-u.x,y:l.y-u.y,width:l.width,height:l.height}}return Su(r)}function Vv(n,l){const i=vl(n);return i===l||!kn(i)||Ws(i)?!1:Un(i).position==="fixed"||Vv(i,l)}function t5(n,l){const i=l.get(n);if(i)return i;let r=wr(n,[],!1).filter(m=>kn(m)&&fi(m)!=="body"),u=null;const c=Un(n).position==="fixed";let d=c?vl(n):n;for(;kn(d)&&!Ws(d);){const m=Un(d),p=rh(d);!p&&m.position==="fixed"&&(u=null),(c?!p&&!u:!p&&m.position==="static"&&!!u&&["absolute","fixed"].includes(u.position)||Br(d)&&!p&&Vv(n,d))?r=r.filter(g=>g!==d):u=m,d=vl(d)}return l.set(n,r),r}function n5(n){let{element:l,boundary:i,rootBoundary:r,strategy:u}=n;const d=[...i==="clippingAncestors"?ku(l)?[]:t5(l,this._c):[].concat(i),r],m=d[0],p=d.reduce((y,g)=>{const x=Hy(l,g,u);return y.top=Jl(x.top,y.top),y.right=Is(x.right,y.right),y.bottom=Is(x.bottom,y.bottom),y.left=Jl(x.left,y.left),y},Hy(l,m,u));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function a5(n){const{width:l,height:i}=Qv(n);return{width:l,height:i}}function l5(n,l,i){const r=ea(l),u=la(l),c=i==="fixed",d=as(n,!0,c,l);let m={scrollLeft:0,scrollTop:0};const p=Wn(0);function y(){p.x=ch(u)}if(r||!r&&!c)if((fi(l)!=="body"||Br(u))&&(m=Uu(l)),r){const j=as(l,!0,c,l);p.x=j.x+l.clientLeft,p.y=j.y+l.clientTop}else u&&y();c&&!r&&u&&y();const g=u&&!r&&!c?Yv(u,m):Wn(0),x=d.left+m.scrollLeft-p.x-g.x,E=d.top+m.scrollTop-p.y-g.y;return{x,y:E,width:d.width,height:d.height}}function ld(n){return Un(n).position==="static"}function Qy(n,l){if(!ea(n)||Un(n).position==="fixed")return null;if(l)return l(n);let i=n.offsetParent;return la(n)===i&&(i=i.ownerDocument.body),i}function Kv(n,l){const i=on(n);if(ku(n))return i;if(!ea(n)){let u=vl(n);for(;u&&!Ws(u);){if(kn(u)&&!ld(u))return u;u=vl(u)}return i}let r=Qy(n,l);for(;r&&GC(r)&&ld(r);)r=Qy(r,l);return r&&Ws(r)&&ld(r)&&!rh(r)?i:r||FC(n)||i}const s5=async function(n){const l=this.getOffsetParent||Kv,i=this.getDimensions,r=await i(n.floating);return{reference:l5(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function i5(n){return Un(n).direction==="rtl"}const r5={convertOffsetParentRelativeRectToViewportRelativeRect:PC,getDocumentElement:la,getClippingRect:n5,getOffsetParent:Kv,getElementRects:s5,getClientRects:JC,getDimensions:a5,getScale:Xs,isElement:kn,isRTL:i5};function Gv(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function o5(n,l){let i=null,r;const u=la(n);function c(){var m;clearTimeout(r),(m=i)==null||m.disconnect(),i=null}function d(m,p){m===void 0&&(m=!1),p===void 0&&(p=1),c();const y=n.getBoundingClientRect(),{left:g,top:x,width:E,height:j}=y;if(m||l(),!E||!j)return;const w=tu(x),C=tu(u.clientWidth-(g+E)),N=tu(u.clientHeight-(x+j)),T=tu(g),D={rootMargin:-w+"px "+-C+"px "+-N+"px "+-T+"px",threshold:Jl(0,Is(1,p))||1};let H=!0;function V(X){const G=X[0].intersectionRatio;if(G!==p){if(!H)return d();G?d(!1,G):r=setTimeout(()=>{d(!1,1e-7)},1e3)}G===1&&!Gv(y,n.getBoundingClientRect())&&d(),H=!1}try{i=new IntersectionObserver(V,{...D,root:u.ownerDocument})}catch{i=new IntersectionObserver(V,D)}i.observe(n)}return d(!0),c}function u5(n,l,i,r){r===void 0&&(r={});const{ancestorScroll:u=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,y=uh(n),g=u||c?[...y?wr(y):[],...wr(l)]:[];g.forEach(T=>{u&&T.addEventListener("scroll",i,{passive:!0}),c&&T.addEventListener("resize",i)});const x=y&&m?o5(y,i):null;let E=-1,j=null;d&&(j=new ResizeObserver(T=>{let[_]=T;_&&_.target===y&&j&&(j.unobserve(l),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var D;(D=j)==null||D.observe(l)})),i()}),y&&!p&&j.observe(y),j.observe(l));let w,C=p?as(n):null;p&&N();function N(){const T=as(n);C&&!Gv(C,T)&&i(),C=T,w=requestAnimationFrame(N)}return i(),()=>{var T;g.forEach(_=>{u&&_.removeEventListener("scroll",i),c&&_.removeEventListener("resize",i)}),x?.(),(T=j)==null||T.disconnect(),j=null,p&&cancelAnimationFrame(w)}}const c5=VC,f5=KC,d5=$C,h5=QC,$y=(n,l,i)=>{const r=new Map,u={platform:r5,...i},c={...u.platform,_c:r};return HC(n,l,{...u,platform:c})};var sd={exports:{}};var Yy;function m5(){return Yy||(Yy=1,function(n){(function(){var l={}.hasOwnProperty;function i(){for(var c="",d=0;d<arguments.length;d++){var m=arguments[d];m&&(c=u(c,r(m)))}return c}function r(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var d="";for(var m in c)l.call(c,m)&&c[m]&&(d=u(d,m));return d}function u(c,d){return d?c?c+" "+d:c+d:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()}(sd)),sd.exports}var p5=m5();const Od=Dd(p5);var Vy={};const y5="react-tooltip-core-styles",v5="react-tooltip-base-styles",Ky={core:!1,base:!1};function Gy({css:n,id:l=v5,type:i="base",ref:r}){var u,c;if(!n||typeof document>"u"||Ky[i]||i==="core"&&typeof process<"u"&&(!((u=process==null?void 0:Vy)===null||u===void 0)&&u.REACT_TOOLTIP_DISABLE_CORE_STYLES)||i!=="base"&&typeof process<"u"&&(!((c=process==null?void 0:Vy)===null||c===void 0)&&c.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;i==="core"&&(l=y5),r||(r={});const{insertAt:d}=r;if(document.getElementById(l))return;const m=document.head||document.getElementsByTagName("head")[0],p=document.createElement("style");p.id=l,p.type="text/css",d==="top"&&m.firstChild?m.insertBefore(p,m.firstChild):m.appendChild(p),p.styleSheet?p.styleSheet.cssText=n:p.appendChild(document.createTextNode(n)),Ky[i]=!0}const Fy=async({elementReference:n=null,tooltipReference:l=null,tooltipArrowReference:i=null,place:r="top",offset:u=10,strategy:c="absolute",middlewares:d=[c5(Number(u)),d5({fallbackAxisSideDirection:"start"}),f5({padding:5})],border:m,arrowSize:p=8})=>{if(!n)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(l===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const y=d;return i?(y.push(h5({element:i,padding:5})),$y(n,l,{placement:r,strategy:c,middleware:y}).then(({x:g,y:x,placement:E,middlewareData:j})=>{var w,C;const N={left:`${g}px`,top:`${x}px`,border:m},{x:T,y:_}=(w=j.arrow)!==null&&w!==void 0?w:{x:0,y:0},D=(C={top:"bottom",right:"left",bottom:"top",left:"right"}[E.split("-")[0]])!==null&&C!==void 0?C:"bottom",H=m&&{borderBottom:m,borderRight:m};let V=0;if(m){const X=`${m}`.match(/(\d+)px/);V=X?.[1]?Number(X[1]):1}return{tooltipStyles:N,tooltipArrowStyles:{left:T!=null?`${T}px`:"",top:_!=null?`${_}px`:"",right:"",bottom:"",...H,[D]:`-${p/2+V}px`},place:E}})):$y(n,l,{placement:"bottom",strategy:c,middleware:y}).then(({x:g,y:x,placement:E})=>({tooltipStyles:{left:`${g}px`,top:`${x}px`},tooltipArrowStyles:{},place:E}))},Xy=(n,l)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(n,l),Zy=(n,l,i)=>{let r=null;const u=function(...c){const d=()=>{r=null};!r&&(n.apply(this,c),r=setTimeout(d,l))};return u.cancel=()=>{r&&(clearTimeout(r),r=null)},u},Py=n=>n!==null&&!Array.isArray(n)&&typeof n=="object",Md=(n,l)=>{if(n===l)return!0;if(Array.isArray(n)&&Array.isArray(l))return n.length===l.length&&n.every((u,c)=>Md(u,l[c]));if(Array.isArray(n)!==Array.isArray(l))return!1;if(!Py(n)||!Py(l))return n===l;const i=Object.keys(n),r=Object.keys(l);return i.length===r.length&&i.every(u=>Md(n[u],l[u]))},g5=n=>{if(!(n instanceof HTMLElement||n instanceof SVGElement))return!1;const l=getComputedStyle(n);return["overflow","overflow-x","overflow-y"].some(i=>{const r=l.getPropertyValue(i);return r==="auto"||r==="scroll"})},Jy=n=>{if(!n)return null;let l=n.parentElement;for(;l;){if(g5(l))return l;l=l.parentElement}return document.scrollingElement||document.documentElement},b5=typeof window<"u"?b.useLayoutEffect:b.useEffect,jn=n=>{n.current&&(clearTimeout(n.current),n.current=null)},x5="DEFAULT_TOOLTIP_ID",S5={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},w5=b.createContext({getTooltipData:()=>S5});function Fv(n=x5){return b.useContext(w5).getTooltipData(n)}var Ks={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},id={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const E5=({forwardRef:n,id:l,className:i,classNameArrow:r,variant:u="dark",anchorId:c,anchorSelect:d,place:m="top",offset:p=10,events:y=["hover"],openOnClick:g=!1,positionStrategy:x="absolute",middlewares:E,wrapper:j,delayShow:w=0,delayHide:C=0,float:N=!1,hidden:T=!1,noArrow:_=!1,clickable:D=!1,closeOnEsc:H=!1,closeOnScroll:V=!1,closeOnResize:X=!1,openEvents:G,closeEvents:P,globalCloseEvents:ae,imperativeModeOnly:ye,style:Ae,position:Ce,afterShow:Ke,afterHide:me,disableTooltip:_e,content:q,contentWrapperRef:F,isOpen:J,defaultIsOpen:he=!1,setIsOpen:R,activeAnchor:Q,setActiveAnchor:I,border:W,opacity:ne,arrowColor:ge,arrowSize:oe=8,role:gt="tooltip"})=>{var De;const Ge=b.useRef(null),Hn=b.useRef(null),Et=b.useRef(null),fn=b.useRef(null),sa=b.useRef(null),[dn,di]=b.useState({tooltipStyles:{},tooltipArrowStyles:{},place:m}),[Mt,Dt]=b.useState(!1),[ia,Qn]=b.useState(!1),[Ye,$n]=b.useState(null),xl=b.useRef(!1),ka=b.useRef(null),{anchorRefs:Sl,setActiveAnchor:ss}=Fv(l),hn=b.useRef(!1),[Je,Bt]=b.useState([]),tt=b.useRef(!1),Ua=g||y.includes("click"),hi=Ua||G?.click||G?.dblclick||G?.mousedown,za=G?{...G}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!G&&Ua&&Object.assign(za,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const mn=P?{...P}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!P&&Ua&&Object.assign(mn,{mouseleave:!1,blur:!1,mouseout:!1});const Ct=ae?{...ae}:{escape:H||!1,scroll:V||!1,resize:X||!1,clickOutsideAnchor:hi||!1};ye&&(Object.assign(za,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(mn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Ct,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),b5(()=>(tt.current=!0,()=>{tt.current=!1}),[]);const ze=Z=>{tt.current&&(Z&&Qn(!0),setTimeout(()=>{tt.current&&(R?.(Z),J===void 0&&Dt(Z))},10))};b.useEffect(()=>{if(J===void 0)return()=>null;J&&Qn(!0);const Z=setTimeout(()=>{Dt(J)},10);return()=>{clearTimeout(Z)}},[J]),b.useEffect(()=>{if(Mt!==xl.current)if(jn(sa),xl.current=Mt,Mt)Ke?.();else{const Z=(te=>{const ce=te.match(/^([\d.]+)(ms|s)$/);if(!ce)return 0;const[,Xe,ht]=ce;return Number(Xe)*(ht==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));sa.current=setTimeout(()=>{Qn(!1),$n(null),me?.()},Z+25)}},[Mt]);const ra=Z=>{di(te=>Md(te,Z)?te:Z)},An=(Z=w)=>{jn(Et),ia?ze(!0):Et.current=setTimeout(()=>{ze(!0)},Z)},qa=(Z=C)=>{jn(fn),fn.current=setTimeout(()=>{hn.current||ze(!1)},Z)},Ba=Z=>{var te;if(!Z)return;const ce=(te=Z.currentTarget)!==null&&te!==void 0?te:Z.target;if(!ce?.isConnected)return I(null),void ss({current:null});w?An():ze(!0),I(ce),ss({current:ce}),jn(fn)},oa=()=>{D?qa(C||100):C?qa():ze(!1),jn(Et)},Yn=({x:Z,y:te})=>{var ce;const Xe={getBoundingClientRect:()=>({x:Z,y:te,width:0,height:0,top:te,left:Z,right:Z,bottom:te})};Fy({place:(ce=Ye?.place)!==null&&ce!==void 0?ce:m,offset:p,elementReference:Xe,tooltipReference:Ge.current,tooltipArrowReference:Hn.current,strategy:x,middlewares:E,border:W,arrowSize:oe}).then(ht=>{ra(ht)})},pn=Z=>{if(!Z)return;const te=Z,ce={x:te.clientX,y:te.clientY};Yn(ce),ka.current=ce},wl=Z=>{var te;if(!Mt)return;const ce=Z.target;ce.isConnected&&(!((te=Ge.current)===null||te===void 0)&&te.contains(ce)||[document.querySelector(`[id='${c}']`),...Je].some(Xe=>Xe?.contains(ce))||(ze(!1),jn(Et)))},El=Zy(Ba,50),nt=Zy(oa,50),_t=Z=>{nt.cancel(),El(Z)},ie=()=>{El.cancel(),nt()},Se=b.useCallback(()=>{var Z,te;const ce=(Z=Ye?.position)!==null&&Z!==void 0?Z:Ce;ce?Yn(ce):N?ka.current&&Yn(ka.current):Q?.isConnected&&Fy({place:(te=Ye?.place)!==null&&te!==void 0?te:m,offset:p,elementReference:Q,tooltipReference:Ge.current,tooltipArrowReference:Hn.current,strategy:x,middlewares:E,border:W,arrowSize:oe}).then(Xe=>{tt.current&&ra(Xe)})},[Mt,Q,q,Ae,m,Ye?.place,p,x,Ce,Ye?.position,N,oe]);b.useEffect(()=>{var Z,te;const ce=new Set(Sl);Je.forEach(Oe=>{_e?.(Oe)||ce.add({current:Oe})});const Xe=document.querySelector(`[id='${c}']`);Xe&&!_e?.(Xe)&&ce.add({current:Xe});const ht=()=>{ze(!1)},yn=Jy(Q),Jt=Jy(Ge.current);Ct.scroll&&(window.addEventListener("scroll",ht),yn?.addEventListener("scroll",ht),Jt?.addEventListener("scroll",ht));let at=null;Ct.resize?window.addEventListener("resize",ht):Q&&Ge.current&&(at=u5(Q,Ge.current,Se,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const jt=Oe=>{Oe.key==="Escape"&&ze(!1)};Ct.escape&&window.addEventListener("keydown",jt),Ct.clickOutsideAnchor&&window.addEventListener("click",wl);const Re=[],It=Oe=>!!(Oe?.target&&Q?.contains(Oe.target)),Cl=Oe=>{Mt&&It(Oe)||Ba(Oe)},Ha=Oe=>{Mt&&It(Oe)&&oa()},lt=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],mi=["click","dblclick","mousedown","mouseup"];Object.entries(za).forEach(([Oe,vn])=>{vn&&(lt.includes(Oe)?Re.push({event:Oe,listener:_t}):mi.includes(Oe)&&Re.push({event:Oe,listener:Cl}))}),Object.entries(mn).forEach(([Oe,vn])=>{vn&&(lt.includes(Oe)?Re.push({event:Oe,listener:ie}):mi.includes(Oe)&&Re.push({event:Oe,listener:Ha}))}),N&&Re.push({event:"pointermove",listener:pn});const pi=()=>{hn.current=!0},Vn=()=>{hn.current=!1,oa()},ua=D&&(mn.mouseout||mn.mouseleave);return ua&&((Z=Ge.current)===null||Z===void 0||Z.addEventListener("mouseover",pi),(te=Ge.current)===null||te===void 0||te.addEventListener("mouseout",Vn)),Re.forEach(({event:Oe,listener:vn})=>{ce.forEach(is=>{var _l;(_l=is.current)===null||_l===void 0||_l.addEventListener(Oe,vn)})}),()=>{var Oe,vn;Ct.scroll&&(window.removeEventListener("scroll",ht),yn?.removeEventListener("scroll",ht),Jt?.removeEventListener("scroll",ht)),Ct.resize?window.removeEventListener("resize",ht):at?.(),Ct.clickOutsideAnchor&&window.removeEventListener("click",wl),Ct.escape&&window.removeEventListener("keydown",jt),ua&&((Oe=Ge.current)===null||Oe===void 0||Oe.removeEventListener("mouseover",pi),(vn=Ge.current)===null||vn===void 0||vn.removeEventListener("mouseout",Vn)),Re.forEach(({event:is,listener:_l})=>{ce.forEach(rs=>{var Qa;(Qa=rs.current)===null||Qa===void 0||Qa.removeEventListener(is,_l)})})}},[Q,Se,ia,Sl,Je,G,P,ae,Ua,w,C]),b.useEffect(()=>{var Z,te;let ce=(te=(Z=Ye?.anchorSelect)!==null&&Z!==void 0?Z:d)!==null&&te!==void 0?te:"";!ce&&l&&(ce=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const Xe=new MutationObserver(ht=>{const yn=[],Jt=[];ht.forEach(at=>{if(at.type==="attributes"&&at.attributeName==="data-tooltip-id"&&(at.target.getAttribute("data-tooltip-id")===l?yn.push(at.target):at.oldValue===l&&Jt.push(at.target)),at.type==="childList"){if(Q){const jt=[...at.removedNodes].filter(Re=>Re.nodeType===1);if(ce)try{Jt.push(...jt.filter(Re=>Re.matches(ce))),Jt.push(...jt.flatMap(Re=>[...Re.querySelectorAll(ce)]))}catch{}jt.some(Re=>{var It;return!!(!((It=Re?.contains)===null||It===void 0)&&It.call(Re,Q))&&(Qn(!1),ze(!1),I(null),jn(Et),jn(fn),!0)})}if(ce)try{const jt=[...at.addedNodes].filter(Re=>Re.nodeType===1);yn.push(...jt.filter(Re=>Re.matches(ce))),yn.push(...jt.flatMap(Re=>[...Re.querySelectorAll(ce)]))}catch{}}}),(yn.length||Jt.length)&&Bt(at=>[...at.filter(jt=>!Jt.includes(jt)),...yn])});return Xe.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{Xe.disconnect()}},[l,d,Ye?.anchorSelect,Q]),b.useEffect(()=>{Se()},[Se]),b.useEffect(()=>{if(!F?.current)return()=>null;const Z=new ResizeObserver(()=>{setTimeout(()=>Se())});return Z.observe(F.current),()=>{Z.disconnect()}},[q,F?.current]),b.useEffect(()=>{var Z;const te=document.querySelector(`[id='${c}']`),ce=[...Je,te];Q&&ce.includes(Q)||I((Z=Je[0])!==null&&Z!==void 0?Z:te)},[c,Je,Q]),b.useEffect(()=>(he&&ze(!0),()=>{jn(Et),jn(fn)}),[]),b.useEffect(()=>{var Z;let te=(Z=Ye?.anchorSelect)!==null&&Z!==void 0?Z:d;if(!te&&l&&(te=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`),te)try{const ce=Array.from(document.querySelectorAll(te));Bt(ce)}catch{Bt([])}},[l,d,Ye?.anchorSelect]),b.useEffect(()=>{Et.current&&(jn(Et),An(w))},[w]);const Lt=(De=Ye?.content)!==null&&De!==void 0?De:q,Nt=Mt&&Object.keys(dn.tooltipStyles).length>0;return b.useImperativeHandle(n,()=>({open:Z=>{if(Z?.anchorSelect)try{document.querySelector(Z.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${Z.anchorSelect}" is not a valid CSS selector`)}$n(Z??null),Z?.delay?An(Z.delay):ze(!0)},close:Z=>{Z?.delay?qa(Z.delay):ze(!1)},activeAnchor:Q,place:dn.place,isOpen:!!(ia&&!T&&Lt&&Nt)})),ia&&!T&&Lt?fl.createElement(j,{id:l,role:gt,className:Od("react-tooltip",Ks.tooltip,id.tooltip,id[u],i,`react-tooltip__place-${dn.place}`,Ks[Nt?"show":"closing"],Nt?"react-tooltip__show":"react-tooltip__closing",x==="fixed"&&Ks.fixed,D&&Ks.clickable),onTransitionEnd:Z=>{jn(sa),Mt||Z.propertyName!=="opacity"||(Qn(!1),$n(null),me?.())},style:{...Ae,...dn.tooltipStyles,opacity:ne!==void 0&&Nt?ne:void 0},ref:Ge},Lt,fl.createElement(j,{className:Od("react-tooltip-arrow",Ks.arrow,id.arrow,r,_&&Ks.noArrow),style:{...dn.tooltipArrowStyles,background:ge?`linear-gradient(to right bottom, transparent 50%, ${ge} 50%)`:void 0,"--rt-arrow-size":`${oe}px`},ref:Hn})):null},C5=({content:n})=>fl.createElement("span",{dangerouslySetInnerHTML:{__html:n}}),wu=fl.forwardRef(({id:n,anchorId:l,anchorSelect:i,content:r,html:u,render:c,className:d,classNameArrow:m,variant:p="dark",place:y="top",offset:g=10,wrapper:x="div",children:E=null,events:j=["hover"],openOnClick:w=!1,positionStrategy:C="absolute",middlewares:N,delayShow:T=0,delayHide:_=0,float:D=!1,hidden:H=!1,noArrow:V=!1,clickable:X=!1,closeOnEsc:G=!1,closeOnScroll:P=!1,closeOnResize:ae=!1,openEvents:ye,closeEvents:Ae,globalCloseEvents:Ce,imperativeModeOnly:Ke=!1,style:me,position:_e,isOpen:q,defaultIsOpen:F=!1,disableStyleInjection:J=!1,border:he,opacity:R,arrowColor:Q,arrowSize:I,setIsOpen:W,afterShow:ne,afterHide:ge,disableTooltip:oe,role:gt="tooltip"},De)=>{const[Ge,Hn]=b.useState(r),[Et,fn]=b.useState(u),[sa,dn]=b.useState(y),[di,Mt]=b.useState(p),[Dt,ia]=b.useState(g),[Qn,Ye]=b.useState(T),[$n,xl]=b.useState(_),[ka,Sl]=b.useState(D),[ss,hn]=b.useState(H),[Je,Bt]=b.useState(x),[tt,Ua]=b.useState(j),[hi,za]=b.useState(C),[mn,Ct]=b.useState(null),[ze,ra]=b.useState(null),An=b.useRef(J),{anchorRefs:qa,activeAnchor:Ba}=Fv(n),oa=nt=>nt?.getAttributeNames().reduce((_t,ie)=>{var Se;return ie.startsWith("data-tooltip-")&&(_t[ie.replace(/^data-tooltip-/,"")]=(Se=nt?.getAttribute(ie))!==null&&Se!==void 0?Se:null),_t},{}),Yn=nt=>{const _t={place:ie=>{var Se;dn((Se=ie)!==null&&Se!==void 0?Se:y)},content:ie=>{Hn(ie??r)},html:ie=>{fn(ie??u)},variant:ie=>{var Se;Mt((Se=ie)!==null&&Se!==void 0?Se:p)},offset:ie=>{ia(ie===null?g:Number(ie))},wrapper:ie=>{var Se;Bt((Se=ie)!==null&&Se!==void 0?Se:x)},events:ie=>{const Se=ie?.split(" ");Ua(Se??j)},"position-strategy":ie=>{var Se;za((Se=ie)!==null&&Se!==void 0?Se:C)},"delay-show":ie=>{Ye(ie===null?T:Number(ie))},"delay-hide":ie=>{xl(ie===null?_:Number(ie))},float:ie=>{Sl(ie===null?D:ie==="true")},hidden:ie=>{hn(ie===null?H:ie==="true")},"class-name":ie=>{Ct(ie)}};Object.values(_t).forEach(ie=>ie(null)),Object.entries(nt).forEach(([ie,Se])=>{var Lt;(Lt=_t[ie])===null||Lt===void 0||Lt.call(_t,Se)})};b.useEffect(()=>{Hn(r)},[r]),b.useEffect(()=>{fn(u)},[u]),b.useEffect(()=>{dn(y)},[y]),b.useEffect(()=>{Mt(p)},[p]),b.useEffect(()=>{ia(g)},[g]),b.useEffect(()=>{Ye(T)},[T]),b.useEffect(()=>{xl(_)},[_]),b.useEffect(()=>{Sl(D)},[D]),b.useEffect(()=>{hn(H)},[H]),b.useEffect(()=>{za(C)},[C]),b.useEffect(()=>{An.current!==J&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[J]),b.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:J==="core",disableBase:J}}))},[]),b.useEffect(()=>{var nt;const _t=new Set(qa);let ie=i;if(!ie&&n&&(ie=`[data-tooltip-id='${n.replace(/'/g,"\\'")}']`),ie)try{document.querySelectorAll(ie).forEach(te=>{_t.add({current:te})})}catch{console.warn(`[react-tooltip] "${ie}" is not a valid CSS selector`)}const Se=document.querySelector(`[id='${l}']`);if(Se&&_t.add({current:Se}),!_t.size)return()=>null;const Lt=(nt=ze??Se)!==null&&nt!==void 0?nt:Ba.current,Nt=new MutationObserver(te=>{te.forEach(ce=>{var Xe;if(!Lt||ce.type!=="attributes"||!(!((Xe=ce.attributeName)===null||Xe===void 0)&&Xe.startsWith("data-tooltip-")))return;const ht=oa(Lt);Yn(ht)})}),Z={attributes:!0,childList:!1,subtree:!1};if(Lt){const te=oa(Lt);Yn(te),Nt.observe(Lt,Z)}return()=>{Nt.disconnect()}},[qa,Ba,ze,l,i]),b.useEffect(()=>{me?.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),he&&!Xy("border",`${he}`)&&console.warn(`[react-tooltip] "${he}" is not a valid \`border\`.`),me?.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),R&&!Xy("opacity",`${R}`)&&console.warn(`[react-tooltip] "${R}" is not a valid \`opacity\`.`)},[]);let pn=E;const wl=b.useRef(null);if(c){const nt=c({content:ze?.getAttribute("data-tooltip-content")||Ge||null,activeAnchor:ze});pn=nt?fl.createElement("div",{ref:wl,className:"react-tooltip-content-wrapper"},nt):null}else Ge&&(pn=Ge);Et&&(pn=fl.createElement(C5,{content:Et}));const El={forwardRef:De,id:n,anchorId:l,anchorSelect:i,className:Od(d,mn),classNameArrow:m,content:pn,contentWrapperRef:wl,place:sa,variant:di,offset:Dt,wrapper:Je,events:tt,openOnClick:w,positionStrategy:hi,middlewares:N,delayShow:Qn,delayHide:$n,float:ka,hidden:ss,noArrow:V,clickable:X,closeOnEsc:G,closeOnScroll:P,closeOnResize:ae,openEvents:ye,closeEvents:Ae,globalCloseEvents:Ce,imperativeModeOnly:Ke,style:me,position:_e,isOpen:q,defaultIsOpen:F,border:he,opacity:R,arrowColor:Q,arrowSize:I,setIsOpen:W,afterShow:ne,afterHide:ge,disableTooltip:oe,activeAnchor:ze,setActiveAnchor:nt=>ra(nt),role:gt};return fl.createElement(E5,{...El})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",n=>{n.detail.disableCore||Gy({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),n.detail.disableBase||Gy({css:`
193
- .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});const _5=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("circle",{cx:256,cy:256,r:32,fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32}),b.createElement("circle",{cx:256,cy:416,r:32,fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32}),b.createElement("circle",{cx:256,cy:96,r:32,fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32})),Xv=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M320 146s24.36-12-64-12a160 160 0 10160 160",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:32}),b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M256 58l80 80-80 80"})),N5=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("rect",{x:128,y:128,width:336,height:336,rx:57,ry:57,fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:32}),b.createElement("path",{d:"M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24M296 216v160M376 296H216",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32})),j5=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("circle",{cx:128,cy:256,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("circle",{cx:384,cy:112,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("circle",{cx:384,cy:400,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M169.83 279.53l172.34 96.94M342.17 135.53l-172.34 96.94"})),Zv=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M32 144h448M112 256h288M208 368h96"})),Pv=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M256 112v288M400 256H112"})),T5=()=>{const n=eh(),l=sE();return{rename:async r=>{if(n){const u=await Ur("New tab name",r);u&&await l.mutateAsync({id:n,payload:{name:u}})}return Promise.resolve()}}},Jv=["shift","alt","meta","mod","ctrl","control"],A5={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function yl(n){return(A5[n.trim()]||n.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Iv(n){return Jv.includes(n)}function rd(n,l=","){return n.toLowerCase().split(l)}function od(n,l="+",i=">",r=!1,u){let c=[],d=!1;n=n.trim(),n.includes(i)?(d=!0,c=n.toLocaleLowerCase().split(i).map(y=>yl(y))):c=n.toLocaleLowerCase().split(l).map(y=>yl(y));const m={alt:c.includes("alt"),ctrl:c.includes("ctrl")||c.includes("control"),shift:c.includes("shift"),meta:c.includes("meta"),mod:c.includes("mod"),useKey:r},p=c.filter(y=>!Jv.includes(y));return{...m,keys:p,description:u,isSequence:d,hotkey:n}}typeof document<"u"&&(document.addEventListener("keydown",n=>{n.code!==void 0&&Wv([yl(n.code)])}),document.addEventListener("keyup",n=>{n.code!==void 0&&eg([yl(n.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Na.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Na.clear()},0)}));const Na=new Set;function fh(n){return Array.isArray(n)}function R5(n,l=","){return(fh(n)?n:n.split(l)).every(i=>Na.has(i.trim().toLowerCase()))}function Wv(n){const l=Array.isArray(n)?n:[n];Na.has("meta")&&Na.forEach(i=>!Iv(i)&&Na.delete(i.toLowerCase())),l.forEach(i=>Na.add(i.toLowerCase()))}function eg(n){const l=Array.isArray(n)?n:[n];n==="meta"?Na.clear():l.forEach(i=>Na.delete(i.toLowerCase()))}function O5(n,l,i){(typeof i=="function"&&i(n,l)||i===!0)&&n.preventDefault()}function M5(n,l,i){return typeof i=="function"?i(n,l):i===!0||i===void 0}const D5=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function L5(n){return tg(n,D5)}function tg(n,l=!1){const{target:i,composed:r}=n;let u,c;return k5(i)&&r?(u=n.composedPath()[0]&&n.composedPath()[0].tagName,c=n.composedPath()[0]&&n.composedPath()[0].role):(u=i&&i.tagName,c=i&&i.role),fh(l)?!!(u&&l&&l.some(d=>d.toLowerCase()===u.toLowerCase()||d===c)):!!(u&&l&&l)}function k5(n){return!!n.tagName&&!n.tagName.startsWith("-")&&n.tagName.includes("-")}function U5(n,l){return n.length===0&&l?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):l?n.some(i=>l.includes(i))||n.includes("*"):!0}const z5=(n,l,i=!1)=>{const{alt:r,meta:u,mod:c,shift:d,ctrl:m,keys:p,useKey:y}=l,{code:g,key:x,ctrlKey:E,metaKey:j,shiftKey:w,altKey:C}=n,N=yl(g);if(y&&p?.length===1&&p.includes(x))return!0;if(!p?.includes(N)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(N))return!1;if(!i){if(r!==C&&N!=="alt"||d!==w&&N!=="shift")return!1;if(c){if(!j&&!E)return!1}else if(u!==j&&N!=="meta"&&N!=="os"||m!==E&&N!=="ctrl"&&N!=="control")return!1}return p&&p.length===1&&p.includes(N)?!0:p?R5(p):!p},q5=b.createContext(void 0),B5=()=>b.useContext(q5);function ng(n,l){return n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(n).length===Object.keys(l).length&&Object.keys(n).reduce((i,r)=>i&&ng(n[r],l[r]),!0):n===l}const H5=b.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Q5=()=>b.useContext(H5);function $5(n){const l=b.useRef(void 0);return ng(l.current,n)||(l.current=n),l.current}const Iy=n=>{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()},Y5=typeof window<"u"?b.useLayoutEffect:b.useEffect;function Dn(n,l,i,r){const u=b.useRef(null),c=b.useRef(!1),d=Array.isArray(i)?Array.isArray(r)?void 0:r:i,m=fh(n)?n.join(d?.delimiter):n,p=Array.isArray(i)?i:Array.isArray(r)?r:void 0,y=b.useCallback(l,p??[]),g=b.useRef(y);p?g.current=y:g.current=l;const x=$5(d),{activeScopes:E}=Q5(),j=B5();return Y5(()=>{if(x?.enabled===!1||!U5(E,x?.scopes))return;let w=[],C;const N=(H,V=!1)=>{if(!(L5(H)&&!tg(H,x?.enableOnFormTags))){if(u.current!==null){const X=u.current.getRootNode();if((X instanceof Document||X instanceof ShadowRoot)&&X.activeElement!==u.current&&!u.current.contains(X.activeElement)){Iy(H);return}}H.target?.isContentEditable&&!x?.enableOnContentEditable||rd(m,x?.delimiter).forEach(X=>{if(X.includes(x?.splitKey??"+")&&X.includes(x?.sequenceSplitKey??">")){console.warn(`Hotkey ${X} contains both ${x?.splitKey??"+"} and ${x?.sequenceSplitKey??">"} which is not supported.`);return}const G=od(X,x?.splitKey,x?.sequenceSplitKey,x?.useKey,x?.description);if(G.isSequence){C=setTimeout(()=>{w=[]},x?.sequenceTimeoutMs??1e3);const P=G.useKey?H.key:yl(H.code);if(Iv(P.toLowerCase()))return;w.push(P);const ae=G.keys?.[w.length-1];if(P!==ae){w=[],C&&clearTimeout(C);return}w.length===G.keys?.length&&(g.current(H,G),C&&clearTimeout(C),w=[])}else if(z5(H,G,x?.ignoreModifiers)||G.keys?.includes("*")){if(x?.ignoreEventWhen?.(H)||V&&c.current)return;if(O5(H,G,x?.preventDefault),!M5(H,G,x?.enabled)){Iy(H);return}g.current(H,G),V||(c.current=!0)}})}},T=H=>{H.code!==void 0&&(Wv(yl(H.code)),(x?.keydown===void 0&&x?.keyup!==!0||x?.keydown)&&N(H))},_=H=>{H.code!==void 0&&(eg(yl(H.code)),c.current=!1,x?.keyup&&N(H,!0))},D=u.current||d?.document||document;return D.addEventListener("keyup",_,d?.eventListenerOptions),D.addEventListener("keydown",T,d?.eventListenerOptions),j&&rd(m,x?.delimiter).forEach(H=>j.addHotkey(od(H,x?.splitKey,x?.sequenceSplitKey,x?.useKey,x?.description))),()=>{D.removeEventListener("keyup",_,d?.eventListenerOptions),D.removeEventListener("keydown",T,d?.eventListenerOptions),j&&rd(m,x?.delimiter).forEach(H=>j.removeHotkey(od(H,x?.splitKey,x?.sequenceSplitKey,x?.useKey,x?.description))),w=[],C&&clearTimeout(C)}},[m,x,E]),u}function V5(){return h.jsxs("div",{className:"flex md:grid md:grid-cols-3 items-center bg-white border-b border-gray-200 overflow-auto no-scrollbar",children:[h.jsx(K5,{}),h.jsx(G5,{}),h.jsx(X5,{})]})}function K5(){const{dataSourceId:n}=b.useContext(La),{data:l}=Ou(n),{state:{table:i}}=b.useContext(Pt);return h.jsx("div",{className:re.tableConfig,children:l&&h.jsxs("div",{className:se(re.tableAction,re.greenFixed),"data-tooltip-id":"default","data-tooltip-content":i,children:[h.jsx(ci,{size:18,type:l.dbType}),h.jsx("p",{className:"text-sm",children:l.name}),h.jsx(pl,{width:12,height:12}),h.jsx("p",{className:"text-sm",children:i})]})})}function G5(){const{page:n,size:l,setPage:i}=kv(),{data:r,isFetching:u}=b.useContext(Bn),c=n*l,d=!u&&!!r?.result.hasMore,m=r?.result.rows.length||0,p=()=>{n>0&&i(n-1)},y=()=>{d&&i(n+1)};return h.jsxs("div",{className:se(re.tableConfig,"justify-self-center"),children:[h.jsx("span",{"data-tooltip-content":"Previous page","data-tooltip-id":"default",className:se(re.tableAction,re.gray,n<1&&"opacity-30"),onClick:p,role:"button",children:h.jsx(pl,{width:16,height:16,className:"rotate-180"})}),h.jsxs("span",{"data-tooltip-id":"rows-num",className:re.paginationIndicator,children:[c+1," - ",c+m,d&&"+"]}),h.jsx("span",{"data-tooltip-content":"Next page","data-tooltip-id":"default",className:se(re.tableAction,d?re.gray:"opacity-30"),onClick:y,role:"button",children:h.jsx(pl,{width:16,height:16})})]})}const F5=[5,10,20,50,100,200];function X5(){const{dataSourceId:n,name:l}=b.useContext(La),{data:i}=Ou(n),{data:r,refetch:u}=b.useContext(Bn),c=Lr(Gt.EDITOR),d=RC(),{rename:m}=T5(),{size:p,setSize:y}=kv(),{state:g}=b.useContext(Pt),x=ui(),E=wt(),j=()=>{x.mutateAsync({name:l,opts:g}).then(_=>{E(`${$e.workbench.path}/tab/${_.id}`)})},w=()=>{if(r?.result.queryHistoryId){const _=new URL(window.location.href);_.pathname=$e.share.path,_.searchParams.set("shareId",r.result.queryHistoryId),navigator.clipboard.writeText(_.toString()),rn.success("Share link copied to clipboard")}},C=()=>{r?.result.columns?.[0].table&&Id({table:r?.result.columns?.[0].table,dataSourceId:n})},N=async()=>{const _=await Ur("Query name",l);!_||!r?.result.queryHistoryId||d.mutate({name:_,queryId:r.result.queryHistoryId})},T=()=>m(l);return Dn("s",N),Dn("r",T),Dn("d",j),h.jsxs("div",{className:"flex justify-self-end",children:[h.jsx("span",{"data-tooltip-content":"Show filters","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:()=>In("filters"),role:"button",children:h.jsx(Zv,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Join table","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:()=>In("joins"),role:"button",children:h.jsx(Pv,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Refresh data","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:()=>u(),role:"button",children:h.jsx(Xv,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Share query","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:w,role:"button",children:h.jsx(j5,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Duplicate tab","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:j,role:"button",children:h.jsx(N5,{width:16,height:16})}),h.jsx(wu,{id:"rows-num",className:"z-10 shadow-md flex gap-1",clickable:!0,variant:"light",opacity:1,children:F5.map(_=>h.jsx("button",{onClick:()=>y(_,!0),className:se(re.tableAction,re.gray,_===p&&re.selectedSize),children:h.jsx("span",{children:_})},_))}),h.jsx("button",{"data-tooltip-id":"explorer-more-actions",className:se(re.tableAction,re.gray),children:h.jsx(_5,{width:16,height:16})}),h.jsxs(wu,{id:"explorer-more-actions",className:"z-10 shadow-md flex flex-col",clickable:!0,variant:"light",opacity:1,children:[h.jsxs("button",{onClick:()=>In("columns"),className:se(re.tableAction,re.modal,re.gray,"justify-between"),children:[h.jsx("span",{children:"Columns"}),h.jsx("span",{className:"hotkey",children:"C"})]}),h.jsxs("button",{onClick:()=>In("groupBy"),className:se(re.tableAction,re.modal,re.gray,"justify-between"),children:[h.jsx("span",{children:"Group by"}),h.jsx("span",{className:"hotkey",children:"G"})]}),h.jsxs("button",{onClick:()=>In("aggregate"),className:se(re.tableAction,re.modal,re.gray,"justify-between"),children:[h.jsx("span",{children:"Aggregate"}),h.jsx("span",{className:"hotkey",children:"A"})]}),h.jsx("div",{className:"h-0.5 my-2 bg-gray-100"}),h.jsxs("button",{onClick:T,className:se(re.tableAction,re.modal,re.gray,"justify-between"),children:[h.jsx("span",{children:"Rename tab"}),h.jsx("span",{className:"hotkey",children:"R"})]}),c&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{onClick:N,className:se(re.tableAction,re.modal,re.gray),children:[h.jsx("span",{children:"Save query"}),h.jsx("span",{className:"hotkey",children:"S"})]}),i?.allowInsert===!0&&h.jsx("button",{onClick:C,className:se(re.tableAction,re.modal,re.gray),children:"Insert new row"})]})]})]})}const Z5="_drop-container_xzwaj_2",P5="_item_xzwaj_2",Wy={dropContainer:Z5,item:P5},ag=({dataSourceId:n,inputClassName:l,focusId:i,placeholder:r="Column",onChange:u,value:c,autoFocus:d,allowTables:m})=>{const{data:p}=Mr(n),y=b.useRef(null),g=b.useMemo(()=>{if(!p)return[];let _=p;return m&&(_=p.filter(D=>m.includes(D.tableName))),_.flatMap(D=>D.columns.map(H=>({value:D.tableName+"."+H.name,label:H.name,table:D.tableName,searchValue:H.name.toLowerCase()})))},[p,m]),x=b.useMemo(()=>{const _=c.toLowerCase()||"",D=[];for(let H=0;H<g.length&&D.length<10;H++)g[H].searchValue.includes(_)&&D.push(g[H]);return D},[g,c]),[E,j]=b.useState(!1),[w,C]=b.useState(0),N=_=>{if(_.key==="ArrowDown")_.preventDefault(),C(D=>(D+1)%x.length);else if(_.key==="ArrowUp")_.preventDefault(),C(D=>(D-1+x.length)%x.length);else if(_.key==="Enter"&&w>=0&&w<x.length){_.preventDefault();const D=x[w].value;j(!1);const H=g.findIndex(V=>V.value===D)>-1;u(x[w]?.value||D,H,!0)}};b.useEffect(()=>{const _=y.current?.querySelector('[data-is-active="true"]');_&&_.scrollIntoView({behavior:"smooth",block:"nearest"})},[w]);const T=_=>{const D=_.currentTarget.value,H=g.findIndex(V=>V.value===D)>-1;u(D,H,!1)};return h.jsxs("div",{className:"relative",onFocus:()=>j(!0),onBlur:()=>j(!1),children:[h.jsx("input",{autoFocus:d,onKeyDown:N,value:c,onChange:T,className:l,placeholder:r,"data-focus":i}),E&&x.length>0&&h.jsx("div",{className:Wy.dropContainer,ref:y,tabIndex:-1,children:x.map((_,D)=>h.jsxs("div",{className:Wy.item,"data-is-active":w===D,onMouseDownCapture:H=>{H.preventDefault(),j(!1),u(_.value,!0,!0)},children:[h.jsx("span",{className:"text-xs font-semibold truncate",children:_.table}),h.jsx("p",{className:"truncate text-sm",children:_.label})]},D))})]})},J5="_actions_wclnx_2",I5="_filter-actions_wclnx_2",W5="_advanced-filter-icon_wclnx_2",e_="_filters-container_wclnx_2",t_="_filter-container_wclnx_2",gr={actions:J5,filterActions:I5,advancedFilterIcon:W5,filtersContainer:e_,filterContainer:t_},n_=({filter:n,dataSourceId:l,allowedTables:i,autoFocus:r,onChangeColumn:u,onChangeValue:c,onRemoveFilter:d,onChangeAdvancedFilter:m,triggerIsEnabled:p,onSubmit:y})=>{const g=E=>{const j=E.target.value;j.charAt(0)===":"?m(n.id,!0):(!n.isAdvanced&&["=","<",">"].includes(j.charAt(0))&&m(n.id,!0),c(n.id,E.currentTarget.value))},x=E=>{E.key==="Backspace"?(n.value.length===0||E.currentTarget.selectionEnd===0)&&m(n.id,!1):E.key==="Enter"&&y()};return h.jsxs("div",{className:gr.filterContainer,children:[h.jsx("input",{type:"checkbox",checked:n.isEnabled!==!1,onClick:()=>p(n.id)}),h.jsx(ag,{dataSourceId:l,onChange:E=>u(n.id,E),value:n.column,allowTables:i,focusId:"column",inputClassName:"input w-full",autoFocus:r}),h.jsxs("div",{className:"flex items-center",children:[n.isAdvanced&&h.jsx("span",{className:gr.advancedFilterIcon,children:h.jsx(Zv,{width:14,height:14})}),h.jsx("input",{placeholder:"Filter value",value:n.value,onChange:g,onKeyDown:x,"data-focus":"value",className:"input flex-1"},n.id)]}),h.jsx("div",{className:gr.filterActions,children:h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove filter",className:"p-0.5 text-sm cursor-pointer rounded-md",onClick:()=>d(n.id),children:h.jsx(ts,{width:20,height:20,className:"text-red-600"})})})]})},a_=()=>{const{state:n}=b.useContext(Pt),{refetch:l}=b.useContext(Bn),{setFilters:i}=ah(),r=Mu(C=>C.filters),u=b.useMemo(()=>[n.table,...n.joins.map(C=>C.table)],[n.table,n.joins]),[c,d]=b.useState([]),m=(C,N)=>{d(T=>[...T.map(_=>_.id===C?{..._,column:N}:_)])},p=(C,N)=>{d(T=>[...T.map(_=>_.id===C?{..._,value:N}:_)])},y=()=>{d(C=>[...C,{id:Oa(),value:"",column:"",isEnabled:!0}])},g=C=>{d(N=>N.filter(T=>T.id!==C))},x=(C,N)=>{d(T=>T.map(_=>_.id===C?{..._,isAdvanced:N}:_))},E=()=>Du("filters"),j=()=>{try{i(c.filter(C=>C.value.length>0&&C.column.length>0)),setTimeout(l,1),E()}catch(C){C instanceof Error?rn.error(C.message):rn.error("Error during parsing, check you filters")}},w=C=>{d(N=>N.map(T=>T.id===C?{...T,isEnabled:!T.isEnabled}:T))};return b.useEffect(()=>{r&&d(()=>[...n.filters,{id:Oa(),value:"",column:"",isEnabled:!0}])},[r]),Dn("f",()=>{gu("filters")}),h.jsxs(cn,{isVisible:r,onClose:E,portal:!0,onClosed:()=>d([]),noPadding:!0,children:[h.jsx(aa,{onClick:E}),h.jsx("h2",{className:"text-lg font-semibold m-2",children:"Filters"}),h.jsxs("div",{className:gr.filtersContainer,children:[c.length<1&&h.jsx("p",{className:"p-1 text-center rounded-lg bg-gray-50 border border-gray-200",children:"No filters"}),c.map((C,N)=>h.jsx(n_,{filter:C,dataSourceId:n.dataSourceId,allowedTables:u,onChangeColumn:m,onChangeValue:p,onRemoveFilter:g,onChangeAdvancedFilter:x,triggerIsEnabled:w,onSubmit:j,autoFocus:N===c.length-1},C.id))]}),h.jsxs("div",{className:gr.actions,children:[h.jsxs("button",{className:"button tertiary flex items-center gap-1 text-sm",onClick:y,children:[h.jsx(Pv,{width:20,height:20}),h.jsx("span",{children:"Add filter"})]}),h.jsx("button",{className:"button primary text-sm",onClick:j,children:"Apply filters"})]})]})},l_="_join-modal_1ta2e_2",s_={joinModal:l_},i_=(n,l)=>n.type!==l.type||n.on!==l.on||n.table!==l.table,r_=(n,l)=>n.type===l.type&&n.on===l.on&&n.table===l.table,lg=()=>{const{state:n,setState:l}=b.useContext(Pt),i=b.useCallback(r=>{l(u=>{const c=u.joins;if(c.some(m=>r_(m,r))){const m=r.table+".";return{...u,joins:c.filter(p=>i_(p,r)),columns:u.columns.filter(p=>!p.value.startsWith(m)),groupBy:u.groupBy.filter(p=>!p.value.startsWith(m)),orderBy:u.orderBy.filter(p=>!p.column.startsWith(m)),aggregations:u.aggregations.filter(p=>!p.value.startsWith(m)),filters:u.filters.filter(p=>!p.column.startsWith(m))}}return{...u,joins:[...c,r]}})},[l]);return{joins:n.joins,toggle:i}},o_=()=>{const{isFetching:n}=b.useContext(Bn),l=Mu(p=>p.joins),{toggle:i}=lg(),{availableJoins:r}=b.useContext(La),[u,c]=b.useState(""),d=b.useMemo(()=>{const p=u.toLowerCase();return r.filter(y=>y.on.toTable.toLowerCase().includes(p))},[r,u]),m=()=>Du("joins");return Dn("j",()=>{r.length>0?In("joins"):rn.error("No available tables to join")}),h.jsxs(cn,{isVisible:l,onClose:m,portal:!0,children:[h.jsx(aa,{onClick:m}),h.jsxs("div",{className:s_.joinModal,children:[h.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Join table"}),r.length>0?h.jsx("input",{className:"input w-full",placeholder:"Filter",autoFocus:!0,onChange:p=>c(p.target.value),value:u,disabled:n}):h.jsx(Ot,{variant:"warning",children:h.jsx("p",{className:"text-sm truncate",children:"There is nothing else to join"})}),h.jsx("div",{className:`flex flex-col mt-2 overflow-y-auto ${n?"opacity-40":""}`,children:d.map(p=>h.jsx(Ov,{hook:p,onClick:()=>{n||(i({table:p.on.toTable,type:"LEFT",on:p.where}),c(""),m())}},p.where))})]})]})};function u_(n){return n.reduce((l,i)=>(l[i]=!0,l),{})}function e1(n){return n.reduce((l,i)=>(l[i]=!0,l),{})}const c_="_container_193jp_2",f_="_column-label_193jp_2",d_="_not-active_193jp_2",fu={container:c_,columnLabel:f_,notActive:d_};function h_(n){if(!n)return[];const l={};return n.forEach(i=>{l[i.table]?l[i.table].push({value:i.full,ogColumn:i.column,label:dl(i.column),type:i.type}):l[i.table]=[{value:i.full,ogColumn:i.column,label:dl(i.column),type:i.type}],U4[i.type]&&["YEAR","MONTH","DAY"].forEach(r=>{l[i.table].push({value:r+" "+i.full,ogColumn:i.column,label:r+" "+dl(i.column),type:"number",nested:!0})})}),Object.entries(l).reduce((i,[r,u])=>(i.push({name:dl(r),columns:u}),i),[])}function m_(n,l){const i=l.toLowerCase();return n.map(r=>{const u=r.columns.filter(c=>c.label.toLowerCase().includes(i)||c.ogColumn.toLowerCase().includes(i));return{...r,columns:u}}).filter(r=>r.columns.length>0)}const p_=({column:n,selected:l,onCheck:i})=>h.jsxs("label",{className:se(fu.columnLabel,l?fu.active:fu.notActive,n.nested&&"pl-5!"),children:[h.jsx("input",{type:"checkbox",checked:l[n.value],name:n.value,onChange:i}),h.jsxs("p",{className:"flex justify-between w-full",children:[h.jsx("span",{"data-tooltip-content":n.value,"data-tooltip-id":"default",children:n.label}),h.jsx("span",{className:"text-blue-600",children:n.type})]})]},n.value),y_={columns:"c",groupBy:"g"},t1=({mode:n})=>{const l=Mu(_=>_[n]),{allColumns:i}=b.useContext(La),{state:r,setState:u}=b.useContext(Pt),[c,d]=b.useState({}),[m,p]=b.useState(""),y=b.useMemo(()=>h_(i),[i]),g=r.aggregations.length>0||r.groupBy.length>0,x=b.useMemo(()=>m?m_(y,m):y,[m,y]),E=_=>{d(D=>({...D,[_.target.name]:_.target.checked}))},j=_=>{const D=_.target.checked;d(H=>{for(const V of i)H[V.full]=D;return{...H}})},w=()=>{Du(n)},C=()=>{const _=[];for(const[D,H]of Object.entries(c))if(H){const[V,X]=D.split(" ");_.push({value:X||V,fn:X?V:void 0})}u(D=>({...D,[n]:_})),w()},N=b.useMemo(()=>{for(const _ of i)if(!c[_.full])return!1;return!0},[c,i]);Dn(y_[n],()=>{n==="columns"?g?rn.error("Columns are ignored when there is at least one aggregation or group by"):gu("columns"):gu("groupBy")}),b.useEffect(()=>{l&&d(()=>u_(r[n].map(_=>_.fn?_.fn+" "+_.value:_.value)))},[l,d]);const T=()=>{p(""),d({})};return h.jsxs(cn,{isVisible:l,onClose:w,portal:!0,onClosed:T,children:[h.jsx(aa,{onClick:w}),h.jsxs("div",{className:fu.container,children:[h.jsx("h2",{className:"text-lg font-semibold",children:n==="groupBy"?"Group by":"Show columns"}),h.jsx("input",{autoFocus:!0,className:"input my-2",placeholder:"Filter",value:m,onChange:_=>p(_.target.value)}),h.jsx("div",{className:"overflow-y-auto",children:x.map(_=>h.jsxs("div",{className:"my-2",children:[h.jsxs("p",{className:"font-semibold sticky top-0 bg-white p-1 z-1",children:["📄 ",_.name]}),_.columns.map(D=>h.jsx(p_,{column:D,selected:c,onCheck:E},D.value))]},_.name))}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsxs("label",{className:"button tertiary flex gap-2 items-center",children:[h.jsx("input",{type:"checkbox",checked:N,onChange:j}),h.jsx("span",{children:"Select all"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{className:"button tertiary",onClick:w,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:C,children:"Apply"})]})]})]})},v_="_options-container_zc0o9_2",g_={optionsContainer:v_},ud="COUNT all",b_=()=>{const n=Mu(w=>w.aggregate),{dataSourceId:l}=b.useContext(La),{setState:i,state:r}=b.useContext(Pt),{data:u}=b.useContext(Bn),[c,d]=b.useState({fn:"",col:""}),m=w=>d({...c,fn:w.currentTarget.value}),p=w=>d({...c,col:w}),y=()=>Du("aggregate"),g=()=>{const w=c.fn===ud?{value:"*",fn:"COUNT"}:{fn:c.fn,value:c.col,distinct:c.fn==="COUNT"};i(C=>({...C,aggregations:[...C.aggregations,w]}))},x=c.fn===ud,E=x?!1:!c.col||!c.fn,j=w=>{const C=gv(w);i(N=>({...N,aggregations:N.aggregations.filter(T=>T.fn!==w.fn||T.value!==w.value),orderBy:N.orderBy.filter(T=>T.column!==C)}))};return Dn("a",()=>{gu("aggregate")}),h.jsxs(cn,{isVisible:n,onClose:y,backdropClose:!0,portal:!0,children:[h.jsx(aa,{onClick:y}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-semibold",children:"Aggregate"}),Ma(r.aggregations.length,0)&&h.jsx("div",{className:"flex flex-col gap-1 mt-4",children:r.aggregations.map((w,C)=>h.jsxs("p",{className:"p-2 rounded-md bg-gray-50 flex items-center justify-between",children:[h.jsx("span",{children:uu(w)}),h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove aggregation",className:"p-0.5 text-sm cursor-pointer",onClick:()=>j(w),children:h.jsx(ts,{width:20,height:20,className:"text-red-600"})})]},C))}),h.jsxs("div",{className:g_.optionsContainer,children:[h.jsxs("label",{className:se(x&&"col-span-2"),children:[h.jsx("p",{className:"font-semibold text-xs",children:"Function"}),h.jsxs("select",{className:"input w-full",value:c.fn,onChange:m,autoFocus:!0,children:[h.jsx("option",{value:"",disabled:!0,children:"Select function"}),h.jsx("option",{value:ud,children:"Count all rows"}),h.jsx("option",{value:"COUNT",children:"Count"}),h.jsx("option",{value:"SUM",children:"Sum"}),h.jsx("option",{value:"MAX",children:"Max"}),h.jsx("option",{value:"MIN",children:"Min"}),h.jsx("option",{value:"AVG",children:"Avg"})]})]}),!x&&h.jsxs("label",{children:[h.jsx("p",{className:"font-semibold text-xs",children:"Column"}),h.jsx(ag,{inputClassName:"input w-full",dataSourceId:l,allowTables:u?.result.tables||[],onChange:p,value:c.col})]}),h.jsx("button",{className:"button primary",disabled:E,onClick:g,children:"Add"})]})]})]})},x_="_container_1v7wv_2",S_="_yellow-pill_1v7wv_2 _pill_1v7wv_2",w_="_blue-pill_1v7wv_2 _pill_1v7wv_2",E_="_purple-pill_1v7wv_2 _pill_1v7wv_2",C_="_red-pill_1v7wv_2 _pill_1v7wv_2",__="_black-pill_1v7wv_2 _pill_1v7wv_2",N_="_disabled-pill_1v7wv_2",Kl={container:x_,yellowPill:S_,bluePill:w_,purplePill:E_,redPill:C_,blackPill:__,disabledPill:N_};function j_(n,l=500,i){const[r,u]=b.useState(n),c=b.useRef(i);return c.current=i,b.useEffect(()=>{const d=setTimeout(()=>{u(n),c.current&&c.current(n)},l);return()=>clearTimeout(d)},[n,l]),r}function T_(n){return!(n===!0||n===void 0)}const A_=()=>{const{state:{aggregations:n,columns:l,groupBy:i}}=b.useContext(Pt),{toggle:r,joins:u}=lg(),{filters:c,setFilters:d,removeFilter:m}=ah(),p=()=>In("joins"),y=()=>In("aggregate"),g=()=>In("columns"),x=()=>In("groupBy"),E=C=>{C.preventDefault(),C.stopPropagation(),r(u[u.length-1])},j=C=>{d(c.map(N=>({...N,isEnabled:C===N.id?T_(N.isEnabled):N.isEnabled})),!0)},w=C=>N=>{N.preventDefault(),N.stopPropagation(),m(C)};return c.length>0||u.length>0||i.length>0||l.length>0||n.length>0?h.jsxs("div",{className:Kl.container,children:[u.map((C,N)=>h.jsxs("button",{onClick:p,className:Kl.yellowPill,"data-tooltip-id":"default","data-tooltip-content":`Joins ${C.table} on ${C.on}`,children:[h.jsx("p",{className:"text-sm",children:C.table}),N===u.length-1&&h.jsx(ts,{onClick:E,width:18,height:18})]},C.table)),c.map(C=>h.jsxs("button",{onClick:()=>j(C.id),onAuxClick:()=>m(C.id),className:se(Kl.bluePill,C.isEnabled===!1&&Kl.disabledPill),"data-tooltip-id":"default","data-tooltip-content":`${C.column} ${C.value}`,children:[h.jsx("p",{className:"text-sm",children:C.column}),h.jsx("p",{className:"text-sm",children:C.value}),h.jsx(ts,{onClick:w(C.id),width:18,height:18})]},C.id)),n.map(C=>h.jsx("button",{onClick:y,className:se(Kl.purplePill),"data-tooltip-id":"default","data-tooltip-content":uu(C),children:h.jsx("p",{className:"text-sm",children:uu(C)})},uu(C))),l.length>0&&h.jsx("button",{onClick:g,className:se(Kl.redPill),"data-tooltip-id":"default","data-tooltip-content":"Has hidden columns",children:h.jsx("p",{className:"text-sm",children:"Hidden columns"})}),i.length>0&&h.jsx("button",{onClick:x,className:se(Kl.blackPill),"data-tooltip-id":"default","data-tooltip-content":"Has GROUP BY",children:h.jsx("p",{className:"text-sm",children:"GROUP BY"})}),!1]}):null},R_=({options:n,updater:l,name:i,tabId:r})=>{const u=tE(n,l),c=iE(r,u.state),d=eE(c.data,u.state.dataSourceId,i,r);return h.jsx(La,{value:d,children:h.jsx(Pt,{value:u,children:h.jsxs(Bn,{value:c,children:[h.jsx(V5,{}),h.jsx(A_,{}),h.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[h.jsx("div",{className:"flex-1 overflow-auto pb-24 lg:pb-12 no-scrollbar",children:h.jsx(AC,{})}),h.jsx(a_,{}),h.jsx(o_,{}),h.jsx(t1,{mode:"columns"}),h.jsx(t1,{mode:"groupBy"}),h.jsx(b_,{})]})]})})})},sg=()=>h.jsxs("div",{role:"status",children:[h.jsxs("svg",{"aria-hidden":"true",className:"w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),h.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),h.jsx("span",{className:"sr-only",children:"Loading..."})]}),O_=({id:n})=>{const{data:l}=aE(n),i=b.useCallback(r=>{if(!l)return;const u=r(oi(l.opts));rt.setQueryData(["workbench-tabs",l.id],{...l,opts:{...l.opts,...u}})},[l]);return l?h.jsx(R_,{updater:i,options:l.opts,name:l.name,tabId:l.id}):h.jsx("div",{className:"flex-1 flex justify-center items-center",children:h.jsx(sg,{})})},M_=n=>{setTimeout(l=>{const i=document.querySelector(`[data-tab-id="${l}"]`);i&&i.scrollIntoView({behavior:"smooth"})},50,n)},D_=()=>{const{id:n}=sx(),l=wt(),{data:i}=Jd(),r=lE(),u=Nv(nh.laptop),c=p=>{if(p===n&&i){if(i.length===1)return l($e.home.path);if(i.length>1){const y=i.find(g=>g.id!==p);if(y)return l(`/workbench/tab/${y.id}`)}}},d=p=>{p.stopPropagation(),p.preventDefault();const y=p.currentTarget.getAttribute("data-tab-id");y&&(r.mutate(y),c(y))},m=p=>{r.mutate(p),c(p)};return b.useEffect(()=>{n&&M_(n)},[n]),h.jsxs("div",{className:"h-screen max-h-screen bg-(--bg) flex flex-col",children:[n&&h.jsx(O_,{id:n}),h.jsx("div",{className:se(mr.tabs,"no-scrollbar",!u&&mr.mobile),children:i?.map(p=>h.jsxs("div",{onClick:()=>l(`${$e.workbench.path}/tab/${p.id}`),className:se(mr.tab,p.id===n&&mr.active),"data-tooltip-id":"default","data-tab-id":p.id,"data-tooltip-content":p.name,onAuxClick:()=>m(p.id),children:[h.jsxs("span",{className:"truncate w-full",children:["🛠️ ",p.name]}),h.jsx("button",{"data-tab-id":p.id,className:mr.closeButton,onClick:d,children:h.jsx(ts,{width:20,height:20})})]},p.id))})]})},L_="_root_ybko5_2",k_="_up_ybko5_2",U_="_down_ybko5_2",z_="_chevron_ybko5_2",q_="_table-name-container_ybko5_2",B_="_link_ybko5_2",H_="_table-name_ybko5_2",Q_="_ul_ybko5_2",$_="_column-type_ybko5_2",Y_="_action-blue_ybko5_2 _action_ybko5_2",V_="_action-red_ybko5_2 _action_ybko5_2",Vt={root:L_,up:k_,down:U_,chevron:z_,tableNameContainer:q_,link:B_,tableName:H_,ul:Q_,columnType:$_,actionBlue:Y_,actionRed:V_},[Aj,K_]=un(!1),ig=()=>K_(!1),G_="_sidebar_10hul_2",F_="_sidebar-visible_10hul_2",X_="_sidebar-container_10hul_2",Z_="_sidebar-invisible_10hul_2",P_="_backdrop_10hul_2",pr={sidebar:G_,sidebarVisible:F_,sidebarContainer:X_,sidebarInvisible:Z_,backdrop:P_},rg=({children:n,backdropClose:l,isVisible:i,onClose:r,onClosed:u,contentClassName:c})=>{const[d,m]=b.useState(!1),p=b.useRef(r);p.current=r;const y=()=>{l&&r()},g=x=>{i||getComputedStyle(x.currentTarget).opacity==="0"&&(m(!1),u&&u())};return b.useEffect(()=>{i&&m(!0)},[i]),b.useEffect(()=>{const x=E=>{i&&E.key==="Escape"&&p.current()};return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[i]),h.jsxs("div",{onTransitionEnd:g,className:se(pr.sidebar,i?pr.sidebarVisible:pr.sidebarInvisible),children:[h.jsx("div",{onClick:y,className:pr.backdrop}),h.jsx("div",{className:se(pr.sidebarContainer,c),children:d&&n})]})},J_=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48M336 64h112v112M224 288L440 72",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32})),I_=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M364.13 125.25L87 403l-23 45 44.99-23 277.76-277.13-22.62-22.62zM420.69 68.69l-22.62 22.62 22.62 22.63 22.62-22.63a16 16 0 000-22.62h0a16 16 0 00-22.62 0z"})),W_=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M432 144l-28.67 275.74A32 32 0 01371.55 448H140.46a32 32 0 01-31.78-28.26L80 144",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("rect",{x:32,y:64,width:448,height:80,rx:16,ry:16,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M312 240L200 352M312 352L200 240"})),og=(n,l=!0)=>{const i=navigator.clipboard.writeText(n);l&&i.then(()=>{rn.success(`Copied "${n}"`)})},eN=new Intl.DateTimeFormat("en",{dateStyle:"full",timeStyle:"long"}),nu=18;function tN(n,l){return l&&n.toLowerCase().includes(l)?"bg-yellow-200 cursor-pointer":"cursor-pointer"}const nN=({insp:n,filter:l,expanded:i})=>{const r=b.useMemo(()=>i?n.columns:l.length<1?[]:n.columns.filter(u=>u.name.toLowerCase().includes(l)),[n,l,i]);return h.jsx("ul",{className:Vt.ul,children:r.map(u=>h.jsx(h.Fragment,{children:h.jsxs("li",{children:[u.isPrimary?"🔐":"🏷️"," ",h.jsx("span",{onClick:()=>og(u.name),className:tN(u.name,l),children:u.name})," ",h.jsxs("span",{className:Vt.columnType,children:["[",u.type,"]"]}),u.ref&&h.jsxs("span",{children:[" ➡️ ",h.jsx("span",{className:Vt.columnType,children:u.ref.table}),".",u.ref.field]})]},u.name+u.type)}))},n.id)};function aN({id:n}){const{data:l}=Ou(n),{data:i}=Mr(n),r=wt(),u=v4(),c=mv(),d=g4(),m=ui(),p=b.useMemo(()=>l?.lastInspected?eN.format(new Date(l.lastInspected)):"--",[l]),[y,g]=b.useState({}),[x,E]=b.useState(""),[j,w]=b.useState("table"),C=Lr(Gt.EDITOR),N=x.toLowerCase(),T=b.useMemo(()=>{if(!N||!i)return i||[];const P=[];for(const ae of i){if(ae.tableName.toLowerCase().includes(N)){P.push(ae);continue}j!=="table"&&ae.columns.findIndex(ye=>ye.name.toLowerCase().includes(N))>=0&&P.push(ae)}return P},[N,i,j]),_=P=>{g(ae=>({...ae,[P]:!ae[P]}))},D=P=>{m.mutateAsync({name:P,opts:oi({table:P,dataSourceId:n})}).then(ae=>{Ps(void 0),ig(),r(`${$e.workbench.path}/tab/${ae.id}`)})},H=()=>{c.mutate(n)},V=async()=>{const P=await Ur("Enter name",l?.name);P&&u.mutate({id:n,dataSource:{name:P}})},X=async()=>{await Cv("Are you sure you want to delete this data source?")&&(d.mutate(n),Ps(void 0))},G=j==="column";return h.jsxs("div",{className:Vt.root,children:[h.jsxs("div",{className:"sticky top-0 bg-white border-b border-gray-200 p-4 z-1",children:[h.jsxs("h3",{className:"page-head flex gap-2",children:[l&&h.jsx(ci,{size:32,type:l.dbType}),h.jsx("span",{className:"truncate",children:l?.name})]}),h.jsx("p",{className:"mt-2 text-xs text-gray-800",children:"Last DB inspection"}),h.jsx("p",{className:"text-sm font-semibold",children:p}),C&&h.jsxs("div",{className:"mt-2 flex gap-2",children:[h.jsxs("button",{disabled:c.isPending,onClick:H,className:Vt.actionBlue,children:[h.jsx(Xv,{width:16,height:16}),"INSPECT"]}),h.jsxs("button",{disabled:c.isPending,onClick:V,className:Vt.actionBlue,children:[h.jsx(I_,{width:16,height:16}),"RENAME"]}),h.jsxs("button",{disabled:c.isPending,onClick:X,className:Vt.actionRed,children:[h.jsx(W_,{width:16,height:16}),"DELETE"]})]}),h.jsxs("div",{className:"flex gap-2 items-center mb-2 mt-4",children:[h.jsxs("select",{className:"input",value:j,onChange:P=>w(P.currentTarget.value),children:[h.jsx("option",{value:"table",children:"Table"}),h.jsx("option",{value:"column",children:"Column"})]}),h.jsx("input",{className:"input flex-1 bg-gray-50",placeholder:G?"Search column":"Search table",value:x,onChange:P=>E(P.target.value),autoFocus:!0})]})]}),h.jsx("div",{className:"overflow-y-auto p-4",children:T?.map(P=>h.jsxs("div",{children:[h.jsxs("div",{className:Vt.tableNameContainer,children:[h.jsx("button",{className:se(Vt.chevron,y[P.id]?Vt.down:Vt.up),onClick:()=>_(P.id),children:h.jsx(pl,{width:16,height:16})}),h.jsx("button",{className:se(Vt.tableName,"flex-1"),onClick:()=>_(P.id),children:P.tableName}),h.jsx("button",{className:Vt.link,onClick:()=>D(P.tableName),"data-tooltip-id":"default-xs","data-tooltip-content":"Explore table data",children:h.jsx(J_,{width:nu,height:nu})}),h.jsx("button",{className:Vt.link,onClick:()=>og(P.tableName),"data-tooltip-id":"default-xs","data-tooltip-content":"Copy table name",children:h.jsx(Lv,{width:nu,height:nu})})]}),(y[P.id]||x.length>0)&&h.jsx(nN,{insp:P,filter:G?N:"",expanded:y[P.id]})]},P.id))})]})}const lN=()=>{const n=ME(),[l,i]=b.useState(void 0);b.useEffect(()=>{n&&i(n)},[n]);const r=()=>Ps(void 0);return h.jsx(rg,{isVisible:n!=null,onClose:r,onClosed:()=>i(void 0),backdropClose:!0,children:l&&h.jsx(aN,{id:l})})},sN="_search_1tk8r_2",iN="_entry_1tk8r_2",rN="_ds_1tk8r_2",oN="_ds-container_1tk8r_2",uN="_ds-entry_1tk8r_2",cN="_enabled_1tk8r_2",Gs={search:sN,entry:iN,ds:rN,dsContainer:oN,dsEntry:uN,enabled:cN};function fN(n,l,i){try{const r=i.getItem(n);if(r)return JSON.parse(r)}catch(r){console.warn("Failed to restore tabs",r)}return l}const dN=({storage:n=localStorage,localStorageKey:l,initialData:i})=>{const r=un(fN(l,i,n));return r[2].subscribe(u=>{n.setItem(l,JSON.stringify(u))}),r},[hN,mN]=dN({initialData:[],localStorageKey:"selected-data-sources-v1"}),pN=n=>mN(l=>{const i=l.indexOf(n);return i>-1?(l.splice(i,1),[...l]):[...l,n]}),yN={table:"📄",query:"📖",tab:"🛠️"},vN=({onTable:n,onQuery:l,onWorkbenchTab:i,autoFocus:r})=>{const[u,c]=b.useState(""),[d,m]=b.useState(-1),p=j_(u,200),y=hN(),{data:g}=qn(),{data:x}=Zd({teamId:g?.teamId}),E=b.useMemo(()=>{const _=[],D=e1(y);if(!x||x.length===0)return[];for(const H of x)D[H.id]&&_.push(H.id);return _},[y,x]),{data:j}=c4(p,{teamId:g?.teamId,selectedDataSources:E}),w=_=>{_.type==="table"?n(_.name,_.dataSourceId):_.type==="query"?l(_.id,_.dataSourceId):_.type==="tab"&&i(_.id,_.dataSourceId)},C=_=>{j&&(_.key==="ArrowDown"?(_.preventDefault(),m(D=>(D+1)%j.length)):_.key==="ArrowUp"?(_.preventDefault(),m(D=>(D-1+j.length)%j.length)):_.key==="Enter"&&d>=0&&j[d]?.name&&(_.preventDefault(),w(j[d])))},N=_=>{const D=_.currentTarget.dataset.tableId,H=j?.find(V=>V.id===D);H&&w(H)},T=b.useMemo(()=>e1(y),[y]);return h.jsxs("div",{className:"overflow-hidden flex flex-col w-full lg:w-lg",children:[Ma(x?.length,0)&&h.jsx("div",{className:Gs.dsContainer,children:x.map(_=>h.jsxs("button",{className:se(Gs.dsEntry,T[_.id]&&Gs.enabled),onClick:()=>pN(_.id),children:[h.jsx(ci,{size:24,type:_.dbType}),h.jsx("span",{children:_.name})]},_.id))}),h.jsx("input",{className:Gs.search,placeholder:"Search table or saved query to start from",value:u,onChange:_=>c(_.target.value),onKeyDown:C,autoFocus:r}),Ma(j?.length,0)&&h.jsx("div",{className:"overflow-y-auto max-h-full mt-2",children:j.map((_,D)=>h.jsxs("button",{className:Gs.entry,"data-is-active":d===D,"data-table-id":_.id,onClick:N,children:[h.jsxs("p",{className:"font-semibold truncate",children:[yN[_.type]," ",_.name]}),h.jsxs("p",{className:Gs.ds,children:["📦 ",_.dataSourceName]})]},_.id))})]})},gN=()=>{const n=oE(),l=(c,d)=>{n?.onConfirm("table",c,d)},i=(c,d)=>{n?.onConfirm("query",c,d)},r=(c,d)=>{n?.onConfirm("tab",c,d)},u=()=>{n?.onCancel()};return h.jsxs(cn,{isVisible:!!n,onClose:u,children:[h.jsx(aa,{onClick:u}),h.jsx(vN,{autoFocus:!0,onTable:l,onQuery:i,onWorkbenchTab:r})]})},bN=()=>{const n=Dr("Hotkey"),l=wt(),{pathname:i}=qt(),{data:r}=qn(),{data:u}=Jd(),c=i===$e.home.path;Dn("n",()=>{r&&n()}),Dn("w",()=>{r&&(u&&u.length>0?l(`${$e.workbench.path}/tab/${u[0].id}`):n())},{enabled:c}),Dn("h",()=>{Js({show:!0})})},xN=()=>{const n=qt();b.useEffect(()=>{},[n.pathname])},[SN,ug]=un(!1),cd=()=>ug(!1),cg=()=>ug(!0),wN=({repeatPassword:n,password:l})=>l.length<1?null:l.length<8?h.jsx(Ot,{variant:"warning",children:"New password should be at least 8 characters long"}):l!==n?h.jsx(Ot,{variant:"warning",children:"Repeat password should match new password"}):null,EN=()=>{const n=SN(),{data:l}=qn(),{mutateAsync:i,isPending:r}=b4(),u=wt(),[{password:c,repeatPassword:d},{change:m,touched:p,reset:y}]=kr({password:"",repeatPassword:""}),g=()=>{u("/"),Or.logout().then(()=>{cd()})},x=()=>{i({password:c}).then(()=>{y(),rn.success("Password successfully updated!")})},E=c.length<8||c!==d||r,j=p.includes("password");return h.jsxs(cn,{isVisible:n,onClose:cd,children:[h.jsx(aa,{onClick:cd}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col gap-2",children:[h.jsx(Ev,{children:"Account settings"}),h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Username"}),h.jsx("input",{className:"input w-full",readOnly:!0,disabled:!0,value:l?.username})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Change password"}),h.jsx("input",{className:"input w-full",type:"password",name:"newPassword",autoComplete:"new-password",value:c,onChange:m("password")})]}),h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Repeat password"}),h.jsx("input",{className:"input w-full",type:"password",value:d,onChange:m("repeatPassword")})]})]}),j&&h.jsx(wN,{password:c,repeatPassword:d}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsx("button",{className:"button tertiary",disabled:E,onClick:x,children:"Update password"}),h.jsx("button",{className:"button danger",onClick:g,children:"Log out"})]})]})]})},[CN,fg]=un(!1),dg=()=>fg(!0),n1=()=>fg(!1),_N=n=>Zt({queryKey:["team-users"],queryFn:async()=>{const{data:l}=await je.get("/teams/"+n+"/users");return l.data},enabled:!!n}),NN=()=>vt({mutationFn:async({role:n,teamId:l,userId:i})=>(await je.patch("/teams/"+l+"/user-role",{role:n,userId:i}),!0),onSuccess:()=>{rt.invalidateQueries({queryKey:["team-users"]})}}),jN=()=>vt({mutationFn:async({teamId:n,userId:l})=>(await je.delete("/teams/"+n,{params:{userId:l}}),!0),onSuccess:()=>{rt.invalidateQueries({queryKey:["team-users"]})}}),TN="_user-entry_32l0s_2",AN="_select-container_32l0s_2",a1={userEntry:TN,selectContainer:AN},RN=()=>{const n=CN(),{data:l}=qn(),{data:i}=_N(l?.teamId),{mutate:r,isPending:u}=x4(),{mutate:c,isPending:d}=NN(),{mutate:m,isPending:p}=jN(),[y,{change:g,reset:x}]=kr({password:"",username:""}),E=()=>{r({username:y.username,password:y.password,teamId:l?.teamId||""}),x()},j=(T,_)=>{c({teamId:l.teamId,role:_,userId:T})},w=T=>{Cv("Are you sure you want to remove this user?").then(_=>{_&&m({userId:T,teamId:l.teamId})})},C=Lr(Gt.ADMIN),N=u||d||p;return h.jsxs(cn,{isVisible:n,onClose:n1,backdropClose:!0,children:[h.jsx(aa,{onClick:n1}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col overflow-hidden",children:[h.jsx(Ev,{children:"Manage users"}),Ma(i?.length,0)&&h.jsx("div",{className:"mt-4 overflow-y-auto flex-1",children:i.map(T=>h.jsxs("div",{className:a1.userEntry,children:[h.jsx("div",{className:a1.selectContainer,children:h.jsxs("select",{value:T.role,disabled:!C||N,onChange:_=>j(T.id,_.currentTarget.value),children:[h.jsx("option",{value:Gt.OWNER,children:"Owner"}),h.jsx("option",{value:Gt.ADMIN,children:"Admin"}),h.jsx("option",{value:Gt.EDITOR,children:"Editor"}),h.jsx("option",{value:Gt.READ_ONLY,children:"Reader"})]})}),h.jsx("p",{className:"flex-1 mx-2",children:T.name}),C&&h.jsx("button",{className:"p-1 cursor-pointer text-red-500 text-sm",onClick:()=>w(T.id),children:"❌"})]},T.id))}),C&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold",children:"Create new user"}),h.jsxs("div",{className:"flex flex-col lg:flex-row gap-2 lg:items-center mt-2",children:[h.jsx("input",{className:"input flex-1",onChange:g("username"),value:y.username,placeholder:"Username",disabled:N}),h.jsx("input",{className:"input",onChange:g("password"),value:y.password,type:"password",name:"newPassword",autoComplete:"new-password",placeholder:"Password",disabled:N}),h.jsx("button",{className:"button primary",onClick:E,disabled:N,children:"Create user"})]}),h.jsx("p",{className:"text-xs mt-1 text-gray-600",children:"You should create default password for the new account. The user should change it after the first login."})]})]})]})},ON=()=>{const[n,l]=b.useState(""),[i,r]=b.useState(""),[u,c]=b.useState(),[d,m]=b.useState(!1),p=wt(),y=g=>{g.preventDefault(),c(void 0),Or.login({password:i,username:n}).then(()=>{p("/",{replace:!0})}).catch(c)};return h.jsx("div",{className:"page-container bg-(--bg) h-screen",children:h.jsx("div",{className:"page-content items-center",children:h.jsxs("form",{className:"flex flex-col gap-2 w-full lg:w-lg",onSubmit:y,children:[h.jsx("p",{className:"font-semibold text-xl min-w-md",children:"Login"}),u&&h.jsx(Ot,{variant:"danger",children:"Failed to login. Please verify your credentials"}),h.jsx("input",{value:n,onChange:g=>l(g.currentTarget.value),className:"input",placeholder:"User name"}),h.jsx("input",{value:i,onChange:g=>r(g.currentTarget.value),className:"input",type:"password",placeholder:"Password"}),h.jsx("button",{type:"submit",className:"button primary",children:"Login"}),d?h.jsxs(Ot,{className:"w-full border border-blue-500",children:[h.jsx("p",{children:"If this is your first login, the default credentials are:"}),h.jsxs("ul",{className:"mt-2",children:[h.jsxs("li",{children:["Username: ",h.jsx("strong",{children:"admin"})]}),h.jsxs("li",{children:["Password: ",h.jsx("strong",{children:"admin"})]})]}),h.jsx("p",{className:"mt-2",children:"Please make sure to change the default password to a secure one."})]}):h.jsx("button",{className:"button tertiary",onClick:()=>m(!0),children:"First login?"})]})})})},MN=()=>{const n=wt(),{pathname:l}=qt(),{data:i,isLoading:r}=pv();b.useEffect(()=>{!i&&!r&&l!==$e.login.path&&n($e.login.path)},[i,r,n,l])},DN=()=>{const[n]=Px(),l=wt(),i=ui(),r=n.get("shareId");return b.useEffect(()=>{r&&i.mutateAsync({queryId:r}).then(u=>{l(`${$e.workbench.path}/tab/${u.id}`,{replace:!0})})},[r]),h.jsxs("div",{className:"page-container flex items-center justify-center h-screen",children:[i.isPending&&h.jsxs("div",{className:"flex items-center flex-col gap-2",children:[h.jsx(sg,{}),h.jsx("p",{children:"Fetching query information"})]}),i.isError&&h.jsx(Ot,{variant:"danger",children:"Failed to load query information"})]})},LN="_container_1mdw4_2",kN="_header_1mdw4_2",UN="_close-button_1mdw4_2",zN="_tab-container_1mdw4_2",qN="_tab-name_1mdw4_2",BN="_archived-badge_1mdw4_2 _badge_1mdw4_2",HN="_active-badge_1mdw4_2 _badge_1mdw4_2",QN="_action-blue_1mdw4_2 _action_1mdw4_2",$N="_action-red_1mdw4_2 _action_1mdw4_2",YN="_load-more-btn_1mdw4_2",Jn={container:LN,header:kN,closeButton:UN,tabContainer:zN,tabName:qN,archivedBadge:BN,activeBadge:HN,actionBlue:QN,actionRed:$N,loadMoreBtn:YN},VN=new Intl.DateTimeFormat,KN=()=>{const{data:n}=qn(),{data:l,fetchNextPage:i,hasNextPage:r,isFetching:u}=f4(n?.teamId,25),c=wt(),d=xv(),m=rE(),p=x=>{d.mutate(x),Js({show:!1}),c(`${$e.workbench.path}/tab/${x}`)},y=x=>{m.mutate(x)},g=l&&l?.length>0;return h.jsxs("div",{className:Jn.container,children:[h.jsxs("div",{className:Jn.header,children:[h.jsx("h3",{className:"text-lg",children:"Tabs history"}),h.jsx("button",{className:Jn.closeButton,onClick:()=>Js({show:!1}),children:h.jsx(ts,{width:24,height:24})})]}),!g&&h.jsx(Ot,{variant:"warning",children:"History is empty."}),l?.map(x=>h.jsxs("div",{className:Jn.tabContainer,children:[h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsx("p",{className:Jn.tabName,children:x.name}),x.dataSourceType&&h.jsx(ci,{size:16,type:x.dataSourceType}),h.jsx("p",{className:"text-sm",children:x.dataSourceName})]}),h.jsxs("div",{className:"flex gap-2 items-center mt-1",children:[h.jsx("p",{className:"text-sm italic",children:VN.format(new Date(x.updatedAt))}),x.archived?h.jsx("span",{className:Jn.archivedBadge,children:"Archived"}):h.jsx("span",{className:Jn.activeBadge,children:"Active"}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{onClick:()=>p(x.id),className:Jn.actionBlue,children:"Open"}),h.jsx("button",{onClick:()=>y(x.id),className:Jn.actionRed,children:"Delete"})]})]},x.id)),r&&!u&&h.jsx("div",{className:"flex justify-center my-2",children:h.jsx("button",{className:Jn.loadMoreBtn,onClick:()=>i(),children:"Load more"})})]})},GN=()=>{const n=DE(l=>l.show);return h.jsx(rg,{isVisible:n,onClose:()=>Js({show:!1}),backdropClose:!0,children:h.jsx(KN,{})})};function FN(){return bN(),xN(),MN(),h.jsxs(h.Fragment,{children:[h.jsxs(xx,{children:[h.jsx(yr,{path:$e.home.path,element:h.jsx(BE,{})}),h.jsx(yr,{path:`${$e.workbench.path}/tab/:id`,element:h.jsx(D_,{})}),h.jsx(yr,{path:$e.login.path,element:h.jsx(ON,{})}),h.jsx(yr,{path:$e.share.path,element:h.jsx(DN,{})})]}),h.jsx(JE,{}),h.jsx(r6,{}),h.jsx(x6,{}),h.jsx(lN,{}),h.jsx(gN,{}),h.jsx(EN,{}),h.jsx(RN,{}),h.jsx(GN,{}),h.jsx(p6,{}),h.jsx(c6,{})]})}const XN="_desktop-layout_15ls5_2",ZN="_mobile-layout_15ls5_2",PN="_nav_15ls5_2",JN="_main_15ls5_2",IN="_header_15ls5_2",ei={desktopLayout:XN,mobileLayout:ZN,nav:PN,main:JN,header:IN},WN="_container_zg43d_2",ej="_menu_zg43d_2",dh={container:WN,menu:ej},tj=({name:n,id:l,onRename:i,onDelete:r,onOpen:u})=>{const c=Av();return h.jsxs("button",{className:dh.menu,onContextMenu:c.open,onClick:()=>u(l),children:[h.jsx(Rv,{handler:c,children:h.jsxs("div",{className:"context-menu-container",children:[h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),c.close(),i(l)},className:"context-menu-item",children:"✏️ Rename"}),h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),c.close(),r(l)},className:"context-menu-item",children:"🗑️ Delete"})]})}),h.jsxs("span",{children:["📖 ",n]})]})},nj=({dataSource:n,index:l})=>{const i=()=>{Ps(n.id)};return Dn(l.toString(),()=>{Ps(r=>{if(r!==n.id)return n.id})}),h.jsxs("button",{className:dh.menu,onClick:i,children:[h.jsx(ci,{size:20,type:n.dbType}),h.jsx("p",{className:"truncate flex-1 text-left mx-1.5",children:n.name}),h.jsx("span",{className:"hotkey",children:l})]})},aj=()=>{const n=wt(),{data:l}=qn(),{data:i}=r4(l?.teamId),{data:r}=o4(l?.teamId),u=ui(),c=MC(),d=OC(),m=g=>{u.mutateAsync({queryId:g}).then(x=>{n(`${$e.workbench.path}/tab/${x.id}`)})},p=async g=>{const x=r?.find(j=>j.id===g);if(!x)return;const E=await Ur("New name?",x?.name);E&&c.mutate({id:x.savedQueryId,payload:{name:E}})},y=g=>{const x=r?.find(E=>E.id===g)?.savedQueryId;x&&d.mutate(x)};return h.jsx("div",{className:dh.container,children:h.jsxs("div",{className:"flex-1 overflow-y-auto",children:[Ma(i?.length,0)&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold text-sm text-gray-600 mb-2",children:"DATA SOURCES"}),i.map((g,x)=>h.jsx(nj,{dataSource:g,index:x+1},g.id))]}),Ma(r?.length,0)&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold text-sm text-gray-600 mb-2",children:"SAVED QUERIES"}),r.map(g=>h.jsx(tj,{onDelete:y,onRename:p,onOpen:m,name:g.name,id:g.id},g.savedQueryId))]})]})})},lj=()=>{const n=wt(),{pathname:l}=qt(),{data:i}=qn(),r=Dr("Desktop nav"),u=()=>{ig(),l!==$e.home.path&&n($e.home.path)},c=()=>Js({show:!0});return h.jsxs("nav",{className:ei.nav,children:[i&&h.jsxs("div",{className:ei.header,children:[h.jsx("button",{onClick:u,className:"flex justify-between items-center",children:h.jsx("span",{children:"🏠 Home"})}),h.jsxs("button",{onClick:r,className:"flex justify-between items-center",children:[h.jsx("span",{children:"🔎 New query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsxs("button",{onClick:c,className:"flex justify-between items-center",children:[h.jsx("span",{children:"⌛ Recent tabs"}),h.jsx("span",{className:"hotkey",children:"H"})]}),h.jsxs("button",{onClick:cg,children:["🪪 ",i.username]}),h.jsx("button",{onClick:dg,children:"👥 Manage users"})]}),h.jsx(aj,{})]})},sj="_root_1btvi_2",ij={root:sj},rj=()=>{const{pathname:n}=qt(),l=wt(),i=Dr("Mobile nav"),r=()=>{n!==$e.home.path&&l($e.home.path)};return h.jsxs("div",{className:ij.root,children:[h.jsxs("button",{onClick:r,children:[h.jsx("p",{children:"🏠"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Home"})]}),h.jsxs("button",{onClick:i,children:[h.jsx("p",{children:"🔎"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"New query"})]}),h.jsxs("button",{onClick:cg,children:[h.jsx("p",{children:"🪪"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Account"})]}),h.jsxs("button",{onClick:dg,children:[h.jsx("p",{children:"👥"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Users"})]})]})},oj=({children:n,isLogin:l})=>h.jsxs("div",{className:ei.desktopLayout,children:[h.jsx(wu,{id:"default",className:"z-100"}),h.jsx(wu,{id:"default-xs",className:"z-100 text-xs!"}),!l&&h.jsx(lj,{}),h.jsx("main",{className:ei.main,children:n})]}),uj=({children:n,isLogin:l})=>h.jsxs("div",{className:ei.mobileLayout,children:[h.jsx("main",{className:ei.main,children:n}),!l&&h.jsx(rj,{})]}),cj=({children:n})=>{const l=Nv(nh.laptop),{pathname:i}=qt(),r=i===$e.login.path;return l?h.jsx(oj,{isLogin:r,children:n}):h.jsx(uj,{isLogin:r,children:n})};T2.createRoot(document.getElementById("root")).render(h.jsxs(fl.StrictMode,{children:[h.jsx(l4,{}),h.jsx(NS,{client:rt,children:h.jsx(Kx,{children:h.jsx(cj,{children:h.jsx(FN,{})})})})]}));
192
+ `,Wo=16,l4=({reverseOrder:n,position:l="top-center",toastOptions:i,gutter:r,children:u,containerStyle:c,containerClassName:d})=>{let{toasts:m,handlers:p}=M3(i);return b.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Wo,left:Wo,right:Wo,bottom:Wo,pointerEvents:"none",...c},className:d,onMouseEnter:p.startPause,onMouseLeave:p.endPause},m.map(y=>{let v=y.position||l,x=p.calculateOffset(y,{reverseOrder:n,gutter:r,defaultPosition:l}),E=n4(v,x);return b.createElement(t4,{id:y.id,key:y.id,onHeightUpdate:p.updateHeight,className:y.visible?a4:"",style:E},y.type==="custom"?gu(y.message,y):u?u(y):b.createElement(e4,{toast:y,position:v}))}))},rn=zt;const rt=new _S({defaultOptions:{queries:{staleTime:1e3*60*5,retry:(n,l)=>yu(l)&&l.response?.status===404?!1:n<3}},mutationCache:new D1({onError:n=>{yu(n)&&n.status&&n.status>=400&&n.status<500&&n.response?.data.error&&rn.error(n.response.data.error)}})}),s4=async()=>{const{data:n}=await Xd.post("/auth/refresh");return n.data.accessToken},i4=async n=>{const{data:l}=await Xd.post("/auth/login",n);return l.data.accessToken},Ly=()=>{rt.invalidateQueries({queryKey:["accessToken"]})},Or=(()=>{let n=Promise.resolve(m3()),l=!1;const i=async()=>{await Xd.post("/auth/logout"),Io(void 0),window.location.reload()};return{get:async()=>n,refresh:()=>(l||(l=!0,n=s4().then(d=>(Io(d),d)).catch(()=>{Io(void 0),i()}).finally(()=>{l=!1,Ly()})),n),login:d=>(l||(l=!0,n=i4(d).then(m=>(Io(m),m)).finally(()=>{l=!1,Ly()})),n),logout:i}})(),dg=location.hostname.includes("app.dataramen.xyz")?"http://localhost:4466/api":"/api",je=et.create({baseURL:dg,withCredentials:!0});je.interceptors.request.use(async n=>{const l=await Or.get();return l&&(n.headers.Authorization=`Bearer ${l}`),n});je.interceptors.response.use(n=>n,n=>(yu(n)&&n.status===401&&n?.response?.data.error!=="Missing auth token"&&Or.refresh(),Promise.reject(n)));const Xd=et.create({baseURL:dg,withCredentials:!0}),bl="data-sources",hg="auth-user",r4=n=>Zt({queryKey:["project","datasources",n],queryFn:async()=>{const{data:l}=await je.get(`/project/team/${n}/datasources`);return l.data},enabled:!!n}),o4=n=>Zt({queryKey:["project","saved-queries",n],queryFn:async()=>{const{data:l}=await je.get(`/project/team/${n}/queries`);return l.data},enabled:!!n}),ii=n=>{const l=["project","datasources"],i=["project","saved-queries"];return Promise.all([rt.invalidateQueries({queryKey:l}),rt.invalidateQueries({queryKey:i})])},u4=n=>{const l=["trash","team"];return rt.invalidateQueries({queryKey:l})},c4=(n,l)=>Zt({queryKey:["project",l.teamId,"tables",n,l.selectedDataSources],queryFn:async()=>{const{data:i}=await je.get(`/project/team/${l.teamId}/query`,{params:{size:30,search:n,selectedDataSources:l.selectedDataSources}});return i.data},enabled:!!l.teamId,staleTime:0}),f4=(n,l=30)=>zS({queryKey:["project","tabs-history",n,l],queryFn:async({pageParam:i})=>{const{data:r}=await je.get(`/project/team/${n}/tabs-history?page=${i}&size=${l}`);return r},select:({pages:i})=>i.flatMap(r=>r.data),enabled:!!n,initialPageParam:0,getNextPageParam:(i,r)=>{if(i.hasMore)return r.length},staleTime:0}),d4=()=>rt.invalidateQueries({queryKey:["project","tabs-history"]}),h4=(n,l)=>{},m4=()=>{},p4={event:h4,pageView:m4},Ou=n=>Zt({queryKey:[bl,n],queryFn:async()=>{const{data:l}=await je.get("/data-sources/"+n);return l.data},enabled:!!n}),Zd=n=>Zt({queryKey:[bl,n.teamId],queryFn:async()=>{const{data:l}=await je.get("/data-sources",{params:n});return l.data},enabled:n.teamId!==void 0}),Mr=n=>Zt({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:l}=await je.get(`/data-sources/${n}/inspections`);return l.data},enabled:!!n}),y4=()=>gt({mutationFn:async n=>{const{data:l}=await je.post("/data-sources",n);return l.data},onSuccess:()=>{rt.invalidateQueries({queryKey:[bl]}),ii()},onError:()=>{}}),g4=()=>gt({mutationFn:async({dataSource:n,id:l})=>{const{data:i}=await je.put(`/data-sources/${l}`,n);return i.data},onSuccess:()=>{rt.invalidateQueries({queryKey:[bl]}),ii()}}),mg=()=>gt({mutationFn:async n=>{await je.post(`/data-sources/${n}/inspect`)},onSuccess:()=>{rt.invalidateQueries({queryKey:[bl]})}}),v4=()=>gt({mutationFn:async n=>{await je.delete(`/data-sources/${n}`)},onSuccess:()=>{rt.invalidateQueries({queryKey:[bl]}),ii()}}),pg=()=>Zt({queryKey:["accessToken"],queryFn:Or.get}),qn=()=>{const{data:n}=pg();return Zt({queryKey:[hg],queryFn:async()=>{const{data:l}=await je.get("/users");return l.data},enabled:!!n,retry:(l,i)=>yu(i)&&i.code==="ERR_NETWORK"?!1:l<3})},b4=()=>gt({mutationFn:async n=>{const{data:l}=await je.patch("/users",n);return l.data},onSuccess:async n=>{rt.setQueryData([hg],n)}}),x4=()=>gt({mutationFn:async n=>(await je.post("/users",n),!0),onSuccess:()=>{rt.invalidateQueries({queryKey:["team-users"]})}}),S4="_alert_4lh7l_2",w4="_info_4lh7l_2",E4="_danger_4lh7l_2",C4="_success_4lh7l_2",_4="_warning_4lh7l_2",N4="_dark_4lh7l_2",$s={alert:S4,info:w4,danger:E4,success:C4,warning:_4,dark:N4};function yg(n){var l,i,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(i=yg(n[l]))&&(r&&(r+=" "),r+=i)}else for(i in n)n[i]&&(r&&(r+=" "),r+=i);return r}function se(){for(var n,l,i=0,r="",u=arguments.length;i<u;i++)(n=arguments[i])&&(l=yg(n))&&(r&&(r+=" "),r+=l);return r}const Ot=({variant:n,noRounded:l,className:i,children:r,...u})=>h.jsx("div",{className:se($s.alert,!l&&"rounded-lg",(n==="info"||!n)&&$s.info,n==="danger"&&$s.danger,n==="dark"&&$s.dark,n==="warning"&&$s.warning,n==="success"&&$s.success,i),role:"alert",...u,children:r}),un=n=>{const l=new Set;let i=n;const r=m=>(l.add(m),()=>l.delete(m)),u=m=>(l.forEach(p=>p(m)),!0),c=m=>{i=typeof m=="function"?m(i):m,u(i)},d=m=>()=>m?m(i):i;return[m=>b.useSyncExternalStore(r,d(m),d(m)),c,{get:()=>i,subscribe:m=>(m(i),r(m))}]};function j4(n){const l=[];for(const i of n)for(const r of i.columns)r.ref&&(l.push({id:`${i.tableName}->${r.ref.table}.${r.ref.field}`,name:`${i.tableName} in ${r.ref.table}`,where:`${i.tableName}.${r.name} = ${r.ref.table}.${r.ref.field}`,on:{fromTable:r.ref.table,toTable:i.tableName,fromColumn:r.ref.field,toColumn:r.name}}),l.push({id:`${r.ref.table}->${i.tableName}.${r.name}`,name:`${r.ref.table} in ${i.tableName}`,where:`${r.ref.table}.${r.ref.field} = ${i.tableName}.${r.name}`,on:{fromTable:i.tableName,toTable:r.ref.table,fromColumn:r.name,toColumn:r.ref.field}}));return l}const T4=n=>Zt({queryKey:["hooks",n],queryFn:async()=>{const l=await rt.fetchQuery({queryKey:[bl,n,"inspections"],queryFn:async()=>{const{data:i}=await je.get(`/data-sources/${n}/inspections`);return i.data}});return j4(l)},enabled:!!n}),gg=[{value:"=",label:"equals"},{value:"<>",label:"not equal"},{value:">",label:"greater than"},{value:">=",label:"greater than or equal"},{value:"<",label:"less than"},{value:"<=",label:"less than or equal"},{value:"LIKE",label:"contains"},{value:"NOT LIKE",label:"not contains"},{value:"IN",label:"in list"},{value:"NOT IN",label:"not in list"},{value:"IS NULL",label:"is null"},{value:"IS NOT NULL",label:"is not null"}],A4=gg.reduce((n,l)=>(n[l.value]=l.label,n),{});gg.reduce((n,l)=>(n[l.label]=l.value,n),{});const ri=n=>n.map(l=>({label:A4[l],value:l}));ri(["=","<>",">",">=","<","<=","IN","NOT IN","IS NULL","IS NOT NULL"]);ri(["=","<>","LIKE","NOT LIKE","IN","NOT IN","IS NULL","IS NOT NULL"]);ri(["=","<>","IS NULL","IS NOT NULL"]);ri(["=","<>",">",">=","<","<=","IS NULL","IS NOT NULL"]);ri(["IS NULL","IS NOT NULL"]);ri(["IN","NOT IN"]);const R4=["char","varchar","binary","varbinary","blob","text","enum","set","character","character varying","text","citext","uuid","xml","json","jsonb"],O4=new Set(R4),M4=n=>O4.has(n),D4=["integer","smallint","decimal","numeric","float","real","double precision","int","smallint","integer","bigint","decimal","numeric","real","double precision","serial","bigserial","money"],L4=new Set(D4),U4=n=>L4.has(n),k4=["date","datetime","timestamp","timestamptz"].reduce((n,l)=>(n[l]=!0,n),{}),vg=n=>n.fn?n.distinct===!0?`${n.fn} distinct ${n.value}`:`${n.fn} ${n.value}`:n.value;var Gt=(n=>(n.OWNER="owner",n.ADMIN="admin",n.EDITOR="editor",n.READ_ONLY="read_only",n))(Gt||{});const Uy={[Gt.READ_ONLY]:10,[Gt.EDITOR]:20,[Gt.ADMIN]:30,[Gt.OWNER]:40},Da=n=>n.startsWith("'")&&n.endsWith("'")||n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):n,z4={operator:"LIKE",parse:n=>{const l=n.match(/^LIKE\s*["'](.*)["']$/i);if(l)return[{value:Da(l[1])}]},stringify:(n,l)=>M4(l)?`${n.value?.[0].value}`:`LIKE "%${n.value?.[0].value}%"`},q4={operator:"NOT LIKE",parse:n=>{const l=n.match(/^NOT LIKE\s*["'](.*)["']$/i);if(l)return[{value:Da(l[1])}]},stringify:n=>`NOT LIKE "%${n.value?.[0].value}%"`};function bg(n){return n===""?[]:B4(n).map(H4)}function B4(n){const l=[];let i=0,r="",u=!1,c=!1;for(;i<n.length;){const d=n[i];if((u||c)&&d==="\\"){r+=n[i+1],i+=2;continue}if(d==="'"&&!c){u=!u,r+=d,i++;continue}if(d==='"'&&!u){c=!c,r+=d,i++;continue}if(d===","&&!u&&!c){l.push(r.trim()),r="",i++;continue}r+=d,i++}if(r.trim()!==""&&l.push(r.trim()),u||c)throw new Error("Unterminated string literal");return l}function H4(n){if(n.startsWith("'")&&n.endsWith("'"))return{value:ky(n.slice(1,-1),"'")};if(n.startsWith('"')&&n.endsWith('"'))return{value:ky(n.slice(1,-1),'"')};const l=Number(n);if(!Number.isNaN(l))return{value:l};throw new Error(`Invalid literal: ${n}`)}function ky(n,l){return n.replace(/\\(.)/g,(i,r)=>r)}const Q4={operator:"IN",parse:n=>{const l=n.match(/^in\s*\((.*)\)$/i);if(l)return bg(l[1])},stringify:n=>`IN (${n.value?.map(l=>`"${l.value}"`).join(", ")})`},$4={operator:"NOT IN",parse:n=>{const l=n.match(/^not\s+in\s*\((.*)\)$/i);if(l)return bg(l[1])},stringify:n=>`NOT IN (${n.value?.map(l=>`"${l.value}"`).join(", ")})`},Y4={operator:"=",parse:n=>{const l=n.match(/^=\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:(n,l)=>U4(l)?`${n.value?.[0].value}`:`= ${n.value?.[0].value}`},V4={operator:"!=",parse:n=>{const l=n.match(/^!=\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`!= ${n.value?.[0].value}`},K4={operator:"<>",parse:n=>{const l=n.match(/^<>\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`<> ${n.value?.[0].value}`},G4={operator:">",parse:n=>{const l=n.match(/^>\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`> ${n.value?.[0].value}`},F4={operator:">=",parse:n=>{const l=n.match(/^>=\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`>= ${n.value?.[0].value}`},X4={operator:"<",parse:n=>{const l=n.match(/^<\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`< ${n.value?.[0].value}`},Z4={operator:"<=",parse:n=>{const l=n.match(/^<=\s*(.*)$/);if(l)return[{value:Da(l[1])}]},stringify:n=>`<= ${n.value?.[0].value}`},P4={operator:"IS NULL",parse:n=>{if(/^is\s+null$/i.test(n))return[]},stringify:()=>"IS NULL"},J4={operator:"IS NOT NULL",parse:n=>{if(/^is\s+not\s+null$/i.test(n))return[]},stringify:()=>"IS NOT NULL"},I4=[z4,q4,Q4,$4,Y4,V4,K4,F4,G4,Z4,X4,P4,J4];I4.reduce((n,l)=>(n[l.operator]=l,n),{});function W4(n,l){if(!n||!l)return{};const i=new Set;for(const u of l)u.table&&i.add(u.table);const r={};for(const u of i){const c=n.find(d=>d.tableName===u);if(c){r[u]=[];const d=c.columns.filter(m=>m.isPrimary);for(const m of d)if(l.find(y=>y.table===u&&y.column===m.name))r[u].push(m.name);else{delete r[u];break}}}return r}function eE(n,l,i,r){const{data:u}=T4(l),{data:c}=Mr(l);return b.useMemo(()=>{const d=W4(c,n?.result.columns);return{name:i,tabId:r,hooks:(()=>{const m=[];if(!u||!n||!n.result.columns)return m;for(const p of u)(n.result.tables.includes(p.on.toTable)||n.result.tables.includes(p.on.fromTable))&&m.push(p);return m})(),availableJoins:(()=>{const m=[];if(!u||!n||!n.result.columns)return m;for(const p of u)!n.result.tables.includes(p.on.toTable)&&n.result.tables.includes(p.on.fromTable)&&m.push(p);return m})(),allColumns:n?.result.allColumns||[],dataSourceId:l,entities:Object.keys(d),getValue:(m,p)=>{const y=vg(p),v=n?.result.columns?.findIndex(x=>x.full===y);if(v!=null&&v>-1)return m[v]},getEntityKey:(m,p)=>d[m].reduce((y,v)=>{const x=n?.result.columns?.findIndex(E=>E.column===v&&E.table===m);return x!=null&&x>-1&&y.push([v,p[x]]),y},[]),getColumnType:m=>{const p=n?.result.allColumns.find(y=>y.full===m);if(p)return p.type}}},[n,l,u,c,i])}function tE(n,l){return b.useMemo(()=>({state:n,setState:l}),[n,l])}function oi(n){return{dataSourceId:n.dataSourceId||"",page:n?.page||0,size:n?.size||50,table:n.table||"",filters:n?.filters||[],joins:n?.joins??[],orderBy:n?.orderBy??[],columns:n?.columns??[],groupBy:n?.groupBy??[],aggregations:n?.aggregations??[]}}const $e={home:{path:"/"},workbench:{path:"/workbench"},share:{path:"/share"},login:{path:"/login"}},Pd=n=>{rt.setQueryData(["workbench-tabs"],l=>n(l||[]))},nE=(n,l)=>{rt.setQueryData(["workbench-tabs",n],i=>i&&l(i))},Jd=()=>Zt({queryKey:["workbench-tabs"],queryFn:async()=>{const{data:n}=await je.get("/workbench-tabs");return n.data}}),aE=n=>Zt({queryKey:["workbench-tabs",n],queryFn:async()=>{const{data:l}=await je.get(`/workbench-tabs/${n}`);return l.data}}),ui=()=>gt({mutationFn:async n=>{const{data:l}=await je.post("/workbench-tabs",n);return l.data},onSuccess:async n=>{Pd(l=>[...l,n])}}),lE=()=>gt({mutationFn:async n=>(await je.patch(`/workbench-tabs/${n}`,{archived:!0}),n),onMutate:n=>{Pd(l=>l.filter(i=>i.id!==n))}}),xg=()=>gt({mutationFn:async n=>(await je.patch(`/workbench-tabs/${n}`,{archived:!1}),n),onSuccess:()=>wg()}),sE=()=>gt({mutationFn:async({id:n,payload:l})=>(await je.patch(`/workbench-tabs/${n}`,l),!0),onMutate:({id:n,payload:l})=>{nE(n,i=>({...i,...l})),Pd(i=>i.map(r=>r.id!==n?r:{...r,name:l.name||r.name}))}}),iE=(n,l)=>{const{dataSourceId:i,searchAll:r,table:u,filters:c,joins:d,orderBy:m,groupBy:p,columns:y,aggregations:v,page:x=0,size:E=20}=l;return Zt({queryKey:["workbench-tab-runner",n,i,u,x,E,c,v,d,m,p,y,r],queryFn:async()=>{const{data:j}=await je.post(`/workbench-tabs/${n}/run`,l);return j.data},retry:1,enabled:!!u&&!!i})},rE=()=>gt({mutationFn:async n=>{await je.delete(`/workbench-tabs/${n}`)},onSuccess:()=>{wg(),d4()}}),Sg=n=>rt.invalidateQueries({queryKey:["workbench-tab-runner",n]}),wg=()=>rt.invalidateQueries({queryKey:["workbench-tabs"]}),[oE,td,uE]=un(void 0),cE=async()=>new Promise(n=>{td({onCancel:()=>{td(void 0),n(void 0)},onConfirm:(l,i,r)=>{td(void 0),n({dsId:r,id:i,type:l})}})}),Dr=n=>{const l=wt(),i=ui(),r=xg();return b.useEffect(()=>{i?.data?.id&&l(`${$e.workbench.path}/tab/${i.data.id}`),r?.data&&l(`${$e.workbench.path}/tab/${r?.data}`)},[i.data,r.data]),b.useCallback(()=>{uE.get()||cE().then(c=>{c?.type==="table"?i.mutate({name:c.id,opts:oi({table:c.id,dataSourceId:c.dsId})}):c?.type==="query"?i.mutate({queryId:c.id}):c?.type==="tab"&&r.mutate(c.id)})},[l,n])},Lr=n=>{const{data:l}=qn();return b.useMemo(()=>l?Uy[l.teamRole]>=Uy[n]:!1,[l,n])},fE="_input_19uh8_2",dE="_small_19uh8_2",hE="_content_19uh8_2",mE="_form_19uh8_2",pE="_mode-select_19uh8_2",ke={input:fE,small:dE,content:hE,form:mE,switch:"_switch_19uh8_2",modeSelect:pE},yE="_modal_uzzz6_2",gE="_modal-visible_uzzz6_2",vE="_modal-invisible_uzzz6_2",bE="_backdrop_uzzz6_2",xE="_modal-container_uzzz6_2",SE="_close-button_uzzz6_2",Fs={modal:yE,modalVisible:gE,modalInvisible:vE,backdrop:bE,modalContainer:xE,closeButton:SE},ts=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M368 368L144 144M368 144L144 368"})),cn=({children:n,backdropClose:l,isVisible:i,onClose:r,onClosed:u,noPadding:c=!1,portal:d=!1})=>{const[m,p]=b.useState(!1),y=()=>{l&&r()},v=E=>{i||getComputedStyle(E.currentTarget).opacity==="0"&&(p(!1),u&&u())};b.useEffect(()=>{i&&p(!0)},[i]);const x=h.jsxs("div",{onTransitionEnd:v,className:se(Fs.modal,i?Fs.modalVisible:Fs.modalInvisible),children:[h.jsx("div",{onClick:y,className:Fs.backdrop}),h.jsx("div",{className:se(Fs.modalContainer,c!==!0&&"p-4"),children:m&&n})]});return d?nS.createPortal(x,document.body):x},aa=({onClick:n})=>{const l=b.useRef(n);return l.current=n,b.useEffect(()=>{const i=r=>{r.key==="Escape"&&l.current?.()};return window.addEventListener("keyup",i),()=>{window.removeEventListener("keyup",i)}},[]),h.jsx("button",{className:Fs.closeButton,onClick:n,children:h.jsx(ts,{width:20,height:20})})},Eg=({children:n})=>h.jsx("h2",{className:"text-xl font-semibold",children:n}),Ur=n=>{const[l,i]=b.useState(n),[r,u]=b.useState([]),c=b.useRef(n),d=b.useCallback((y,v)=>{i(x=>({...x,[y]:v}))},[]),m=b.useCallback(y=>v=>{v.target.type==="checkbox"?d(y,v.target.checked):d(y,v.target.value),u(x=>x.includes(y)?x:[...x,y])},[d]),p=b.useCallback(()=>{i(c.current),u([])},[]);return[l,{set:d,change:m,reset:p,touched:r}]},wE=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"Database port"}),h.jsx("input",{value:n.dbPort,onChange:l("dbPort"),type:"number",className:"input"})]}),h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]})]}),EE=({form:n,change:l})=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"Database URL"}),h.jsx("input",{value:n.dbUrl,onChange:l("dbUrl"),className:"input"})]}),h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"Database port"}),h.jsx("input",{value:n.dbPort,onChange:l("dbPort"),type:"number",className:"input"})]}),h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"User"}),h.jsx("input",{value:n.dbUser,onChange:l("dbUser"),className:"input"})]}),h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"Password"}),h.jsx("input",{type:"password",value:n.dbPassword,onChange:l("dbPassword"),className:"input"})]}),h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"Database"}),h.jsx("input",{value:n.dbDatabase,onChange:l("dbDatabase"),className:"input"})]}),h.jsxs("div",{className:se(ke.input,ke.small),children:[h.jsx("label",{children:"Schema"}),h.jsx("input",{value:n.dbSchema,onChange:l("dbSchema"),className:"input"})]})]}),Ys=[{label:"PostgreSQL",tag:"postgres"},{label:"MySQL",tag:"mysql"}],CE=({show:n,onClose:l,dbType:i="postgres"})=>{const r=y4(),u=mg(),{data:c}=qn(),[d,{change:m,set:p}]=Ur({name:"",dbType:i,dbUrl:"",dbUser:"",dbPassword:"",dbDatabase:"",dbSchema:"",dbPort:5432,teamId:"",ownerId:"",description:"",allowInsert:!1,allowUpdate:!1}),y=async()=>{const w=await r.mutateAsync({...d,dbPort:Number(d.dbPort),teamId:c.teamId,ownerId:c.id});await u.mutateAsync(w.id),l(),p4.event("Create Datasource",{dbType:d.dbType})},v=w=>{p("allowInsert",!w),p("allowUpdate",!w)},x=()=>{l()},E=r.isPending||u.isPending,j=!d.allowInsert&&!d.allowUpdate;return h.jsxs(cn,{isVisible:n,onClose:x,children:[h.jsx(aa,{onClick:x}),h.jsxs(Ot,{variant:"warning",className:"text-sm mb-2 max-w-xl",children:["DataRamen is currently under active development. In production-like environments, ",h.jsx("span",{className:"font-semibold underline",children:"it’s recommended to use read-only database credentials"}),"."]}),r.isError&&h.jsx(Ot,{variant:"danger",className:"mb-2",children:h.jsx("span",{children:"Failed to connect to the database. Please check if the data are correct and retry."})}),r.isPending&&h.jsx(Ot,{className:"mb-2",variant:"info",children:"Creating connection"}),u.isPending&&h.jsx(Ot,{className:"mb-2",variant:"info",children:"Inspecting connection"}),h.jsxs("div",{className:ke.switch,children:[h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===Ys[0].tag,onChange:()=>p("dbType",Ys[0].tag)}),h.jsx("span",{children:Ys[0].label})]}),h.jsxs("label",{className:"button tertiary",children:[h.jsx("input",{type:"radio",name:"bdType",className:"mr-2",checked:d.dbType===Ys[1].tag,onChange:()=>p("dbType",Ys[1].tag)}),h.jsx("span",{children:Ys[1].label})]})]}),h.jsxs("div",{className:"overflow-y-auto mt-2",children:[h.jsx("div",{className:ke.content,children:h.jsxs("div",{className:ke.form,children:[h.jsxs("div",{className:se(ke.input,"col-span-2"),children:[h.jsx("label",{children:"Name"}),h.jsx("input",{value:d.name,onChange:m("name"),className:"input"})]}),h.jsxs("div",{className:se(ke.input,"col-span-2"),children:[h.jsx("label",{children:"Description"}),h.jsx("textarea",{value:d.description,onChange:m("description"),className:"input"})]}),d.dbType==="mysql"&&h.jsx(wE,{form:d,change:m}),d.dbType==="postgres"&&h.jsx(EE,{form:d,change:m})]})}),h.jsxs("div",{className:"mt-4",children:[h.jsxs("label",{className:ke.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:j,onChange:()=>v(!0)}),h.jsx("span",{className:"text-sm font-semibold",children:"Production mode"})]}),h.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",h.jsx("strong",{children:"forbidden"}),". You won't be able to insert new rows or edit existing data. Tables in this data source are read-only."]})]}),h.jsxs("label",{className:ke.modeSelect,children:[h.jsxs("div",{children:[h.jsx("input",{type:"radio",name:"production-mode",className:"mr-2",checked:!j,onChange:()=>v(!1)}),h.jsx("span",{className:"text-sm font-semibold",children:"Dev mode"})]}),h.jsxs("p",{className:"text-xs mt-1 text-gray-600",children:["Mutation operations (such as INSERT or UPDATE) are ",h.jsx("strong",{children:"allowed"}),". You will be able to insert new rows and edit existing data."]})]})]})]}),h.jsxs("div",{className:"flex justify-end gap-1 mt-2",children:[h.jsx("button",{onClick:x,className:"button tertiary",disabled:E,children:"Cancel"}),h.jsx("button",{onClick:y,className:"button primary",disabled:E,children:"Create"})]})]})},_E="_data-source-entry_13bu1_2",NE="_action-title_13bu1_2",jE="_action-subtext_13bu1_2",TE="_dev-tag_13bu1_2",AE="_prod-tag_13bu1_2",Kt={dataSourceEntry:_E,actionTitle:NE,actionSubtext:jE,devTag:TE,prodTag:AE},RE=n=>b.createElement("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n},b.createElement("path",{d:"m24.129 23.412-.508-.484c-.251-.331-.518-.624-.809-.891l-.005-.004q-.448-.407-.931-.774-.387-.266-1.064-.641c-.371-.167-.661-.46-.818-.824l-.004-.01-.048-.024c.212-.021.406-.06.592-.115l-.023.006.57-.157c.236-.074.509-.122.792-.133h.006c.298-.012.579-.06.847-.139l-.025.006q.194-.048.399-.109t.351-.109v-.169q-.145-.217-.351-.496c-.131-.178-.278-.333-.443-.468l-.005-.004q-.629-.556-1.303-1.076c-.396-.309-.845-.624-1.311-.916l-.068-.04c-.246-.162-.528-.312-.825-.435l-.034-.012q-.448-.182-.883-.399c-.097-.048-.21-.09-.327-.119l-.011-.002c-.117-.024-.217-.084-.29-.169l-.001-.001c-.138-.182-.259-.389-.355-.609l-.008-.02q-.145-.339-.314-.651-.363-.702-.702-1.427t-.651-1.452q-.217-.484-.399-.967c-.134-.354-.285-.657-.461-.942l.013.023c-.432-.736-.863-1.364-1.331-1.961l.028.038c-.463-.584-.943-1.106-1.459-1.59l-.008-.007c-.509-.478-1.057-.934-1.632-1.356l-.049-.035q-.896-.651-1.96-1.282c-.285-.168-.616-.305-.965-.393l-.026-.006-1.113-.278-.629-.048q-.314-.024-.629-.024c-.148-.078-.275-.171-.387-.279-.11-.105-.229-.204-.353-.295l-.01-.007c-.605-.353-1.308-.676-2.043-.93l-.085-.026c-.193-.113-.425-.179-.672-.179-.176 0-.345.034-.499.095l.009-.003c-.38.151-.67.458-.795.84l-.003.01c-.073.172-.115.371-.115.581 0 .368.13.705.347.968l-.002-.003q.544.725.834 1.14.217.291.448.605c.141.188.266.403.367.63l.008.021c.056.119.105.261.141.407l.003.016q.048.206.121.448.217.556.411 1.14c.141.425.297.785.478 1.128l-.019-.04q.145.266.291.52t.314.496c.065.098.147.179.241.242l.003.002c.099.072.164.185.169.313v.001c-.114.168-.191.369-.217.586l-.001.006c-.035.253-.085.478-.153.695l.008-.03c-.223.666-.351 1.434-.351 2.231 0 .258.013.512.04.763l-.003-.031c.06.958.349 1.838.812 2.6l-.014-.025c.197.295.408.552.641.787.168.188.412.306.684.306.152 0 .296-.037.422-.103l-.005.002c.35-.126.599-.446.617-.827v-.002c.048-.474.12-.898.219-1.312l-.013.067c.024-.063.038-.135.038-.211 0-.015-.001-.03-.002-.045v.002q-.012-.109.133-.206v.048q.145.339.302.677t.326.677c.295.449.608.841.952 1.202l-.003-.003c.345.372.721.706 1.127 1.001l.022.015c.212.162.398.337.566.528l.004.004c.158.186.347.339.56.454l.01.005v-.024h.048c-.039-.087-.102-.157-.18-.205l-.002-.001c-.079-.044-.147-.088-.211-.136l.005.003q-.217-.217-.448-.484t-.423-.508q-.508-.702-.969-1.467t-.871-1.555q-.194-.387-.375-.798t-.351-.798c-.049-.099-.083-.213-.096-.334v-.005c-.006-.115-.072-.214-.168-.265l-.002-.001c-.121.206-.255.384-.408.545l.001-.001c-.159.167-.289.364-.382.58l-.005.013c-.141.342-.244.739-.289 1.154l-.002.019q-.072.641-.145 1.318l-.048.024-.024.024c-.26-.053-.474-.219-.59-.443l-.002-.005q-.182-.351-.326-.69c-.248-.637-.402-1.374-.423-2.144v-.009c-.009-.122-.013-.265-.013-.408 0-.666.105-1.308.299-1.91l-.012.044q.072-.266.314-.896t.097-.871c-.05-.165-.143-.304-.265-.41l-.001-.001c-.122-.106-.233-.217-.335-.335l-.003-.004q-.169-.244-.326-.52t-.278-.544c-.165-.382-.334-.861-.474-1.353l-.022-.089c-.159-.565-.336-1.043-.546-1.503l.026.064c-.111-.252-.24-.47-.39-.669l.006.008q-.244-.326-.436-.617-.244-.314-.484-.605c-.163-.197-.308-.419-.426-.657l-.009-.02c-.048-.097-.09-.21-.119-.327l-.002-.011c-.011-.035-.017-.076-.017-.117 0-.082.024-.159.066-.223l-.001.002c.011-.056.037-.105.073-.145.039-.035.089-.061.143-.072h.002c.085-.055.188-.088.3-.088.084 0 .165.019.236.053l-.003-.001c.219.062.396.124.569.195l-.036-.013q.459.194.847.375c.298.142.552.292.792.459l-.018-.012q.194.121.387.266t.411.291h.339q.387 0 .822.037c.293.023.564.078.822.164l-.024-.007c.481.143.894.312 1.286.515l-.041-.019q.593.302 1.125.641c.589.367 1.098.743 1.577 1.154l-.017-.014c.5.428.954.867 1.38 1.331l.01.012c.416.454.813.947 1.176 1.464l.031.047c.334.472.671 1.018.974 1.584l.042.085c.081.154.163.343.234.536l.011.033q.097.278.217.57.266.605.57 1.221t.57 1.198l.532 1.161c.187.406.396.756.639 1.079l-.011-.015c.203.217.474.369.778.422l.008.001c.368.092.678.196.978.319l-.047-.017c.143.065.327.134.516.195l.04.011c.212.065.396.151.565.259l-.009-.005c.327.183.604.363.868.559l-.021-.015q.411.302.822.57.194.145.651.423t.484.52c-.114-.004-.249-.007-.384-.007-.492 0-.976.032-1.45.094l.056-.006c-.536.072-1.022.203-1.479.39l.04-.014c-.113.049-.248.094-.388.129l-.019.004c-.142.021-.252.135-.266.277v.001c.061.076.11.164.143.26l.002.006c.034.102.075.19.125.272l-.003-.006c.119.211.247.393.391.561l-.004-.005c.141.174.3.325.476.454l.007.005q.244.194.508.399c.161.126.343.25.532.362l.024.013c.284.174.614.34.958.479l.046.016c.374.15.695.324.993.531l-.016-.011q.291.169.58.375t.556.399c.073.072.137.152.191.239l.003.005c.091.104.217.175.36.193h.003v-.048c-.088-.067-.153-.16-.184-.267l-.001-.004c-.025-.102-.062-.191-.112-.273l.002.004zm-18.576-19.205q-.194 0-.363.012c-.115.008-.222.029-.323.063l.009-.003v.024h.048q.097.145.244.326t.266.351l.387.798.048-.024c.113-.082.2-.192.252-.321l.002-.005c.052-.139.082-.301.082-.469 0-.018 0-.036-.001-.054v.003c-.045-.044-.082-.096-.108-.154l-.001-.003-.081-.182c-.053-.084-.127-.15-.214-.192l-.003-.001c-.094-.045-.174-.102-.244-.169z"})),OE=n=>b.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...n},b.createElement("title",null,"file_type_pgsql"),b.createElement("path",{d:"M29.507,18.773a1.378,1.378,0,0,0-1.144-.921,2.619,2.619,0,0,0-.913.051,8.2,8.2,0,0,1-1.406.185,27.125,27.125,0,0,0,2.872-6.83c.953-3.689.444-5.369-.151-6.13A8.239,8.239,0,0,0,22.121,2a11.773,11.773,0,0,0-3.453.484A12.858,12.858,0,0,0,16.648,2.3a6.565,6.565,0,0,0-3.518.867,16.039,16.039,0,0,0-2.484-.624,7.694,7.694,0,0,0-5.819.924C3.093,4.691,2.289,6.819,2.438,9.792A36.351,36.351,0,0,0,3.844,16.33a22.579,22.579,0,0,0,1.514,3.863A4.786,4.786,0,0,0,7.8,22.742a2.4,2.4,0,0,0,2.379-.516,2.08,2.08,0,0,0,.5.43,3.328,3.328,0,0,0,.944.4,5.069,5.069,0,0,0,3.3-.2c.006.171.011.335.014.477.006.229.013.454.021.665a11.641,11.641,0,0,0,.441,3.3c.016.043.037.107.059.176a3.975,3.975,0,0,0,.991,1.745,2.955,2.955,0,0,0,2.09.777,4.7,4.7,0,0,0,.977-.109A4.592,4.592,0,0,0,22.607,28.1c.811-1.155,1.206-2.894,1.277-5.635.009-.078.018-.152.026-.222l.017-.145.191.017.049,0a7.562,7.562,0,0,0,3.163-.548c.631-.293,2.654-1.361,2.177-2.8"}),b.createElement("path",{d:"M27.689,19.053c-3.163.652-3.38-.418-3.38-.418C27.648,13.68,29.044,7.39,27.839,5.851c-3.286-4.2-8.975-2.213-9.07-2.162l-.031.006a11.28,11.28,0,0,0-2.11-.22,5.212,5.212,0,0,0-3.34,1S3.14.294,3.612,9.733c.1,2.008,2.878,15.194,6.191,11.211,1.211-1.456,2.381-2.688,2.381-2.688a3.071,3.071,0,0,0,2.006.512l.057-.048a2.21,2.21,0,0,0,.023.567c-.854.954-.6,1.121-2.309,1.472-1.726.356-.712.989-.05,1.155a3.508,3.508,0,0,0,3.915-1.272l-.05.2c.334.268.569,1.742.53,3.079a8.481,8.481,0,0,0,.2,2.971c.264.717.526,2.329,2.769,1.849a3.307,3.307,0,0,0,2.98-3.179c.1-1.234.313-1.052.326-2.155l.174-.522c.2-1.673.032-2.213,1.186-1.962l.281.025a6.4,6.4,0,0,0,2.615-.44c1.406-.652,2.239-1.742.853-1.455h0",style:{fill:"#336791"}}),b.createElement("path",{d:"M13.882,10.631a.981.981,0,0,0-.674.1.247.247,0,0,0-.1.164.48.48,0,0,0,.117.314.881.881,0,0,0,.559.349.637.637,0,0,0,.09.006.725.725,0,0,0,.687-.467c.035-.248-.326-.414-.676-.463m9.442.008c-.027-.195-.374-.25-.7-.2s-.647.194-.62.389a.667.667,0,0,0,.62.411.592.592,0,0,0,.083-.006.8.8,0,0,0,.451-.247.5.5,0,0,0,.169-.343",style:{fill:"#fff"}}),b.createElement("path",{d:"M28.741,18.979c-.121-.365-.509-.482-1.154-.349-1.915.4-2.6.121-2.826-.044a26.327,26.327,0,0,0,3.373-7.565,14.374,14.374,0,0,0,.5-3.253,3.513,3.513,0,0,0-.509-2.2,7.482,7.482,0,0,0-6.049-2.825,10.363,10.363,0,0,0-3.5.551,8.717,8.717,0,0,0-1.968-.253,5.684,5.684,0,0,0-3.372.929,15.051,15.051,0,0,0-2.74-.718,6.978,6.978,0,0,0-5.242.805c-1.5,1.064-2.2,2.966-2.061,5.653a35.489,35.489,0,0,0,1.373,6.348c1.07,3.505,2.233,5.49,3.457,5.9a1.548,1.548,0,0,0,.491.081,2.049,2.049,0,0,0,1.563-.886q1.042-1.25,2.155-2.438a3.472,3.472,0,0,0,1.55.417l0,.042q-.14.166-.273.338c-.375.475-.452.574-1.658.823-.343.071-1.254.259-1.267.9-.014.7,1.077.991,1.2,1.022a5.144,5.144,0,0,0,1.249.162,3.634,3.634,0,0,0,2.5-.934,23.674,23.674,0,0,0,.381,5.684,2.854,2.854,0,0,0,2.729,2.1,4.378,4.378,0,0,0,.917-.1,3.462,3.462,0,0,0,3.156-3.212c.177-1.026.481-3.475.624-4.789a3.859,3.859,0,0,0,1.11.137,6.6,6.6,0,0,0,2.519-.48c.712-.331,2-1.141,1.763-1.846ZM24.051,10.1a7.968,7.968,0,0,1-.116,1.107,10.229,10.229,0,0,0-.14,1.3,9.859,9.859,0,0,0,.1,1.47,5.236,5.236,0,0,1-.229,2.986,3.882,3.882,0,0,1-.207-.426c-.058-.141-.185-.368-.359-.681-.68-1.22-2.274-4.078-1.458-5.244.243-.347.86-.7,2.408-.512ZM22.174,3.531a6.617,6.617,0,0,1,5.334,2.522c.975,1.245-.1,6.912-3.205,11.8l-.094-.119-.039-.049a5.524,5.524,0,0,0,.506-3.8,9.114,9.114,0,0,1-.1-1.352,9.572,9.572,0,0,1,.131-1.206,7.614,7.614,0,0,0,.123-1.493.619.619,0,0,0,.013-.21,8.381,8.381,0,0,0-1.912-3.6,8.61,8.61,0,0,0-3.039-2.284,10.246,10.246,0,0,1,2.28-.214ZM9.479,20.654c-.627.754-1.061.61-1.2.562-.928-.31-2.006-2.272-2.955-5.384a35.167,35.167,0,0,1-1.34-6.159c-.12-2.4.462-4.074,1.73-4.974,2.063-1.463,5.456-.587,6.819-.143-.02.019-.04.037-.059.057-2.237,2.259-2.184,6.119-2.178,6.355,0,.091.007.22.018.4a15.969,15.969,0,0,1-.081,3.226A4.08,4.08,0,0,0,11.3,18.007q.133.138.278.262c-.383.41-1.216,1.318-2.1,2.385Zm2.39-3.19a3.3,3.3,0,0,1-.865-2.764,16.7,16.7,0,0,0,.087-3.381c-.006-.095-.011-.178-.014-.243A4.3,4.3,0,0,1,14,10.223a1.188,1.188,0,0,1,.918,1.026c.646,2.989.085,4.234-.365,5.235-.093.206-.181.4-.255.6l-.058.156a10.218,10.218,0,0,0-.368,1.109,2.788,2.788,0,0,1-2-.887Zm.113,4.03a1.733,1.733,0,0,1-.523-.225,2.553,2.553,0,0,1,.557-.166c1.418-.292,1.637-.5,2.116-1.105.11-.139.234-.3.406-.489h0c.256-.287.374-.238.586-.15a.829.829,0,0,1,.408.525.585.585,0,0,1-.05.491A3.1,3.1,0,0,1,11.983,21.495ZM19.406,28.4a2.113,2.113,0,0,1-2.754-1.526,31.129,31.129,0,0,1-.3-6.853.392.392,0,0,0-.017-.124,1.643,1.643,0,0,0-.048-.23,1.589,1.589,0,0,0-.862-1.034,1.216,1.216,0,0,0-.793-.1,9.586,9.586,0,0,1,.342-1.022l.058-.157c.066-.177.148-.36.235-.554.471-1.047,1.117-2.482.416-5.722a2.044,2.044,0,0,0-2.468-1.669A5.694,5.694,0,0,0,11.328,10c-.078.04-.15.078-.216.115A8.244,8.244,0,0,1,13.03,5.163,4.711,4.711,0,0,1,16.6,3.827,7.567,7.567,0,0,1,22.381,6.59,8.774,8.774,0,0,1,23.963,9.3c-1.463-.149-2.458.14-2.962.861-1.1,1.568.6,4.612,1.416,6.075.15.268.279.5.319.6a5.432,5.432,0,0,0,.861,1.387c.077.1.152.189.208.271-.443.128-1.239.423-1.166,1.9-.058.74-.474,4.205-.686,5.43-.279,1.617-.874,2.22-2.548,2.579Zm7.242-8.288a5.714,5.714,0,0,1-1.931.4,2.422,2.422,0,0,1-1.3-.167c-.045-.919.3-1.015.66-1.117.057-.016.112-.032.166-.05a1.353,1.353,0,0,0,.11.08c.639.422,1.78.467,3.39.135l.018,0a4.334,4.334,0,0,1-1.116.72Z",style:{fill:"#fff"}})),ci=({size:n,type:l})=>l==="mysql"?h.jsx(RE,{width:n,height:n}):h.jsx(OE,{width:n,height:n}),[ME,Ps]=un(void 0),[DE,Js]=un({show:!1}),LE=()=>{const n=Dr("Home");return h.jsxs("div",{className:"card-white lg:col-span-2",onClick:n,children:[h.jsxs("h2",{className:Kt.actionTitle,children:[h.jsx("span",{children:"🔎 Start new query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsx("input",{className:"input mt-3 w-full",placeholder:"Search table or query to start"})]})},UE=()=>{const[n,l]=b.useState(void 0),i=Lr(Gt.EDITOR),r=u=>{i?l(u):rn.error("You don't have permission to connect new data sources in this team")};return h.jsxs("div",{children:[n&&h.jsx(CE,{show:!0,dbType:n,onClose:()=>l(void 0)}),h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:()=>r("postgres"),children:[h.jsx("p",{className:Kt.actionTitle,children:"🧙‍♂️ Connection wizard"}),h.jsx("p",{className:Kt.actionSubtext,children:"Configure new database connection."})]})]})},kE=()=>{const n=wt(),{data:l}=Jd(),i=Dr("Home"),r=()=>{l&&l.length>0?n(`${$e.workbench.path}/tab/${l[0].id}`):i()};return h.jsxs("div",{className:"card-white hover:bg-gray-50! cursor-pointer",onClick:r,children:[h.jsxs("h2",{className:Kt.actionTitle,children:[h.jsx("span",{children:"🛠️ Workbench"}),h.jsx("span",{className:"hotkey",children:"W"})]}),h.jsx("p",{className:Kt.actionSubtext,children:"Continue your work from where you left."})]})},zE=()=>{const{data:n}=qn(),{data:l}=Zd({teamId:n?.teamId}),i=r=>{Ps(r)};return!l||l.length===0?null:h.jsxs("div",{className:"mt-8",children:[h.jsx("h2",{className:"font-semibold text-gray-700",children:"Data sources"}),h.jsx("div",{className:"grid lg:grid-cols-3 gap-2 mt-4",children:l?.map(r=>h.jsxs("div",{className:Kt.dataSourceEntry,onClick:()=>i(r.id),tabIndex:0,children:[h.jsx(ci,{size:32,type:r.dbType}),h.jsxs("div",{className:"overflow-hidden",children:[h.jsx("p",{className:"font-semibold truncate text-gray-800 flex-1",children:r.name}),r.allowInsert?h.jsx("span",{className:Kt.devTag,children:"dev"}):h.jsx("span",{className:Kt.prodTag,children:"prod"})]})]},r.id))})]})},qE=()=>h.jsxs("div",{className:"mt-8",children:[h.jsx("h2",{className:"font-semibold text-gray-700",children:"Useful links"}),h.jsxs("div",{className:"grid lg:grid-cols-3 gap-2 mt-4",children:[h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"https://dataramen.xyz/",children:[h.jsx("h2",{className:Kt.actionTitle,children:"↗️ Documentation"}),h.jsx("p",{className:Kt.actionSubtext,children:"Learn how to use DataRamen"})]}),h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"https://github.com/OleksandrDemian/dataramen",children:[h.jsx("h2",{className:Kt.actionTitle,children:"↗️ Github"}),h.jsx("p",{className:Kt.actionSubtext,children:"Codebase is open source"})]}),h.jsxs("a",{className:"card-white hover:bg-gray-50!",href:"#",onClick:()=>Js({show:!0}),children:[h.jsxs("h2",{className:Kt.actionTitle,children:[h.jsx("span",{children:"⌛ Recent tabs"}),h.jsx("span",{className:"hotkey",children:"H"})]}),h.jsx("p",{className:Kt.actionSubtext,children:"Manage recent tabs"})]})]})]}),BE=()=>{const{data:n}=qn(),{data:l}=Zd({teamId:n?.teamId}),i=!!l&&l.length>0,r=!!n;return h.jsx("div",{className:"page-container h-screen max-h-screen bg-(--bg)",children:h.jsxs("div",{className:"page-content h-full pb-12 overflow-y-auto",children:[h.jsx("h2",{className:"font-semibold text-gray-700 mt-4 hidden lg:block",children:"Quick actions"}),r&&!i&&h.jsx(Ot,{variant:"warning",className:"font-semibold mt-4",children:"Connect at least one datasource to start using DataRamen"}),h.jsxs("div",{className:"grid lg:grid-cols-2 gap-2 mt-4",children:[h.jsx(LE,{}),h.jsx(UE,{}),r&&h.jsx(kE,{})]}),r&&h.jsx(zE,{}),h.jsx(qE,{})]})})},[HE,Id]=un(void 0),QE=()=>Id(void 0);function Pl(n,l){if(n==null)return"";switch(l){case"json":case"jsonb":return JSON.stringify(n,null,2)}if(n===0||n===!1)return n.toString();switch(typeof n){case"string":return n;case"number":case"boolean":return n.toString();default:return JSON.stringify(n)}}const uu=n=>n.distinct?[n.fn,"DISTINCT",n.value].join(" "):[n.fn,n.value].join(" "),dl=n=>{let l=n.replace(/[_-]+/g," ");return l=l.replace(/([a-z0-9])([A-Z])/g,"$1 $2"),l=l.toLowerCase().replace(/\b\w/g,i=>i.toUpperCase()),l},$E="_container_kbspw_2",YE="_header_kbspw_2",VE="_fields-container_kbspw_2",KE="_field-label_kbspw_2",GE="_actions_kbspw_2",hr={container:$E,header:YE,fieldsContainer:VE,fieldLabel:KE,actions:GE},Oa=()=>Date.now().toString(36)+Math.random().toString(36).substring(2),FE=(n,l,i)=>Zt({queryKey:["entity",n,l,i],queryFn:async()=>{const r=i?i.map(([c,d])=>({id:Oa(),column:c,value:`${d}`})):[],{data:u}=await je.post("/runner/select",{datasourceId:n,opts:{table:l,filters:r,joins:[],columns:[],orderBy:[],groupBy:[],aggregations:[]},size:1,page:0,name:`Select ${l}: [${i?.join()}]`});return u.data},retry:1,enabled:!!l&&!!n&&!!i,staleTime:0}),XE=()=>gt({mutationFn:async n=>{const{data:l}=await je.post("/runner/update",n);return l.data}}),ZE=()=>gt({mutationFn:async n=>{const{data:l}=await je.post("/runner/insert",n);return l.data}}),Wd=n=>b.useMemo(()=>{if(n)return n instanceof h3?n.response?.data.error?n.response.data.error:n.response?.data?.message?n.response.data.message:n.message:n instanceof Error?n.message:"Undefined error"},[n]),eh=()=>{const{pathname:n}=qt();return b.useMemo(()=>xr({path:`${$e.workbench.path}/tab/:id`,end:!1},n)?.params.id,[n])},PE=({data:n})=>{const[l,{change:i,touched:r}]=Ur({}),u=eh(),{mutateAsync:c,error:d}=ZE(),m=Wd(d),{data:p}=Mr(n.dataSourceId),[y,v]=b.useState(""),x=b.useMemo(()=>p?.find(w=>w.tableName===n.table),[p,n.table]),E=b.useMemo(()=>{if(!x)return[];if(!y)return x.columns.map(C=>({...C,label:dl(C.name)}));const w=y.toLowerCase();return x.columns.filter(C=>C.name.toLowerCase().includes(w)).map(C=>({...C,label:dl(C.name)}))},[y,x]),j=()=>{const w=[];for(const C of r)w.push({value:l[C],column:C});c({datasourceId:n.dataSourceId,table:n.table,values:w}).then(()=>{QE(),u&&Sg(u)})};return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:hr.header,children:[h.jsxs("p",{className:"text-lg font-semibold",children:["Insert new row in ",h.jsx("span",{className:"underline",children:n.table})]}),m&&h.jsx(Ot,{variant:"danger",children:h.jsx("p",{children:m})})]}),h.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:h.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),h.jsx("div",{className:hr.container,children:h.jsx("div",{className:hr.fieldsContainer,children:E.map(w=>h.jsxs("label",{className:hr.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[w.isPrimary?"🔐":"🏷️"," ",w.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",w.name,": ",w.type,"]"]})]}),h.jsx("input",{className:"input w-full",value:Pl(l[w.name]),onChange:i(w.name),placeholder:w.name})]},w.name))})}),h.jsxs("div",{className:hr.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:y,onChange:w=>v(w.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{disabled:!r.length,className:"button primary",onClick:j,children:"Run insert"})]})]})},JE=()=>{const n=HE(),[l,i]=b.useState(void 0);b.useEffect(()=>{n&&i(n)},[n]);const r=()=>Id(void 0);return h.jsxs(cn,{isVisible:n!=null,onClose:r,onClosed:()=>i(void 0),noPadding:!0,children:[h.jsx(aa,{onClick:r}),l&&h.jsx(PE,{data:l})]})},[IE,th]=un(void 0),WE=()=>th(void 0),e6="_container_p8vns_2",t6="_header_p8vns_2",n6="_key_p8vns_2",a6="_fields-container_p8vns_2",l6="_field-label_p8vns_2",s6="_actions_p8vns_2",Vs={container:e6,header:t6,key:n6,fieldsContainer:a6,fieldLabel:l6,actions:s6},i6=({data:n})=>{const[l,{change:i,set:r,reset:u,touched:c}]=Ur({}),d=eh(),[m,p]=b.useState(""),{data:y,isLoading:v}=FE(n.dataSourceId,n.tableName,n.entityId),{mutateAsync:x,error:E}=XE(),j=Wd(E),w=Lr(Gt.EDITOR),{data:C}=Mr(n.dataSourceId),{data:N}=Ou(n.dataSourceId),T=b.useMemo(()=>C?.find(X=>X.tableName===n.tableName),[n.tableName,C]),_=b.useMemo(()=>{if(!T)return[];if(!m)return T.columns.map(G=>({...G,label:dl(G.name)}));const X=m.toLowerCase();return T.columns.filter(G=>G.name.toLowerCase().includes(X)).map(G=>({...G,label:dl(G.name)}))},[m,T]);b.useEffect(()=>{const X=y?.rows[0];if(u(),X&&y?.columns)for(let G=0;G<y.columns.length;G++){const P=y.columns[G];r(P.column,Pl(X[G]))}},[y,r,u]);const D=()=>{const X=[];for(const G of c)X.push({value:l[G],column:G});x({datasourceId:n.dataSourceId,table:n.tableName,filters:n.entityId.map(G=>({id:Oa(),value:[{value:G[1]}],column:G[0],connector:"AND",operator:"="})),values:X}).then(()=>{WE(),d&&Sg(d)})},H=n.entityId.map(([X,G])=>`${X} = ${G}`).join(", ")||"",V=!N?.allowUpdate||!w;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Vs.header,children:[h.jsxs("p",{className:"text-lg font-semibold",children:[V?"View":"Edit"," row in ",h.jsx("span",{className:"underline",children:n?.tableName})]}),h.jsx("span",{className:Vs.key,children:H}),j&&h.jsx(Ot,{variant:"danger",children:h.jsx("p",{children:j})})]}),!V&&h.jsx("div",{className:"bg-gray-50 py-1 px-4 border-y border-gray-200",children:h.jsx("p",{className:"text-xs text-gray-800",children:"Tip: use = to write raw SQL. Ex: =NULL or =NOW()"})}),h.jsx("div",{className:Vs.container,children:h.jsx("div",{className:Vs.fieldsContainer,children:_.map(X=>h.jsxs("label",{className:Vs.fieldLabel,children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsxs("p",{children:[X.isPrimary?"🔐":"🏷️"," ",X.label]}),h.jsxs("p",{className:"text-blue-800 text-sm",children:["[",X.name,": ",X.type,"]"]})]}),h.jsx("input",{disabled:X.isPrimary||v||V,className:"input w-full",value:Pl(l[X.name]),onChange:i(X.name),placeholder:X.name})]},X.name))})}),h.jsxs("div",{className:Vs.actions,children:[h.jsxs("label",{children:[h.jsx("span",{className:"mr-2",children:"🔎"}),h.jsx("input",{className:"input bg-white!",value:m,onChange:X=>p(X.target.value),placeholder:"Filter columns"})]}),h.jsx("span",{className:"flex-1"}),!V&&h.jsx("button",{disabled:!c.length,className:"button primary",onClick:D,children:"Run update"})]})]})},r6=()=>{const n=IE(),[l,i]=b.useState(void 0);b.useEffect(()=>{n&&i(n)},[n]);const r=()=>th(void 0);return h.jsxs(cn,{isVisible:n!=null,onClose:r,onClosed:()=>i(void 0),noPadding:!0,children:[h.jsx(aa,{onClick:r}),l&&h.jsx(i6,{data:l})]})},[o6,nd]=un(void 0),Cg=async n=>new Promise(l=>{nd({message:n,onCancel:()=>{l(!1),nd(void 0)},onConfirm:()=>{l(!0),nd(void 0)}})}),u6=({confirm:n})=>h.jsxs("div",{children:[h.jsx("p",{children:n.message}),h.jsxs("div",{className:"flex gap-2 justify-end mt-4",children:[h.jsx("button",{className:"button tertiary",onClick:n.onCancel,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:n.onConfirm,children:"Confirm"})]})]}),c6=()=>{const n=o6(),[l,i]=b.useState(void 0);return b.useEffect(()=>{n&&i(n)},[n]),h.jsx(cn,{isVisible:!!n,onClose:()=>n?.onCancel(),onClosed:()=>i(void 0),children:l&&h.jsx(u6,{confirm:l})})},[f6,cu]=un(void 0),kr=async(n,l,i)=>new Promise(r=>{cu({message:n,defaultValue:l,alert:i,onCancel:()=>{cu(void 0),r(void 0)},onConfirm:u=>{cu(void 0),r(u)}})}),d6="_root_12mtw_1",h6={root:d6},m6=({data:n})=>{const[l,i]=b.useState("");b.useEffect(()=>{n.defaultValue&&i(n.defaultValue)},[n]);const r=c=>{i(c.target.value)},u=c=>{c.key==="Enter"&&(c.preventDefault(),n.onConfirm(l)),c.key==="Escape"&&(c.preventDefault(),n.onCancel())};return h.jsxs("div",{className:h6.root,children:[h.jsx("h2",{className:"text-xl font-semibold",children:n.message}),n.alert&&h.jsx(Ot,{variant:n.alert.type,className:"mt-2",children:n.alert.message}),h.jsx("input",{autoFocus:!0,className:"w-full input my-2",value:l,onChange:r,onKeyDown:u}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx("button",{className:"button tertiary",onClick:n.onCancel,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:()=>n.onConfirm(l),children:"Confirm"})]})]})},p6=()=>{const n=f6(),[l,i]=b.useState(void 0);return b.useEffect(()=>{n&&i(n)},[n]),h.jsx(cn,{isVisible:!!n,onClose:()=>cu(void 0),onClosed:()=>i(void 0),children:l&&h.jsx(m6,{data:l})})},[y6,g6]=un(void 0),_g=n=>{g6(n)},v6="_textarea_om8lx_2",b6={textarea:v6},x6=()=>{const n=y6(),l=()=>{n&&(navigator.clipboard.writeText(n.toString()),rn.success("Copied!"))},i=()=>_g(void 0);return h.jsxs(cn,{isVisible:!!n,onClose:i,backdropClose:!0,children:[h.jsx("textarea",{className:b6.textarea,readOnly:!0,defaultValue:n?.toString()}),h.jsxs("div",{className:"mt-2 flex gap-1 justify-end",children:[h.jsx("button",{className:"button primary",onClick:l,children:"Copy"}),h.jsx("button",{className:"button tertiary",onClick:i,children:"Close"})]})]})},S6="_tabs_lmhsd_2",w6="_mobile_lmhsd_2",E6="_tab_lmhsd_2",C6="_active_lmhsd_2",_6="_close-button_lmhsd_2",mr={tabs:S6,mobile:w6,tab:E6,active:C6,closeButton:_6},zy=n=>window.matchMedia(n).matches;function Ng(n,{defaultValue:l=!1,initializeWithValue:i=!0}={}){const[r,u]=b.useState(()=>i?zy(n):l);return b.useLayoutEffect(()=>{const c=window.matchMedia(n);function d(){u(()=>zy(n))}return d(),c.addListener?c.addListener(d):c.addEventListener("change",d),()=>{c.removeListener?c.removeListener(d):c.removeEventListener("change",d)}},[n]),r}const nh={laptop:"(min-width: 1024px)"},jg=()=>window.matchMedia(nh.laptop).matches,N6="_table_1h7li_2",j6="_row-index-btn_1h7li_2",T6="_semi-transparent_1h7li_2",A6="_table-loading_1h7li_2",R6="_table-empty_1h7li_2",O6="_table-row-cells_1h7li_2",M6="_header-cell_1h7li_2",D6="_header-actions_1h7li_2",L6="_cell_1h7li_2",U6="_value_1h7li_2",k6="_table-config_1h7li_2",z6="_table-action_1h7li_2",q6="_green-fixed_1h7li_2",B6="_gray_1h7li_2",H6="_modal_1h7li_2",Q6="_selected-size_1h7li_2",$6="_pagination-indicator_1h7li_2",re={table:N6,rowIndexBtn:j6,semiTransparent:T6,tableLoading:A6,tableEmpty:R6,tableRowCells:O6,headerCell:M6,headerActions:D6,cell:L6,value:U6,tableConfig:k6,tableAction:z6,greenFixed:q6,gray:B6,modal:H6,selectedSize:Q6,paginationIndicator:$6},La=b.createContext({name:"No name",hooks:[],availableJoins:[],allColumns:[],dataSourceId:"",entities:[],getValue:()=>{},getColumnType:()=>{},getEntityKey:()=>[]}),Pt=b.createContext({state:oi({}),setState:()=>{}}),Bn=b.createContext({}),Tg={ON_ANIMATION_END:Symbol("ON_TRANSITION_END")},Ag=()=>{const[n,l]=b.useState(),[i,r]=b.useState("hidden");return b.useMemo(()=>{const u=m=>{m.preventDefault(),r("in"),l({x:m.clientX-1,y:m.clientY-1})},c=()=>{r("out")},d=()=>{i==="in"?r("visible"):i==="out"&&(l(void 0),r("hidden"))};return{show:!!n,position:n,state:i,open:u,close:c,[Tg.ON_ANIMATION_END]:d}},[n,i])},Y6=n=>{if(n==="ASC")return"DESC";if(n!=="DESC")return"ASC"},V6=()=>{const{state:n,setState:l}=b.useContext(Pt),i=b.useCallback(r=>{l(u=>{const c=u.orderBy[0];if(c&&c.column===r){const d=Y6(c.direction);return d?{...u,orderBy:[{column:r,direction:d}]}:{...u,orderBy:[]}}return{...u,orderBy:[{column:r,direction:"ASC"}]}})},[l]);return{orderBy:n.orderBy,updateOrderBy:i}},K6="_options-container_119qo_2",G6="_filter-input_119qo_2",F6="_option-item_119qo_2",X6="_list_119qo_2",Z6="_empty-text_119qo_2",Ta={optionsContainer:K6,filterInput:G6,optionItem:F6,list:X6,emptyText:Z6},P6="_container_tobwe_2",J6="_animate-show_tobwe_2",I6="_animate-hide_tobwe_2",W6="_content_tobwe_2",eC="_backdrop_tobwe_2",$l={container:P6,animateShow:J6,animateHide:I6,content:W6,backdrop:eC},Rg=({children:n,handler:l})=>{const i=b.useRef(l.close);i.current=l.close;const r=b.useMemo(()=>{if(!l.position)return;const u={};if(typeof window<"u"){const c=l.position.y>window.innerHeight/2,d=l.position.x>window.innerWidth/2;c?u.bottom=window.innerHeight-l.position.y:u.top=l.position.y,jg()?d?u.right=window.innerWidth-l.position.x:u.left=l.position.x:(u.right=36,u.left=36)}return u},[l.position]);return b.useEffect(()=>{const u=c=>{c.code==="Escape"&&i.current()};return window.addEventListener("keyup",u),()=>{window.removeEventListener("keyup",u)}},[]),r?h.jsxs("div",{className:se($l.container,l.state==="out"&&$l.animateHide,l.state==="in"&&$l.animateShow),onAnimationEnd:l[Tg.ON_ANIMATION_END],children:[h.jsx("div",{className:$l.backdrop,onClick:u=>{u.stopPropagation(),u.preventDefault(),l.close()}}),h.jsx("div",{className:se($l.content,l.state==="out"&&$l.animateHide,l.state==="in"&&$l.animateShow),style:r,children:n})]}):null},Ma=(n,l)=>n!=null&&n>l,tC="_root_g4rg8_2",nC="_content_g4rg8_2",aC="_table-name_g4rg8_2",lC="_sub_g4rg8_2",eu={root:tC,content:nC,tableName:aC,sub:lC},Og=({hook:n,onClick:l})=>h.jsxs("button",{className:eu.root,onClick:l,children:[h.jsx("span",{children:"📄"}),h.jsxs("div",{className:eu.content,children:[h.jsx("span",{className:eu.tableName,children:n.on.toTable}),h.jsxs("span",{className:eu.sub,children:[n.on.toColumn," = ",n.on.fromTable,".",n.on.fromColumn]})]})]},n.where),sC=se("input",Ta.filterInput);function iC(n,l,i){return{name:`${n.on.toTable} ${n.on.toColumn} equals ${i}`,opts:oi({table:n.on.toTable,dataSourceId:l,filters:[{id:Oa(),column:`${n.on.toTable}.${n.on.toColumn}`,value:i==null?"IS NULL":`${i}`,isEnabled:!0}]})}}const Mg=({rowIndex:n,onClose:l,className:i})=>{const[r,u]=b.useState(""),{hooks:c,dataSourceId:d,getValue:m}=b.useContext(La),{state:p}=b.useContext(Pt),{data:y}=b.useContext(Bn),v=b.useMemo(()=>y?.result.rows[n],[y,n]),x=ui(),E=wt(),j=b.useMemo(()=>{if(!y)return[];const T=r.toLowerCase();return c.filter(_=>y.result.columns.some(H=>H.column===_.on.fromColumn&&H.table===_.on.fromTable)?_.on.toTable.toLowerCase().includes(T):!1)},[r,c,y]),w=T=>{v&&x.mutateAsync(iC(T,d,m(v,{value:`${T.on.fromTable}.${T.on.fromColumn}`}))).then(_=>{E(`${$e.workbench.path}/tab/${_.id}`),l?.()})},C=()=>{!v||!p||x.mutateAsync({name:`${p.table} > [${p.joins.map(T=>T.table).join()}]`,opts:oi({joins:p.joins,table:p.table,dataSourceId:p.dataSourceId,filters:[...p.filters.filter(T=>T.isEnabled),...p.groupBy.map(T=>({id:Oa(),column:T.value,value:`${m(v,T)}`,isEnabled:!0}))]})}).then(T=>{E(`${$e.workbench.path}/tab/${T.id}`),l?.()})},N=p.groupBy.length>0;return h.jsxs("div",{className:i,children:[h.jsx("input",{className:sC,placeholder:"Filter",value:r,onChange:T=>u(T.target.value)}),h.jsxs("div",{className:Ta.list,children:[N&&h.jsx("button",{onClick:C,className:Ta.optionItem,children:"🎯 Underlying rows"}),Ma(j.length,0)?j.map(T=>h.jsx(Og,{hook:T,onClick:()=>w(T)},T.where)):h.jsx("p",{className:Ta.emptyText,children:"Empty"})]})]})},rC=({handler:n,rowIndex:l})=>h.jsx(Rg,{handler:n,children:h.jsx("div",{className:Ta.optionsContainer,children:h.jsx(Mg,{rowIndex:l,className:"p-2",onClose:()=>{n.close()}})})}),ah=()=>{const{state:n,setState:l}=b.useContext(Pt),i=b.useCallback((u,c=!1)=>{l(d=>({...d,page:c?0:d.page,filters:u}))},[l]),r=b.useCallback(u=>{l(c=>({...c,filters:c.filters.filter(d=>d.id!==u)}))},[l]);return{filters:n.filters,removeFilter:r,setFilters:i}},oC=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:48,d:"M112 244l144-144 144 144M256 120v292"})),pl=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:48,d:"M184 112l144 144-144 144"})),uC=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M464 208L352 96 240 208M352 113.13V416M48 304l112 112 112-112M160 398V96"})),Dg=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("title",null,"Search"),b.createElement("path",{d:"M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z",fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32}),b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:32,d:"M338.29 338.29L448 448"})),cC="_container_1aduu_2",fC="_animate-show_1aduu_2",dC="_animate-hide_1aduu_2",hC="_backdrop_1aduu_2",mC="_content_1aduu_2",Yl={container:cC,animateShow:fC,animateHide:dC,backdrop:hC,content:mC},pC=({children:n,ref:l,onClosed:i})=>{const[r,u]=b.useState(void 0),[c,d]=b.useState("hidden"),m=b.useRef(null);if(b.useImperativeHandle(l,()=>({open:y=>{const v={},x=y.clientY>window.innerHeight/2,E=y.clientX>window.innerWidth/2;x?v.bottom=window.innerHeight-y.clientY:v.top=y.clientY,jg()?E?v.right=window.innerWidth-y.clientX:v.left=y.clientX:(v.right=36,v.left=36),u(v),d("in")},close:()=>{d("out")}}),[]),!r)return null;const p=()=>{c==="in"?d("visible"):c==="out"&&(u(void 0),d("hidden"),i?.())};return h.jsxs("div",{className:se(Yl.container,c==="out"&&Yl.animateHide,c==="in"&&Yl.animateShow),onAnimationEnd:p,children:[h.jsx("div",{className:Yl.backdrop,onClick:()=>d("out")}),h.jsx("div",{ref:m,style:r,className:se(Yl.content,c==="out"&&Yl.animateHide,c==="in"&&Yl.animateShow),children:n})]})};function ad(n,l,i){const r=n?.rows?.[l]?.[i],u=n?.columns?.[i];return{value:r,column:u}}const yC=({ref:n})=>{const{data:l}=b.useContext(Bn),{getColumnType:i}=b.useContext(La),{setState:r}=b.useContext(Pt);return{copyValue:(m,p)=>{const{value:y,column:v}=ad(l?.result,m,p);if(v){const x=Pl(y,i(v.full));navigator.clipboard.writeText(x),rn.success("Copied!"),n.current?.close()}},showValue:(m,p)=>{const{value:y,column:v}=ad(l?.result,m,p);if(v){const x=Pl(y,i(v.full));_g(x),n.current?.close()}},filterValue:(m,p)=>{const{value:y,column:v}=ad(l?.result,m,p),x=v?.full||"";if(v?.table===""){rn.error("Filtering on aggregated column is not supported yet");return}if(x){let E;if(y==null)E={id:Oa(),isEnabled:!0,column:x,value:"IS NULL"};else{const j=Pl(y,i(x));E={id:Oa(),isEnabled:!0,column:x,value:j}}r(j=>({...j,filters:[...j.filters,E]})),rn.success(`Added new filter on column ${v?.alias}`),n.current?.close()}}}},Lg=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("rect",{x:128,y:128,width:336,height:336,rx:57,ry:57,fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:32}),b.createElement("path",{d:"M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32})),gC=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 00-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 000-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("circle",{cx:256,cy:256,r:80,fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32})),vC="_section-name_9o660_2",bC="_item_9o660_2",Vl={sectionName:vC,item:bC},xC=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M136 208l120-104 120 104M136 304l120 104 120-104",stroke:"currentColor",fill:"none",strokeWidth:32,strokeLinecap:"round",strokeLinejoin:"round"})),SC=se("input",Ta.filterInput),wC=({onClose:n,rowIndex:l,className:i})=>{const[r,u]=b.useState(""),{entities:c,dataSourceId:d,getEntityKey:m}=b.useContext(La),{data:p}=b.useContext(Bn),y=b.useMemo(()=>p?.result.rows[l],[p,l]),v=b.useMemo(()=>r?c.filter(E=>E.includes(r)):c,[c,r]),x=E=>{if(!y)return;const j=m(E,y);th({tableName:E,dataSourceId:d,entityId:j}),n?.()};return h.jsxs("div",{className:i,children:[h.jsx("input",{className:SC,placeholder:"Filter",value:r,onChange:E=>u(E.target.value)}),h.jsx("div",{className:Ta.list,children:Ma(v.length,0)?v.map(E=>h.jsx("button",{className:Ta.optionItem,onClick:()=>x(E),children:h.jsxs("span",{children:["📄 ",E]})},E)):h.jsx("p",{className:Ta.emptyText,children:"Empty"})})]})},EC=({ref:n,row:l,col:i,onClosed:r})=>{const u=yC({ref:n}),[c,d]=b.useState("cell"),m=()=>u.copyValue(l,i),p=()=>u.showValue(l,i),y=()=>u.filterValue(l,i),v=()=>{r?.(),d("cell")};return h.jsx(pC,{ref:n,onClosed:v,children:h.jsxs("div",{className:"w-full lg:w-sm",children:[c==="cell"&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:Vl.sectionName,children:"Cell actions"}),h.jsxs("button",{className:Vl.item,onClick:m,children:[h.jsx(Lg,{width:14,height:14}),"Copy"]}),h.jsxs("button",{className:Vl.item,onClick:p,children:[h.jsx(gC,{width:14,height:14}),"View"]}),h.jsxs("button",{className:Vl.item,onClick:y,children:[h.jsx(Dg,{width:14,height:14}),"Filter"]}),h.jsx("p",{className:Vl.sectionName,children:"Row actions"}),h.jsxs("button",{className:Vl.item,onClick:()=>d("drill"),children:[h.jsx(pl,{width:14,height:14}),"Drill down"]}),h.jsxs("button",{className:Vl.item,onClick:()=>d("expand"),children:[h.jsx(xC,{width:14,height:14}),"Expand row"]})]}),c==="drill"&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"flex gap-1 items-center cursor-pointer px-2 py-1 text-sm rounded-lg bg-gray-50 hover:bg-gray-100 mb-2",onClick:()=>d("cell"),children:[h.jsx(pl,{className:"rotate-180",width:16,height:16}),"Drill down"]}),h.jsx(Mg,{rowIndex:l,onClose:()=>n.current?.close()})]}),c==="expand"&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"flex gap-1 items-center cursor-pointer px-2 py-1 text-sm rounded-lg bg-gray-50 hover:bg-gray-100 mb-2",onClick:()=>d("cell"),children:[h.jsx(pl,{className:"rotate-180",width:16,height:16}),"Expand row"]}),h.jsx(wC,{rowIndex:l,onClose:()=>n.current?.close()})]})]})})},CC={ASC:"",DESC:"rotate-180"},_C=(n,{column:l,value:i})=>{const r=n.map(u=>({...u,isEnabled:u.column===l?!1:u.isEnabled}));return r.push({id:Oa(),column:l,isEnabled:!0,value:i,isAdvanced:!1}),r},NC=()=>{const{data:n}=b.useContext(Bn),{orderBy:l,updateOrderBy:i}=V6(),{setFilters:r,filters:u}=ah(),c=n?.result.columns||[],d=l[0],m=Ma(n?.result.tables.length,1),p=y=>{kr("Filter value","").then(v=>{v&&r(_C(u,{column:y,value:v}))})};return h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("td",{children:"🥢"}),c.map(y=>h.jsxs("td",{className:re.headerCell,children:[h.jsxs("div",{className:"overflow-hidden",children:[m&&h.jsx("p",{className:"text-xs truncate italic",children:y.table||"-"}),h.jsx("p",{className:"text-sm font-semibold truncate",children:y.column})]}),h.jsxs("div",{className:re.headerActions,children:[h.jsx("button",{onClick:()=>i(y.full),children:d?.column===y.full?h.jsx(oC,{className:CC[d.direction],width:16,height:16}):h.jsx(uC,{width:16,height:16})}),y.table&&h.jsx("button",{onClick:()=>p(y.full),children:h.jsx(Dg,{width:16,height:16})})]})]},y.full))]})})};function jC({value:n}){if(n==="")return h.jsx("span",{className:"pointer-events-none text-black/30 truncate",children:"<EMPTY STRING>"});if(n==null)return h.jsx("span",{className:"pointer-events-none text-black/30",children:"<NULL>"});const l=Pl(n);return h.jsx("span",{className:re.value,children:l})}const TC=b.memo(({row:n,isLastRow:l,index:i,offset:r})=>h.jsxs("tr",{className:se(re.tableRowCells,l&&"rounded-b-lg"),children:[h.jsx("td",{children:h.jsxs("button",{"data-row-action":i,className:re.rowIndexBtn,children:[h.jsx(pl,{className:"pointer-events-none",width:16,height:16}),i+1+r]})}),n.map((u,c)=>h.jsx("td",{className:re.cell,"data-row":i,"data-col":c,children:h.jsx(jC,{value:u})},c))]})),AC=()=>{const{data:n,error:l,isLoading:i,isFetching:r}=b.useContext(Bn),{state:{page:u,size:c}}=b.useContext(Pt),d=b.useRef(null),m=Wd(l),p=Ag(),[y,v]=b.useState(void 0),[x,E]=b.useState(void 0),j=N=>{const _=N.target?.dataset?.rowAction;_!=null&&(v(parseInt(_)),p.open(N))},w=N=>{const T=N.target?.dataset,_=T?.row,D=T?.col;_!=null&&D!=null&&(v(parseInt(_)),E(parseInt(D)),d.current?.open(N),N.preventDefault(),N.stopPropagation())},C=u*c;return h.jsxs(h.Fragment,{children:[y!=null&&p.show&&h.jsx(rC,{handler:p,rowIndex:y}),h.jsx(EC,{ref:d,col:x,row:y,onClosed:()=>{v(void 0),E(void 0)}}),m&&h.jsx(Ot,{variant:"danger",children:m}),i&&h.jsx("div",{className:re.tableLoading,children:"Loading data"}),n&&h.jsxs("table",{className:se(re.table,r&&re.semiTransparent),onClick:j,onContextMenu:w,children:[h.jsx(NC,{}),h.jsxs("tbody",{children:[n.result.rows?.length<1&&h.jsx("tr",{className:re.tableEmpty,children:h.jsx("td",{colSpan:n.result.columns.length+1,children:"No data"})}),n.result.rows?.map((N,T)=>h.jsx(TC,{index:T,offset:C,row:N,isLastRow:T===n.result.rows.length-1},T))]})]})]})},Ug=()=>{const{state:n,setState:l}=b.useContext(Pt),i=b.useCallback(u=>{l(c=>({...c,page:u}))},[l]),r=b.useCallback((u,c=!1)=>{l(d=>({...d,size:u,page:c?0:d.page}))},[l]);return{page:n.page,size:n.size,setSize:r,setPage:i}},RC=()=>gt({mutationFn:async n=>{const{data:l}=await je.post("/saved-queries",n);return l.data},onSuccess:()=>{rt.invalidateQueries({queryKey:["queries"]}),ii()}}),OC=()=>gt({mutationFn:async n=>je.delete("/saved-queries/"+n),onSuccess:()=>{ii()}}),MC=()=>gt({mutationFn:async({id:n,payload:l})=>{const{data:i}=await je.patch("/saved-queries/"+n,l);return i.data},onSuccess:()=>{ii(),u4()}}),[Mu,lh]=un({filters:!1,joins:!1,columns:!1,groupBy:!1,aggregate:!1}),In=n=>lh(l=>({...l,[n]:!0})),Du=n=>lh(l=>({...l,[n]:!1})),vu=n=>lh(l=>({...l,[n]:!l[n]})),Is=Math.min,Jl=Math.max,bu=Math.round,tu=Math.floor,Wn=n=>({x:n,y:n}),DC={left:"right",right:"left",bottom:"top",top:"bottom"},LC={start:"end",end:"start"};function Td(n,l,i){return Jl(n,Is(l,i))}function zr(n,l){return typeof n=="function"?n(l):n}function ns(n){return n.split("-")[0]}function qr(n){return n.split("-")[1]}function kg(n){return n==="x"?"y":"x"}function sh(n){return n==="y"?"height":"width"}function hl(n){return["top","bottom"].includes(ns(n))?"y":"x"}function ih(n){return kg(hl(n))}function UC(n,l,i){i===void 0&&(i=!1);const r=qr(n),u=ih(n),c=sh(u);let d=u==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return l.reference[c]>l.floating[c]&&(d=xu(d)),[d,xu(d)]}function kC(n){const l=xu(n);return[Ad(n),l,Ad(l)]}function Ad(n){return n.replace(/start|end/g,l=>LC[l])}function zC(n,l,i){const r=["left","right"],u=["right","left"],c=["top","bottom"],d=["bottom","top"];switch(n){case"top":case"bottom":return i?l?u:r:l?r:u;case"left":case"right":return l?c:d;default:return[]}}function qC(n,l,i,r){const u=qr(n);let c=zC(ns(n),i==="start",r);return u&&(c=c.map(d=>d+"-"+u),l&&(c=c.concat(c.map(Ad)))),c}function xu(n){return n.replace(/left|right|bottom|top/g,l=>DC[l])}function BC(n){return{top:0,right:0,bottom:0,left:0,...n}}function zg(n){return typeof n!="number"?BC(n):{top:n,right:n,bottom:n,left:n}}function Su(n){const{x:l,y:i,width:r,height:u}=n;return{width:r,height:u,top:i,left:l,right:l+r,bottom:i+u,x:l,y:i}}function qy(n,l,i){let{reference:r,floating:u}=n;const c=hl(l),d=ih(l),m=sh(d),p=ns(l),y=c==="y",v=r.x+r.width/2-u.width/2,x=r.y+r.height/2-u.height/2,E=r[m]/2-u[m]/2;let j;switch(p){case"top":j={x:v,y:r.y-u.height};break;case"bottom":j={x:v,y:r.y+r.height};break;case"right":j={x:r.x+r.width,y:x};break;case"left":j={x:r.x-u.width,y:x};break;default:j={x:r.x,y:r.y}}switch(qr(l)){case"start":j[d]-=E*(i&&y?-1:1);break;case"end":j[d]+=E*(i&&y?-1:1);break}return j}const HC=async(n,l,i)=>{const{placement:r="bottom",strategy:u="absolute",middleware:c=[],platform:d}=i,m=c.filter(Boolean),p=await(d.isRTL==null?void 0:d.isRTL(l));let y=await d.getElementRects({reference:n,floating:l,strategy:u}),{x:v,y:x}=qy(y,r,p),E=r,j={},w=0;for(let C=0;C<m.length;C++){const{name:N,fn:T}=m[C],{x:_,y:D,data:H,reset:V}=await T({x:v,y:x,initialPlacement:r,placement:E,strategy:u,middlewareData:j,rects:y,platform:d,elements:{reference:n,floating:l}});v=_??v,x=D??x,j={...j,[N]:{...j[N],...H}},V&&w<=50&&(w++,typeof V=="object"&&(V.placement&&(E=V.placement),V.rects&&(y=V.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:u}):V.rects),{x:v,y:x}=qy(y,E,p)),C=-1)}return{x:v,y:x,placement:E,strategy:u,middlewareData:j}};async function qg(n,l){var i;l===void 0&&(l={});const{x:r,y:u,platform:c,rects:d,elements:m,strategy:p}=n,{boundary:y="clippingAncestors",rootBoundary:v="viewport",elementContext:x="floating",altBoundary:E=!1,padding:j=0}=zr(l,n),w=zg(j),N=m[E?x==="floating"?"reference":"floating":x],T=Su(await c.getClippingRect({element:(i=await(c.isElement==null?void 0:c.isElement(N)))==null||i?N:N.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(m.floating)),boundary:y,rootBoundary:v,strategy:p})),_=x==="floating"?{x:r,y:u,width:d.floating.width,height:d.floating.height}:d.reference,D=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m.floating)),H=await(c.isElement==null?void 0:c.isElement(D))?await(c.getScale==null?void 0:c.getScale(D))||{x:1,y:1}:{x:1,y:1},V=Su(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:_,offsetParent:D,strategy:p}):_);return{top:(T.top-V.top+w.top)/H.y,bottom:(V.bottom-T.bottom+w.bottom)/H.y,left:(T.left-V.left+w.left)/H.x,right:(V.right-T.right+w.right)/H.x}}const QC=n=>({name:"arrow",options:n,async fn(l){const{x:i,y:r,placement:u,rects:c,platform:d,elements:m,middlewareData:p}=l,{element:y,padding:v=0}=zr(n,l)||{};if(y==null)return{};const x=zg(v),E={x:i,y:r},j=ih(u),w=sh(j),C=await d.getDimensions(y),N=j==="y",T=N?"top":"left",_=N?"bottom":"right",D=N?"clientHeight":"clientWidth",H=c.reference[w]+c.reference[j]-E[j]-c.floating[w],V=E[j]-c.reference[j],X=await(d.getOffsetParent==null?void 0:d.getOffsetParent(y));let G=X?X[D]:0;(!G||!await(d.isElement==null?void 0:d.isElement(X)))&&(G=m.floating[D]||c.floating[w]);const P=H/2-V/2,ae=G/2-C[w]/2-1,ye=Is(x[T],ae),Ae=Is(x[_],ae),Ce=ye,Ke=G-C[w]-Ae,me=G/2-C[w]/2+P,_e=Td(Ce,me,Ke),q=!p.arrow&&qr(u)!=null&&me!==_e&&c.reference[w]/2-(me<Ce?ye:Ae)-C[w]/2<0,F=q?me<Ce?me-Ce:me-Ke:0;return{[j]:E[j]+F,data:{[j]:_e,centerOffset:me-_e-F,...q&&{alignmentOffset:F}},reset:q}}}),$C=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var i,r;const{placement:u,middlewareData:c,rects:d,initialPlacement:m,platform:p,elements:y}=l,{mainAxis:v=!0,crossAxis:x=!0,fallbackPlacements:E,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...N}=zr(n,l);if((i=c.arrow)!=null&&i.alignmentOffset)return{};const T=ns(u),_=hl(m),D=ns(m)===m,H=await(p.isRTL==null?void 0:p.isRTL(y.floating)),V=E||(D||!C?[xu(m)]:kC(m)),X=w!=="none";!E&&X&&V.push(...qC(m,C,w,H));const G=[m,...V],P=await qg(l,N),ae=[];let ye=((r=c.flip)==null?void 0:r.overflows)||[];if(v&&ae.push(P[T]),x){const me=UC(u,d,H);ae.push(P[me[0]],P[me[1]])}if(ye=[...ye,{placement:u,overflows:ae}],!ae.every(me=>me<=0)){var Ae,Ce;const me=(((Ae=c.flip)==null?void 0:Ae.index)||0)+1,_e=G[me];if(_e&&(!(x==="alignment"?_!==hl(_e):!1)||ye.every(J=>J.overflows[0]>0&&hl(J.placement)===_)))return{data:{index:me,overflows:ye},reset:{placement:_e}};let q=(Ce=ye.filter(F=>F.overflows[0]<=0).sort((F,J)=>F.overflows[1]-J.overflows[1])[0])==null?void 0:Ce.placement;if(!q)switch(j){case"bestFit":{var Ke;const F=(Ke=ye.filter(J=>{if(X){const he=hl(J.placement);return he===_||he==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(he=>he>0).reduce((he,R)=>he+R,0)]).sort((J,he)=>J[1]-he[1])[0])==null?void 0:Ke[0];F&&(q=F);break}case"initialPlacement":q=m;break}if(u!==q)return{reset:{placement:q}}}return{}}}};async function YC(n,l){const{placement:i,platform:r,elements:u}=n,c=await(r.isRTL==null?void 0:r.isRTL(u.floating)),d=ns(i),m=qr(i),p=hl(i)==="y",y=["left","top"].includes(d)?-1:1,v=c&&p?-1:1,x=zr(l,n);let{mainAxis:E,crossAxis:j,alignmentAxis:w}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return m&&typeof w=="number"&&(j=m==="end"?w*-1:w),p?{x:j*v,y:E*y}:{x:E*y,y:j*v}}const VC=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var i,r;const{x:u,y:c,placement:d,middlewareData:m}=l,p=await YC(l,n);return d===((i=m.offset)==null?void 0:i.placement)&&(r=m.arrow)!=null&&r.alignmentOffset?{}:{x:u+p.x,y:c+p.y,data:{...p,placement:d}}}}},KC=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:i,y:r,placement:u}=l,{mainAxis:c=!0,crossAxis:d=!1,limiter:m={fn:N=>{let{x:T,y:_}=N;return{x:T,y:_}}},...p}=zr(n,l),y={x:i,y:r},v=await qg(l,p),x=hl(ns(u)),E=kg(x);let j=y[E],w=y[x];if(c){const N=E==="y"?"top":"left",T=E==="y"?"bottom":"right",_=j+v[N],D=j-v[T];j=Td(_,j,D)}if(d){const N=x==="y"?"top":"left",T=x==="y"?"bottom":"right",_=w+v[N],D=w-v[T];w=Td(_,w,D)}const C=m.fn({...l,[E]:j,[x]:w});return{...C,data:{x:C.x-i,y:C.y-r,enabled:{[E]:c,[x]:d}}}}}};function Lu(){return typeof window<"u"}function fi(n){return Bg(n)?(n.nodeName||"").toLowerCase():"#document"}function on(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function la(n){var l;return(l=(Bg(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function Bg(n){return Lu()?n instanceof Node||n instanceof on(n).Node:!1}function Un(n){return Lu()?n instanceof Element||n instanceof on(n).Element:!1}function ea(n){return Lu()?n instanceof HTMLElement||n instanceof on(n).HTMLElement:!1}function By(n){return!Lu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof on(n).ShadowRoot}function Br(n){const{overflow:l,overflowX:i,overflowY:r,display:u}=kn(n);return/auto|scroll|overlay|hidden|clip/.test(l+r+i)&&!["inline","contents"].includes(u)}function GC(n){return["table","td","th"].includes(fi(n))}function Uu(n){return[":popover-open",":modal"].some(l=>{try{return n.matches(l)}catch{return!1}})}function rh(n){const l=oh(),i=Un(n)?kn(n):n;return["transform","translate","scale","rotate","perspective"].some(r=>i[r]?i[r]!=="none":!1)||(i.containerType?i.containerType!=="normal":!1)||!l&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!l&&(i.filter?i.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(i.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(i.contain||"").includes(r))}function FC(n){let l=gl(n);for(;ea(l)&&!Ws(l);){if(rh(l))return l;if(Uu(l))return null;l=gl(l)}return null}function oh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ws(n){return["html","body","#document"].includes(fi(n))}function kn(n){return on(n).getComputedStyle(n)}function ku(n){return Un(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function gl(n){if(fi(n)==="html")return n;const l=n.assignedSlot||n.parentNode||By(n)&&n.host||la(n);return By(l)?l.host:l}function Hg(n){const l=gl(n);return Ws(l)?n.ownerDocument?n.ownerDocument.body:n.body:ea(l)&&Br(l)?l:Hg(l)}function wr(n,l,i){var r;l===void 0&&(l=[]),i===void 0&&(i=!0);const u=Hg(n),c=u===((r=n.ownerDocument)==null?void 0:r.body),d=on(u);if(c){const m=Rd(d);return l.concat(d,d.visualViewport||[],Br(u)?u:[],m&&i?wr(m):[])}return l.concat(u,wr(u,[],i))}function Rd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Qg(n){const l=kn(n);let i=parseFloat(l.width)||0,r=parseFloat(l.height)||0;const u=ea(n),c=u?n.offsetWidth:i,d=u?n.offsetHeight:r,m=bu(i)!==c||bu(r)!==d;return m&&(i=c,r=d),{width:i,height:r,$:m}}function uh(n){return Un(n)?n:n.contextElement}function Xs(n){const l=uh(n);if(!ea(l))return Wn(1);const i=l.getBoundingClientRect(),{width:r,height:u,$:c}=Qg(l);let d=(c?bu(i.width):i.width)/r,m=(c?bu(i.height):i.height)/u;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const XC=Wn(0);function $g(n){const l=on(n);return!oh()||!l.visualViewport?XC:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function ZC(n,l,i){return l===void 0&&(l=!1),!i||l&&i!==on(n)?!1:l}function as(n,l,i,r){l===void 0&&(l=!1),i===void 0&&(i=!1);const u=n.getBoundingClientRect(),c=uh(n);let d=Wn(1);l&&(r?Un(r)&&(d=Xs(r)):d=Xs(n));const m=ZC(c,i,r)?$g(c):Wn(0);let p=(u.left+m.x)/d.x,y=(u.top+m.y)/d.y,v=u.width/d.x,x=u.height/d.y;if(c){const E=on(c),j=r&&Un(r)?on(r):r;let w=E,C=Rd(w);for(;C&&r&&j!==w;){const N=Xs(C),T=C.getBoundingClientRect(),_=kn(C),D=T.left+(C.clientLeft+parseFloat(_.paddingLeft))*N.x,H=T.top+(C.clientTop+parseFloat(_.paddingTop))*N.y;p*=N.x,y*=N.y,v*=N.x,x*=N.y,p+=D,y+=H,w=on(C),C=Rd(w)}}return Su({width:v,height:x,x:p,y})}function ch(n,l){const i=ku(n).scrollLeft;return l?l.left+i:as(la(n)).left+i}function Yg(n,l,i){i===void 0&&(i=!1);const r=n.getBoundingClientRect(),u=r.left+l.scrollLeft-(i?0:ch(n,r)),c=r.top+l.scrollTop;return{x:u,y:c}}function PC(n){let{elements:l,rect:i,offsetParent:r,strategy:u}=n;const c=u==="fixed",d=la(r),m=l?Uu(l.floating):!1;if(r===d||m&&c)return i;let p={scrollLeft:0,scrollTop:0},y=Wn(1);const v=Wn(0),x=ea(r);if((x||!x&&!c)&&((fi(r)!=="body"||Br(d))&&(p=ku(r)),ea(r))){const j=as(r);y=Xs(r),v.x=j.x+r.clientLeft,v.y=j.y+r.clientTop}const E=d&&!x&&!c?Yg(d,p,!0):Wn(0);return{width:i.width*y.x,height:i.height*y.y,x:i.x*y.x-p.scrollLeft*y.x+v.x+E.x,y:i.y*y.y-p.scrollTop*y.y+v.y+E.y}}function JC(n){return Array.from(n.getClientRects())}function IC(n){const l=la(n),i=ku(n),r=n.ownerDocument.body,u=Jl(l.scrollWidth,l.clientWidth,r.scrollWidth,r.clientWidth),c=Jl(l.scrollHeight,l.clientHeight,r.scrollHeight,r.clientHeight);let d=-i.scrollLeft+ch(n);const m=-i.scrollTop;return kn(r).direction==="rtl"&&(d+=Jl(l.clientWidth,r.clientWidth)-u),{width:u,height:c,x:d,y:m}}function WC(n,l){const i=on(n),r=la(n),u=i.visualViewport;let c=r.clientWidth,d=r.clientHeight,m=0,p=0;if(u){c=u.width,d=u.height;const y=oh();(!y||y&&l==="fixed")&&(m=u.offsetLeft,p=u.offsetTop)}return{width:c,height:d,x:m,y:p}}function e_(n,l){const i=as(n,!0,l==="fixed"),r=i.top+n.clientTop,u=i.left+n.clientLeft,c=ea(n)?Xs(n):Wn(1),d=n.clientWidth*c.x,m=n.clientHeight*c.y,p=u*c.x,y=r*c.y;return{width:d,height:m,x:p,y}}function Hy(n,l,i){let r;if(l==="viewport")r=WC(n,i);else if(l==="document")r=IC(la(n));else if(Un(l))r=e_(l,i);else{const u=$g(n);r={x:l.x-u.x,y:l.y-u.y,width:l.width,height:l.height}}return Su(r)}function Vg(n,l){const i=gl(n);return i===l||!Un(i)||Ws(i)?!1:kn(i).position==="fixed"||Vg(i,l)}function t_(n,l){const i=l.get(n);if(i)return i;let r=wr(n,[],!1).filter(m=>Un(m)&&fi(m)!=="body"),u=null;const c=kn(n).position==="fixed";let d=c?gl(n):n;for(;Un(d)&&!Ws(d);){const m=kn(d),p=rh(d);!p&&m.position==="fixed"&&(u=null),(c?!p&&!u:!p&&m.position==="static"&&!!u&&["absolute","fixed"].includes(u.position)||Br(d)&&!p&&Vg(n,d))?r=r.filter(v=>v!==d):u=m,d=gl(d)}return l.set(n,r),r}function n_(n){let{element:l,boundary:i,rootBoundary:r,strategy:u}=n;const d=[...i==="clippingAncestors"?Uu(l)?[]:t_(l,this._c):[].concat(i),r],m=d[0],p=d.reduce((y,v)=>{const x=Hy(l,v,u);return y.top=Jl(x.top,y.top),y.right=Is(x.right,y.right),y.bottom=Is(x.bottom,y.bottom),y.left=Jl(x.left,y.left),y},Hy(l,m,u));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function a_(n){const{width:l,height:i}=Qg(n);return{width:l,height:i}}function l_(n,l,i){const r=ea(l),u=la(l),c=i==="fixed",d=as(n,!0,c,l);let m={scrollLeft:0,scrollTop:0};const p=Wn(0);function y(){p.x=ch(u)}if(r||!r&&!c)if((fi(l)!=="body"||Br(u))&&(m=ku(l)),r){const j=as(l,!0,c,l);p.x=j.x+l.clientLeft,p.y=j.y+l.clientTop}else u&&y();c&&!r&&u&&y();const v=u&&!r&&!c?Yg(u,m):Wn(0),x=d.left+m.scrollLeft-p.x-v.x,E=d.top+m.scrollTop-p.y-v.y;return{x,y:E,width:d.width,height:d.height}}function ld(n){return kn(n).position==="static"}function Qy(n,l){if(!ea(n)||kn(n).position==="fixed")return null;if(l)return l(n);let i=n.offsetParent;return la(n)===i&&(i=i.ownerDocument.body),i}function Kg(n,l){const i=on(n);if(Uu(n))return i;if(!ea(n)){let u=gl(n);for(;u&&!Ws(u);){if(Un(u)&&!ld(u))return u;u=gl(u)}return i}let r=Qy(n,l);for(;r&&GC(r)&&ld(r);)r=Qy(r,l);return r&&Ws(r)&&ld(r)&&!rh(r)?i:r||FC(n)||i}const s_=async function(n){const l=this.getOffsetParent||Kg,i=this.getDimensions,r=await i(n.floating);return{reference:l_(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function i_(n){return kn(n).direction==="rtl"}const r_={convertOffsetParentRelativeRectToViewportRelativeRect:PC,getDocumentElement:la,getClippingRect:n_,getOffsetParent:Kg,getElementRects:s_,getClientRects:JC,getDimensions:a_,getScale:Xs,isElement:Un,isRTL:i_};function Gg(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function o_(n,l){let i=null,r;const u=la(n);function c(){var m;clearTimeout(r),(m=i)==null||m.disconnect(),i=null}function d(m,p){m===void 0&&(m=!1),p===void 0&&(p=1),c();const y=n.getBoundingClientRect(),{left:v,top:x,width:E,height:j}=y;if(m||l(),!E||!j)return;const w=tu(x),C=tu(u.clientWidth-(v+E)),N=tu(u.clientHeight-(x+j)),T=tu(v),D={rootMargin:-w+"px "+-C+"px "+-N+"px "+-T+"px",threshold:Jl(0,Is(1,p))||1};let H=!0;function V(X){const G=X[0].intersectionRatio;if(G!==p){if(!H)return d();G?d(!1,G):r=setTimeout(()=>{d(!1,1e-7)},1e3)}G===1&&!Gg(y,n.getBoundingClientRect())&&d(),H=!1}try{i=new IntersectionObserver(V,{...D,root:u.ownerDocument})}catch{i=new IntersectionObserver(V,D)}i.observe(n)}return d(!0),c}function u_(n,l,i,r){r===void 0&&(r={});const{ancestorScroll:u=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,y=uh(n),v=u||c?[...y?wr(y):[],...wr(l)]:[];v.forEach(T=>{u&&T.addEventListener("scroll",i,{passive:!0}),c&&T.addEventListener("resize",i)});const x=y&&m?o_(y,i):null;let E=-1,j=null;d&&(j=new ResizeObserver(T=>{let[_]=T;_&&_.target===y&&j&&(j.unobserve(l),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var D;(D=j)==null||D.observe(l)})),i()}),y&&!p&&j.observe(y),j.observe(l));let w,C=p?as(n):null;p&&N();function N(){const T=as(n);C&&!Gg(C,T)&&i(),C=T,w=requestAnimationFrame(N)}return i(),()=>{var T;v.forEach(_=>{u&&_.removeEventListener("scroll",i),c&&_.removeEventListener("resize",i)}),x?.(),(T=j)==null||T.disconnect(),j=null,p&&cancelAnimationFrame(w)}}const c_=VC,f_=KC,d_=$C,h_=QC,$y=(n,l,i)=>{const r=new Map,u={platform:r_,...i},c={...u.platform,_c:r};return HC(n,l,{...u,platform:c})};var sd={exports:{}};var Yy;function m_(){return Yy||(Yy=1,function(n){(function(){var l={}.hasOwnProperty;function i(){for(var c="",d=0;d<arguments.length;d++){var m=arguments[d];m&&(c=u(c,r(m)))}return c}function r(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var d="";for(var m in c)l.call(c,m)&&c[m]&&(d=u(d,m));return d}function u(c,d){return d?c?c+" "+d:c+d:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()}(sd)),sd.exports}var p_=m_();const Od=Dd(p_);var Vy={};const y_="react-tooltip-core-styles",g_="react-tooltip-base-styles",Ky={core:!1,base:!1};function Gy({css:n,id:l=g_,type:i="base",ref:r}){var u,c;if(!n||typeof document>"u"||Ky[i]||i==="core"&&typeof process<"u"&&(!((u=process==null?void 0:Vy)===null||u===void 0)&&u.REACT_TOOLTIP_DISABLE_CORE_STYLES)||i!=="base"&&typeof process<"u"&&(!((c=process==null?void 0:Vy)===null||c===void 0)&&c.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;i==="core"&&(l=y_),r||(r={});const{insertAt:d}=r;if(document.getElementById(l))return;const m=document.head||document.getElementsByTagName("head")[0],p=document.createElement("style");p.id=l,p.type="text/css",d==="top"&&m.firstChild?m.insertBefore(p,m.firstChild):m.appendChild(p),p.styleSheet?p.styleSheet.cssText=n:p.appendChild(document.createTextNode(n)),Ky[i]=!0}const Fy=async({elementReference:n=null,tooltipReference:l=null,tooltipArrowReference:i=null,place:r="top",offset:u=10,strategy:c="absolute",middlewares:d=[c_(Number(u)),d_({fallbackAxisSideDirection:"start"}),f_({padding:5})],border:m,arrowSize:p=8})=>{if(!n)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(l===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const y=d;return i?(y.push(h_({element:i,padding:5})),$y(n,l,{placement:r,strategy:c,middleware:y}).then(({x:v,y:x,placement:E,middlewareData:j})=>{var w,C;const N={left:`${v}px`,top:`${x}px`,border:m},{x:T,y:_}=(w=j.arrow)!==null&&w!==void 0?w:{x:0,y:0},D=(C={top:"bottom",right:"left",bottom:"top",left:"right"}[E.split("-")[0]])!==null&&C!==void 0?C:"bottom",H=m&&{borderBottom:m,borderRight:m};let V=0;if(m){const X=`${m}`.match(/(\d+)px/);V=X?.[1]?Number(X[1]):1}return{tooltipStyles:N,tooltipArrowStyles:{left:T!=null?`${T}px`:"",top:_!=null?`${_}px`:"",right:"",bottom:"",...H,[D]:`-${p/2+V}px`},place:E}})):$y(n,l,{placement:"bottom",strategy:c,middleware:y}).then(({x:v,y:x,placement:E})=>({tooltipStyles:{left:`${v}px`,top:`${x}px`},tooltipArrowStyles:{},place:E}))},Xy=(n,l)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(n,l),Zy=(n,l,i)=>{let r=null;const u=function(...c){const d=()=>{r=null};!r&&(n.apply(this,c),r=setTimeout(d,l))};return u.cancel=()=>{r&&(clearTimeout(r),r=null)},u},Py=n=>n!==null&&!Array.isArray(n)&&typeof n=="object",Md=(n,l)=>{if(n===l)return!0;if(Array.isArray(n)&&Array.isArray(l))return n.length===l.length&&n.every((u,c)=>Md(u,l[c]));if(Array.isArray(n)!==Array.isArray(l))return!1;if(!Py(n)||!Py(l))return n===l;const i=Object.keys(n),r=Object.keys(l);return i.length===r.length&&i.every(u=>Md(n[u],l[u]))},v_=n=>{if(!(n instanceof HTMLElement||n instanceof SVGElement))return!1;const l=getComputedStyle(n);return["overflow","overflow-x","overflow-y"].some(i=>{const r=l.getPropertyValue(i);return r==="auto"||r==="scroll"})},Jy=n=>{if(!n)return null;let l=n.parentElement;for(;l;){if(v_(l))return l;l=l.parentElement}return document.scrollingElement||document.documentElement},b_=typeof window<"u"?b.useLayoutEffect:b.useEffect,jn=n=>{n.current&&(clearTimeout(n.current),n.current=null)},x_="DEFAULT_TOOLTIP_ID",S_={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},w_=b.createContext({getTooltipData:()=>S_});function Fg(n=x_){return b.useContext(w_).getTooltipData(n)}var Ks={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},id={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const E_=({forwardRef:n,id:l,className:i,classNameArrow:r,variant:u="dark",anchorId:c,anchorSelect:d,place:m="top",offset:p=10,events:y=["hover"],openOnClick:v=!1,positionStrategy:x="absolute",middlewares:E,wrapper:j,delayShow:w=0,delayHide:C=0,float:N=!1,hidden:T=!1,noArrow:_=!1,clickable:D=!1,closeOnEsc:H=!1,closeOnScroll:V=!1,closeOnResize:X=!1,openEvents:G,closeEvents:P,globalCloseEvents:ae,imperativeModeOnly:ye,style:Ae,position:Ce,afterShow:Ke,afterHide:me,disableTooltip:_e,content:q,contentWrapperRef:F,isOpen:J,defaultIsOpen:he=!1,setIsOpen:R,activeAnchor:Q,setActiveAnchor:I,border:W,opacity:ne,arrowColor:ve,arrowSize:oe=8,role:vt="tooltip"})=>{var De;const Ge=b.useRef(null),Hn=b.useRef(null),Et=b.useRef(null),fn=b.useRef(null),sa=b.useRef(null),[dn,di]=b.useState({tooltipStyles:{},tooltipArrowStyles:{},place:m}),[Mt,Dt]=b.useState(!1),[ia,Qn]=b.useState(!1),[Ye,$n]=b.useState(null),xl=b.useRef(!1),Ua=b.useRef(null),{anchorRefs:Sl,setActiveAnchor:ss}=Fg(l),hn=b.useRef(!1),[Je,Bt]=b.useState([]),tt=b.useRef(!1),ka=v||y.includes("click"),hi=ka||G?.click||G?.dblclick||G?.mousedown,za=G?{...G}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!G&&ka&&Object.assign(za,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const mn=P?{...P}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!P&&ka&&Object.assign(mn,{mouseleave:!1,blur:!1,mouseout:!1});const Ct=ae?{...ae}:{escape:H||!1,scroll:V||!1,resize:X||!1,clickOutsideAnchor:hi||!1};ye&&(Object.assign(za,{mouseover:!1,focus:!1,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(mn,{mouseout:!1,blur:!1,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Ct,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),b_(()=>(tt.current=!0,()=>{tt.current=!1}),[]);const ze=Z=>{tt.current&&(Z&&Qn(!0),setTimeout(()=>{tt.current&&(R?.(Z),J===void 0&&Dt(Z))},10))};b.useEffect(()=>{if(J===void 0)return()=>null;J&&Qn(!0);const Z=setTimeout(()=>{Dt(J)},10);return()=>{clearTimeout(Z)}},[J]),b.useEffect(()=>{if(Mt!==xl.current)if(jn(sa),xl.current=Mt,Mt)Ke?.();else{const Z=(te=>{const ce=te.match(/^([\d.]+)(ms|s)$/);if(!ce)return 0;const[,Xe,ht]=ce;return Number(Xe)*(ht==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));sa.current=setTimeout(()=>{Qn(!1),$n(null),me?.()},Z+25)}},[Mt]);const ra=Z=>{di(te=>Md(te,Z)?te:Z)},An=(Z=w)=>{jn(Et),ia?ze(!0):Et.current=setTimeout(()=>{ze(!0)},Z)},qa=(Z=C)=>{jn(fn),fn.current=setTimeout(()=>{hn.current||ze(!1)},Z)},Ba=Z=>{var te;if(!Z)return;const ce=(te=Z.currentTarget)!==null&&te!==void 0?te:Z.target;if(!ce?.isConnected)return I(null),void ss({current:null});w?An():ze(!0),I(ce),ss({current:ce}),jn(fn)},oa=()=>{D?qa(C||100):C?qa():ze(!1),jn(Et)},Yn=({x:Z,y:te})=>{var ce;const Xe={getBoundingClientRect:()=>({x:Z,y:te,width:0,height:0,top:te,left:Z,right:Z,bottom:te})};Fy({place:(ce=Ye?.place)!==null&&ce!==void 0?ce:m,offset:p,elementReference:Xe,tooltipReference:Ge.current,tooltipArrowReference:Hn.current,strategy:x,middlewares:E,border:W,arrowSize:oe}).then(ht=>{ra(ht)})},pn=Z=>{if(!Z)return;const te=Z,ce={x:te.clientX,y:te.clientY};Yn(ce),Ua.current=ce},wl=Z=>{var te;if(!Mt)return;const ce=Z.target;ce.isConnected&&(!((te=Ge.current)===null||te===void 0)&&te.contains(ce)||[document.querySelector(`[id='${c}']`),...Je].some(Xe=>Xe?.contains(ce))||(ze(!1),jn(Et)))},El=Zy(Ba,50),nt=Zy(oa,50),_t=Z=>{nt.cancel(),El(Z)},ie=()=>{El.cancel(),nt()},Se=b.useCallback(()=>{var Z,te;const ce=(Z=Ye?.position)!==null&&Z!==void 0?Z:Ce;ce?Yn(ce):N?Ua.current&&Yn(Ua.current):Q?.isConnected&&Fy({place:(te=Ye?.place)!==null&&te!==void 0?te:m,offset:p,elementReference:Q,tooltipReference:Ge.current,tooltipArrowReference:Hn.current,strategy:x,middlewares:E,border:W,arrowSize:oe}).then(Xe=>{tt.current&&ra(Xe)})},[Mt,Q,q,Ae,m,Ye?.place,p,x,Ce,Ye?.position,N,oe]);b.useEffect(()=>{var Z,te;const ce=new Set(Sl);Je.forEach(Oe=>{_e?.(Oe)||ce.add({current:Oe})});const Xe=document.querySelector(`[id='${c}']`);Xe&&!_e?.(Xe)&&ce.add({current:Xe});const ht=()=>{ze(!1)},yn=Jy(Q),Jt=Jy(Ge.current);Ct.scroll&&(window.addEventListener("scroll",ht),yn?.addEventListener("scroll",ht),Jt?.addEventListener("scroll",ht));let at=null;Ct.resize?window.addEventListener("resize",ht):Q&&Ge.current&&(at=u_(Q,Ge.current,Se,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const jt=Oe=>{Oe.key==="Escape"&&ze(!1)};Ct.escape&&window.addEventListener("keydown",jt),Ct.clickOutsideAnchor&&window.addEventListener("click",wl);const Re=[],It=Oe=>!!(Oe?.target&&Q?.contains(Oe.target)),Cl=Oe=>{Mt&&It(Oe)||Ba(Oe)},Ha=Oe=>{Mt&&It(Oe)&&oa()},lt=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],mi=["click","dblclick","mousedown","mouseup"];Object.entries(za).forEach(([Oe,gn])=>{gn&&(lt.includes(Oe)?Re.push({event:Oe,listener:_t}):mi.includes(Oe)&&Re.push({event:Oe,listener:Cl}))}),Object.entries(mn).forEach(([Oe,gn])=>{gn&&(lt.includes(Oe)?Re.push({event:Oe,listener:ie}):mi.includes(Oe)&&Re.push({event:Oe,listener:Ha}))}),N&&Re.push({event:"pointermove",listener:pn});const pi=()=>{hn.current=!0},Vn=()=>{hn.current=!1,oa()},ua=D&&(mn.mouseout||mn.mouseleave);return ua&&((Z=Ge.current)===null||Z===void 0||Z.addEventListener("mouseover",pi),(te=Ge.current)===null||te===void 0||te.addEventListener("mouseout",Vn)),Re.forEach(({event:Oe,listener:gn})=>{ce.forEach(is=>{var _l;(_l=is.current)===null||_l===void 0||_l.addEventListener(Oe,gn)})}),()=>{var Oe,gn;Ct.scroll&&(window.removeEventListener("scroll",ht),yn?.removeEventListener("scroll",ht),Jt?.removeEventListener("scroll",ht)),Ct.resize?window.removeEventListener("resize",ht):at?.(),Ct.clickOutsideAnchor&&window.removeEventListener("click",wl),Ct.escape&&window.removeEventListener("keydown",jt),ua&&((Oe=Ge.current)===null||Oe===void 0||Oe.removeEventListener("mouseover",pi),(gn=Ge.current)===null||gn===void 0||gn.removeEventListener("mouseout",Vn)),Re.forEach(({event:is,listener:_l})=>{ce.forEach(rs=>{var Qa;(Qa=rs.current)===null||Qa===void 0||Qa.removeEventListener(is,_l)})})}},[Q,Se,ia,Sl,Je,G,P,ae,ka,w,C]),b.useEffect(()=>{var Z,te;let ce=(te=(Z=Ye?.anchorSelect)!==null&&Z!==void 0?Z:d)!==null&&te!==void 0?te:"";!ce&&l&&(ce=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const Xe=new MutationObserver(ht=>{const yn=[],Jt=[];ht.forEach(at=>{if(at.type==="attributes"&&at.attributeName==="data-tooltip-id"&&(at.target.getAttribute("data-tooltip-id")===l?yn.push(at.target):at.oldValue===l&&Jt.push(at.target)),at.type==="childList"){if(Q){const jt=[...at.removedNodes].filter(Re=>Re.nodeType===1);if(ce)try{Jt.push(...jt.filter(Re=>Re.matches(ce))),Jt.push(...jt.flatMap(Re=>[...Re.querySelectorAll(ce)]))}catch{}jt.some(Re=>{var It;return!!(!((It=Re?.contains)===null||It===void 0)&&It.call(Re,Q))&&(Qn(!1),ze(!1),I(null),jn(Et),jn(fn),!0)})}if(ce)try{const jt=[...at.addedNodes].filter(Re=>Re.nodeType===1);yn.push(...jt.filter(Re=>Re.matches(ce))),yn.push(...jt.flatMap(Re=>[...Re.querySelectorAll(ce)]))}catch{}}}),(yn.length||Jt.length)&&Bt(at=>[...at.filter(jt=>!Jt.includes(jt)),...yn])});return Xe.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{Xe.disconnect()}},[l,d,Ye?.anchorSelect,Q]),b.useEffect(()=>{Se()},[Se]),b.useEffect(()=>{if(!F?.current)return()=>null;const Z=new ResizeObserver(()=>{setTimeout(()=>Se())});return Z.observe(F.current),()=>{Z.disconnect()}},[q,F?.current]),b.useEffect(()=>{var Z;const te=document.querySelector(`[id='${c}']`),ce=[...Je,te];Q&&ce.includes(Q)||I((Z=Je[0])!==null&&Z!==void 0?Z:te)},[c,Je,Q]),b.useEffect(()=>(he&&ze(!0),()=>{jn(Et),jn(fn)}),[]),b.useEffect(()=>{var Z;let te=(Z=Ye?.anchorSelect)!==null&&Z!==void 0?Z:d;if(!te&&l&&(te=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`),te)try{const ce=Array.from(document.querySelectorAll(te));Bt(ce)}catch{Bt([])}},[l,d,Ye?.anchorSelect]),b.useEffect(()=>{Et.current&&(jn(Et),An(w))},[w]);const Lt=(De=Ye?.content)!==null&&De!==void 0?De:q,Nt=Mt&&Object.keys(dn.tooltipStyles).length>0;return b.useImperativeHandle(n,()=>({open:Z=>{if(Z?.anchorSelect)try{document.querySelector(Z.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${Z.anchorSelect}" is not a valid CSS selector`)}$n(Z??null),Z?.delay?An(Z.delay):ze(!0)},close:Z=>{Z?.delay?qa(Z.delay):ze(!1)},activeAnchor:Q,place:dn.place,isOpen:!!(ia&&!T&&Lt&&Nt)})),ia&&!T&&Lt?fl.createElement(j,{id:l,role:vt,className:Od("react-tooltip",Ks.tooltip,id.tooltip,id[u],i,`react-tooltip__place-${dn.place}`,Ks[Nt?"show":"closing"],Nt?"react-tooltip__show":"react-tooltip__closing",x==="fixed"&&Ks.fixed,D&&Ks.clickable),onTransitionEnd:Z=>{jn(sa),Mt||Z.propertyName!=="opacity"||(Qn(!1),$n(null),me?.())},style:{...Ae,...dn.tooltipStyles,opacity:ne!==void 0&&Nt?ne:void 0},ref:Ge},Lt,fl.createElement(j,{className:Od("react-tooltip-arrow",Ks.arrow,id.arrow,r,_&&Ks.noArrow),style:{...dn.tooltipArrowStyles,background:ve?`linear-gradient(to right bottom, transparent 50%, ${ve} 50%)`:void 0,"--rt-arrow-size":`${oe}px`},ref:Hn})):null},C_=({content:n})=>fl.createElement("span",{dangerouslySetInnerHTML:{__html:n}}),wu=fl.forwardRef(({id:n,anchorId:l,anchorSelect:i,content:r,html:u,render:c,className:d,classNameArrow:m,variant:p="dark",place:y="top",offset:v=10,wrapper:x="div",children:E=null,events:j=["hover"],openOnClick:w=!1,positionStrategy:C="absolute",middlewares:N,delayShow:T=0,delayHide:_=0,float:D=!1,hidden:H=!1,noArrow:V=!1,clickable:X=!1,closeOnEsc:G=!1,closeOnScroll:P=!1,closeOnResize:ae=!1,openEvents:ye,closeEvents:Ae,globalCloseEvents:Ce,imperativeModeOnly:Ke=!1,style:me,position:_e,isOpen:q,defaultIsOpen:F=!1,disableStyleInjection:J=!1,border:he,opacity:R,arrowColor:Q,arrowSize:I,setIsOpen:W,afterShow:ne,afterHide:ve,disableTooltip:oe,role:vt="tooltip"},De)=>{const[Ge,Hn]=b.useState(r),[Et,fn]=b.useState(u),[sa,dn]=b.useState(y),[di,Mt]=b.useState(p),[Dt,ia]=b.useState(v),[Qn,Ye]=b.useState(T),[$n,xl]=b.useState(_),[Ua,Sl]=b.useState(D),[ss,hn]=b.useState(H),[Je,Bt]=b.useState(x),[tt,ka]=b.useState(j),[hi,za]=b.useState(C),[mn,Ct]=b.useState(null),[ze,ra]=b.useState(null),An=b.useRef(J),{anchorRefs:qa,activeAnchor:Ba}=Fg(n),oa=nt=>nt?.getAttributeNames().reduce((_t,ie)=>{var Se;return ie.startsWith("data-tooltip-")&&(_t[ie.replace(/^data-tooltip-/,"")]=(Se=nt?.getAttribute(ie))!==null&&Se!==void 0?Se:null),_t},{}),Yn=nt=>{const _t={place:ie=>{var Se;dn((Se=ie)!==null&&Se!==void 0?Se:y)},content:ie=>{Hn(ie??r)},html:ie=>{fn(ie??u)},variant:ie=>{var Se;Mt((Se=ie)!==null&&Se!==void 0?Se:p)},offset:ie=>{ia(ie===null?v:Number(ie))},wrapper:ie=>{var Se;Bt((Se=ie)!==null&&Se!==void 0?Se:x)},events:ie=>{const Se=ie?.split(" ");ka(Se??j)},"position-strategy":ie=>{var Se;za((Se=ie)!==null&&Se!==void 0?Se:C)},"delay-show":ie=>{Ye(ie===null?T:Number(ie))},"delay-hide":ie=>{xl(ie===null?_:Number(ie))},float:ie=>{Sl(ie===null?D:ie==="true")},hidden:ie=>{hn(ie===null?H:ie==="true")},"class-name":ie=>{Ct(ie)}};Object.values(_t).forEach(ie=>ie(null)),Object.entries(nt).forEach(([ie,Se])=>{var Lt;(Lt=_t[ie])===null||Lt===void 0||Lt.call(_t,Se)})};b.useEffect(()=>{Hn(r)},[r]),b.useEffect(()=>{fn(u)},[u]),b.useEffect(()=>{dn(y)},[y]),b.useEffect(()=>{Mt(p)},[p]),b.useEffect(()=>{ia(v)},[v]),b.useEffect(()=>{Ye(T)},[T]),b.useEffect(()=>{xl(_)},[_]),b.useEffect(()=>{Sl(D)},[D]),b.useEffect(()=>{hn(H)},[H]),b.useEffect(()=>{za(C)},[C]),b.useEffect(()=>{An.current!==J&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[J]),b.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:J==="core",disableBase:J}}))},[]),b.useEffect(()=>{var nt;const _t=new Set(qa);let ie=i;if(!ie&&n&&(ie=`[data-tooltip-id='${n.replace(/'/g,"\\'")}']`),ie)try{document.querySelectorAll(ie).forEach(te=>{_t.add({current:te})})}catch{console.warn(`[react-tooltip] "${ie}" is not a valid CSS selector`)}const Se=document.querySelector(`[id='${l}']`);if(Se&&_t.add({current:Se}),!_t.size)return()=>null;const Lt=(nt=ze??Se)!==null&&nt!==void 0?nt:Ba.current,Nt=new MutationObserver(te=>{te.forEach(ce=>{var Xe;if(!Lt||ce.type!=="attributes"||!(!((Xe=ce.attributeName)===null||Xe===void 0)&&Xe.startsWith("data-tooltip-")))return;const ht=oa(Lt);Yn(ht)})}),Z={attributes:!0,childList:!1,subtree:!1};if(Lt){const te=oa(Lt);Yn(te),Nt.observe(Lt,Z)}return()=>{Nt.disconnect()}},[qa,Ba,ze,l,i]),b.useEffect(()=>{me?.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),he&&!Xy("border",`${he}`)&&console.warn(`[react-tooltip] "${he}" is not a valid \`border\`.`),me?.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),R&&!Xy("opacity",`${R}`)&&console.warn(`[react-tooltip] "${R}" is not a valid \`opacity\`.`)},[]);let pn=E;const wl=b.useRef(null);if(c){const nt=c({content:ze?.getAttribute("data-tooltip-content")||Ge||null,activeAnchor:ze});pn=nt?fl.createElement("div",{ref:wl,className:"react-tooltip-content-wrapper"},nt):null}else Ge&&(pn=Ge);Et&&(pn=fl.createElement(C_,{content:Et}));const El={forwardRef:De,id:n,anchorId:l,anchorSelect:i,className:Od(d,mn),classNameArrow:m,content:pn,contentWrapperRef:wl,place:sa,variant:di,offset:Dt,wrapper:Je,events:tt,openOnClick:w,positionStrategy:hi,middlewares:N,delayShow:Qn,delayHide:$n,float:Ua,hidden:ss,noArrow:V,clickable:X,closeOnEsc:G,closeOnScroll:P,closeOnResize:ae,openEvents:ye,closeEvents:Ae,globalCloseEvents:Ce,imperativeModeOnly:Ke,style:me,position:_e,isOpen:q,defaultIsOpen:F,border:he,opacity:R,arrowColor:Q,arrowSize:I,setIsOpen:W,afterShow:ne,afterHide:ve,disableTooltip:oe,activeAnchor:ze,setActiveAnchor:nt=>ra(nt),role:vt};return fl.createElement(E_,{...El})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",n=>{n.detail.disableCore||Gy({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),n.detail.disableBase||Gy({css:`
193
+ .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});const __=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("circle",{cx:256,cy:256,r:32,fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32}),b.createElement("circle",{cx:256,cy:416,r:32,fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32}),b.createElement("circle",{cx:256,cy:96,r:32,fill:"none",stroke:"currentColor",strokeMiterlimit:10,strokeWidth:32})),Xg=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M320 146s24.36-12-64-12a160 160 0 10160 160",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:32}),b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M256 58l80 80-80 80"})),N_=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("rect",{x:128,y:128,width:336,height:336,rx:57,ry:57,fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:32}),b.createElement("path",{d:"M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24M296 216v160M376 296H216",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32})),j_=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("circle",{cx:128,cy:256,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("circle",{cx:384,cy:112,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("circle",{cx:384,cy:400,r:48,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M169.83 279.53l172.34 96.94M342.17 135.53l-172.34 96.94"})),Zg=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M32 144h448M112 256h288M208 368h96"})),Pg=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M256 112v288M400 256H112"})),T_=()=>{const n=eh(),l=sE();return{rename:async r=>{if(n){const u=await kr("New tab name",r);u&&await l.mutateAsync({id:n,payload:{name:u}})}return Promise.resolve()}}},Jg=["shift","alt","meta","mod","ctrl","control"],A_={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function yl(n){return(A_[n.trim()]||n.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Ig(n){return Jg.includes(n)}function rd(n,l=","){return n.toLowerCase().split(l)}function od(n,l="+",i=">",r=!1,u){let c=[],d=!1;n=n.trim(),n.includes(i)?(d=!0,c=n.toLocaleLowerCase().split(i).map(y=>yl(y))):c=n.toLocaleLowerCase().split(l).map(y=>yl(y));const m={alt:c.includes("alt"),ctrl:c.includes("ctrl")||c.includes("control"),shift:c.includes("shift"),meta:c.includes("meta"),mod:c.includes("mod"),useKey:r},p=c.filter(y=>!Jg.includes(y));return{...m,keys:p,description:u,isSequence:d,hotkey:n}}typeof document<"u"&&(document.addEventListener("keydown",n=>{n.code!==void 0&&Wg([yl(n.code)])}),document.addEventListener("keyup",n=>{n.code!==void 0&&ev([yl(n.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Na.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Na.clear()},0)}));const Na=new Set;function fh(n){return Array.isArray(n)}function R_(n,l=","){return(fh(n)?n:n.split(l)).every(i=>Na.has(i.trim().toLowerCase()))}function Wg(n){const l=Array.isArray(n)?n:[n];Na.has("meta")&&Na.forEach(i=>!Ig(i)&&Na.delete(i.toLowerCase())),l.forEach(i=>Na.add(i.toLowerCase()))}function ev(n){const l=Array.isArray(n)?n:[n];n==="meta"?Na.clear():l.forEach(i=>Na.delete(i.toLowerCase()))}function O_(n,l,i){(typeof i=="function"&&i(n,l)||i===!0)&&n.preventDefault()}function M_(n,l,i){return typeof i=="function"?i(n,l):i===!0||i===void 0}const D_=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function L_(n){return tv(n,D_)}function tv(n,l=!1){const{target:i,composed:r}=n;let u,c;return U_(i)&&r?(u=n.composedPath()[0]&&n.composedPath()[0].tagName,c=n.composedPath()[0]&&n.composedPath()[0].role):(u=i&&i.tagName,c=i&&i.role),fh(l)?!!(u&&l&&l.some(d=>d.toLowerCase()===u.toLowerCase()||d===c)):!!(u&&l&&l)}function U_(n){return!!n.tagName&&!n.tagName.startsWith("-")&&n.tagName.includes("-")}function k_(n,l){return n.length===0&&l?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):l?n.some(i=>l.includes(i))||n.includes("*"):!0}const z_=(n,l,i=!1)=>{const{alt:r,meta:u,mod:c,shift:d,ctrl:m,keys:p,useKey:y}=l,{code:v,key:x,ctrlKey:E,metaKey:j,shiftKey:w,altKey:C}=n,N=yl(v);if(y&&p?.length===1&&p.includes(x))return!0;if(!p?.includes(N)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(N))return!1;if(!i){if(r!==C&&N!=="alt"||d!==w&&N!=="shift")return!1;if(c){if(!j&&!E)return!1}else if(u!==j&&N!=="meta"&&N!=="os"||m!==E&&N!=="ctrl"&&N!=="control")return!1}return p&&p.length===1&&p.includes(N)?!0:p?R_(p):!p},q_=b.createContext(void 0),B_=()=>b.useContext(q_);function nv(n,l){return n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(n).length===Object.keys(l).length&&Object.keys(n).reduce((i,r)=>i&&nv(n[r],l[r]),!0):n===l}const H_=b.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Q_=()=>b.useContext(H_);function $_(n){const l=b.useRef(void 0);return nv(l.current,n)||(l.current=n),l.current}const Iy=n=>{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()},Y_=typeof window<"u"?b.useLayoutEffect:b.useEffect;function Dn(n,l,i,r){const u=b.useRef(null),c=b.useRef(!1),d=Array.isArray(i)?Array.isArray(r)?void 0:r:i,m=fh(n)?n.join(d?.delimiter):n,p=Array.isArray(i)?i:Array.isArray(r)?r:void 0,y=b.useCallback(l,p??[]),v=b.useRef(y);p?v.current=y:v.current=l;const x=$_(d),{activeScopes:E}=Q_(),j=B_();return Y_(()=>{if(x?.enabled===!1||!k_(E,x?.scopes))return;let w=[],C;const N=(H,V=!1)=>{if(!(L_(H)&&!tv(H,x?.enableOnFormTags))){if(u.current!==null){const X=u.current.getRootNode();if((X instanceof Document||X instanceof ShadowRoot)&&X.activeElement!==u.current&&!u.current.contains(X.activeElement)){Iy(H);return}}H.target?.isContentEditable&&!x?.enableOnContentEditable||rd(m,x?.delimiter).forEach(X=>{if(X.includes(x?.splitKey??"+")&&X.includes(x?.sequenceSplitKey??">")){console.warn(`Hotkey ${X} contains both ${x?.splitKey??"+"} and ${x?.sequenceSplitKey??">"} which is not supported.`);return}const G=od(X,x?.splitKey,x?.sequenceSplitKey,x?.useKey,x?.description);if(G.isSequence){C=setTimeout(()=>{w=[]},x?.sequenceTimeoutMs??1e3);const P=G.useKey?H.key:yl(H.code);if(Ig(P.toLowerCase()))return;w.push(P);const ae=G.keys?.[w.length-1];if(P!==ae){w=[],C&&clearTimeout(C);return}w.length===G.keys?.length&&(v.current(H,G),C&&clearTimeout(C),w=[])}else if(z_(H,G,x?.ignoreModifiers)||G.keys?.includes("*")){if(x?.ignoreEventWhen?.(H)||V&&c.current)return;if(O_(H,G,x?.preventDefault),!M_(H,G,x?.enabled)){Iy(H);return}v.current(H,G),V||(c.current=!0)}})}},T=H=>{H.code!==void 0&&(Wg(yl(H.code)),(x?.keydown===void 0&&x?.keyup!==!0||x?.keydown)&&N(H))},_=H=>{H.code!==void 0&&(ev(yl(H.code)),c.current=!1,x?.keyup&&N(H,!0))},D=u.current||d?.document||document;return D.addEventListener("keyup",_,d?.eventListenerOptions),D.addEventListener("keydown",T,d?.eventListenerOptions),j&&rd(m,x?.delimiter).forEach(H=>j.addHotkey(od(H,x?.splitKey,x?.sequenceSplitKey,x?.useKey,x?.description))),()=>{D.removeEventListener("keyup",_,d?.eventListenerOptions),D.removeEventListener("keydown",T,d?.eventListenerOptions),j&&rd(m,x?.delimiter).forEach(H=>j.removeHotkey(od(H,x?.splitKey,x?.sequenceSplitKey,x?.useKey,x?.description))),w=[],C&&clearTimeout(C)}},[m,x,E]),u}function V_(){return h.jsxs("div",{className:"flex md:grid md:grid-cols-3 items-center bg-white overflow-auto no-scrollbar mb-2 shadow",children:[h.jsx(K_,{}),h.jsx(G_,{}),h.jsx(X_,{})]})}function K_(){const{dataSourceId:n}=b.useContext(La),{data:l}=Ou(n),{state:{table:i}}=b.useContext(Pt);return h.jsx("div",{className:re.tableConfig,children:l&&h.jsxs("div",{className:se(re.tableAction,re.greenFixed),"data-tooltip-id":"default","data-tooltip-content":i,children:[h.jsx(ci,{size:18,type:l.dbType}),h.jsx("p",{className:"text-sm",children:l.name}),h.jsx(pl,{width:12,height:12}),h.jsx("p",{className:"text-sm",children:i})]})})}function G_(){const{page:n,size:l,setPage:i}=Ug(),{data:r,isFetching:u}=b.useContext(Bn),c=n*l,d=!u&&!!r?.result.hasMore,m=r?.result.rows.length||0,p=()=>{n>0&&i(n-1)},y=()=>{d&&i(n+1)};return h.jsxs("div",{className:se(re.tableConfig,"justify-self-center"),children:[h.jsx("span",{"data-tooltip-content":"Previous page","data-tooltip-id":"default",className:se(re.tableAction,re.gray,n<1&&"opacity-30"),onClick:p,role:"button",children:h.jsx(pl,{width:16,height:16,className:"rotate-180"})}),h.jsxs("span",{"data-tooltip-id":"rows-num",className:re.paginationIndicator,children:[c+1," - ",c+m,d&&"+"]}),h.jsx("span",{"data-tooltip-content":"Next page","data-tooltip-id":"default",className:se(re.tableAction,d?re.gray:"opacity-30"),onClick:y,role:"button",children:h.jsx(pl,{width:16,height:16})})]})}const F_=[5,10,20,50,100,200];function X_(){const{dataSourceId:n,name:l}=b.useContext(La),{data:i}=Ou(n),{data:r,refetch:u}=b.useContext(Bn),c=Lr(Gt.EDITOR),d=RC(),{rename:m}=T_(),{size:p,setSize:y}=Ug(),{state:v}=b.useContext(Pt),x=ui(),E=wt(),j=()=>{x.mutateAsync({name:l,opts:v}).then(_=>{E(`${$e.workbench.path}/tab/${_.id}`)})},w=()=>{if(r?.result.queryHistoryId){const _=new URL(window.location.href);_.pathname=$e.share.path,_.searchParams.set("shareId",r.result.queryHistoryId),navigator.clipboard.writeText(_.toString()),rn.success("Share link copied to clipboard")}},C=()=>{r?.result.columns?.[0].table&&Id({table:r?.result.columns?.[0].table,dataSourceId:n})},N=async()=>{const _=await kr("Query name",l);!_||!r?.result.queryHistoryId||d.mutate({name:_,queryId:r.result.queryHistoryId})},T=()=>m(l);return Dn("s",N),Dn("r",T),Dn("d",j),h.jsxs("div",{className:"flex justify-self-end",children:[h.jsx("span",{"data-tooltip-content":"Show filters","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:()=>In("filters"),role:"button",children:h.jsx(Zg,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Join table","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:()=>In("joins"),role:"button",children:h.jsx(Pg,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Refresh data","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:()=>u(),role:"button",children:h.jsx(Xg,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Share query","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:w,role:"button",children:h.jsx(j_,{width:16,height:16})}),h.jsx("span",{"data-tooltip-content":"Duplicate tab","data-tooltip-id":"default",className:se(re.tableAction,re.gray),onClick:j,role:"button",children:h.jsx(N_,{width:16,height:16})}),h.jsx(wu,{id:"rows-num",className:"z-10 shadow-md flex gap-1",clickable:!0,variant:"light",opacity:1,children:F_.map(_=>h.jsx("button",{onClick:()=>y(_,!0),className:se(re.tableAction,re.gray,_===p&&re.selectedSize),children:h.jsx("span",{children:_})},_))}),h.jsx("button",{"data-tooltip-id":"explorer-more-actions",className:se(re.tableAction,re.gray),children:h.jsx(__,{width:16,height:16})}),h.jsxs(wu,{id:"explorer-more-actions",className:"z-10 shadow-md flex flex-col",clickable:!0,variant:"light",opacity:1,children:[h.jsxs("button",{onClick:()=>In("columns"),className:se(re.tableAction,re.modal,re.gray,"justify-between"),children:[h.jsx("span",{children:"Columns"}),h.jsx("span",{className:"hotkey",children:"C"})]}),h.jsxs("button",{onClick:()=>In("groupBy"),className:se(re.tableAction,re.modal,re.gray,"justify-between"),children:[h.jsx("span",{children:"Group by"}),h.jsx("span",{className:"hotkey",children:"G"})]}),h.jsxs("button",{onClick:()=>In("aggregate"),className:se(re.tableAction,re.modal,re.gray,"justify-between"),children:[h.jsx("span",{children:"Aggregate"}),h.jsx("span",{className:"hotkey",children:"A"})]}),h.jsx("div",{className:"h-0.5 my-2 bg-gray-100"}),h.jsxs("button",{onClick:T,className:se(re.tableAction,re.modal,re.gray,"justify-between"),children:[h.jsx("span",{children:"Rename tab"}),h.jsx("span",{className:"hotkey",children:"R"})]}),c&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{onClick:N,className:se(re.tableAction,re.modal,re.gray),children:[h.jsx("span",{children:"Save query"}),h.jsx("span",{className:"hotkey",children:"S"})]}),i?.allowInsert===!0&&h.jsx("button",{onClick:C,className:se(re.tableAction,re.modal,re.gray),children:"Insert new row"})]})]})]})}const Z_="_drop-container_171jy_2",P_="_item_171jy_2",Wy={dropContainer:Z_,item:P_},av=({dataSourceId:n,inputClassName:l,focusId:i,placeholder:r="Column",onChange:u,value:c,autoFocus:d,allowTables:m})=>{const{data:p}=Mr(n),y=b.useRef(null),v=b.useMemo(()=>{if(!p)return[];let _=p;return m&&(_=p.filter(D=>m.includes(D.tableName))),_.flatMap(D=>D.columns.map(H=>({value:D.tableName+"."+H.name,label:H.name,table:D.tableName,searchValue:H.name.toLowerCase()})))},[p,m]),x=b.useMemo(()=>{const _=c.toLowerCase()||"",D=[];for(let H=0;H<v.length&&D.length<10;H++)v[H].searchValue.includes(_)&&D.push(v[H]);return D},[v,c]),[E,j]=b.useState(!1),[w,C]=b.useState(0),N=_=>{if(_.key==="ArrowDown")_.preventDefault(),C(D=>(D+1)%x.length);else if(_.key==="ArrowUp")_.preventDefault(),C(D=>(D-1+x.length)%x.length);else if(_.key==="Enter"&&w>=0&&w<x.length){_.preventDefault();const D=x[w].value;j(!1);const H=v.findIndex(V=>V.value===D)>-1;u(x[w]?.value||D,H,!0)}};b.useEffect(()=>{const _=y.current?.querySelector('[data-is-active="true"]');_&&_.scrollIntoView({behavior:"smooth",block:"nearest"})},[w]);const T=_=>{const D=_.currentTarget.value,H=v.findIndex(V=>V.value===D)>-1;u(D,H,!1)};return h.jsxs("div",{className:"relative",onFocus:()=>j(!0),onBlur:()=>j(!1),children:[h.jsx("input",{autoFocus:d,onKeyDown:N,value:c,onChange:T,className:l,placeholder:r,"data-focus":i}),E&&x.length>0&&h.jsx("div",{className:Wy.dropContainer,ref:y,tabIndex:-1,children:x.map((_,D)=>h.jsxs("div",{className:Wy.item,"data-is-active":w===D,onMouseDownCapture:H=>{H.preventDefault(),j(!1),u(_.value,!0,!0)},children:[h.jsx("span",{className:"text-xs font-semibold truncate",children:_.table}),h.jsx("p",{className:"truncate text-sm",children:_.label})]},D))})]})},J_="_actions_16nol_2",I_="_filter-actions_16nol_2",W_="_advanced-filter-icon_16nol_2",e5="_filters-container_16nol_2",t5="_filter-container_16nol_2",vr={actions:J_,filterActions:I_,advancedFilterIcon:W_,filtersContainer:e5,filterContainer:t5},n5=({filter:n,dataSourceId:l,allowedTables:i,autoFocus:r,onChangeColumn:u,onChangeValue:c,onRemoveFilter:d,onChangeAdvancedFilter:m,triggerIsEnabled:p,onSubmit:y})=>{const v=E=>{const j=E.target.value;j.charAt(0)===":"?m(n.id,!0):(!n.isAdvanced&&["=","<",">"].includes(j.charAt(0))&&m(n.id,!0),c(n.id,E.currentTarget.value))},x=E=>{E.key==="Backspace"?(n.value.length===0||E.currentTarget.selectionEnd===0)&&m(n.id,!1):E.key==="Enter"&&y()};return h.jsxs("div",{className:vr.filterContainer,children:[h.jsx("input",{type:"checkbox",checked:n.isEnabled!==!1,onClick:()=>p(n.id)}),h.jsx(av,{dataSourceId:l,onChange:E=>u(n.id,E),value:n.column,allowTables:i,focusId:"column",inputClassName:"input w-full",autoFocus:r}),h.jsxs("div",{className:"flex items-center",children:[n.isAdvanced&&h.jsx("span",{className:vr.advancedFilterIcon,children:h.jsx(Zg,{width:14,height:14})}),h.jsx("input",{placeholder:"Filter value",value:n.value,onChange:v,onKeyDown:x,"data-focus":"value",className:"input flex-1"},n.id)]}),h.jsx("div",{className:vr.filterActions,children:h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove filter",className:"p-0.5 text-sm cursor-pointer rounded-md",onClick:()=>d(n.id),children:h.jsx(ts,{width:20,height:20,className:"text-red-600"})})})]})},a5=()=>{const{state:n}=b.useContext(Pt),{refetch:l}=b.useContext(Bn),{setFilters:i}=ah(),r=Mu(C=>C.filters),u=b.useMemo(()=>[n.table,...n.joins.map(C=>C.table)],[n.table,n.joins]),[c,d]=b.useState([]),m=(C,N)=>{d(T=>[...T.map(_=>_.id===C?{..._,column:N}:_)])},p=(C,N)=>{d(T=>[...T.map(_=>_.id===C?{..._,value:N}:_)])},y=()=>{d(C=>[...C,{id:Oa(),value:"",column:"",isEnabled:!0}])},v=C=>{d(N=>N.filter(T=>T.id!==C))},x=(C,N)=>{d(T=>T.map(_=>_.id===C?{..._,isAdvanced:N}:_))},E=()=>Du("filters"),j=()=>{try{i(c.filter(C=>C.value.length>0&&C.column.length>0)),setTimeout(l,1),E()}catch(C){C instanceof Error?rn.error(C.message):rn.error("Error during parsing, check you filters")}},w=C=>{d(N=>N.map(T=>T.id===C?{...T,isEnabled:!T.isEnabled}:T))};return b.useEffect(()=>{r&&d(()=>[...n.filters,{id:Oa(),value:"",column:"",isEnabled:!0}])},[r]),Dn("f",()=>{vu("filters")}),h.jsxs(cn,{isVisible:r,onClose:E,portal:!0,onClosed:()=>d([]),noPadding:!0,children:[h.jsx(aa,{onClick:E}),h.jsx("h2",{className:"text-lg font-semibold m-2",children:"Filters"}),h.jsxs("div",{className:vr.filtersContainer,children:[c.length<1&&h.jsx("p",{className:"p-1 text-center rounded-lg bg-gray-50 border border-gray-200",children:"No filters"}),c.map((C,N)=>h.jsx(n5,{filter:C,dataSourceId:n.dataSourceId,allowedTables:u,onChangeColumn:m,onChangeValue:p,onRemoveFilter:v,onChangeAdvancedFilter:x,triggerIsEnabled:w,onSubmit:j,autoFocus:N===c.length-1},C.id))]}),h.jsxs("div",{className:vr.actions,children:[h.jsxs("button",{className:"button tertiary flex items-center gap-1 text-sm",onClick:y,children:[h.jsx(Pg,{width:20,height:20}),h.jsx("span",{children:"Add filter"})]}),h.jsx("button",{className:"button primary text-sm",onClick:j,children:"Apply filters"})]})]})},l5="_join-modal_qr9l0_2",s5={joinModal:l5},i5=(n,l)=>n.type!==l.type||n.on!==l.on||n.table!==l.table,r5=(n,l)=>n.type===l.type&&n.on===l.on&&n.table===l.table,lv=()=>{const{state:n,setState:l}=b.useContext(Pt),i=b.useCallback(r=>{l(u=>{const c=u.joins;if(c.some(m=>r5(m,r))){const m=r.table+".";return{...u,joins:c.filter(p=>i5(p,r)),columns:u.columns.filter(p=>!p.value.startsWith(m)),groupBy:u.groupBy.filter(p=>!p.value.startsWith(m)),orderBy:u.orderBy.filter(p=>!p.column.startsWith(m)),aggregations:u.aggregations.filter(p=>!p.value.startsWith(m)),filters:u.filters.filter(p=>!p.column.startsWith(m))}}return{...u,joins:[...c,r]}})},[l]);return{joins:n.joins,toggle:i}},o5=()=>{const{isFetching:n}=b.useContext(Bn),l=Mu(p=>p.joins),{toggle:i}=lv(),{availableJoins:r}=b.useContext(La),[u,c]=b.useState(""),d=b.useMemo(()=>{const p=u.toLowerCase();return r.filter(y=>y.on.toTable.toLowerCase().includes(p))},[r,u]),m=()=>Du("joins");return Dn("j",()=>{r.length>0?In("joins"):rn.error("No available tables to join")}),h.jsxs(cn,{isVisible:l,onClose:m,portal:!0,children:[h.jsx(aa,{onClick:m}),h.jsxs("div",{className:s5.joinModal,children:[h.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Join table"}),r.length>0?h.jsx("input",{className:"input w-full",placeholder:"Filter",autoFocus:!0,onChange:p=>c(p.target.value),value:u,disabled:n}):h.jsx(Ot,{variant:"warning",children:h.jsx("p",{className:"text-sm truncate",children:"There is nothing else to join"})}),h.jsx("div",{className:`flex flex-col mt-2 overflow-y-auto ${n?"opacity-40":""}`,children:d.map(p=>h.jsx(Og,{hook:p,onClick:()=>{n||(i({table:p.on.toTable,type:"LEFT",on:p.where}),c(""),m())}},p.where))})]})]})};function u5(n){return n.reduce((l,i)=>(l[i]=!0,l),{})}function e1(n){return n.reduce((l,i)=>(l[i]=!0,l),{})}const c5="_container_17r32_2",f5="_column-label_17r32_2",d5="_not-active_17r32_2",fu={container:c5,columnLabel:f5,notActive:d5};function h5(n){if(!n)return[];const l={};return n.forEach(i=>{l[i.table]?l[i.table].push({value:i.full,ogColumn:i.column,label:dl(i.column),type:i.type}):l[i.table]=[{value:i.full,ogColumn:i.column,label:dl(i.column),type:i.type}],k4[i.type]&&["YEAR","MONTH","DAY"].forEach(r=>{l[i.table].push({value:r+" "+i.full,ogColumn:i.column,label:r+" "+dl(i.column),type:"number",nested:!0})})}),Object.entries(l).reduce((i,[r,u])=>(i.push({name:dl(r),columns:u}),i),[])}function m5(n,l){const i=l.toLowerCase();return n.map(r=>{const u=r.columns.filter(c=>c.label.toLowerCase().includes(i)||c.ogColumn.toLowerCase().includes(i));return{...r,columns:u}}).filter(r=>r.columns.length>0)}const p5=({column:n,selected:l,onCheck:i})=>h.jsxs("label",{className:se(fu.columnLabel,l?fu.active:fu.notActive,n.nested&&"pl-5!"),children:[h.jsx("input",{type:"checkbox",checked:l[n.value],name:n.value,onChange:i}),h.jsxs("p",{className:"flex justify-between w-full",children:[h.jsx("span",{"data-tooltip-content":n.value,"data-tooltip-id":"default",children:n.label}),h.jsx("span",{className:"text-blue-600",children:n.type})]})]},n.value),y5={columns:"c",groupBy:"g"},t1=({mode:n})=>{const l=Mu(_=>_[n]),{allColumns:i}=b.useContext(La),{state:r,setState:u}=b.useContext(Pt),[c,d]=b.useState({}),[m,p]=b.useState(""),y=b.useMemo(()=>h5(i),[i]),v=r.aggregations.length>0||r.groupBy.length>0,x=b.useMemo(()=>m?m5(y,m):y,[m,y]),E=_=>{d(D=>({...D,[_.target.name]:_.target.checked}))},j=_=>{const D=_.target.checked;d(H=>{for(const V of i)H[V.full]=D;return{...H}})},w=()=>{Du(n)},C=()=>{const _=[];for(const[D,H]of Object.entries(c))if(H){const[V,X]=D.split(" ");_.push({value:X||V,fn:X?V:void 0})}u(D=>({...D,[n]:_})),w()},N=b.useMemo(()=>{for(const _ of i)if(!c[_.full])return!1;return!0},[c,i]);Dn(y5[n],()=>{n==="columns"?v?rn.error("Columns are ignored when there is at least one aggregation or group by"):vu("columns"):vu("groupBy")}),b.useEffect(()=>{l&&d(()=>u5(r[n].map(_=>_.fn?_.fn+" "+_.value:_.value)))},[l,d]);const T=()=>{p(""),d({})};return h.jsxs(cn,{isVisible:l,onClose:w,portal:!0,onClosed:T,children:[h.jsx(aa,{onClick:w}),h.jsxs("div",{className:fu.container,children:[h.jsx("h2",{className:"text-lg font-semibold",children:n==="groupBy"?"Group by":"Show columns"}),h.jsx("input",{autoFocus:!0,className:"input my-2",placeholder:"Filter",value:m,onChange:_=>p(_.target.value)}),h.jsx("div",{className:"overflow-y-auto",children:x.map(_=>h.jsxs("div",{className:"my-2",children:[h.jsxs("p",{className:"font-semibold sticky top-0 bg-white p-1 z-1",children:["📄 ",_.name]}),_.columns.map(D=>h.jsx(p5,{column:D,selected:c,onCheck:E},D.value))]},_.name))}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsxs("label",{className:"button tertiary flex gap-2 items-center",children:[h.jsx("input",{type:"checkbox",checked:N,onChange:j}),h.jsx("span",{children:"Select all"})]}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{className:"button tertiary",onClick:w,children:"Cancel"}),h.jsx("button",{className:"button primary",onClick:C,children:"Apply"})]})]})]})},g5="_options-container_17x2q_2",v5={optionsContainer:g5},ud="COUNT all",b5=()=>{const n=Mu(w=>w.aggregate),{dataSourceId:l}=b.useContext(La),{setState:i,state:r}=b.useContext(Pt),{data:u}=b.useContext(Bn),[c,d]=b.useState({fn:"",col:""}),m=w=>d({...c,fn:w.currentTarget.value}),p=w=>d({...c,col:w}),y=()=>Du("aggregate"),v=()=>{const w=c.fn===ud?{value:"*",fn:"COUNT"}:{fn:c.fn,value:c.col,distinct:c.fn==="COUNT"};i(C=>({...C,aggregations:[...C.aggregations,w]}))},x=c.fn===ud,E=x?!1:!c.col||!c.fn,j=w=>{const C=vg(w);i(N=>({...N,aggregations:N.aggregations.filter(T=>T.fn!==w.fn||T.value!==w.value),orderBy:N.orderBy.filter(T=>T.column!==C)}))};return Dn("a",()=>{vu("aggregate")}),h.jsxs(cn,{isVisible:n,onClose:y,backdropClose:!0,portal:!0,children:[h.jsx(aa,{onClick:y}),h.jsxs("div",{children:[h.jsx("h2",{className:"text-lg font-semibold",children:"Aggregate"}),Ma(r.aggregations.length,0)&&h.jsx("div",{className:"flex flex-col gap-1 mt-4",children:r.aggregations.map((w,C)=>h.jsxs("p",{className:"p-2 rounded-md bg-gray-50 flex items-center justify-between",children:[h.jsx("span",{children:uu(w)}),h.jsx("button",{tabIndex:-1,"data-tooltip-id":"default","data-tooltip-content":"Remove aggregation",className:"p-0.5 text-sm cursor-pointer",onClick:()=>j(w),children:h.jsx(ts,{width:20,height:20,className:"text-red-600"})})]},C))}),h.jsxs("div",{className:v5.optionsContainer,children:[h.jsxs("label",{className:se(x&&"col-span-2"),children:[h.jsx("p",{className:"font-semibold text-xs",children:"Function"}),h.jsxs("select",{className:"input w-full",value:c.fn,onChange:m,autoFocus:!0,children:[h.jsx("option",{value:"",disabled:!0,children:"Select function"}),h.jsx("option",{value:ud,children:"Count all rows"}),h.jsx("option",{value:"COUNT",children:"Count"}),h.jsx("option",{value:"SUM",children:"Sum"}),h.jsx("option",{value:"MAX",children:"Max"}),h.jsx("option",{value:"MIN",children:"Min"}),h.jsx("option",{value:"AVG",children:"Avg"})]})]}),!x&&h.jsxs("label",{children:[h.jsx("p",{className:"font-semibold text-xs",children:"Column"}),h.jsx(av,{inputClassName:"input w-full",dataSourceId:l,allowTables:u?.result.tables||[],onChange:p,value:c.col})]}),h.jsx("button",{className:"button primary",disabled:E,onClick:v,children:"Add"})]})]})]})},x5="_container_wa801_2",S5="_yellow-pill_wa801_2 _pill_wa801_2",w5="_blue-pill_wa801_2 _pill_wa801_2",E5="_purple-pill_wa801_2 _pill_wa801_2",C5="_red-pill_wa801_2 _pill_wa801_2",_5="_black-pill_wa801_2 _pill_wa801_2",N5="_disabled-pill_wa801_2",Kl={container:x5,yellowPill:S5,bluePill:w5,purplePill:E5,redPill:C5,blackPill:_5,disabledPill:N5};function j5(n,l=500,i){const[r,u]=b.useState(n),c=b.useRef(i);return c.current=i,b.useEffect(()=>{const d=setTimeout(()=>{u(n),c.current&&c.current(n)},l);return()=>clearTimeout(d)},[n,l]),r}function T5(n){return!(n===!0||n===void 0)}const A5=()=>{const{state:{aggregations:n,columns:l,groupBy:i}}=b.useContext(Pt),{toggle:r,joins:u}=lv(),{filters:c,setFilters:d,removeFilter:m}=ah(),p=()=>In("joins"),y=()=>In("aggregate"),v=()=>In("columns"),x=()=>In("groupBy"),E=C=>{C.preventDefault(),C.stopPropagation(),r(u[u.length-1])},j=C=>{d(c.map(N=>({...N,isEnabled:C===N.id?T5(N.isEnabled):N.isEnabled})),!0)},w=C=>N=>{N.preventDefault(),N.stopPropagation(),m(C)};return c.length>0||u.length>0||i.length>0||l.length>0||n.length>0?h.jsxs("div",{className:Kl.container,children:[u.map((C,N)=>h.jsxs("button",{onClick:p,className:Kl.yellowPill,"data-tooltip-id":"default","data-tooltip-content":`Joins ${C.table} on ${C.on}`,children:[h.jsx("p",{className:"text-sm",children:C.table}),N===u.length-1&&h.jsx(ts,{onClick:E,width:18,height:18})]},C.table)),c.map(C=>h.jsxs("button",{onClick:()=>j(C.id),onAuxClick:()=>m(C.id),className:se(Kl.bluePill,C.isEnabled===!1&&Kl.disabledPill),"data-tooltip-id":"default","data-tooltip-content":`${C.column} ${C.value}`,children:[h.jsx("p",{className:"text-sm",children:C.column}),h.jsx("p",{className:"text-sm",children:C.value}),h.jsx(ts,{onClick:w(C.id),width:18,height:18})]},C.id)),n.map(C=>h.jsx("button",{onClick:y,className:se(Kl.purplePill),"data-tooltip-id":"default","data-tooltip-content":uu(C),children:h.jsx("p",{className:"text-sm",children:uu(C)})},uu(C))),l.length>0&&h.jsx("button",{onClick:v,className:se(Kl.redPill),"data-tooltip-id":"default","data-tooltip-content":"Has hidden columns",children:h.jsx("p",{className:"text-sm",children:"Hidden columns"})}),i.length>0&&h.jsx("button",{onClick:x,className:se(Kl.blackPill),"data-tooltip-id":"default","data-tooltip-content":"Has GROUP BY",children:h.jsx("p",{className:"text-sm",children:"Grouped columns"})}),!1]}):null},R5=({options:n,updater:l,name:i,tabId:r})=>{const u=tE(n,l),c=iE(r,u.state),d=eE(c.data,u.state.dataSourceId,i,r);return h.jsx(La,{value:d,children:h.jsx(Pt,{value:u,children:h.jsxs(Bn,{value:c,children:[h.jsx(V_,{}),h.jsx(A5,{}),h.jsxs("div",{className:"flex-1 flex overflow-hidden border-t border-t-gray-200",children:[h.jsx("div",{className:"flex-1 overflow-auto pb-24 lg:pb-12 no-scrollbar",children:h.jsx(AC,{})}),h.jsx(a5,{}),h.jsx(o5,{}),h.jsx(t1,{mode:"columns"}),h.jsx(t1,{mode:"groupBy"}),h.jsx(b5,{})]})]})})})},sv=()=>h.jsxs("div",{role:"status",children:[h.jsxs("svg",{"aria-hidden":"true",className:"w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),h.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),h.jsx("span",{className:"sr-only",children:"Loading..."})]}),O5=({id:n})=>{const{data:l}=aE(n),i=b.useCallback(r=>{if(!l)return;const u=r(oi(l.opts));rt.setQueryData(["workbench-tabs",l.id],{...l,opts:{...l.opts,...u}})},[l]);return l?h.jsx(R5,{updater:i,options:l.opts,name:l.name,tabId:l.id}):h.jsx("div",{className:"flex-1 flex justify-center items-center",children:h.jsx(sv,{})})},M5=n=>{setTimeout(l=>{const i=document.querySelector(`[data-tab-id="${l}"]`);i&&i.scrollIntoView({behavior:"smooth"})},50,n)},D5=()=>{const{id:n}=sx(),l=wt(),{data:i}=Jd(),r=lE(),u=Ng(nh.laptop),c=p=>{if(p===n&&i){if(i.length===1)return l($e.home.path);if(i.length>1){const y=i.find(v=>v.id!==p);if(y)return l(`/workbench/tab/${y.id}`)}}},d=p=>{p.stopPropagation(),p.preventDefault();const y=p.currentTarget.getAttribute("data-tab-id");y&&(r.mutate(y),c(y))},m=p=>{r.mutate(p),c(p)};return b.useEffect(()=>{n&&M5(n)},[n]),h.jsxs("div",{className:"h-screen max-h-screen bg-(--bg) flex flex-col",children:[n&&h.jsx(O5,{id:n}),h.jsx("div",{className:se(mr.tabs,"no-scrollbar",!u&&mr.mobile),children:i?.map(p=>h.jsxs("div",{onClick:()=>l(`${$e.workbench.path}/tab/${p.id}`),className:se(mr.tab,p.id===n&&mr.active),"data-tooltip-id":"default","data-tab-id":p.id,"data-tooltip-content":p.name,onAuxClick:()=>m(p.id),children:[h.jsxs("span",{className:"truncate w-full",children:["🛠️ ",p.name]}),h.jsx("button",{"data-tab-id":p.id,className:mr.closeButton,onClick:d,children:h.jsx(ts,{width:20,height:20})})]},p.id))})]})},L5="_root_28ig6_2",U5="_up_28ig6_2",k5="_down_28ig6_2",z5="_chevron_28ig6_2",q5="_table-name-container_28ig6_2",B5="_link_28ig6_2",H5="_table-name_28ig6_2",Q5="_ul_28ig6_2",$5="_column-type_28ig6_2",Y5="_action-blue_28ig6_2 _action_28ig6_2",V5="_action-red_28ig6_2 _action_28ig6_2",Vt={root:L5,up:U5,down:k5,chevron:z5,tableNameContainer:q5,link:B5,tableName:H5,ul:Q5,columnType:$5,actionBlue:Y5,actionRed:V5},[A8,K5]=un(!1),iv=()=>K5(!1),G5="_sidebar_y9cc9_2",F5="_sidebar-visible_y9cc9_2",X5="_sidebar-container_y9cc9_2",Z5="_sidebar-invisible_y9cc9_2",P5="_backdrop_y9cc9_2",pr={sidebar:G5,sidebarVisible:F5,sidebarContainer:X5,sidebarInvisible:Z5,backdrop:P5},rv=({children:n,backdropClose:l,isVisible:i,onClose:r,onClosed:u,contentClassName:c})=>{const[d,m]=b.useState(!1),p=b.useRef(r);p.current=r;const y=()=>{l&&r()},v=x=>{i||getComputedStyle(x.currentTarget).opacity==="0"&&(m(!1),u&&u())};return b.useEffect(()=>{i&&m(!0)},[i]),b.useEffect(()=>{const x=E=>{i&&E.key==="Escape"&&p.current()};return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[i]),h.jsxs("div",{onTransitionEnd:v,className:se(pr.sidebar,i?pr.sidebarVisible:pr.sidebarInvisible),children:[h.jsx("div",{onClick:y,className:pr.backdrop}),h.jsx("div",{className:se(pr.sidebarContainer,c),children:d&&n})]})},J5=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48M336 64h112v112M224 288L440 72",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32})),I5=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M364.13 125.25L87 403l-23 45 44.99-23 277.76-277.13-22.62-22.62zM420.69 68.69l-22.62 22.62 22.62 22.63 22.62-22.63a16 16 0 000-22.62h0a16 16 0 00-22.62 0z"})),W5=n=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ionicon",viewBox:"0 0 512 512",...n},b.createElement("path",{d:"M432 144l-28.67 275.74A32 32 0 01371.55 448H140.46a32 32 0 01-31.78-28.26L80 144",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("rect",{x:32,y:64,width:448,height:80,rx:16,ry:16,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32}),b.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:32,d:"M312 240L200 352M312 352L200 240"})),ov=(n,l=!0)=>{const i=navigator.clipboard.writeText(n);l&&i.then(()=>{rn.success(`Copied "${n}"`)})},eN=new Intl.DateTimeFormat("en",{dateStyle:"full",timeStyle:"long"}),nu=18;function tN(n,l){return l&&n.toLowerCase().includes(l)?"bg-yellow-200 cursor-pointer":"cursor-pointer"}const nN=({insp:n,filter:l,expanded:i})=>{const r=b.useMemo(()=>i?n.columns:l.length<1?[]:n.columns.filter(u=>u.name.toLowerCase().includes(l)),[n,l,i]);return h.jsx("ul",{className:Vt.ul,children:r.map(u=>h.jsx(h.Fragment,{children:h.jsxs("li",{children:[u.isPrimary?"🔐":"🏷️"," ",h.jsx("span",{onClick:()=>ov(u.name),className:tN(u.name,l),children:u.name})," ",h.jsxs("span",{className:Vt.columnType,children:["[",u.type,"]"]}),u.ref&&h.jsxs("span",{children:[" ➡️ ",h.jsx("span",{className:Vt.columnType,children:u.ref.table}),".",u.ref.field]})]},u.name+u.type)}))},n.id)};function aN({id:n}){const{data:l}=Ou(n),{data:i}=Mr(n),r=wt(),u=g4(),c=mg(),d=v4(),m=ui(),p=b.useMemo(()=>l?.lastInspected?eN.format(new Date(l.lastInspected)):"--",[l]),[y,v]=b.useState({}),[x,E]=b.useState(""),[j,w]=b.useState("table"),C=Lr(Gt.EDITOR),N=x.toLowerCase(),T=b.useMemo(()=>{if(!N||!i)return i||[];const P=[];for(const ae of i){if(ae.tableName.toLowerCase().includes(N)){P.push(ae);continue}j!=="table"&&ae.columns.findIndex(ye=>ye.name.toLowerCase().includes(N))>=0&&P.push(ae)}return P},[N,i,j]),_=P=>{v(ae=>({...ae,[P]:!ae[P]}))},D=P=>{m.mutateAsync({name:P,opts:oi({table:P,dataSourceId:n})}).then(ae=>{Ps(void 0),iv(),r(`${$e.workbench.path}/tab/${ae.id}`)})},H=()=>{c.mutate(n)},V=async()=>{const P=await kr("Enter name",l?.name);P&&u.mutate({id:n,dataSource:{name:P}})},X=async()=>{await Cg("Are you sure you want to delete this data source?")&&(d.mutate(n),Ps(void 0))},G=j==="column";return h.jsxs("div",{className:Vt.root,children:[h.jsxs("div",{className:"sticky top-0 bg-white border-b border-gray-200 p-4 z-1",children:[h.jsxs("h3",{className:"page-head flex gap-2",children:[l&&h.jsx(ci,{size:32,type:l.dbType}),h.jsx("span",{className:"truncate",children:l?.name})]}),h.jsx("p",{className:"mt-2 text-xs text-gray-800",children:"Last DB inspection"}),h.jsx("p",{className:"text-sm font-semibold",children:p}),C&&h.jsxs("div",{className:"mt-2 flex gap-2",children:[h.jsxs("button",{disabled:c.isPending,onClick:H,className:Vt.actionBlue,children:[h.jsx(Xg,{width:16,height:16}),"INSPECT"]}),h.jsxs("button",{disabled:c.isPending,onClick:V,className:Vt.actionBlue,children:[h.jsx(I5,{width:16,height:16}),"RENAME"]}),h.jsxs("button",{disabled:c.isPending,onClick:X,className:Vt.actionRed,children:[h.jsx(W5,{width:16,height:16}),"DELETE"]})]}),h.jsxs("div",{className:"flex gap-2 items-center mb-2 mt-4",children:[h.jsxs("select",{className:"input",value:j,onChange:P=>w(P.currentTarget.value),children:[h.jsx("option",{value:"table",children:"Table"}),h.jsx("option",{value:"column",children:"Column"})]}),h.jsx("input",{className:"input flex-1 bg-gray-50",placeholder:G?"Search column":"Search table",value:x,onChange:P=>E(P.target.value),autoFocus:!0})]})]}),h.jsx("div",{className:"overflow-y-auto p-4",children:T?.map(P=>h.jsxs("div",{children:[h.jsxs("div",{className:Vt.tableNameContainer,children:[h.jsx("button",{className:se(Vt.chevron,y[P.id]?Vt.down:Vt.up),onClick:()=>_(P.id),children:h.jsx(pl,{width:16,height:16})}),h.jsx("button",{className:se(Vt.tableName,"flex-1"),onClick:()=>_(P.id),children:P.tableName}),h.jsx("button",{className:Vt.link,onClick:()=>D(P.tableName),"data-tooltip-id":"default-xs","data-tooltip-content":"Explore table data",children:h.jsx(J5,{width:nu,height:nu})}),h.jsx("button",{className:Vt.link,onClick:()=>ov(P.tableName),"data-tooltip-id":"default-xs","data-tooltip-content":"Copy table name",children:h.jsx(Lg,{width:nu,height:nu})})]}),(y[P.id]||x.length>0)&&h.jsx(nN,{insp:P,filter:G?N:"",expanded:y[P.id]})]},P.id))})]})}const lN=()=>{const n=ME(),[l,i]=b.useState(void 0);b.useEffect(()=>{n&&i(n)},[n]);const r=()=>Ps(void 0);return h.jsx(rv,{isVisible:n!=null,onClose:r,onClosed:()=>i(void 0),backdropClose:!0,children:l&&h.jsx(aN,{id:l})})},sN="_search_12h6v_2",iN="_entry_12h6v_2",rN="_ds_12h6v_2",oN="_ds-container_12h6v_2",uN="_ds-entry_12h6v_2",cN="_enabled_12h6v_2",Gs={search:sN,entry:iN,ds:rN,dsContainer:oN,dsEntry:uN,enabled:cN};function fN(n,l,i){try{const r=i.getItem(n);if(r)return JSON.parse(r)}catch(r){console.warn("Failed to restore tabs",r)}return l}const dN=({storage:n=localStorage,localStorageKey:l,initialData:i})=>{const r=un(fN(l,i,n));return r[2].subscribe(u=>{n.setItem(l,JSON.stringify(u))}),r},[hN,mN]=dN({initialData:[],localStorageKey:"selected-data-sources-v1"}),pN=n=>mN(l=>{const i=l.indexOf(n);return i>-1?(l.splice(i,1),[...l]):[...l,n]}),yN={table:"📄",query:"📖",tab:"🛠️"},gN=({onTable:n,onQuery:l,onWorkbenchTab:i,autoFocus:r})=>{const[u,c]=b.useState(""),[d,m]=b.useState(-1),p=j5(u,200),y=hN(),{data:v}=qn(),{data:x}=Zd({teamId:v?.teamId}),E=b.useMemo(()=>{const _=[],D=e1(y);if(!x||x.length===0)return[];for(const H of x)D[H.id]&&_.push(H.id);return _},[y,x]),{data:j}=c4(p,{teamId:v?.teamId,selectedDataSources:E}),w=_=>{_.type==="table"?n(_.name,_.dataSourceId):_.type==="query"?l(_.id,_.dataSourceId):_.type==="tab"&&i(_.id,_.dataSourceId)},C=_=>{j&&(_.key==="ArrowDown"?(_.preventDefault(),m(D=>(D+1)%j.length)):_.key==="ArrowUp"?(_.preventDefault(),m(D=>(D-1+j.length)%j.length)):_.key==="Enter"&&d>=0&&j[d]?.name&&(_.preventDefault(),w(j[d])))},N=_=>{const D=_.currentTarget.dataset.tableId,H=j?.find(V=>V.id===D);H&&w(H)},T=b.useMemo(()=>e1(y),[y]);return h.jsxs("div",{className:"overflow-hidden flex flex-col w-full lg:w-lg",children:[Ma(x?.length,0)&&h.jsx("div",{className:Gs.dsContainer,children:x.map(_=>h.jsxs("button",{className:se(Gs.dsEntry,T[_.id]&&Gs.enabled),onClick:()=>pN(_.id),children:[h.jsx(ci,{size:24,type:_.dbType}),h.jsx("span",{children:_.name})]},_.id))}),h.jsx("input",{className:Gs.search,placeholder:"Search table or saved query to start from",value:u,onChange:_=>c(_.target.value),onKeyDown:C,autoFocus:r}),Ma(j?.length,0)&&h.jsx("div",{className:"overflow-y-auto max-h-full mt-2",children:j.map((_,D)=>h.jsxs("button",{className:Gs.entry,"data-is-active":d===D,"data-table-id":_.id,onClick:N,children:[h.jsxs("p",{className:"font-semibold truncate",children:[yN[_.type]," ",_.name]}),h.jsxs("p",{className:Gs.ds,children:["📦 ",_.dataSourceName]})]},_.id))})]})},vN=()=>{const n=oE(),l=(c,d)=>{n?.onConfirm("table",c,d)},i=(c,d)=>{n?.onConfirm("query",c,d)},r=(c,d)=>{n?.onConfirm("tab",c,d)},u=()=>{n?.onCancel()};return h.jsxs(cn,{isVisible:!!n,onClose:u,children:[h.jsx(aa,{onClick:u}),h.jsx(gN,{autoFocus:!0,onTable:l,onQuery:i,onWorkbenchTab:r})]})},bN=()=>{const n=Dr("Hotkey"),l=wt(),{pathname:i}=qt(),{data:r}=qn(),{data:u}=Jd(),c=i===$e.home.path;Dn("n",()=>{r&&n()}),Dn("w",()=>{r&&(u&&u.length>0?l(`${$e.workbench.path}/tab/${u[0].id}`):n())},{enabled:c}),Dn("h",()=>{Js({show:!0})})},xN=()=>{const n=qt();b.useEffect(()=>{},[n.pathname])},[SN,uv]=un(!1),cd=()=>uv(!1),cv=()=>uv(!0),wN=({repeatPassword:n,password:l})=>l.length<1?null:l.length<8?h.jsx(Ot,{variant:"warning",children:"New password should be at least 8 characters long"}):l!==n?h.jsx(Ot,{variant:"warning",children:"Repeat password should match new password"}):null,EN=()=>{const n=SN(),{data:l}=qn(),{mutateAsync:i,isPending:r}=b4(),u=wt(),[{password:c,repeatPassword:d},{change:m,touched:p,reset:y}]=Ur({password:"",repeatPassword:""}),v=()=>{u("/"),Or.logout().then(()=>{cd()})},x=()=>{i({password:c}).then(()=>{y(),rn.success("Password successfully updated!")})},E=c.length<8||c!==d||r,j=p.includes("password");return h.jsxs(cn,{isVisible:n,onClose:cd,children:[h.jsx(aa,{onClick:cd}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col gap-2",children:[h.jsx(Eg,{children:"Account settings"}),h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Username"}),h.jsx("input",{className:"input w-full",readOnly:!0,disabled:!0,value:l?.username})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Change password"}),h.jsx("input",{className:"input w-full",type:"password",name:"newPassword",autoComplete:"new-password",value:c,onChange:m("password")})]}),h.jsxs("label",{children:[h.jsx("p",{className:"text-xs font-semibold mb-1",children:"Repeat password"}),h.jsx("input",{className:"input w-full",type:"password",value:d,onChange:m("repeatPassword")})]})]}),j&&h.jsx(wN,{password:c,repeatPassword:d}),h.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[h.jsx("button",{className:"button tertiary",disabled:E,onClick:x,children:"Update password"}),h.jsx("button",{className:"button danger",onClick:v,children:"Log out"})]})]})]})},[CN,fv]=un(!1),dv=()=>fv(!0),n1=()=>fv(!1),_N=n=>Zt({queryKey:["team-users"],queryFn:async()=>{const{data:l}=await je.get("/teams/"+n+"/users");return l.data},enabled:!!n}),NN=()=>gt({mutationFn:async({role:n,teamId:l,userId:i})=>(await je.patch("/teams/"+l+"/user-role",{role:n,userId:i}),!0),onSuccess:()=>{rt.invalidateQueries({queryKey:["team-users"]})}}),jN=()=>gt({mutationFn:async({teamId:n,userId:l})=>(await je.delete("/teams/"+n,{params:{userId:l}}),!0),onSuccess:()=>{rt.invalidateQueries({queryKey:["team-users"]})}}),TN="_user-entry_iaoco_2",AN="_select-container_iaoco_2",a1={userEntry:TN,selectContainer:AN},RN=()=>{const n=CN(),{data:l}=qn(),{data:i}=_N(l?.teamId),{mutate:r,isPending:u}=x4(),{mutate:c,isPending:d}=NN(),{mutate:m,isPending:p}=jN(),[y,{change:v,reset:x}]=Ur({password:"",username:""}),E=()=>{r({username:y.username,password:y.password,teamId:l?.teamId||""}),x()},j=(T,_)=>{c({teamId:l.teamId,role:_,userId:T})},w=T=>{Cg("Are you sure you want to remove this user?").then(_=>{_&&m({userId:T,teamId:l.teamId})})},C=Lr(Gt.ADMIN),N=u||d||p;return h.jsxs(cn,{isVisible:n,onClose:n1,backdropClose:!0,children:[h.jsx(aa,{onClick:n1}),h.jsxs("div",{className:"w-full lg:w-lg flex flex-col overflow-hidden",children:[h.jsx(Eg,{children:"Manage users"}),Ma(i?.length,0)&&h.jsx("div",{className:"mt-4 overflow-y-auto flex-1",children:i.map(T=>h.jsxs("div",{className:a1.userEntry,children:[h.jsx("div",{className:a1.selectContainer,children:h.jsxs("select",{value:T.role,disabled:!C||N,onChange:_=>j(T.id,_.currentTarget.value),children:[h.jsx("option",{value:Gt.OWNER,children:"Owner"}),h.jsx("option",{value:Gt.ADMIN,children:"Admin"}),h.jsx("option",{value:Gt.EDITOR,children:"Editor"}),h.jsx("option",{value:Gt.READ_ONLY,children:"Reader"})]})}),h.jsx("p",{className:"flex-1 mx-2",children:T.name}),C&&h.jsx("button",{className:"p-1 cursor-pointer text-red-500 text-sm",onClick:()=>w(T.id),children:"❌"})]},T.id))}),C&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold",children:"Create new user"}),h.jsxs("div",{className:"flex flex-col lg:flex-row gap-2 lg:items-center mt-2",children:[h.jsx("input",{className:"input flex-1",onChange:v("username"),value:y.username,placeholder:"Username",disabled:N}),h.jsx("input",{className:"input",onChange:v("password"),value:y.password,type:"password",name:"newPassword",autoComplete:"new-password",placeholder:"Password",disabled:N}),h.jsx("button",{className:"button primary",onClick:E,disabled:N,children:"Create user"})]}),h.jsx("p",{className:"text-xs mt-1 text-gray-600",children:"You should create default password for the new account. The user should change it after the first login."})]})]})]})},ON=()=>{const[n,l]=b.useState(""),[i,r]=b.useState(""),[u,c]=b.useState(),[d,m]=b.useState(!1),p=wt(),y=v=>{v.preventDefault(),c(void 0),Or.login({password:i,username:n}).then(()=>{p("/",{replace:!0})}).catch(c)};return h.jsx("div",{className:"page-container bg-(--bg) h-screen",children:h.jsx("div",{className:"page-content items-center",children:h.jsxs("form",{className:"flex flex-col gap-2 w-full lg:w-lg",onSubmit:y,children:[h.jsx("p",{className:"font-semibold text-xl min-w-md",children:"Login"}),u&&h.jsx(Ot,{variant:"danger",children:"Failed to login. Please verify your credentials"}),h.jsx("input",{value:n,onChange:v=>l(v.currentTarget.value),className:"input",placeholder:"User name"}),h.jsx("input",{value:i,onChange:v=>r(v.currentTarget.value),className:"input",type:"password",placeholder:"Password"}),h.jsx("button",{type:"submit",className:"button primary",children:"Login"}),d?h.jsxs(Ot,{className:"w-full border border-blue-500",children:[h.jsx("p",{children:"If this is your first login, the default credentials are:"}),h.jsxs("ul",{className:"mt-2",children:[h.jsxs("li",{children:["Username: ",h.jsx("strong",{children:"admin"})]}),h.jsxs("li",{children:["Password: ",h.jsx("strong",{children:"admin"})]})]}),h.jsx("p",{className:"mt-2",children:"Please make sure to change the default password to a secure one."})]}):h.jsx("button",{className:"button tertiary",onClick:()=>m(!0),children:"First login?"})]})})})},MN=()=>{const n=wt(),{pathname:l}=qt(),{data:i,isLoading:r}=pg();b.useEffect(()=>{!i&&!r&&l!==$e.login.path&&n($e.login.path)},[i,r,n,l])},DN=()=>{const[n]=Px(),l=wt(),i=ui(),r=n.get("shareId");return b.useEffect(()=>{r&&i.mutateAsync({queryId:r}).then(u=>{l(`${$e.workbench.path}/tab/${u.id}`,{replace:!0})})},[r]),h.jsxs("div",{className:"page-container flex items-center justify-center h-screen",children:[i.isPending&&h.jsxs("div",{className:"flex items-center flex-col gap-2",children:[h.jsx(sv,{}),h.jsx("p",{children:"Fetching query information"})]}),i.isError&&h.jsx(Ot,{variant:"danger",children:"Failed to load query information"})]})},LN="_container_1g6ko_2",UN="_header_1g6ko_2",kN="_close-button_1g6ko_2",zN="_tab-container_1g6ko_2",qN="_tab-name_1g6ko_2",BN="_archived-badge_1g6ko_2 _badge_1g6ko_2",HN="_active-badge_1g6ko_2 _badge_1g6ko_2",QN="_action-blue_1g6ko_2 _action_1g6ko_2",$N="_action-red_1g6ko_2 _action_1g6ko_2",YN="_load-more-btn_1g6ko_2",Jn={container:LN,header:UN,closeButton:kN,tabContainer:zN,tabName:qN,archivedBadge:BN,activeBadge:HN,actionBlue:QN,actionRed:$N,loadMoreBtn:YN},VN=new Intl.DateTimeFormat,KN=()=>{const{data:n}=qn(),{data:l,fetchNextPage:i,hasNextPage:r,isFetching:u}=f4(n?.teamId,25),c=wt(),d=xg(),m=rE(),p=x=>{d.mutate(x),Js({show:!1}),c(`${$e.workbench.path}/tab/${x}`)},y=x=>{m.mutate(x)},v=l&&l?.length>0;return h.jsxs("div",{className:Jn.container,children:[h.jsxs("div",{className:Jn.header,children:[h.jsx("h3",{className:"text-lg",children:"Tabs history"}),h.jsx("button",{className:Jn.closeButton,onClick:()=>Js({show:!1}),children:h.jsx(ts,{width:24,height:24})})]}),!v&&h.jsx(Ot,{variant:"warning",children:"History is empty."}),l?.map(x=>h.jsxs("div",{className:Jn.tabContainer,children:[h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsx("p",{className:Jn.tabName,children:x.name}),x.dataSourceType&&h.jsx(ci,{size:16,type:x.dataSourceType}),h.jsx("p",{className:"text-sm",children:x.dataSourceName})]}),h.jsxs("div",{className:"flex gap-2 items-center mt-1",children:[h.jsx("p",{className:"text-sm italic",children:VN.format(new Date(x.updatedAt))}),x.archived?h.jsx("span",{className:Jn.archivedBadge,children:"Archived"}):h.jsx("span",{className:Jn.activeBadge,children:"Active"}),h.jsx("span",{className:"flex-1"}),h.jsx("button",{onClick:()=>p(x.id),className:Jn.actionBlue,children:"Open"}),h.jsx("button",{onClick:()=>y(x.id),className:Jn.actionRed,children:"Delete"})]})]},x.id)),r&&!u&&h.jsx("div",{className:"flex justify-center my-2",children:h.jsx("button",{className:Jn.loadMoreBtn,onClick:()=>i(),children:"Load more"})})]})},GN=()=>{const n=DE(l=>l.show);return h.jsx(rv,{isVisible:n,onClose:()=>Js({show:!1}),backdropClose:!0,children:h.jsx(KN,{})})};function FN(){return bN(),xN(),MN(),h.jsxs(h.Fragment,{children:[h.jsxs(xx,{children:[h.jsx(yr,{path:$e.home.path,element:h.jsx(BE,{})}),h.jsx(yr,{path:`${$e.workbench.path}/tab/:id`,element:h.jsx(D5,{})}),h.jsx(yr,{path:$e.login.path,element:h.jsx(ON,{})}),h.jsx(yr,{path:$e.share.path,element:h.jsx(DN,{})})]}),h.jsx(JE,{}),h.jsx(r6,{}),h.jsx(x6,{}),h.jsx(lN,{}),h.jsx(vN,{}),h.jsx(EN,{}),h.jsx(RN,{}),h.jsx(GN,{}),h.jsx(p6,{}),h.jsx(c6,{})]})}const XN="_desktop-layout_cnn2p_2",ZN="_mobile-layout_cnn2p_2",PN="_nav_cnn2p_2",JN="_main_cnn2p_2",IN="_header_cnn2p_2",ei={desktopLayout:XN,mobileLayout:ZN,nav:PN,main:JN,header:IN},WN="_container_1h11m_2",e8="_menu_1h11m_2",dh={container:WN,menu:e8},t8=({name:n,id:l,onRename:i,onDelete:r,onOpen:u})=>{const c=Ag();return h.jsxs("button",{className:dh.menu,onContextMenu:c.open,onClick:()=>u(l),children:[h.jsx(Rg,{handler:c,children:h.jsxs("div",{className:"context-menu-container",children:[h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),c.close(),i(l)},className:"context-menu-item",children:"✏️ Rename"}),h.jsx("button",{onClick:d=>{d.preventDefault(),d.stopPropagation(),c.close(),r(l)},className:"context-menu-item",children:"🗑️ Delete"})]})}),h.jsxs("span",{children:["📖 ",n]})]})},n8=({dataSource:n,index:l})=>{const i=()=>{Ps(n.id)};return Dn(l.toString(),()=>{Ps(r=>{if(r!==n.id)return n.id})}),h.jsxs("button",{className:dh.menu,onClick:i,children:[h.jsx(ci,{size:20,type:n.dbType}),h.jsx("p",{className:"truncate flex-1 text-left mx-1.5",children:n.name}),h.jsx("span",{className:"hotkey",children:l})]})},a8=()=>{const n=wt(),{data:l}=qn(),{data:i}=r4(l?.teamId),{data:r}=o4(l?.teamId),u=ui(),c=MC(),d=OC(),m=v=>{u.mutateAsync({queryId:v}).then(x=>{n(`${$e.workbench.path}/tab/${x.id}`)})},p=async v=>{const x=r?.find(j=>j.id===v);if(!x)return;const E=await kr("New name?",x?.name);E&&c.mutate({id:x.savedQueryId,payload:{name:E}})},y=v=>{const x=r?.find(E=>E.id===v)?.savedQueryId;x&&d.mutate(x)};return h.jsx("div",{className:dh.container,children:h.jsxs("div",{className:"flex-1 overflow-y-auto",children:[Ma(i?.length,0)&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold text-sm text-gray-600 mb-2",children:"DATA SOURCES"}),i.map((v,x)=>h.jsx(n8,{dataSource:v,index:x+1},v.id))]}),Ma(r?.length,0)&&h.jsxs("div",{className:"mt-4",children:[h.jsx("p",{className:"font-semibold text-sm text-gray-600 mb-2",children:"SAVED QUERIES"}),r.map(v=>h.jsx(t8,{onDelete:y,onRename:p,onOpen:m,name:v.name,id:v.id},v.savedQueryId))]})]})})},l8=()=>{const n=wt(),{pathname:l}=qt(),{data:i}=qn(),r=Dr("Desktop nav"),u=()=>{iv(),l!==$e.home.path&&n($e.home.path)},c=()=>Js({show:!0});return h.jsxs("nav",{className:ei.nav,children:[i&&h.jsxs("div",{className:ei.header,children:[h.jsx("button",{onClick:u,className:"flex justify-between items-center",children:h.jsx("span",{children:"🏠 Home"})}),h.jsxs("button",{onClick:r,className:"flex justify-between items-center",children:[h.jsx("span",{children:"🔎 New query"}),h.jsx("span",{className:"hotkey",children:"N"})]}),h.jsxs("button",{onClick:c,className:"flex justify-between items-center",children:[h.jsx("span",{children:"⌛ Recent tabs"}),h.jsx("span",{className:"hotkey",children:"H"})]}),h.jsxs("button",{onClick:cv,children:["🪪 ",i.username]}),h.jsx("button",{onClick:dv,children:"👥 Manage users"})]}),h.jsx(a8,{})]})},s8="_root_428rt_2",i8={root:s8},r8=()=>{const{pathname:n}=qt(),l=wt(),i=Dr("Mobile nav"),r=()=>{n!==$e.home.path&&l($e.home.path)};return h.jsxs("div",{className:i8.root,children:[h.jsxs("button",{onClick:r,children:[h.jsx("p",{children:"🏠"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Home"})]}),h.jsxs("button",{onClick:i,children:[h.jsx("p",{children:"🔎"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"New query"})]}),h.jsxs("button",{onClick:cv,children:[h.jsx("p",{children:"🪪"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Account"})]}),h.jsxs("button",{onClick:dv,children:[h.jsx("p",{children:"👥"}),h.jsx("p",{className:"text-xs font-semibold text-gray-600",children:"Users"})]})]})},o8=({children:n,isLogin:l})=>h.jsxs("div",{className:ei.desktopLayout,children:[h.jsx(wu,{id:"default",className:"z-100"}),h.jsx(wu,{id:"default-xs",className:"z-100 text-xs!"}),!l&&h.jsx(l8,{}),h.jsx("main",{className:ei.main,children:n})]}),u8=({children:n,isLogin:l})=>h.jsxs("div",{className:ei.mobileLayout,children:[h.jsx("main",{className:ei.main,children:n}),!l&&h.jsx(r8,{})]}),c8=({children:n})=>{const l=Ng(nh.laptop),{pathname:i}=qt(),r=i===$e.login.path;return l?h.jsx(o8,{isLogin:r,children:n}):h.jsx(u8,{isLogin:r,children:n})};T2.createRoot(document.getElementById("root")).render(h.jsxs(fl.StrictMode,{children:[h.jsx(l4,{}),h.jsx(NS,{client:rt,children:h.jsx(Kx,{children:h.jsx(c8,{children:h.jsx(FN,{})})})})]}));