const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Fonctionnalites-BrJAZjBK.js","assets/badge-DbKw4c92.js","assets/bell-_i_t2Pdz.js","assets/tabs-BXk3Ubp5.js","assets/triangle-alert-BTo7iYzS.js","assets/calendar-D-lE_7Xv.js","assets/card-P5wp8txs.js","assets/plane-DpEadO59.js","assets/external-link-d_50q_qG.js","assets/building-2-BHhmeRSe.js","assets/users-CboAA-Jb.js","assets/QuickAnswer-Bi4QwWFm.js","assets/Tarifs-WQOmZRy7.js","assets/label-BdjpXo10.js","assets/slider-D4pOXnd_.js","assets/index-BdQq_4o_.js","assets/refresh-cw-Bd6AGOI-.js","assets/FAQ-D-JHoFPq.js","assets/Contact-CwHusd9N.js","assets/checkbox-DbXTD2iO.js","assets/arrow-left-DDOSTBUa.js","assets/briefcase-B3TnR2cd.js","assets/bruno-verplancken-ceo-BOVAfWXp.js","assets/Demo-jVIFJ71p.js","assets/select-Dw_Nvl-D.js","assets/circle-alert-Cr6vh1fr.js","assets/Auth-BIiqteH7.js","assets/Admin-B4DFFZPK.js","assets/APropos-DTigiQF5.js","assets/Blog-CGKLqvMp.js","assets/BlogArticle-Bk1r9l5n.js","assets/NewsletterUnsubscribe-BsUzlZ1W.js","assets/NewsletterConfirm-Qk-6d6B-.js"])))=>i.map(i=>d[i]);
var p1=Object.defineProperty;var rp=e=>{throw TypeError(e)};var m1=(e,t,r)=>t in e?p1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var wr=(e,t,r)=>m1(e,typeof t!="symbol"?t+"":t,r),Ac=(e,t,r)=>t.has(e)||rp("Cannot "+r);var A=(e,t,r)=>(Ac(e,t,"read from private field"),r?r.call(e):t.get(e)),se=(e,t,r)=>t.has(e)?rp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Q=(e,t,r,n)=>(Ac(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ve=(e,t,r)=>(Ac(e,t,"access private method"),r);var ta=(e,t,r,n)=>({set _(s){Q(e,t,s,r)},get _(){return A(e,t,n)}});function g1(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var ZL=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ui(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zg={exports:{}},Dl={},ev={exports:{}},re={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Fi=Symbol.for("react.element"),v1=Symbol.for("react.portal"),y1=Symbol.for("react.fragment"),w1=Symbol.for("react.strict_mode"),x1=Symbol.for("react.profiler"),b1=Symbol.for("react.provider"),_1=Symbol.for("react.context"),S1=Symbol.for("react.forward_ref"),E1=Symbol.for("react.suspense"),k1=Symbol.for("react.memo"),C1=Symbol.for("react.lazy"),np=Symbol.iterator;function T1(e){return e===null||typeof e!="object"?null:(e=np&&e[np]||e["@@iterator"],typeof e=="function"?e:null)}var tv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rv=Object.assign,nv={};function go(e,t,r){this.props=e,this.context=t,this.refs=nv,this.updater=r||tv}go.prototype.isReactComponent={};go.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};go.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sv(){}sv.prototype=go.prototype;function df(e,t,r){this.props=e,this.context=t,this.refs=nv,this.updater=r||tv}var ff=df.prototype=new sv;ff.constructor=df;rv(ff,go.prototype);ff.isPureReactComponent=!0;var sp=Array.isArray,ov=Object.prototype.hasOwnProperty,hf={current:null},iv={key:!0,ref:!0,__self:!0,__source:!0};function av(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)ov.call(t,n)&&!iv.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:Fi,type:e,key:o,ref:i,props:s,_owner:hf.current}}function P1(e,t){return{$$typeof:Fi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function pf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fi}function A1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var op=/\/+/g;function Rc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?A1(""+e.key):t.toString(36)}function Oa(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Fi:case v1:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+Rc(i,0):n,sp(s)?(r="",e!=null&&(r=e.replace(op,"$&/")+"/"),Oa(s,t,r,"",function(c){return c})):s!=null&&(pf(s)&&(s=P1(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(op,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",sp(e))for(var a=0;a<e.length;a++){o=e[a];var l=n+Rc(o,a);i+=Oa(o,t,r,l,s)}else if(l=T1(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=n+Rc(o,a++),i+=Oa(o,t,r,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ra(e,t,r){if(e==null)return e;var n=[],s=0;return Oa(e,n,"","",function(o){return t.call(r,o,s++)}),n}function R1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var tt={current:null},Ia={transition:null},j1={ReactCurrentDispatcher:tt,ReactCurrentBatchConfig:Ia,ReactCurrentOwner:hf};function lv(){throw Error("act(...) is not supported in production builds of React.")}re.Children={map:ra,forEach:function(e,t,r){ra(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ra(e,function(){t++}),t},toArray:function(e){return ra(e,function(t){return t})||[]},only:function(e){if(!pf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=go;re.Fragment=y1;re.Profiler=x1;re.PureComponent=df;re.StrictMode=w1;re.Suspense=E1;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j1;re.act=lv;re.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=rv({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=hf.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)ov.call(t,l)&&!iv.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:Fi,type:e.type,key:s,ref:o,props:n,_owner:i}};re.createContext=function(e){return e={$$typeof:_1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:b1,_context:e},e.Consumer=e};re.createElement=av;re.createFactory=function(e){var t=av.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:S1,render:e}};re.isValidElement=pf;re.lazy=function(e){return{$$typeof:C1,_payload:{_status:-1,_result:e},_init:R1}};re.memo=function(e,t){return{$$typeof:k1,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=Ia.transition;Ia.transition={};try{e()}finally{Ia.transition=t}};re.unstable_act=lv;re.useCallback=function(e,t){return tt.current.useCallback(e,t)};re.useContext=function(e){return tt.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return tt.current.useDeferredValue(e)};re.useEffect=function(e,t){return tt.current.useEffect(e,t)};re.useId=function(){return tt.current.useId()};re.useImperativeHandle=function(e,t,r){return tt.current.useImperativeHandle(e,t,r)};re.useInsertionEffect=function(e,t){return tt.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return tt.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return tt.current.useMemo(e,t)};re.useReducer=function(e,t,r){return tt.current.useReducer(e,t,r)};re.useRef=function(e){return tt.current.useRef(e)};re.useState=function(e){return tt.current.useState(e)};re.useSyncExternalStore=function(e,t,r){return tt.current.useSyncExternalStore(e,t,r)};re.useTransition=function(){return tt.current.useTransition()};re.version="18.3.1";ev.exports=re;var m=ev.exports;const R=Ui(m),mf=g1({__proto__:null,default:R},[m]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var N1=m,O1=Symbol.for("react.element"),I1=Symbol.for("react.fragment"),L1=Object.prototype.hasOwnProperty,M1=N1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D1={key:!0,ref:!0,__self:!0,__source:!0};function cv(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)L1.call(t,n)&&!D1.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:O1,type:e,key:o,ref:i,props:s,_owner:M1.current}}Dl.Fragment=I1;Dl.jsx=cv;Dl.jsxs=cv;Zg.exports=Dl;var u=Zg.exports,uv={exports:{}},bt={},dv={exports:{}},fv={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(P,C){var I=P.length;P.push(C);e:for(;0<I;){var z=I-1>>>1,$=P[z];if(0<s($,C))P[z]=C,P[I]=$,I=z;else break e}}function r(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var C=P[0],I=P.pop();if(I!==C){P[0]=I;e:for(var z=0,$=P.length,J=$>>>1;z<J;){var Z=2*(z+1)-1,ge=P[Z],be=Z+1,te=P[be];if(0>s(ge,I))be<$&&0>s(te,ge)?(P[z]=te,P[be]=I,z=be):(P[z]=ge,P[Z]=I,z=Z);else if(be<$&&0>s(te,I))P[z]=te,P[be]=I,z=be;else break e}}return C}function s(P,C){var I=P.sortIndex-C.sortIndex;return I!==0?I:P.id-C.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],c=[],d=1,f=null,p=3,h=!1,x=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(P){for(var C=r(c);C!==null;){if(C.callback===null)n(c);else if(C.startTime<=P)n(c),C.sortIndex=C.expirationTime,t(l,C);else break;C=r(c)}}function _(P){if(g=!1,w(P),!x)if(r(l)!==null)x=!0,F(S);else{var C=r(c);C!==null&&q(_,C.startTime-P)}}function S(P,C){x=!1,g&&(g=!1,y(T),T=-1),h=!0;var I=p;try{for(w(C),f=r(l);f!==null&&(!(f.expirationTime>C)||P&&!V());){var z=f.callback;if(typeof z=="function"){f.callback=null,p=f.priorityLevel;var $=z(f.expirationTime<=C);C=e.unstable_now(),typeof $=="function"?f.callback=$:f===r(l)&&n(l),w(C)}else n(l);f=r(l)}if(f!==null)var J=!0;else{var Z=r(c);Z!==null&&q(_,Z.startTime-C),J=!1}return J}finally{f=null,p=I,h=!1}}var E=!1,k=null,T=-1,j=5,O=-1;function V(){return!(e.unstable_now()-O<j)}function M(){if(k!==null){var P=e.unstable_now();O=P;var C=!0;try{C=k(!0,P)}finally{C?K():(E=!1,k=null)}}else E=!1}var K;if(typeof v=="function")K=function(){v(M)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,X=L.port2;L.port1.onmessage=M,K=function(){X.postMessage(null)}}else K=function(){b(M,0)};function F(P){k=P,E||(E=!0,K())}function q(P,C){T=b(function(){P(e.unstable_now())},C)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){x||h||(x=!0,F(S))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(P){switch(p){case 1:case 2:case 3:var C=3;break;default:C=p}var I=p;p=C;try{return P()}finally{p=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,C){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var I=p;p=P;try{return C()}finally{p=I}},e.unstable_scheduleCallback=function(P,C,I){var z=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?z+I:z):I=z,P){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=I+$,P={id:d++,callback:C,priorityLevel:P,startTime:I,expirationTime:$,sortIndex:-1},I>z?(P.sortIndex=I,t(c,P),r(l)===null&&P===r(c)&&(g?(y(T),T=-1):g=!0,q(_,I-z))):(P.sortIndex=$,t(l,P),x||h||(x=!0,F(S))),P},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(P){var C=p;return function(){var I=p;p=C;try{return P.apply(this,arguments)}finally{p=I}}}})(fv);dv.exports=fv;var $1=dv.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var U1=m,wt=$1;function N(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var hv=new Set,ni={};function ns(e,t){io(e,t),io(e+"Capture",t)}function io(e,t){for(ni[e]=t,e=0;e<t.length;e++)hv.add(t[e])}var Rr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ou=Object.prototype.hasOwnProperty,F1=/^[: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]*$/,ip={},ap={};function z1(e){return Ou.call(ap,e)?!0:Ou.call(ip,e)?!1:F1.test(e)?ap[e]=!0:(ip[e]=!0,!1)}function B1(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function V1(e,t,r,n){if(t===null||typeof t>"u"||B1(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function rt(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Be[e]=new rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Be[t]=new rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Be[e]=new rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Be[e]=new rt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Be[e]=new rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Be[e]=new rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Be[e]=new rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Be[e]=new rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Be[e]=new rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var gf=/[\-:]([a-z])/g;function vf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(gf,vf);Be[t]=new rt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(gf,vf);Be[t]=new rt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(gf,vf);Be[t]=new rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Be[e]=new rt(e,1,!1,e.toLowerCase(),null,!1,!1)});Be.xlinkHref=new rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Be[e]=new rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function yf(e,t,r,n){var s=Be.hasOwnProperty(t)?Be[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(V1(t,r,s,n)&&(r=null),n||s===null?z1(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Mr=U1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,na=Symbol.for("react.element"),Ts=Symbol.for("react.portal"),Ps=Symbol.for("react.fragment"),wf=Symbol.for("react.strict_mode"),Iu=Symbol.for("react.profiler"),pv=Symbol.for("react.provider"),mv=Symbol.for("react.context"),xf=Symbol.for("react.forward_ref"),Lu=Symbol.for("react.suspense"),Mu=Symbol.for("react.suspense_list"),bf=Symbol.for("react.memo"),Qr=Symbol.for("react.lazy"),gv=Symbol.for("react.offscreen"),lp=Symbol.iterator;function To(e){return e===null||typeof e!="object"?null:(e=lp&&e[lp]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Object.assign,jc;function Uo(e){if(jc===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);jc=t&&t[1]||""}return`
`+jc+e}var Nc=!1;function Oc(e,t){if(!e||Nc)return"";Nc=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(`
`),o=n.stack.split(`
`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=`
`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Nc=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Uo(e):""}function H1(e){switch(e.tag){case 5:return Uo(e.type);case 16:return Uo("Lazy");case 13:return Uo("Suspense");case 19:return Uo("SuspenseList");case 0:case 2:case 15:return e=Oc(e.type,!1),e;case 11:return e=Oc(e.type.render,!1),e;case 1:return e=Oc(e.type,!0),e;default:return""}}function Du(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ps:return"Fragment";case Ts:return"Portal";case Iu:return"Profiler";case wf:return"StrictMode";case Lu:return"Suspense";case Mu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mv:return(e.displayName||"Context")+".Consumer";case pv:return(e._context.displayName||"Context")+".Provider";case xf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bf:return t=e.displayName||null,t!==null?t:Du(e.type)||"Memo";case Qr:t=e._payload,e=e._init;try{return Du(e(t))}catch{}}return null}function W1(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Du(t);case 8:return t===wf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function q1(e){var t=vv(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sa(e){e._valueTracker||(e._valueTracker=q1(e))}function yv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=vv(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Za(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $u(e,t){var r=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function cp(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=wn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wv(e,t){t=t.checked,t!=null&&yf(e,"checked",t,!1)}function Uu(e,t){wv(e,t);var r=wn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fu(e,t.type,r):t.hasOwnProperty("defaultValue")&&Fu(e,t.type,wn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function up(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Fu(e,t,r){(t!=="number"||Za(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Fo=Array.isArray;function Fs(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+wn(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function zu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return xe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function dp(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(N(92));if(Fo(r)){if(1<r.length)throw Error(N(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:wn(r)}}function xv(e,t){var r=wn(t.value),n=wn(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function fp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function bv(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Bu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?bv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var oa,_v=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(oa=oa||document.createElement("div"),oa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=oa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function si(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Wo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},K1=["Webkit","ms","Moz","O"];Object.keys(Wo).forEach(function(e){K1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wo[t]=Wo[e]})});function Sv(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Wo.hasOwnProperty(e)&&Wo[e]?(""+t).trim():t+"px"}function Ev(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Sv(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var G1=xe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Vu(e,t){if(t){if(G1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function Hu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Wu=null;function _f(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qu=null,zs=null,Bs=null;function hp(e){if(e=Vi(e)){if(typeof qu!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Bl(t),qu(e.stateNode,e.type,t))}}function kv(e){zs?Bs?Bs.push(e):Bs=[e]:zs=e}function Cv(){if(zs){var e=zs,t=Bs;if(Bs=zs=null,hp(e),t)for(e=0;e<t.length;e++)hp(t[e])}}function Tv(e,t){return e(t)}function Pv(){}var Ic=!1;function Av(e,t,r){if(Ic)return e(t,r);Ic=!0;try{return Tv(e,t,r)}finally{Ic=!1,(zs!==null||Bs!==null)&&(Pv(),Cv())}}function oi(e,t){var r=e.stateNode;if(r===null)return null;var n=Bl(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(N(231,t,typeof r));return r}var Ku=!1;if(Rr)try{var Po={};Object.defineProperty(Po,"passive",{get:function(){Ku=!0}}),window.addEventListener("test",Po,Po),window.removeEventListener("test",Po,Po)}catch{Ku=!1}function Q1(e,t,r,n,s,o,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var qo=!1,el=null,tl=!1,Gu=null,J1={onError:function(e){qo=!0,el=e}};function Y1(e,t,r,n,s,o,i,a,l){qo=!1,el=null,Q1.apply(J1,arguments)}function X1(e,t,r,n,s,o,i,a,l){if(Y1.apply(this,arguments),qo){if(qo){var c=el;qo=!1,el=null}else throw Error(N(198));tl||(tl=!0,Gu=c)}}function ss(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Rv(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 pp(e){if(ss(e)!==e)throw Error(N(188))}function Z1(e){var t=e.alternate;if(!t){if(t=ss(e),t===null)throw Error(N(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return pp(s),e;if(o===n)return pp(s),t;o=o.sibling}throw Error(N(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,a=s.child;a;){if(a===r){i=!0,r=s,n=o;break}if(a===n){i=!0,n=s,r=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===r){i=!0,r=o,n=s;break}if(a===n){i=!0,n=o,r=s;break}a=a.sibling}if(!i)throw Error(N(189))}}if(r.alternate!==n)throw Error(N(190))}if(r.tag!==3)throw Error(N(188));return r.stateNode.current===r?e:t}function jv(e){return e=Z1(e),e!==null?Nv(e):null}function Nv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Nv(e);if(t!==null)return t;e=e.sibling}return null}var Ov=wt.unstable_scheduleCallback,mp=wt.unstable_cancelCallback,e_=wt.unstable_shouldYield,t_=wt.unstable_requestPaint,Ce=wt.unstable_now,r_=wt.unstable_getCurrentPriorityLevel,Sf=wt.unstable_ImmediatePriority,Iv=wt.unstable_UserBlockingPriority,rl=wt.unstable_NormalPriority,n_=wt.unstable_LowPriority,Lv=wt.unstable_IdlePriority,$l=null,ur=null;function s_(e){if(ur&&typeof ur.onCommitFiberRoot=="function")try{ur.onCommitFiberRoot($l,e,void 0,(e.current.flags&128)===128)}catch{}}var Gt=Math.clz32?Math.clz32:a_,o_=Math.log,i_=Math.LN2;function a_(e){return e>>>=0,e===0?32:31-(o_(e)/i_|0)|0}var ia=64,aa=4194304;function zo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nl(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=zo(a):(o&=i,o!==0&&(n=zo(o)))}else i=r&~s,i!==0?n=zo(i):o!==0&&(n=zo(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Gt(t),s=1<<r,n|=e[r],t&=~s;return n}function l_(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function c_(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Gt(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=l_(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Qu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Mv(){var e=ia;return ia<<=1,!(ia&4194240)&&(ia=64),e}function Lc(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function zi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Gt(t),e[t]=r}function u_(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Gt(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function Ef(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Gt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ie=0;function Dv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var $v,kf,Uv,Fv,zv,Ju=!1,la=[],un=null,dn=null,fn=null,ii=new Map,ai=new Map,Xr=[],d_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function gp(e,t){switch(e){case"focusin":case"focusout":un=null;break;case"dragenter":case"dragleave":dn=null;break;case"mouseover":case"mouseout":fn=null;break;case"pointerover":case"pointerout":ii.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ai.delete(t.pointerId)}}function Ao(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Vi(t),t!==null&&kf(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function f_(e,t,r,n,s){switch(t){case"focusin":return un=Ao(un,e,t,r,n,s),!0;case"dragenter":return dn=Ao(dn,e,t,r,n,s),!0;case"mouseover":return fn=Ao(fn,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return ii.set(o,Ao(ii.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,ai.set(o,Ao(ai.get(o)||null,e,t,r,n,s)),!0}return!1}function Bv(e){var t=$n(e.target);if(t!==null){var r=ss(t);if(r!==null){if(t=r.tag,t===13){if(t=Rv(r),t!==null){e.blockedOn=t,zv(e.priority,function(){Uv(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function La(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Yu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Wu=n,r.target.dispatchEvent(n),Wu=null}else return t=Vi(r),t!==null&&kf(t),e.blockedOn=r,!1;t.shift()}return!0}function vp(e,t,r){La(e)&&r.delete(t)}function h_(){Ju=!1,un!==null&&La(un)&&(un=null),dn!==null&&La(dn)&&(dn=null),fn!==null&&La(fn)&&(fn=null),ii.forEach(vp),ai.forEach(vp)}function Ro(e,t){e.blockedOn===t&&(e.blockedOn=null,Ju||(Ju=!0,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,h_)))}function li(e){function t(s){return Ro(s,e)}if(0<la.length){Ro(la[0],e);for(var r=1;r<la.length;r++){var n=la[r];n.blockedOn===e&&(n.blockedOn=null)}}for(un!==null&&Ro(un,e),dn!==null&&Ro(dn,e),fn!==null&&Ro(fn,e),ii.forEach(t),ai.forEach(t),r=0;r<Xr.length;r++)n=Xr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Xr.length&&(r=Xr[0],r.blockedOn===null);)Bv(r),r.blockedOn===null&&Xr.shift()}var Vs=Mr.ReactCurrentBatchConfig,sl=!0;function p_(e,t,r,n){var s=ie,o=Vs.transition;Vs.transition=null;try{ie=1,Cf(e,t,r,n)}finally{ie=s,Vs.transition=o}}function m_(e,t,r,n){var s=ie,o=Vs.transition;Vs.transition=null;try{ie=4,Cf(e,t,r,n)}finally{ie=s,Vs.transition=o}}function Cf(e,t,r,n){if(sl){var s=Yu(e,t,r,n);if(s===null)Wc(e,t,n,ol,r),gp(e,n);else if(f_(s,e,t,r,n))n.stopPropagation();else if(gp(e,n),t&4&&-1<d_.indexOf(e)){for(;s!==null;){var o=Vi(s);if(o!==null&&$v(o),o=Yu(e,t,r,n),o===null&&Wc(e,t,n,ol,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else Wc(e,t,n,null,r)}}var ol=null;function Yu(e,t,r,n){if(ol=null,e=_f(n),e=$n(e),e!==null)if(t=ss(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Rv(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ol=e,null}function Vv(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(r_()){case Sf:return 1;case Iv:return 4;case rl:case n_:return 16;case Lv:return 536870912;default:return 16}default:return 16}}var an=null,Tf=null,Ma=null;function Hv(){if(Ma)return Ma;var e,t=Tf,r=t.length,n,s="value"in an?an.value:an.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return Ma=s.slice(e,1<n?1-n:void 0)}function Da(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 ca(){return!0}function yp(){return!1}function _t(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ca:yp,this.isPropagationStopped=yp,this}return xe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ca)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ca)},persist:function(){},isPersistent:ca}),t}var vo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pf=_t(vo),Bi=xe({},vo,{view:0,detail:0}),g_=_t(Bi),Mc,Dc,jo,Ul=xe({},Bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Af,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!==jo&&(jo&&e.type==="mousemove"?(Mc=e.screenX-jo.screenX,Dc=e.screenY-jo.screenY):Dc=Mc=0,jo=e),Mc)},movementY:function(e){return"movementY"in e?e.movementY:Dc}}),wp=_t(Ul),v_=xe({},Ul,{dataTransfer:0}),y_=_t(v_),w_=xe({},Bi,{relatedTarget:0}),$c=_t(w_),x_=xe({},vo,{animationName:0,elapsedTime:0,pseudoElement:0}),b_=_t(x_),__=xe({},vo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S_=_t(__),E_=xe({},vo,{data:0}),xp=_t(E_),k_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},C_={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"},T_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function P_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=T_[e])?!!t[e]:!1}function Af(){return P_}var A_=xe({},Bi,{key:function(e){if(e.key){var t=k_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Da(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?C_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Af,charCode:function(e){return e.type==="keypress"?Da(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Da(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),R_=_t(A_),j_=xe({},Ul,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bp=_t(j_),N_=xe({},Bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Af}),O_=_t(N_),I_=xe({},vo,{propertyName:0,elapsedTime:0,pseudoElement:0}),L_=_t(I_),M_=xe({},Ul,{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}),D_=_t(M_),$_=[9,13,27,32],Rf=Rr&&"CompositionEvent"in window,Ko=null;Rr&&"documentMode"in document&&(Ko=document.documentMode);var U_=Rr&&"TextEvent"in window&&!Ko,Wv=Rr&&(!Rf||Ko&&8<Ko&&11>=Ko),_p=" ",Sp=!1;function qv(e,t){switch(e){case"keyup":return $_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var As=!1;function F_(e,t){switch(e){case"compositionend":return Kv(t);case"keypress":return t.which!==32?null:(Sp=!0,_p);case"textInput":return e=t.data,e===_p&&Sp?null:e;default:return null}}function z_(e,t){if(As)return e==="compositionend"||!Rf&&qv(e,t)?(e=Hv(),Ma=Tf=an=null,As=!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 Wv&&t.locale!=="ko"?null:t.data;default:return null}}var B_={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 Ep(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!B_[e.type]:t==="textarea"}function Gv(e,t,r,n){kv(n),t=il(t,"onChange"),0<t.length&&(r=new Pf("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Go=null,ci=null;function V_(e){oy(e,0)}function Fl(e){var t=Ns(e);if(yv(t))return e}function H_(e,t){if(e==="change")return t}var Qv=!1;if(Rr){var Uc;if(Rr){var Fc="oninput"in document;if(!Fc){var kp=document.createElement("div");kp.setAttribute("oninput","return;"),Fc=typeof kp.oninput=="function"}Uc=Fc}else Uc=!1;Qv=Uc&&(!document.documentMode||9<document.documentMode)}function Cp(){Go&&(Go.detachEvent("onpropertychange",Jv),ci=Go=null)}function Jv(e){if(e.propertyName==="value"&&Fl(ci)){var t=[];Gv(t,ci,e,_f(e)),Av(V_,t)}}function W_(e,t,r){e==="focusin"?(Cp(),Go=t,ci=r,Go.attachEvent("onpropertychange",Jv)):e==="focusout"&&Cp()}function q_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fl(ci)}function K_(e,t){if(e==="click")return Fl(t)}function G_(e,t){if(e==="input"||e==="change")return Fl(t)}function Q_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:Q_;function ui(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Ou.call(t,s)||!Jt(e[s],t[s]))return!1}return!0}function Tp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pp(e,t){var r=Tp(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Tp(r)}}function Yv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xv(){for(var e=window,t=Za();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Za(e.document)}return t}function jf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function J_(e){var t=Xv(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Yv(r.ownerDocument.documentElement,r)){if(n!==null&&jf(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=Pp(r,o);var i=Pp(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Y_=Rr&&"documentMode"in document&&11>=document.documentMode,Rs=null,Xu=null,Qo=null,Zu=!1;function Ap(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Zu||Rs==null||Rs!==Za(n)||(n=Rs,"selectionStart"in n&&jf(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Qo&&ui(Qo,n)||(Qo=n,n=il(Xu,"onSelect"),0<n.length&&(t=new Pf("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Rs)))}function ua(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var js={animationend:ua("Animation","AnimationEnd"),animationiteration:ua("Animation","AnimationIteration"),animationstart:ua("Animation","AnimationStart"),transitionend:ua("Transition","TransitionEnd")},zc={},Zv={};Rr&&(Zv=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function zl(e){if(zc[e])return zc[e];if(!js[e])return e;var t=js[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Zv)return zc[e]=t[r];return e}var ey=zl("animationend"),ty=zl("animationiteration"),ry=zl("animationstart"),ny=zl("transitionend"),sy=new Map,Rp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Sn(e,t){sy.set(e,t),ns(t,[e])}for(var Bc=0;Bc<Rp.length;Bc++){var Vc=Rp[Bc],X_=Vc.toLowerCase(),Z_=Vc[0].toUpperCase()+Vc.slice(1);Sn(X_,"on"+Z_)}Sn(ey,"onAnimationEnd");Sn(ty,"onAnimationIteration");Sn(ry,"onAnimationStart");Sn("dblclick","onDoubleClick");Sn("focusin","onFocus");Sn("focusout","onBlur");Sn(ny,"onTransitionEnd");io("onMouseEnter",["mouseout","mouseover"]);io("onMouseLeave",["mouseout","mouseover"]);io("onPointerEnter",["pointerout","pointerover"]);io("onPointerLeave",["pointerout","pointerover"]);ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ns("onBeforeInput",["compositionend","keypress","textInput","paste"]);ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bo="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(" "),eS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Bo));function jp(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,X1(n,t,void 0,e),e.currentTarget=null}function oy(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;jp(s,a,c),o=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;jp(s,a,c),o=l}}}if(tl)throw e=Gu,tl=!1,Gu=null,e}function fe(e,t){var r=t[sd];r===void 0&&(r=t[sd]=new Set);var n=e+"__bubble";r.has(n)||(iy(t,e,2,!1),r.add(n))}function Hc(e,t,r){var n=0;t&&(n|=4),iy(r,e,n,t)}var da="_reactListening"+Math.random().toString(36).slice(2);function di(e){if(!e[da]){e[da]=!0,hv.forEach(function(r){r!=="selectionchange"&&(eS.has(r)||Hc(r,!1,e),Hc(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[da]||(t[da]=!0,Hc("selectionchange",!1,t))}}function iy(e,t,r,n){switch(Vv(t)){case 1:var s=p_;break;case 4:s=m_;break;default:s=Cf}r=s.bind(null,t,r,e),s=void 0,!Ku||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function Wc(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=$n(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}Av(function(){var c=o,d=_f(r),f=[];e:{var p=sy.get(e);if(p!==void 0){var h=Pf,x=e;switch(e){case"keypress":if(Da(r)===0)break e;case"keydown":case"keyup":h=R_;break;case"focusin":x="focus",h=$c;break;case"focusout":x="blur",h=$c;break;case"beforeblur":case"afterblur":h=$c;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=wp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=y_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=O_;break;case ey:case ty:case ry:h=b_;break;case ny:h=L_;break;case"scroll":h=g_;break;case"wheel":h=D_;break;case"copy":case"cut":case"paste":h=S_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=bp}var g=(t&4)!==0,b=!g&&e==="scroll",y=g?p!==null?p+"Capture":null:p;g=[];for(var v=c,w;v!==null;){w=v;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,y!==null&&(_=oi(v,y),_!=null&&g.push(fi(v,_,w)))),b)break;v=v.return}0<g.length&&(p=new h(p,x,null,r,d),f.push({event:p,listeners:g}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&r!==Wu&&(x=r.relatedTarget||r.fromElement)&&($n(x)||x[jr]))break e;if((h||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(x=r.relatedTarget||r.toElement,h=c,x=x?$n(x):null,x!==null&&(b=ss(x),x!==b||x.tag!==5&&x.tag!==6)&&(x=null)):(h=null,x=c),h!==x)){if(g=wp,_="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(g=bp,_="onPointerLeave",y="onPointerEnter",v="pointer"),b=h==null?p:Ns(h),w=x==null?p:Ns(x),p=new g(_,v+"leave",h,r,d),p.target=b,p.relatedTarget=w,_=null,$n(d)===c&&(g=new g(y,v+"enter",x,r,d),g.target=w,g.relatedTarget=b,_=g),b=_,h&&x)t:{for(g=h,y=x,v=0,w=g;w;w=hs(w))v++;for(w=0,_=y;_;_=hs(_))w++;for(;0<v-w;)g=hs(g),v--;for(;0<w-v;)y=hs(y),w--;for(;v--;){if(g===y||y!==null&&g===y.alternate)break t;g=hs(g),y=hs(y)}g=null}else g=null;h!==null&&Np(f,p,h,g,!1),x!==null&&b!==null&&Np(f,b,x,g,!0)}}e:{if(p=c?Ns(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var S=H_;else if(Ep(p))if(Qv)S=G_;else{S=q_;var E=W_}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(S=K_);if(S&&(S=S(e,c))){Gv(f,S,r,d);break e}E&&E(e,p,c),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&Fu(p,"number",p.value)}switch(E=c?Ns(c):window,e){case"focusin":(Ep(E)||E.contentEditable==="true")&&(Rs=E,Xu=c,Qo=null);break;case"focusout":Qo=Xu=Rs=null;break;case"mousedown":Zu=!0;break;case"contextmenu":case"mouseup":case"dragend":Zu=!1,Ap(f,r,d);break;case"selectionchange":if(Y_)break;case"keydown":case"keyup":Ap(f,r,d)}var k;if(Rf)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else As?qv(e,r)&&(T="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(Wv&&r.locale!=="ko"&&(As||T!=="onCompositionStart"?T==="onCompositionEnd"&&As&&(k=Hv()):(an=d,Tf="value"in an?an.value:an.textContent,As=!0)),E=il(c,T),0<E.length&&(T=new xp(T,e,null,r,d),f.push({event:T,listeners:E}),k?T.data=k:(k=Kv(r),k!==null&&(T.data=k)))),(k=U_?F_(e,r):z_(e,r))&&(c=il(c,"onBeforeInput"),0<c.length&&(d=new xp("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:c}),d.data=k))}oy(f,t)})}function fi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function il(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=oi(e,r),o!=null&&n.unshift(fi(e,o,s)),o=oi(e,t),o!=null&&n.push(fi(e,o,s))),e=e.return}return n}function hs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Np(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,s?(l=oi(r,o),l!=null&&i.unshift(fi(r,l,a))):s||(l=oi(r,o),l!=null&&i.push(fi(r,l,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var tS=/\r\n?/g,rS=/\u0000|\uFFFD/g;function Op(e){return(typeof e=="string"?e:""+e).replace(tS,`
`).replace(rS,"")}function fa(e,t,r){if(t=Op(t),Op(e)!==t&&r)throw Error(N(425))}function al(){}var ed=null,td=null;function rd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nd=typeof setTimeout=="function"?setTimeout:void 0,nS=typeof clearTimeout=="function"?clearTimeout:void 0,Ip=typeof Promise=="function"?Promise:void 0,sS=typeof queueMicrotask=="function"?queueMicrotask:typeof Ip<"u"?function(e){return Ip.resolve(null).then(e).catch(oS)}:nd;function oS(e){setTimeout(function(){throw e})}function qc(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),li(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);li(t)}function hn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Lp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var yo=Math.random().toString(36).slice(2),ar="__reactFiber$"+yo,hi="__reactProps$"+yo,jr="__reactContainer$"+yo,sd="__reactEvents$"+yo,iS="__reactListeners$"+yo,aS="__reactHandles$"+yo;function $n(e){var t=e[ar];if(t)return t;for(var r=e.parentNode;r;){if(t=r[jr]||r[ar]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Lp(e);e!==null;){if(r=e[ar])return r;e=Lp(e)}return t}e=r,r=e.parentNode}return null}function Vi(e){return e=e[ar]||e[jr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ns(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function Bl(e){return e[hi]||null}var od=[],Os=-1;function En(e){return{current:e}}function he(e){0>Os||(e.current=od[Os],od[Os]=null,Os--)}function ue(e,t){Os++,od[Os]=e.current,e.current=t}var xn={},Qe=En(xn),lt=En(!1),Yn=xn;function ao(e,t){var r=e.type.contextTypes;if(!r)return xn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ct(e){return e=e.childContextTypes,e!=null}function ll(){he(lt),he(Qe)}function Mp(e,t,r){if(Qe.current!==xn)throw Error(N(168));ue(Qe,t),ue(lt,r)}function ay(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(N(108,W1(e)||"Unknown",s));return xe({},r,n)}function cl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Yn=Qe.current,ue(Qe,e),ue(lt,lt.current),!0}function Dp(e,t,r){var n=e.stateNode;if(!n)throw Error(N(169));r?(e=ay(e,t,Yn),n.__reactInternalMemoizedMergedChildContext=e,he(lt),he(Qe),ue(Qe,e)):he(lt),ue(lt,r)}var Er=null,Vl=!1,Kc=!1;function ly(e){Er===null?Er=[e]:Er.push(e)}function lS(e){Vl=!0,ly(e)}function kn(){if(!Kc&&Er!==null){Kc=!0;var e=0,t=ie;try{var r=Er;for(ie=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Er=null,Vl=!1}catch(s){throw Er!==null&&(Er=Er.slice(e+1)),Ov(Sf,kn),s}finally{ie=t,Kc=!1}}return null}var Is=[],Ls=0,ul=null,dl=0,Ct=[],Tt=0,Xn=null,Cr=1,Tr="";function On(e,t){Is[Ls++]=dl,Is[Ls++]=ul,ul=e,dl=t}function cy(e,t,r){Ct[Tt++]=Cr,Ct[Tt++]=Tr,Ct[Tt++]=Xn,Xn=e;var n=Cr;e=Tr;var s=32-Gt(n)-1;n&=~(1<<s),r+=1;var o=32-Gt(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,Cr=1<<32-Gt(t)+s|r<<s|n,Tr=o+e}else Cr=1<<o|r<<s|n,Tr=e}function Nf(e){e.return!==null&&(On(e,1),cy(e,1,0))}function Of(e){for(;e===ul;)ul=Is[--Ls],Is[Ls]=null,dl=Is[--Ls],Is[Ls]=null;for(;e===Xn;)Xn=Ct[--Tt],Ct[Tt]=null,Tr=Ct[--Tt],Ct[Tt]=null,Cr=Ct[--Tt],Ct[Tt]=null}var vt=null,gt=null,me=!1,qt=null;function uy(e,t){var r=Pt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function $p(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,vt=e,gt=hn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,vt=e,gt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Xn!==null?{id:Cr,overflow:Tr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Pt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,vt=e,gt=null,!0):!1;default:return!1}}function id(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ad(e){if(me){var t=gt;if(t){var r=t;if(!$p(e,t)){if(id(e))throw Error(N(418));t=hn(r.nextSibling);var n=vt;t&&$p(e,t)?uy(n,r):(e.flags=e.flags&-4097|2,me=!1,vt=e)}}else{if(id(e))throw Error(N(418));e.flags=e.flags&-4097|2,me=!1,vt=e}}}function Up(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;vt=e}function ha(e){if(e!==vt)return!1;if(!me)return Up(e),me=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!rd(e.type,e.memoizedProps)),t&&(t=gt)){if(id(e))throw dy(),Error(N(418));for(;t;)uy(e,t),t=hn(t.nextSibling)}if(Up(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){gt=hn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}gt=null}}else gt=vt?hn(e.stateNode.nextSibling):null;return!0}function dy(){for(var e=gt;e;)e=hn(e.nextSibling)}function lo(){gt=vt=null,me=!1}function If(e){qt===null?qt=[e]:qt.push(e)}var cS=Mr.ReactCurrentBatchConfig;function No(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(N(309));var n=r.stateNode}if(!n)throw Error(N(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(N(284));if(!r._owner)throw Error(N(290,e))}return e}function pa(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Fp(e){var t=e._init;return t(e._payload)}function fy(e){function t(y,v){if(e){var w=y.deletions;w===null?(y.deletions=[v],y.flags|=16):w.push(v)}}function r(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function n(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function s(y,v){return y=vn(y,v),y.index=0,y.sibling=null,y}function o(y,v,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<v?(y.flags|=2,v):w):(y.flags|=2,v)):(y.flags|=1048576,v)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,v,w,_){return v===null||v.tag!==6?(v=eu(w,y.mode,_),v.return=y,v):(v=s(v,w),v.return=y,v)}function l(y,v,w,_){var S=w.type;return S===Ps?d(y,v,w.props.children,_,w.key):v!==null&&(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Qr&&Fp(S)===v.type)?(_=s(v,w.props),_.ref=No(y,v,w),_.return=y,_):(_=Ha(w.type,w.key,w.props,null,y.mode,_),_.ref=No(y,v,w),_.return=y,_)}function c(y,v,w,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=tu(w,y.mode,_),v.return=y,v):(v=s(v,w.children||[]),v.return=y,v)}function d(y,v,w,_,S){return v===null||v.tag!==7?(v=Jn(w,y.mode,_,S),v.return=y,v):(v=s(v,w),v.return=y,v)}function f(y,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=eu(""+v,y.mode,w),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case na:return w=Ha(v.type,v.key,v.props,null,y.mode,w),w.ref=No(y,null,v),w.return=y,w;case Ts:return v=tu(v,y.mode,w),v.return=y,v;case Qr:var _=v._init;return f(y,_(v._payload),w)}if(Fo(v)||To(v))return v=Jn(v,y.mode,w,null),v.return=y,v;pa(y,v)}return null}function p(y,v,w,_){var S=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(y,v,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case na:return w.key===S?l(y,v,w,_):null;case Ts:return w.key===S?c(y,v,w,_):null;case Qr:return S=w._init,p(y,v,S(w._payload),_)}if(Fo(w)||To(w))return S!==null?null:d(y,v,w,_,null);pa(y,w)}return null}function h(y,v,w,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return y=y.get(w)||null,a(v,y,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case na:return y=y.get(_.key===null?w:_.key)||null,l(v,y,_,S);case Ts:return y=y.get(_.key===null?w:_.key)||null,c(v,y,_,S);case Qr:var E=_._init;return h(y,v,w,E(_._payload),S)}if(Fo(_)||To(_))return y=y.get(w)||null,d(v,y,_,S,null);pa(v,_)}return null}function x(y,v,w,_){for(var S=null,E=null,k=v,T=v=0,j=null;k!==null&&T<w.length;T++){k.index>T?(j=k,k=null):j=k.sibling;var O=p(y,k,w[T],_);if(O===null){k===null&&(k=j);break}e&&k&&O.alternate===null&&t(y,k),v=o(O,v,T),E===null?S=O:E.sibling=O,E=O,k=j}if(T===w.length)return r(y,k),me&&On(y,T),S;if(k===null){for(;T<w.length;T++)k=f(y,w[T],_),k!==null&&(v=o(k,v,T),E===null?S=k:E.sibling=k,E=k);return me&&On(y,T),S}for(k=n(y,k);T<w.length;T++)j=h(k,y,T,w[T],_),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?T:j.key),v=o(j,v,T),E===null?S=j:E.sibling=j,E=j);return e&&k.forEach(function(V){return t(y,V)}),me&&On(y,T),S}function g(y,v,w,_){var S=To(w);if(typeof S!="function")throw Error(N(150));if(w=S.call(w),w==null)throw Error(N(151));for(var E=S=null,k=v,T=v=0,j=null,O=w.next();k!==null&&!O.done;T++,O=w.next()){k.index>T?(j=k,k=null):j=k.sibling;var V=p(y,k,O.value,_);if(V===null){k===null&&(k=j);break}e&&k&&V.alternate===null&&t(y,k),v=o(V,v,T),E===null?S=V:E.sibling=V,E=V,k=j}if(O.done)return r(y,k),me&&On(y,T),S;if(k===null){for(;!O.done;T++,O=w.next())O=f(y,O.value,_),O!==null&&(v=o(O,v,T),E===null?S=O:E.sibling=O,E=O);return me&&On(y,T),S}for(k=n(y,k);!O.done;T++,O=w.next())O=h(k,y,T,O.value,_),O!==null&&(e&&O.alternate!==null&&k.delete(O.key===null?T:O.key),v=o(O,v,T),E===null?S=O:E.sibling=O,E=O);return e&&k.forEach(function(M){return t(y,M)}),me&&On(y,T),S}function b(y,v,w,_){if(typeof w=="object"&&w!==null&&w.type===Ps&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case na:e:{for(var S=w.key,E=v;E!==null;){if(E.key===S){if(S=w.type,S===Ps){if(E.tag===7){r(y,E.sibling),v=s(E,w.props.children),v.return=y,y=v;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Qr&&Fp(S)===E.type){r(y,E.sibling),v=s(E,w.props),v.ref=No(y,E,w),v.return=y,y=v;break e}r(y,E);break}else t(y,E);E=E.sibling}w.type===Ps?(v=Jn(w.props.children,y.mode,_,w.key),v.return=y,y=v):(_=Ha(w.type,w.key,w.props,null,y.mode,_),_.ref=No(y,v,w),_.return=y,y=_)}return i(y);case Ts:e:{for(E=w.key;v!==null;){if(v.key===E)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){r(y,v.sibling),v=s(v,w.children||[]),v.return=y,y=v;break e}else{r(y,v);break}else t(y,v);v=v.sibling}v=tu(w,y.mode,_),v.return=y,y=v}return i(y);case Qr:return E=w._init,b(y,v,E(w._payload),_)}if(Fo(w))return x(y,v,w,_);if(To(w))return g(y,v,w,_);pa(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(r(y,v.sibling),v=s(v,w),v.return=y,y=v):(r(y,v),v=eu(w,y.mode,_),v.return=y,y=v),i(y)):r(y,v)}return b}var co=fy(!0),hy=fy(!1),fl=En(null),hl=null,Ms=null,Lf=null;function Mf(){Lf=Ms=hl=null}function Df(e){var t=fl.current;he(fl),e._currentValue=t}function ld(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Hs(e,t){hl=e,Lf=Ms=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(at=!0),e.firstContext=null)}function jt(e){var t=e._currentValue;if(Lf!==e)if(e={context:e,memoizedValue:t,next:null},Ms===null){if(hl===null)throw Error(N(308));Ms=e,hl.dependencies={lanes:0,firstContext:e}}else Ms=Ms.next=e;return t}var Un=null;function $f(e){Un===null?Un=[e]:Un.push(e)}function py(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,$f(t)):(r.next=s.next,s.next=r),t.interleaved=r,Nr(e,n)}function Nr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Jr=!1;function Uf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function my(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ar(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ne&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Nr(e,r)}return s=n.interleaved,s===null?(t.next=t,$f(n)):(t.next=s.next,s.next=t),n.interleaved=t,Nr(e,r)}function $a(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Ef(e,r)}}function zp(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function pl(e,t,r,n){var s=e.updateQueue;Jr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?o=c:i.next=c,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,d=c=l=null,a=o;do{var p=a.lane,h=a.eventTime;if((n&p)===p){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,g=a;switch(p=t,h=r,g.tag){case 1:if(x=g.payload,typeof x=="function"){f=x.call(h,f,p);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=g.payload,p=typeof x=="function"?x.call(h,f,p):x,p==null)break e;f=xe({},f,p);break e;case 2:Jr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else h={eventTime:h,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=h,l=f):d=d.next=h,i|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);es|=i,e.lanes=i,e.memoizedState=f}}function Bp(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(N(191,s));s.call(n)}}}var Hi={},dr=En(Hi),pi=En(Hi),mi=En(Hi);function Fn(e){if(e===Hi)throw Error(N(174));return e}function Ff(e,t){switch(ue(mi,t),ue(pi,e),ue(dr,Hi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Bu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Bu(t,e)}he(dr),ue(dr,t)}function uo(){he(dr),he(pi),he(mi)}function gy(e){Fn(mi.current);var t=Fn(dr.current),r=Bu(t,e.type);t!==r&&(ue(pi,e),ue(dr,r))}function zf(e){pi.current===e&&(he(dr),he(pi))}var ye=En(0);function ml(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Gc=[];function Bf(){for(var e=0;e<Gc.length;e++)Gc[e]._workInProgressVersionPrimary=null;Gc.length=0}var Ua=Mr.ReactCurrentDispatcher,Qc=Mr.ReactCurrentBatchConfig,Zn=0,we=null,Ne=null,Le=null,gl=!1,Jo=!1,gi=0,uS=0;function He(){throw Error(N(321))}function Vf(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Jt(e[r],t[r]))return!1;return!0}function Hf(e,t,r,n,s,o){if(Zn=o,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ua.current=e===null||e.memoizedState===null?pS:mS,e=r(n,s),Jo){o=0;do{if(Jo=!1,gi=0,25<=o)throw Error(N(301));o+=1,Le=Ne=null,t.updateQueue=null,Ua.current=gS,e=r(n,s)}while(Jo)}if(Ua.current=vl,t=Ne!==null&&Ne.next!==null,Zn=0,Le=Ne=we=null,gl=!1,t)throw Error(N(300));return e}function Wf(){var e=gi!==0;return gi=0,e}function rr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?we.memoizedState=Le=e:Le=Le.next=e,Le}function Nt(){if(Ne===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Le===null?we.memoizedState:Le.next;if(t!==null)Le=t,Ne=e;else{if(e===null)throw Error(N(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Le===null?we.memoizedState=Le=e:Le=Le.next=e}return Le}function vi(e,t){return typeof t=="function"?t(e):t}function Jc(e){var t=Nt(),r=t.queue;if(r===null)throw Error(N(311));r.lastRenderedReducer=e;var n=Ne,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var a=i=null,l=null,c=o;do{var d=c.lane;if((Zn&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,i=n):l=l.next=f,we.lanes|=d,es|=d}c=c.next}while(c!==null&&c!==o);l===null?i=n:l.next=a,Jt(n,t.memoizedState)||(at=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,we.lanes|=o,es|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Yc(e){var t=Nt(),r=t.queue;if(r===null)throw Error(N(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Jt(o,t.memoizedState)||(at=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function vy(){}function yy(e,t){var r=we,n=Nt(),s=t(),o=!Jt(n.memoizedState,s);if(o&&(n.memoizedState=s,at=!0),n=n.queue,qf(by.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(r.flags|=2048,yi(9,xy.bind(null,r,n,s,t),void 0,null),Me===null)throw Error(N(349));Zn&30||wy(r,t,s)}return s}function wy(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function xy(e,t,r,n){t.value=r,t.getSnapshot=n,_y(t)&&Sy(e)}function by(e,t,r){return r(function(){_y(t)&&Sy(e)})}function _y(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Jt(e,r)}catch{return!0}}function Sy(e){var t=Nr(e,1);t!==null&&Qt(t,e,1,-1)}function Vp(e){var t=rr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},t.queue=e,e=e.dispatch=hS.bind(null,we,e),[t.memoizedState,e]}function yi(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Ey(){return Nt().memoizedState}function Fa(e,t,r,n){var s=rr();we.flags|=e,s.memoizedState=yi(1|t,r,void 0,n===void 0?null:n)}function Hl(e,t,r,n){var s=Nt();n=n===void 0?null:n;var o=void 0;if(Ne!==null){var i=Ne.memoizedState;if(o=i.destroy,n!==null&&Vf(n,i.deps)){s.memoizedState=yi(t,r,o,n);return}}we.flags|=e,s.memoizedState=yi(1|t,r,o,n)}function Hp(e,t){return Fa(8390656,8,e,t)}function qf(e,t){return Hl(2048,8,e,t)}function ky(e,t){return Hl(4,2,e,t)}function Cy(e,t){return Hl(4,4,e,t)}function Ty(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Py(e,t,r){return r=r!=null?r.concat([e]):null,Hl(4,4,Ty.bind(null,t,e),r)}function Kf(){}function Ay(e,t){var r=Nt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Vf(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Ry(e,t){var r=Nt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Vf(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function jy(e,t,r){return Zn&21?(Jt(r,t)||(r=Mv(),we.lanes|=r,es|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,at=!0),e.memoizedState=r)}function dS(e,t){var r=ie;ie=r!==0&&4>r?r:4,e(!0);var n=Qc.transition;Qc.transition={};try{e(!1),t()}finally{ie=r,Qc.transition=n}}function Ny(){return Nt().memoizedState}function fS(e,t,r){var n=gn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Oy(e))Iy(t,r);else if(r=py(e,t,r,n),r!==null){var s=et();Qt(r,e,n,s),Ly(r,t,n)}}function hS(e,t,r){var n=gn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Oy(e))Iy(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,Jt(a,i)){var l=t.interleaved;l===null?(s.next=s,$f(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=py(e,t,s,n),r!==null&&(s=et(),Qt(r,e,n,s),Ly(r,t,n))}}function Oy(e){var t=e.alternate;return e===we||t!==null&&t===we}function Iy(e,t){Jo=gl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ly(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Ef(e,r)}}var vl={readContext:jt,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},pS={readContext:jt,useCallback:function(e,t){return rr().memoizedState=[e,t===void 0?null:t],e},useContext:jt,useEffect:Hp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Fa(4194308,4,Ty.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Fa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fa(4,2,e,t)},useMemo:function(e,t){var r=rr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=rr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=fS.bind(null,we,e),[n.memoizedState,e]},useRef:function(e){var t=rr();return e={current:e},t.memoizedState=e},useState:Vp,useDebugValue:Kf,useDeferredValue:function(e){return rr().memoizedState=e},useTransition:function(){var e=Vp(!1),t=e[0];return e=dS.bind(null,e[1]),rr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=we,s=rr();if(me){if(r===void 0)throw Error(N(407));r=r()}else{if(r=t(),Me===null)throw Error(N(349));Zn&30||wy(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,Hp(by.bind(null,n,o,e),[e]),n.flags|=2048,yi(9,xy.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=rr(),t=Me.identifierPrefix;if(me){var r=Tr,n=Cr;r=(n&~(1<<32-Gt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=gi++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=uS++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mS={readContext:jt,useCallback:Ay,useContext:jt,useEffect:qf,useImperativeHandle:Py,useInsertionEffect:ky,useLayoutEffect:Cy,useMemo:Ry,useReducer:Jc,useRef:Ey,useState:function(){return Jc(vi)},useDebugValue:Kf,useDeferredValue:function(e){var t=Nt();return jy(t,Ne.memoizedState,e)},useTransition:function(){var e=Jc(vi)[0],t=Nt().memoizedState;return[e,t]},useMutableSource:vy,useSyncExternalStore:yy,useId:Ny,unstable_isNewReconciler:!1},gS={readContext:jt,useCallback:Ay,useContext:jt,useEffect:qf,useImperativeHandle:Py,useInsertionEffect:ky,useLayoutEffect:Cy,useMemo:Ry,useReducer:Yc,useRef:Ey,useState:function(){return Yc(vi)},useDebugValue:Kf,useDeferredValue:function(e){var t=Nt();return Ne===null?t.memoizedState=e:jy(t,Ne.memoizedState,e)},useTransition:function(){var e=Yc(vi)[0],t=Nt().memoizedState;return[e,t]},useMutableSource:vy,useSyncExternalStore:yy,useId:Ny,unstable_isNewReconciler:!1};function Ut(e,t){if(e&&e.defaultProps){t=xe({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function cd(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:xe({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Wl={isMounted:function(e){return(e=e._reactInternals)?ss(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=et(),s=gn(e),o=Ar(n,s);o.payload=t,r!=null&&(o.callback=r),t=pn(e,o,s),t!==null&&(Qt(t,e,s,n),$a(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=et(),s=gn(e),o=Ar(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=pn(e,o,s),t!==null&&(Qt(t,e,s,n),$a(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=et(),n=gn(e),s=Ar(r,n);s.tag=2,t!=null&&(s.callback=t),t=pn(e,s,n),t!==null&&(Qt(t,e,n,r),$a(t,e,n))}};function Wp(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!ui(r,n)||!ui(s,o):!0}function My(e,t,r){var n=!1,s=xn,o=t.contextType;return typeof o=="object"&&o!==null?o=jt(o):(s=ct(t)?Yn:Qe.current,n=t.contextTypes,o=(n=n!=null)?ao(e,s):xn),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function qp(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Wl.enqueueReplaceState(t,t.state,null)}function ud(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Uf(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=jt(o):(o=ct(t)?Yn:Qe.current,s.context=ao(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(cd(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Wl.enqueueReplaceState(s,s.state,null),pl(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function fo(e,t){try{var r="",n=t;do r+=H1(n),n=n.return;while(n);var s=r}catch(o){s=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Xc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function dd(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var vS=typeof WeakMap=="function"?WeakMap:Map;function Dy(e,t,r){r=Ar(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){wl||(wl=!0,bd=n),dd(e,t)},r}function $y(e,t,r){r=Ar(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){dd(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){dd(e,t),typeof n!="function"&&(mn===null?mn=new Set([this]):mn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Kp(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new vS;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=jS.bind(null,e,t,r),t.then(e,e))}function Gp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Qp(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ar(-1,1),t.tag=2,pn(r,t,1))),r.lanes|=1),e)}var yS=Mr.ReactCurrentOwner,at=!1;function Xe(e,t,r,n){t.child=e===null?hy(t,null,r,n):co(t,e.child,r,n)}function Jp(e,t,r,n,s){r=r.render;var o=t.ref;return Hs(t,s),n=Hf(e,t,r,n,o,s),r=Wf(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Or(e,t,s)):(me&&r&&Nf(t),t.flags|=1,Xe(e,t,n,s),t.child)}function Yp(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!th(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,Uy(e,t,o,n,s)):(e=Ha(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:ui,r(i,n)&&e.ref===t.ref)return Or(e,t,s)}return t.flags|=1,e=vn(o,n),e.ref=t.ref,e.return=t,t.child=e}function Uy(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(ui(o,n)&&e.ref===t.ref)if(at=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(at=!0);else return t.lanes=e.lanes,Or(e,t,s)}return fd(e,t,r,n,s)}function Fy(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue($s,ft),ft|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ue($s,ft),ft|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,ue($s,ft),ft|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,ue($s,ft),ft|=n;return Xe(e,t,s,r),t.child}function zy(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function fd(e,t,r,n,s){var o=ct(r)?Yn:Qe.current;return o=ao(t,o),Hs(t,s),r=Hf(e,t,r,n,o,s),n=Wf(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Or(e,t,s)):(me&&n&&Nf(t),t.flags|=1,Xe(e,t,r,s),t.child)}function Xp(e,t,r,n,s){if(ct(r)){var o=!0;cl(t)}else o=!1;if(Hs(t,s),t.stateNode===null)za(e,t),My(t,r,n),ud(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=r.contextType;typeof c=="object"&&c!==null?c=jt(c):(c=ct(r)?Yn:Qe.current,c=ao(t,c));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==c)&&qp(t,i,n,c),Jr=!1;var p=t.memoizedState;i.state=p,pl(t,n,i,s),l=t.memoizedState,a!==n||p!==l||lt.current||Jr?(typeof d=="function"&&(cd(t,r,d,n),l=t.memoizedState),(a=Jr||Wp(t,r,a,n,p,l,c))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=c,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,my(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Ut(t.type,a),i.props=c,f=t.pendingProps,p=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=jt(l):(l=ct(r)?Yn:Qe.current,l=ao(t,l));var h=r.getDerivedStateFromProps;(d=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||p!==l)&&qp(t,i,n,l),Jr=!1,p=t.memoizedState,i.state=p,pl(t,n,i,s);var x=t.memoizedState;a!==f||p!==x||lt.current||Jr?(typeof h=="function"&&(cd(t,r,h,n),x=t.memoizedState),(c=Jr||Wp(t,r,c,n,p,x,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,x,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,x,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=x),i.props=n,i.state=x,i.context=l,n=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return hd(e,t,r,n,o,s)}function hd(e,t,r,n,s,o){zy(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&Dp(t,r,!1),Or(e,t,o);n=t.stateNode,yS.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=co(t,e.child,null,o),t.child=co(t,null,a,o)):Xe(e,t,a,o),t.memoizedState=n.state,s&&Dp(t,r,!0),t.child}function By(e){var t=e.stateNode;t.pendingContext?Mp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mp(e,t.context,!1),Ff(e,t.containerInfo)}function Zp(e,t,r,n,s){return lo(),If(s),t.flags|=256,Xe(e,t,r,n),t.child}var pd={dehydrated:null,treeContext:null,retryLane:0};function md(e){return{baseLanes:e,cachePool:null,transitions:null}}function Vy(e,t,r){var n=t.pendingProps,s=ye.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ue(ye,s&1),e===null)return ad(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Gl(i,n,0,null),e=Jn(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=md(r),t.memoizedState=pd,e):Gf(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return wS(e,t,i,n,a,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=vn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=vn(a,o):(o=Jn(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?md(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=pd,n}return o=e.child,e=o.sibling,n=vn(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Gf(e,t){return t=Gl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ma(e,t,r,n){return n!==null&&If(n),co(t,e.child,null,r),e=Gf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wS(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=Xc(Error(N(422))),ma(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=Gl({mode:"visible",children:n.children},s,0,null),o=Jn(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&co(t,e.child,null,i),t.child.memoizedState=md(i),t.memoizedState=pd,o);if(!(t.mode&1))return ma(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(N(419)),n=Xc(o,n,void 0),ma(e,t,i,n)}if(a=(i&e.childLanes)!==0,at||a){if(n=Me,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Nr(e,s),Qt(n,e,s,-1))}return eh(),n=Xc(Error(N(421))),ma(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=NS.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,gt=hn(s.nextSibling),vt=t,me=!0,qt=null,e!==null&&(Ct[Tt++]=Cr,Ct[Tt++]=Tr,Ct[Tt++]=Xn,Cr=e.id,Tr=e.overflow,Xn=t),t=Gf(t,n.children),t.flags|=4096,t)}function em(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ld(e.return,t,r)}function Zc(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function Hy(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(Xe(e,t,n.children,r),n=ye.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&em(e,r,t);else if(e.tag===19)em(e,r,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}n&=1}if(ue(ye,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&ml(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Zc(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ml(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Zc(t,!0,r,null,o);break;case"together":Zc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function za(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Or(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),es|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,r=vn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=vn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function xS(e,t,r){switch(t.tag){case 3:By(t),lo();break;case 5:gy(t);break;case 1:ct(t.type)&&cl(t);break;case 4:Ff(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;ue(fl,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ue(ye,ye.current&1),t.flags|=128,null):r&t.child.childLanes?Vy(e,t,r):(ue(ye,ye.current&1),e=Or(e,t,r),e!==null?e.sibling:null);ue(ye,ye.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Hy(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ue(ye,ye.current),n)break;return null;case 22:case 23:return t.lanes=0,Fy(e,t,r)}return Or(e,t,r)}var Wy,gd,qy,Ky;Wy=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};gd=function(){};qy=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Fn(dr.current);var o=null;switch(r){case"input":s=$u(e,s),n=$u(e,n),o=[];break;case"select":s=xe({},s,{value:void 0}),n=xe({},n,{value:void 0}),o=[];break;case"textarea":s=zu(e,s),n=zu(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=al)}Vu(r,n);var i;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ni.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(o||(o=[]),o.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ni.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&fe("scroll",e),o||a===l||(o=[])):(o=o||[]).push(c,l))}r&&(o=o||[]).push("style",r);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};Ky=function(e,t,r,n){r!==n&&(t.flags|=4)};function Oo(e,t){if(!me)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function bS(e,t,r){var n=t.pendingProps;switch(Of(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return ct(t.type)&&ll(),We(t),null;case 3:return n=t.stateNode,uo(),he(lt),he(Qe),Bf(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ha(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qt!==null&&(Ed(qt),qt=null))),gd(e,t),We(t),null;case 5:zf(t);var s=Fn(mi.current);if(r=t.type,e!==null&&t.stateNode!=null)qy(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(N(166));return We(t),null}if(e=Fn(dr.current),ha(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[ar]=t,n[hi]=o,e=(t.mode&1)!==0,r){case"dialog":fe("cancel",n),fe("close",n);break;case"iframe":case"object":case"embed":fe("load",n);break;case"video":case"audio":for(s=0;s<Bo.length;s++)fe(Bo[s],n);break;case"source":fe("error",n);break;case"img":case"image":case"link":fe("error",n),fe("load",n);break;case"details":fe("toggle",n);break;case"input":cp(n,o),fe("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},fe("invalid",n);break;case"textarea":dp(n,o),fe("invalid",n)}Vu(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&fa(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&fa(n.textContent,a,e),s=["children",""+a]):ni.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&fe("scroll",n)}switch(r){case"input":sa(n),up(n,o,!0);break;case"textarea":sa(n),fp(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=al)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=bv(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[ar]=t,e[hi]=n,Wy(e,t,!1,!1),t.stateNode=e;e:{switch(i=Hu(r,n),r){case"dialog":fe("cancel",e),fe("close",e),s=n;break;case"iframe":case"object":case"embed":fe("load",e),s=n;break;case"video":case"audio":for(s=0;s<Bo.length;s++)fe(Bo[s],e);s=n;break;case"source":fe("error",e),s=n;break;case"img":case"image":case"link":fe("error",e),fe("load",e),s=n;break;case"details":fe("toggle",e),s=n;break;case"input":cp(e,n),s=$u(e,n),fe("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=xe({},n,{value:void 0}),fe("invalid",e);break;case"textarea":dp(e,n),s=zu(e,n),fe("invalid",e);break;default:s=n}Vu(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?Ev(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&_v(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&si(e,l):typeof l=="number"&&si(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ni.hasOwnProperty(o)?l!=null&&o==="onScroll"&&fe("scroll",e):l!=null&&yf(e,o,l,i))}switch(r){case"input":sa(e),up(e,n,!1);break;case"textarea":sa(e),fp(e);break;case"option":n.value!=null&&e.setAttribute("value",""+wn(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Fs(e,!!n.multiple,o,!1):n.defaultValue!=null&&Fs(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=al)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return We(t),null;case 6:if(e&&t.stateNode!=null)Ky(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(N(166));if(r=Fn(mi.current),Fn(dr.current),ha(t)){if(n=t.stateNode,r=t.memoizedProps,n[ar]=t,(o=n.nodeValue!==r)&&(e=vt,e!==null))switch(e.tag){case 3:fa(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&fa(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ar]=t,t.stateNode=n}return We(t),null;case 13:if(he(ye),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(me&&gt!==null&&t.mode&1&&!(t.flags&128))dy(),lo(),t.flags|=98560,o=!1;else if(o=ha(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(N(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(N(317));o[ar]=t}else lo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;We(t),o=!1}else qt!==null&&(Ed(qt),qt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||ye.current&1?Oe===0&&(Oe=3):eh())),t.updateQueue!==null&&(t.flags|=4),We(t),null);case 4:return uo(),gd(e,t),e===null&&di(t.stateNode.containerInfo),We(t),null;case 10:return Df(t.type._context),We(t),null;case 17:return ct(t.type)&&ll(),We(t),null;case 19:if(he(ye),o=t.memoizedState,o===null)return We(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)Oo(o,!1);else{if(Oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ml(e),i!==null){for(t.flags|=128,Oo(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ue(ye,ye.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ce()>ho&&(t.flags|=128,n=!0,Oo(o,!1),t.lanes=4194304)}else{if(!n)if(e=ml(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Oo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!me)return We(t),null}else 2*Ce()-o.renderingStartTime>ho&&r!==1073741824&&(t.flags|=128,n=!0,Oo(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ce(),t.sibling=null,r=ye.current,ue(ye,n?r&1|2:r&1),t):(We(t),null);case 22:case 23:return Zf(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?ft&1073741824&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function _S(e,t){switch(Of(t),t.tag){case 1:return ct(t.type)&&ll(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return uo(),he(lt),he(Qe),Bf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zf(t),null;case 13:if(he(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));lo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(ye),null;case 4:return uo(),null;case 10:return Df(t.type._context),null;case 22:case 23:return Zf(),null;case 24:return null;default:return null}}var ga=!1,Ke=!1,SS=typeof WeakSet=="function"?WeakSet:Set,D=null;function Ds(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ee(e,t,n)}else r.current=null}function vd(e,t,r){try{r()}catch(n){Ee(e,t,n)}}var tm=!1;function ES(e,t){if(ed=sl,e=Xv(),jf(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==r||s!==0&&f.nodeType!==3||(a=i+s),f!==o||n!==0&&f.nodeType!==3||(l=i+n),f.nodeType===3&&(i+=f.nodeValue.length),(h=f.firstChild)!==null;)p=f,f=h;for(;;){if(f===e)break t;if(p===r&&++c===s&&(a=i),p===o&&++d===n&&(l=i),(h=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(td={focusedElem:e,selectionRange:r},sl=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var g=x.memoizedProps,b=x.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ut(t.type,g),b);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(_){Ee(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return x=tm,tm=!1,x}function Yo(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&vd(t,r,o)}s=s.next}while(s!==n)}}function ql(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function yd(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Gy(e){var t=e.alternate;t!==null&&(e.alternate=null,Gy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ar],delete t[hi],delete t[sd],delete t[iS],delete t[aS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Qy(e){return e.tag===5||e.tag===3||e.tag===4}function rm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wd(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=al));else if(n!==4&&(e=e.child,e!==null))for(wd(e,t,r),e=e.sibling;e!==null;)wd(e,t,r),e=e.sibling}function xd(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(xd(e,t,r),e=e.sibling;e!==null;)xd(e,t,r),e=e.sibling}var Fe=null,Ht=!1;function Hr(e,t,r){for(r=r.child;r!==null;)Jy(e,t,r),r=r.sibling}function Jy(e,t,r){if(ur&&typeof ur.onCommitFiberUnmount=="function")try{ur.onCommitFiberUnmount($l,r)}catch{}switch(r.tag){case 5:Ke||Ds(r,t);case 6:var n=Fe,s=Ht;Fe=null,Hr(e,t,r),Fe=n,Ht=s,Fe!==null&&(Ht?(e=Fe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Fe.removeChild(r.stateNode));break;case 18:Fe!==null&&(Ht?(e=Fe,r=r.stateNode,e.nodeType===8?qc(e.parentNode,r):e.nodeType===1&&qc(e,r),li(e)):qc(Fe,r.stateNode));break;case 4:n=Fe,s=Ht,Fe=r.stateNode.containerInfo,Ht=!0,Hr(e,t,r),Fe=n,Ht=s;break;case 0:case 11:case 14:case 15:if(!Ke&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&vd(r,t,i),s=s.next}while(s!==n)}Hr(e,t,r);break;case 1:if(!Ke&&(Ds(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Ee(r,t,a)}Hr(e,t,r);break;case 21:Hr(e,t,r);break;case 22:r.mode&1?(Ke=(n=Ke)||r.memoizedState!==null,Hr(e,t,r),Ke=n):Hr(e,t,r);break;default:Hr(e,t,r)}}function nm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new SS),t.forEach(function(n){var s=OS.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Mt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Fe=a.stateNode,Ht=!1;break e;case 3:Fe=a.stateNode.containerInfo,Ht=!0;break e;case 4:Fe=a.stateNode.containerInfo,Ht=!0;break e}a=a.return}if(Fe===null)throw Error(N(160));Jy(o,i,s),Fe=null,Ht=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Ee(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Yy(t,e),t=t.sibling}function Yy(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Mt(t,e),tr(e),n&4){try{Yo(3,e,e.return),ql(3,e)}catch(g){Ee(e,e.return,g)}try{Yo(5,e,e.return)}catch(g){Ee(e,e.return,g)}}break;case 1:Mt(t,e),tr(e),n&512&&r!==null&&Ds(r,r.return);break;case 5:if(Mt(t,e),tr(e),n&512&&r!==null&&Ds(r,r.return),e.flags&32){var s=e.stateNode;try{si(s,"")}catch(g){Ee(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&wv(s,o),Hu(a,i);var c=Hu(a,o);for(i=0;i<l.length;i+=2){var d=l[i],f=l[i+1];d==="style"?Ev(s,f):d==="dangerouslySetInnerHTML"?_v(s,f):d==="children"?si(s,f):yf(s,d,f,c)}switch(a){case"input":Uu(s,o);break;case"textarea":xv(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Fs(s,!!o.multiple,h,!1):p!==!!o.multiple&&(o.defaultValue!=null?Fs(s,!!o.multiple,o.defaultValue,!0):Fs(s,!!o.multiple,o.multiple?[]:"",!1))}s[hi]=o}catch(g){Ee(e,e.return,g)}}break;case 6:if(Mt(t,e),tr(e),n&4){if(e.stateNode===null)throw Error(N(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(g){Ee(e,e.return,g)}}break;case 3:if(Mt(t,e),tr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(g){Ee(e,e.return,g)}break;case 4:Mt(t,e),tr(e);break;case 13:Mt(t,e),tr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Yf=Ce())),n&4&&nm(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Ke=(c=Ke)||d,Mt(t,e),Ke=c):Mt(t,e),tr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(D=e,d=e.child;d!==null;){for(f=D=d;D!==null;){switch(p=D,h=p.child,p.tag){case 0:case 11:case 14:case 15:Yo(4,p,p.return);break;case 1:Ds(p,p.return);var x=p.stateNode;if(typeof x.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(g){Ee(n,r,g)}}break;case 5:Ds(p,p.return);break;case 22:if(p.memoizedState!==null){om(f);continue}}h!==null?(h.return=p,D=h):om(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Sv("display",i))}catch(g){Ee(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(g){Ee(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Mt(t,e),tr(e),n&4&&nm(e);break;case 21:break;default:Mt(t,e),tr(e)}}function tr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Qy(r)){var n=r;break e}r=r.return}throw Error(N(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(si(s,""),n.flags&=-33);var o=rm(e);xd(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=rm(e);wd(e,a,i);break;default:throw Error(N(161))}}catch(l){Ee(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kS(e,t,r){D=e,Xy(e)}function Xy(e,t,r){for(var n=(e.mode&1)!==0;D!==null;){var s=D,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||ga;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ke;a=ga;var c=Ke;if(ga=i,(Ke=l)&&!c)for(D=s;D!==null;)i=D,l=i.child,i.tag===22&&i.memoizedState!==null?im(s):l!==null?(l.return=i,D=l):im(s);for(;o!==null;)D=o,Xy(o),o=o.sibling;D=s,ga=a,Ke=c}sm(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,D=o):sm(e)}}function sm(e){for(;D!==null;){var t=D;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ke||ql(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Ke)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Ut(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Bp(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Bp(t,i,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&li(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}Ke||t.flags&512&&yd(t)}catch(p){Ee(t,t.return,p)}}if(t===e){D=null;break}if(r=t.sibling,r!==null){r.return=t.return,D=r;break}D=t.return}}function om(e){for(;D!==null;){var t=D;if(t===e){D=null;break}var r=t.sibling;if(r!==null){r.return=t.return,D=r;break}D=t.return}}function im(e){for(;D!==null;){var t=D;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{ql(4,t)}catch(l){Ee(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){Ee(t,s,l)}}var o=t.return;try{yd(t)}catch(l){Ee(t,o,l)}break;case 5:var i=t.return;try{yd(t)}catch(l){Ee(t,i,l)}}}catch(l){Ee(t,t.return,l)}if(t===e){D=null;break}var a=t.sibling;if(a!==null){a.return=t.return,D=a;break}D=t.return}}var CS=Math.ceil,yl=Mr.ReactCurrentDispatcher,Qf=Mr.ReactCurrentOwner,At=Mr.ReactCurrentBatchConfig,ne=0,Me=null,Ae=null,ze=0,ft=0,$s=En(0),Oe=0,wi=null,es=0,Kl=0,Jf=0,Xo=null,ot=null,Yf=0,ho=1/0,_r=null,wl=!1,bd=null,mn=null,va=!1,ln=null,xl=0,Zo=0,_d=null,Ba=-1,Va=0;function et(){return ne&6?Ce():Ba!==-1?Ba:Ba=Ce()}function gn(e){return e.mode&1?ne&2&&ze!==0?ze&-ze:cS.transition!==null?(Va===0&&(Va=Mv()),Va):(e=ie,e!==0||(e=window.event,e=e===void 0?16:Vv(e.type)),e):1}function Qt(e,t,r,n){if(50<Zo)throw Zo=0,_d=null,Error(N(185));zi(e,r,n),(!(ne&2)||e!==Me)&&(e===Me&&(!(ne&2)&&(Kl|=r),Oe===4&&Zr(e,ze)),ut(e,n),r===1&&ne===0&&!(t.mode&1)&&(ho=Ce()+500,Vl&&kn()))}function ut(e,t){var r=e.callbackNode;c_(e,t);var n=nl(e,e===Me?ze:0);if(n===0)r!==null&&mp(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&mp(r),t===1)e.tag===0?lS(am.bind(null,e)):ly(am.bind(null,e)),sS(function(){!(ne&6)&&kn()}),r=null;else{switch(Dv(n)){case 1:r=Sf;break;case 4:r=Iv;break;case 16:r=rl;break;case 536870912:r=Lv;break;default:r=rl}r=i0(r,Zy.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Zy(e,t){if(Ba=-1,Va=0,ne&6)throw Error(N(327));var r=e.callbackNode;if(Ws()&&e.callbackNode!==r)return null;var n=nl(e,e===Me?ze:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=bl(e,n);else{t=n;var s=ne;ne|=2;var o=t0();(Me!==e||ze!==t)&&(_r=null,ho=Ce()+500,Qn(e,t));do try{AS();break}catch(a){e0(e,a)}while(!0);Mf(),yl.current=o,ne=s,Ae!==null?t=0:(Me=null,ze=0,t=Oe)}if(t!==0){if(t===2&&(s=Qu(e),s!==0&&(n=s,t=Sd(e,s))),t===1)throw r=wi,Qn(e,0),Zr(e,n),ut(e,Ce()),r;if(t===6)Zr(e,n);else{if(s=e.current.alternate,!(n&30)&&!TS(s)&&(t=bl(e,n),t===2&&(o=Qu(e),o!==0&&(n=o,t=Sd(e,o))),t===1))throw r=wi,Qn(e,0),Zr(e,n),ut(e,Ce()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(N(345));case 2:In(e,ot,_r);break;case 3:if(Zr(e,n),(n&130023424)===n&&(t=Yf+500-Ce(),10<t)){if(nl(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){et(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=nd(In.bind(null,e,ot,_r),t);break}In(e,ot,_r);break;case 4:if(Zr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-Gt(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=Ce()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*CS(n/1960))-n,10<n){e.timeoutHandle=nd(In.bind(null,e,ot,_r),n);break}In(e,ot,_r);break;case 5:In(e,ot,_r);break;default:throw Error(N(329))}}}return ut(e,Ce()),e.callbackNode===r?Zy.bind(null,e):null}function Sd(e,t){var r=Xo;return e.current.memoizedState.isDehydrated&&(Qn(e,t).flags|=256),e=bl(e,t),e!==2&&(t=ot,ot=r,t!==null&&Ed(t)),e}function Ed(e){ot===null?ot=e:ot.push.apply(ot,e)}function TS(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!Jt(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Zr(e,t){for(t&=~Jf,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Gt(t),n=1<<r;e[r]=-1,t&=~n}}function am(e){if(ne&6)throw Error(N(327));Ws();var t=nl(e,0);if(!(t&1))return ut(e,Ce()),null;var r=bl(e,t);if(e.tag!==0&&r===2){var n=Qu(e);n!==0&&(t=n,r=Sd(e,n))}if(r===1)throw r=wi,Qn(e,0),Zr(e,t),ut(e,Ce()),r;if(r===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,In(e,ot,_r),ut(e,Ce()),null}function Xf(e,t){var r=ne;ne|=1;try{return e(t)}finally{ne=r,ne===0&&(ho=Ce()+500,Vl&&kn())}}function ts(e){ln!==null&&ln.tag===0&&!(ne&6)&&Ws();var t=ne;ne|=1;var r=At.transition,n=ie;try{if(At.transition=null,ie=1,e)return e()}finally{ie=n,At.transition=r,ne=t,!(ne&6)&&kn()}}function Zf(){ft=$s.current,he($s)}function Qn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,nS(r)),Ae!==null)for(r=Ae.return;r!==null;){var n=r;switch(Of(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&ll();break;case 3:uo(),he(lt),he(Qe),Bf();break;case 5:zf(n);break;case 4:uo();break;case 13:he(ye);break;case 19:he(ye);break;case 10:Df(n.type._context);break;case 22:case 23:Zf()}r=r.return}if(Me=e,Ae=e=vn(e.current,null),ze=ft=t,Oe=0,wi=null,Jf=Kl=es=0,ot=Xo=null,Un!==null){for(t=0;t<Un.length;t++)if(r=Un[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}Un=null}return e}function e0(e,t){do{var r=Ae;try{if(Mf(),Ua.current=vl,gl){for(var n=we.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}gl=!1}if(Zn=0,Le=Ne=we=null,Jo=!1,gi=0,Qf.current=null,r===null||r.return===null){Oe=1,wi=t,Ae=null;break}e:{var o=e,i=r.return,a=r,l=t;if(t=ze,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=Gp(i);if(h!==null){h.flags&=-257,Qp(h,i,a,o,t),h.mode&1&&Kp(o,c,t),t=h,l=c;var x=t.updateQueue;if(x===null){var g=new Set;g.add(l),t.updateQueue=g}else x.add(l);break e}else{if(!(t&1)){Kp(o,c,t),eh();break e}l=Error(N(426))}}else if(me&&a.mode&1){var b=Gp(i);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Qp(b,i,a,o,t),If(fo(l,a));break e}}o=l=fo(l,a),Oe!==4&&(Oe=2),Xo===null?Xo=[o]:Xo.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=Dy(o,l,t);zp(o,y);break e;case 1:a=l;var v=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(mn===null||!mn.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=$y(o,a,t);zp(o,_);break e}}o=o.return}while(o!==null)}n0(r)}catch(S){t=S,Ae===r&&r!==null&&(Ae=r=r.return);continue}break}while(!0)}function t0(){var e=yl.current;return yl.current=vl,e===null?vl:e}function eh(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),Me===null||!(es&268435455)&&!(Kl&268435455)||Zr(Me,ze)}function bl(e,t){var r=ne;ne|=2;var n=t0();(Me!==e||ze!==t)&&(_r=null,Qn(e,t));do try{PS();break}catch(s){e0(e,s)}while(!0);if(Mf(),ne=r,yl.current=n,Ae!==null)throw Error(N(261));return Me=null,ze=0,Oe}function PS(){for(;Ae!==null;)r0(Ae)}function AS(){for(;Ae!==null&&!e_();)r0(Ae)}function r0(e){var t=o0(e.alternate,e,ft);e.memoizedProps=e.pendingProps,t===null?n0(e):Ae=t,Qf.current=null}function n0(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=_S(r,t),r!==null){r.flags&=32767,Ae=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Oe=6,Ae=null;return}}else if(r=bS(r,t,ft),r!==null){Ae=r;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);Oe===0&&(Oe=5)}function In(e,t,r){var n=ie,s=At.transition;try{At.transition=null,ie=1,RS(e,t,r,n)}finally{At.transition=s,ie=n}return null}function RS(e,t,r,n){do Ws();while(ln!==null);if(ne&6)throw Error(N(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(N(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(u_(e,o),e===Me&&(Ae=Me=null,ze=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||va||(va=!0,i0(rl,function(){return Ws(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=At.transition,At.transition=null;var i=ie;ie=1;var a=ne;ne|=4,Qf.current=null,ES(e,r),Yy(r,e),J_(td),sl=!!ed,td=ed=null,e.current=r,kS(r),t_(),ne=a,ie=i,At.transition=o}else e.current=r;if(va&&(va=!1,ln=e,xl=s),o=e.pendingLanes,o===0&&(mn=null),s_(r.stateNode),ut(e,Ce()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(wl)throw wl=!1,e=bd,bd=null,e;return xl&1&&e.tag!==0&&Ws(),o=e.pendingLanes,o&1?e===_d?Zo++:(Zo=0,_d=e):Zo=0,kn(),null}function Ws(){if(ln!==null){var e=Dv(xl),t=At.transition,r=ie;try{if(At.transition=null,ie=16>e?16:e,ln===null)var n=!1;else{if(e=ln,ln=null,xl=0,ne&6)throw Error(N(331));var s=ne;for(ne|=4,D=e.current;D!==null;){var o=D,i=o.child;if(D.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(D=c;D!==null;){var d=D;switch(d.tag){case 0:case 11:case 15:Yo(8,d,o)}var f=d.child;if(f!==null)f.return=d,D=f;else for(;D!==null;){d=D;var p=d.sibling,h=d.return;if(Gy(d),d===c){D=null;break}if(p!==null){p.return=h,D=p;break}D=h}}}var x=o.alternate;if(x!==null){var g=x.child;if(g!==null){x.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}D=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,D=i;else e:for(;D!==null;){if(o=D,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Yo(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,D=y;break e}D=o.return}}var v=e.current;for(D=v;D!==null;){i=D;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,D=w;else e:for(i=v;D!==null;){if(a=D,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ql(9,a)}}catch(S){Ee(a,a.return,S)}if(a===i){D=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,D=_;break e}D=a.return}}if(ne=s,kn(),ur&&typeof ur.onPostCommitFiberRoot=="function")try{ur.onPostCommitFiberRoot($l,e)}catch{}n=!0}return n}finally{ie=r,At.transition=t}}return!1}function lm(e,t,r){t=fo(r,t),t=Dy(e,t,1),e=pn(e,t,1),t=et(),e!==null&&(zi(e,1,t),ut(e,t))}function Ee(e,t,r){if(e.tag===3)lm(e,e,r);else for(;t!==null;){if(t.tag===3){lm(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(mn===null||!mn.has(n))){e=fo(r,e),e=$y(t,e,1),t=pn(t,e,1),e=et(),t!==null&&(zi(t,1,e),ut(t,e));break}}t=t.return}}function jS(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=et(),e.pingedLanes|=e.suspendedLanes&r,Me===e&&(ze&r)===r&&(Oe===4||Oe===3&&(ze&130023424)===ze&&500>Ce()-Yf?Qn(e,0):Jf|=r),ut(e,t)}function s0(e,t){t===0&&(e.mode&1?(t=aa,aa<<=1,!(aa&130023424)&&(aa=4194304)):t=1);var r=et();e=Nr(e,t),e!==null&&(zi(e,t,r),ut(e,r))}function NS(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),s0(e,r)}function OS(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(N(314))}n!==null&&n.delete(t),s0(e,r)}var o0;o0=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||lt.current)at=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return at=!1,xS(e,t,r);at=!!(e.flags&131072)}else at=!1,me&&t.flags&1048576&&cy(t,dl,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;za(e,t),e=t.pendingProps;var s=ao(t,Qe.current);Hs(t,r),s=Hf(null,t,n,e,s,r);var o=Wf();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(n)?(o=!0,cl(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Uf(t),s.updater=Wl,t.stateNode=s,s._reactInternals=t,ud(t,n,e,r),t=hd(null,t,n,!0,o,r)):(t.tag=0,me&&o&&Nf(t),Xe(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(za(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=LS(n),e=Ut(n,e),s){case 0:t=fd(null,t,n,e,r);break e;case 1:t=Xp(null,t,n,e,r);break e;case 11:t=Jp(null,t,n,e,r);break e;case 14:t=Yp(null,t,n,Ut(n.type,e),r);break e}throw Error(N(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ut(n,s),fd(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ut(n,s),Xp(e,t,n,s,r);case 3:e:{if(By(t),e===null)throw Error(N(387));n=t.pendingProps,o=t.memoizedState,s=o.element,my(e,t),pl(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=fo(Error(N(423)),t),t=Zp(e,t,n,r,s);break e}else if(n!==s){s=fo(Error(N(424)),t),t=Zp(e,t,n,r,s);break e}else for(gt=hn(t.stateNode.containerInfo.firstChild),vt=t,me=!0,qt=null,r=hy(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(lo(),n===s){t=Or(e,t,r);break e}Xe(e,t,n,r)}t=t.child}return t;case 5:return gy(t),e===null&&ad(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,rd(n,s)?i=null:o!==null&&rd(n,o)&&(t.flags|=32),zy(e,t),Xe(e,t,i,r),t.child;case 6:return e===null&&ad(t),null;case 13:return Vy(e,t,r);case 4:return Ff(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=co(t,null,n,r):Xe(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ut(n,s),Jp(e,t,n,s,r);case 7:return Xe(e,t,t.pendingProps,r),t.child;case 8:return Xe(e,t,t.pendingProps.children,r),t.child;case 12:return Xe(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,ue(fl,n._currentValue),n._currentValue=i,o!==null)if(Jt(o.value,i)){if(o.children===s.children&&!lt.current){t=Or(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=Ar(-1,r&-r),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),ld(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(N(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),ld(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Xe(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Hs(t,r),s=jt(s),n=n(s),t.flags|=1,Xe(e,t,n,r),t.child;case 14:return n=t.type,s=Ut(n,t.pendingProps),s=Ut(n.type,s),Yp(e,t,n,s,r);case 15:return Uy(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Ut(n,s),za(e,t),t.tag=1,ct(n)?(e=!0,cl(t)):e=!1,Hs(t,r),My(t,n,s),ud(t,n,s,r),hd(null,t,n,!0,e,r);case 19:return Hy(e,t,r);case 22:return Fy(e,t,r)}throw Error(N(156,t.tag))};function i0(e,t){return Ov(e,t)}function IS(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(e,t,r,n){return new IS(e,t,r,n)}function th(e){return e=e.prototype,!(!e||!e.isReactComponent)}function LS(e){if(typeof e=="function")return th(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xf)return 11;if(e===bf)return 14}return 2}function vn(e,t){var r=e.alternate;return r===null?(r=Pt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ha(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")th(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ps:return Jn(r.children,s,o,t);case wf:i=8,s|=8;break;case Iu:return e=Pt(12,r,t,s|2),e.elementType=Iu,e.lanes=o,e;case Lu:return e=Pt(13,r,t,s),e.elementType=Lu,e.lanes=o,e;case Mu:return e=Pt(19,r,t,s),e.elementType=Mu,e.lanes=o,e;case gv:return Gl(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pv:i=10;break e;case mv:i=9;break e;case xf:i=11;break e;case bf:i=14;break e;case Qr:i=16,n=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=Pt(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Jn(e,t,r,n){return e=Pt(7,e,n,t),e.lanes=r,e}function Gl(e,t,r,n){return e=Pt(22,e,n,t),e.elementType=gv,e.lanes=r,e.stateNode={isHidden:!1},e}function eu(e,t,r){return e=Pt(6,e,null,t),e.lanes=r,e}function tu(e,t,r){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function MS(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Lc(0),this.expirationTimes=Lc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lc(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function rh(e,t,r,n,s,o,i,a,l){return e=new MS(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Pt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Uf(o),e}function DS(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ts,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function a0(e){if(!e)return xn;e=e._reactInternals;e:{if(ss(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ct(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var r=e.type;if(ct(r))return ay(e,r,t)}return t}function l0(e,t,r,n,s,o,i,a,l){return e=rh(r,n,!0,e,s,o,i,a,l),e.context=a0(null),r=e.current,n=et(),s=gn(r),o=Ar(n,s),o.callback=t??null,pn(r,o,s),e.current.lanes=s,zi(e,s,n),ut(e,n),e}function Ql(e,t,r,n){var s=t.current,o=et(),i=gn(s);return r=a0(r),t.context===null?t.context=r:t.pendingContext=r,t=Ar(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=pn(s,t,i),e!==null&&(Qt(e,s,i,o),$a(e,s,i)),i}function _l(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function nh(e,t){cm(e,t),(e=e.alternate)&&cm(e,t)}function $S(){return null}var c0=typeof reportError=="function"?reportError:function(e){console.error(e)};function sh(e){this._internalRoot=e}Jl.prototype.render=sh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));Ql(e,t,null,null)};Jl.prototype.unmount=sh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ts(function(){Ql(null,e,null,null)}),t[jr]=null}};function Jl(e){this._internalRoot=e}Jl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fv();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Xr.length&&t!==0&&t<Xr[r].priority;r++);Xr.splice(r,0,e),r===0&&Bv(e)}};function oh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Yl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function um(){}function US(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var c=_l(i);o.call(c)}}var i=l0(t,n,e,0,null,!1,!1,"",um);return e._reactRootContainer=i,e[jr]=i.current,di(e.nodeType===8?e.parentNode:e),ts(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=_l(l);a.call(c)}}var l=rh(e,0,!1,null,null,!1,!1,"",um);return e._reactRootContainer=l,e[jr]=l.current,di(e.nodeType===8?e.parentNode:e),ts(function(){Ql(t,l,r,n)}),l}function Xl(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=_l(i);a.call(l)}}Ql(t,i,e,s)}else i=US(r,t,e,s,n);return _l(i)}$v=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=zo(t.pendingLanes);r!==0&&(Ef(t,r|1),ut(t,Ce()),!(ne&6)&&(ho=Ce()+500,kn()))}break;case 13:ts(function(){var n=Nr(e,1);if(n!==null){var s=et();Qt(n,e,1,s)}}),nh(e,1)}};kf=function(e){if(e.tag===13){var t=Nr(e,134217728);if(t!==null){var r=et();Qt(t,e,134217728,r)}nh(e,134217728)}};Uv=function(e){if(e.tag===13){var t=gn(e),r=Nr(e,t);if(r!==null){var n=et();Qt(r,e,t,n)}nh(e,t)}};Fv=function(){return ie};zv=function(e,t){var r=ie;try{return ie=e,t()}finally{ie=r}};qu=function(e,t,r){switch(t){case"input":if(Uu(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Bl(n);if(!s)throw Error(N(90));yv(n),Uu(n,s)}}}break;case"textarea":xv(e,r);break;case"select":t=r.value,t!=null&&Fs(e,!!r.multiple,t,!1)}};Tv=Xf;Pv=ts;var FS={usingClientEntryPoint:!1,Events:[Vi,Ns,Bl,kv,Cv,Xf]},Io={findFiberByHostInstance:$n,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zS={bundleType:Io.bundleType,version:Io.version,rendererPackageName:Io.rendererPackageName,rendererConfig:Io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Mr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=jv(e),e===null?null:e.stateNode},findFiberByHostInstance:Io.findFiberByHostInstance||$S,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ya=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ya.isDisabled&&ya.supportsFiber)try{$l=ya.inject(zS),ur=ya}catch{}}bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FS;bt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!oh(t))throw Error(N(200));return DS(e,t,null,r)};bt.createRoot=function(e,t){if(!oh(e))throw Error(N(299));var r=!1,n="",s=c0;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=rh(e,1,!1,null,null,r,!1,n,s),e[jr]=t.current,di(e.nodeType===8?e.parentNode:e),new sh(t)};bt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=jv(t),e=e===null?null:e.stateNode,e};bt.flushSync=function(e){return ts(e)};bt.hydrate=function(e,t,r){if(!Yl(t))throw Error(N(200));return Xl(null,e,t,!0,r)};bt.hydrateRoot=function(e,t,r){if(!oh(e))throw Error(N(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=c0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=l0(t,null,e,1,r??null,s,!1,o,i),e[jr]=t.current,di(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Jl(t)};bt.render=function(e,t,r){if(!Yl(t))throw Error(N(200));return Xl(null,e,t,!1,r)};bt.unmountComponentAtNode=function(e){if(!Yl(e))throw Error(N(40));return e._reactRootContainer?(ts(function(){Xl(null,null,e,!1,function(){e._reactRootContainer=null,e[jr]=null})}),!0):!1};bt.unstable_batchedUpdates=Xf;bt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Yl(r))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return Xl(e,t,r,!1,n)};bt.version="18.3.1-next-f1338f8080-20240426";function u0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u0)}catch(e){console.error(e)}}u0(),uv.exports=bt;var Wi=uv.exports;const d0=Ui(Wi);var f0,dm=Wi;f0=dm.createRoot,dm.hydrateRoot;const BS="modulepreload",VS=function(e){return"/"+e},fm={},Je=function(t,r,n){let s=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(r.map(l=>{if(l=VS(l),l in fm)return;fm[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":BS,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,h)=>{f.addEventListener("load",p),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},HS=1,WS=1e6;let ru=0;function qS(){return ru=(ru+1)%Number.MAX_SAFE_INTEGER,ru.toString()}const nu=new Map,hm=e=>{if(nu.has(e))return;const t=setTimeout(()=>{nu.delete(e),ei({type:"REMOVE_TOAST",toastId:e})},WS);nu.set(e,t)},KS=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,HS)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?hm(r):e.toasts.forEach(n=>{hm(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Wa=[];let qa={toasts:[]};function ei(e){qa=KS(qa,e),Wa.forEach(t=>{t(qa)})}function GS({...e}){const t=qS(),r=s=>ei({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>ei({type:"DISMISS_TOAST",toastId:t});return ei({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function QS(){const[e,t]=m.useState(qa);return m.useEffect(()=>(Wa.push(t),()=>{const r=Wa.indexOf(t);r>-1&&Wa.splice(r,1)}),[e]),{...e,toast:GS,dismiss:r=>ei({type:"DISMISS_TOAST",toastId:r})}}function B(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function pm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zl(...e){return t=>{let r=!1;const n=e.map(s=>{const o=pm(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():pm(e[s],null)}}}}function ke(...e){return m.useCallback(Zl(...e),e)}function eM(e,t){const r=m.createContext(t),n=o=>{const{children:i,...a}=o,l=m.useMemo(()=>a,Object.values(a));return u.jsx(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function s(o){const i=m.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function mr(e,t=[]){let r=[];function n(o,i){const a=m.createContext(i),l=r.length;r=[...r,i];const c=f=>{var y;const{scope:p,children:h,...x}=f,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||a,b=m.useMemo(()=>x,Object.values(x));return u.jsx(g.Provider,{value:b,children:h})};c.displayName=o+"Provider";function d(f,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[l])||a,x=m.useContext(h);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const s=()=>{const o=r.map(i=>m.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return m.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,JS(s,...t)]}function JS(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function xi(e){const t=XS(e),r=m.forwardRef((n,s)=>{const{children:o,...i}=n,a=m.Children.toArray(o),l=a.find(eE);if(l){const c=l.props.children,d=a.map(f=>f===l?m.Children.count(c)>1?m.Children.only(null):m.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...i,ref:s,children:m.isValidElement(c)?m.cloneElement(c,void 0,d):null})}return u.jsx(t,{...i,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var YS=xi("Slot");function XS(e){const t=m.forwardRef((r,n)=>{const{children:s,...o}=r;if(m.isValidElement(s)){const i=rE(s),a=tE(o,s.props);return s.type!==m.Fragment&&(a.ref=n?Zl(n,i):i),m.cloneElement(s,a)}return m.Children.count(s)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var h0=Symbol("radix.slottable");function ZS(e){const t=({children:r})=>u.jsx(u.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=h0,t}function eE(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===h0}function tE(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function rE(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ec(e){const t=e+"CollectionProvider",[r,n]=mr(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:b,children:y}=g,v=R.useRef(null),w=R.useRef(new Map).current;return u.jsx(s,{scope:b,itemMap:w,collectionRef:v,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=xi(a),c=R.forwardRef((g,b)=>{const{scope:y,children:v}=g,w=o(a,y),_=ke(b,w.collectionRef);return u.jsx(l,{ref:_,children:v})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=xi(d),h=R.forwardRef((g,b)=>{const{scope:y,children:v,...w}=g,_=R.useRef(null),S=ke(b,_),E=o(d,y);return R.useEffect(()=>(E.itemMap.set(_,{ref:_,...w}),()=>void E.itemMap.delete(_))),u.jsx(p,{[f]:"",ref:S,children:v})});h.displayName=d;function x(g){const b=o(e+"CollectionConsumer",g);return R.useCallback(()=>{const v=b.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((E,k)=>w.indexOf(E.ref.current)-w.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:c,ItemSlot:h},x,n]}var nE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oe=nE.reduce((e,t)=>{const r=xi(`Primitive.${t}`),n=m.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ih(e,t){e&&Wi.flushSync(()=>e.dispatchEvent(t))}function xt(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function sE(e,t=globalThis==null?void 0:globalThis.document){const r=xt(e);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var oE="DismissableLayer",kd="dismissableLayer.update",iE="dismissableLayer.pointerDownOutside",aE="dismissableLayer.focusOutside",mm,p0=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tc=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,c=m.useContext(p0),[d,f]=m.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=m.useState({}),x=ke(t,k=>f(k)),g=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),v=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,_=v>=y,S=cE(k=>{const T=k.target,j=[...c.branches].some(O=>O.contains(T));!_||j||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},p),E=uE(k=>{const T=k.target;[...c.branches].some(O=>O.contains(T))||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},p);return sE(k=>{v===c.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},p),m.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(mm=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),gm(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=mm)}},[d,p,r,c]),m.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),gm())},[d,c]),m.useEffect(()=>{const k=()=>h({});return document.addEventListener(kd,k),()=>document.removeEventListener(kd,k)},[]),u.jsx(oe.div,{...l,ref:x,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,E.onFocusCapture),onBlurCapture:B(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,S.onPointerDownCapture)})});tc.displayName=oE;var lE="DismissableLayerBranch",m0=m.forwardRef((e,t)=>{const r=m.useContext(p0),n=m.useRef(null),s=ke(t,n);return m.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),u.jsx(oe.div,{...e,ref:s})});m0.displayName=lE;function cE(e,t=globalThis==null?void 0:globalThis.document){const r=xt(e),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){g0(iE,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function uE(e,t=globalThis==null?void 0:globalThis.document){const r=xt(e),n=m.useRef(!1);return m.useEffect(()=>{const s=o=>{o.target&&!n.current&&g0(aE,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function gm(){const e=new CustomEvent(kd);document.dispatchEvent(e)}function g0(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?ih(s,o):s.dispatchEvent(o)}var dE=tc,fE=m0,hr=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},hE="Portal",ah=m.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=m.useState(!1);hr(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?d0.createPortal(u.jsx(oe.div,{...n,ref:t}),i):null});ah.displayName=hE;function pE(e,t){return m.useReducer((r,n)=>t[r][n]??r,e)}var Cn=e=>{const{present:t,children:r}=e,n=mE(t),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),o=ke(n.ref,gE(s));return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:o}):null};Cn.displayName="Presence";function mE(e){const[t,r]=m.useState(),n=m.useRef(null),s=m.useRef(e),o=m.useRef("none"),i=e?"mounted":"unmounted",[a,l]=pE(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=wa(n.current);o.current=a==="mounted"?c:"none"},[a]),hr(()=>{const c=n.current,d=s.current;if(d!==e){const p=o.current,h=wa(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),hr(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=h=>{const g=wa(n.current).includes(h.animationName);if(h.target===t&&g&&(l("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=h=>{h.target===t&&(o.current=wa(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function wa(e){return(e==null?void 0:e.animationName)||"none"}function gE(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var vE=mf[" useInsertionEffect ".trim().toString()]||hr;function os({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,i]=yE({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const d=m.useRef(e!==void 0);m.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,n])}const c=m.useCallback(d=>{var f;if(a){const p=wE(d)?d(e):d;p!==e&&((f=i.current)==null||f.call(i,p))}else o(d)},[a,e,o,i]);return[l,c]}function yE({defaultProp:e,onChange:t}){const[r,n]=m.useState(e),s=m.useRef(r),o=m.useRef(t);return vE(()=>{o.current=t},[t]),m.useEffect(()=>{var i;s.current!==r&&((i=o.current)==null||i.call(o,r),s.current=r)},[r,s]),[r,n,o]}function wE(e){return typeof e=="function"}var xE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),bE="VisuallyHidden",rc=m.forwardRef((e,t)=>u.jsx(oe.span,{...e,ref:t,style:{...xE,...e.style}}));rc.displayName=bE;var _E=rc,lh="ToastProvider",[ch,SE,EE]=ec("Toast"),[v0,tM]=mr("Toast",[EE]),[kE,nc]=v0(lh),y0=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=m.useState(null),[c,d]=m.useState(0),f=m.useRef(!1),p=m.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${lh}\`. Expected non-empty \`string\`.`),u.jsx(ch.Provider,{scope:t,children:u.jsx(kE,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:m.useCallback(()=>d(h=>h+1),[]),onToastRemove:m.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:i})})};y0.displayName=lh;var w0="ToastViewport",CE=["F8"],Cd="toast.viewportPause",Td="toast.viewportResume",x0=m.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=CE,label:s="Notifications ({hotkey})",...o}=e,i=nc(w0,r),a=SE(r),l=m.useRef(null),c=m.useRef(null),d=m.useRef(null),f=m.useRef(null),p=ke(t,f,i.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;m.useEffect(()=>{const b=y=>{var w;n.length!==0&&n.every(_=>y[_]||y.code===_)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),m.useEffect(()=>{const b=l.current,y=f.current;if(x&&b&&y){const v=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(Cd);y.dispatchEvent(E),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(Td);y.dispatchEvent(E),i.isClosePausedRef.current=!1}},_=E=>{!b.contains(E.relatedTarget)&&w()},S=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",v),b.addEventListener("focusout",_),b.addEventListener("pointermove",v),b.addEventListener("pointerleave",S),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",v),b.removeEventListener("focusout",_),b.removeEventListener("pointermove",v),b.removeEventListener("pointerleave",S),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[x,i.isClosePausedRef]);const g=m.useCallback(({tabbingDirection:b})=>{const v=a().map(w=>{const _=w.ref.current,S=[_,...UE(_)];return b==="forwards"?S:S.reverse()});return(b==="forwards"?v.reverse():v).flat()},[a]);return m.useEffect(()=>{const b=f.current;if(b){const y=v=>{var S,E,k;const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const T=document.activeElement,j=v.shiftKey;if(v.target===b&&j){(S=c.current)==null||S.focus();return}const M=g({tabbingDirection:j?"backwards":"forwards"}),K=M.findIndex(L=>L===T);su(M.slice(K+1))?v.preventDefault():j?(E=c.current)==null||E.focus():(k=d.current)==null||k.focus()}};return b.addEventListener("keydown",y),()=>b.removeEventListener("keydown",y)}},[a,g]),u.jsxs(fE,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&u.jsx(Pd,{ref:c,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"forwards"});su(b)}}),u.jsx(ch.Slot,{scope:r,children:u.jsx(oe.ol,{tabIndex:-1,...o,ref:p})}),x&&u.jsx(Pd,{ref:d,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"backwards"});su(b)}})]})});x0.displayName=w0;var b0="ToastFocusProxy",Pd=m.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=nc(b0,r);return u.jsx(rc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=o.viewport)!=null&&c.contains(a))&&n()}})});Pd.displayName=b0;var qi="Toast",TE="toast.swipeStart",PE="toast.swipeMove",AE="toast.swipeCancel",RE="toast.swipeEnd",_0=m.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a,l]=os({prop:n,defaultProp:s??!0,onChange:o,caller:qi});return u.jsx(Cn,{present:r||a,children:u.jsx(OE,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:xt(e.onPause),onResume:xt(e.onResume),onSwipeStart:B(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:B(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:B(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:B(e.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});_0.displayName=qi;var[jE,NE]=v0(qi,{onClose(){}}),OE=m.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:h,...x}=e,g=nc(qi,r),[b,y]=m.useState(null),v=ke(t,L=>y(L)),w=m.useRef(null),_=m.useRef(null),S=s||g.duration,E=m.useRef(0),k=m.useRef(S),T=m.useRef(0),{onToastAdd:j,onToastRemove:O}=g,V=xt(()=>{var X;(b==null?void 0:b.contains(document.activeElement))&&((X=g.viewport)==null||X.focus()),i()}),M=m.useCallback(L=>{!L||L===1/0||(window.clearTimeout(T.current),E.current=new Date().getTime(),T.current=window.setTimeout(V,L))},[V]);m.useEffect(()=>{const L=g.viewport;if(L){const X=()=>{M(k.current),c==null||c()},F=()=>{const q=new Date().getTime()-E.current;k.current=k.current-q,window.clearTimeout(T.current),l==null||l()};return L.addEventListener(Cd,F),L.addEventListener(Td,X),()=>{L.removeEventListener(Cd,F),L.removeEventListener(Td,X)}}},[g.viewport,S,l,c,M]),m.useEffect(()=>{o&&!g.isClosePausedRef.current&&M(S)},[o,S,g.isClosePausedRef,M]),m.useEffect(()=>(j(),()=>O()),[j,O]);const K=m.useMemo(()=>b?A0(b):null,[b]);return g.viewport?u.jsxs(u.Fragment,{children:[K&&u.jsx(IE,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),u.jsx(jE,{scope:r,onClose:V,children:Wi.createPortal(u.jsx(ch.ItemSlot,{scope:r,children:u.jsx(dE,{asChild:!0,onEscapeKeyDown:B(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||V(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(oe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":g.swipeDirection,...x,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:B(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:B(e.onPointerDown,L=>{L.button===0&&(w.current={x:L.clientX,y:L.clientY})}),onPointerMove:B(e.onPointerMove,L=>{if(!w.current)return;const X=L.clientX-w.current.x,F=L.clientY-w.current.y,q=!!_.current,P=["left","right"].includes(g.swipeDirection),C=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,I=P?C(0,X):0,z=P?0:C(0,F),$=L.pointerType==="touch"?10:2,J={x:I,y:z},Z={originalEvent:L,delta:J};q?(_.current=J,xa(PE,f,Z,{discrete:!1})):vm(J,g.swipeDirection,$)?(_.current=J,xa(TE,d,Z,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(X)>$||Math.abs(F)>$)&&(w.current=null)}),onPointerUp:B(e.onPointerUp,L=>{const X=_.current,F=L.target;if(F.hasPointerCapture(L.pointerId)&&F.releasePointerCapture(L.pointerId),_.current=null,w.current=null,X){const q=L.currentTarget,P={originalEvent:L,delta:X};vm(X,g.swipeDirection,g.swipeThreshold)?xa(RE,h,P,{discrete:!0}):xa(AE,p,P,{discrete:!0}),q.addEventListener("click",C=>C.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),IE=e=>{const{__scopeToast:t,children:r,...n}=e,s=nc(qi,t),[o,i]=m.useState(!1),[a,l]=m.useState(!1);return DE(()=>i(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(ah,{asChild:!0,children:u.jsx(rc,{...n,children:o&&u.jsxs(u.Fragment,{children:[s.label," ",r]})})})},LE="ToastTitle",S0=m.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(oe.div,{...n,ref:t})});S0.displayName=LE;var ME="ToastDescription",E0=m.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return u.jsx(oe.div,{...n,ref:t})});E0.displayName=ME;var k0="ToastAction",C0=m.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?u.jsx(P0,{altText:r,asChild:!0,children:u.jsx(uh,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${k0}\`. Expected non-empty \`string\`.`),null)});C0.displayName=k0;var T0="ToastClose",uh=m.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=NE(T0,r);return u.jsx(P0,{asChild:!0,children:u.jsx(oe.button,{type:"button",...n,ref:t,onClick:B(e.onClick,s.onClose)})})});uh.displayName=T0;var P0=m.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return u.jsx(oe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function A0(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),$E(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...A0(n))}}),t}function xa(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?ih(s,o):s.dispatchEvent(o)}var vm=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function DE(e=()=>{}){const t=xt(e);hr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function $E(e){return e.nodeType===e.ELEMENT_NODE}function UE(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function su(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var FE=y0,R0=x0,j0=_0,N0=S0,O0=E0,I0=C0,L0=uh;function M0(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=M0(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function D0(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=M0(e))&&(n&&(n+=" "),n+=t);return n}const ym=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wm=D0,$0=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return wm(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(c=>{const d=r==null?void 0:r[c],f=o==null?void 0:o[c];if(d===null)return null;const p=ym(d)||ym(f);return s[c][p]}),a=r&&Object.entries(r).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:f,className:p,...h}=d;return Object.entries(h).every(x=>{let[g,b]=x;return Array.isArray(b)?b.includes({...o,...a}[g]):{...o,...a}[g]===b})?[...c,f,p]:c},[]);return wm(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),U0=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var BE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const VE=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>m.createElement("svg",{ref:l,...BE,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:U0("lucide",s),...a},[...i.map(([c,d])=>m.createElement(c,d)),...Array.isArray(o)?o:[o]]));/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ee=(e,t)=>{const r=m.forwardRef(({className:n,...s},o)=>m.createElement(VE,{ref:o,iconNode:t,className:U0(`lucide-${zE(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bi=ee("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HE=ee("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const WE=ee("Bus",[["path",{d:"M8 6v6",key:"18i7km"}],["path",{d:"M15 6v6",key:"1sg6z9"}],["path",{d:"M2 12h19.6",key:"de5uta"}],["path",{d:"M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3",key:"1wwztk"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}],["path",{d:"M9 18h5",key:"lrx6i"}],["circle",{cx:"16",cy:"18",r:"2",key:"1v4tcr"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qE=ee("CalendarCheck",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const KE=ee("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GE=ee("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F0=ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const QE=ee("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z0=ee("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const JE=ee("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const YE=ee("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const XE=ee("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ZE=ee("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B0=ee("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ek=ee("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tk=ee("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V0=ee("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xm=ee("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rk=ee("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nk=ee("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sk=ee("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ok=ee("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bm=ee("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _m=ee("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ik=ee("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ak=ee("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lk=ee("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ck=ee("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uk=ee("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sl=ee("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dk=ee("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ad=ee("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rd=ee("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fk=ee("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hk=ee("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ou=ee("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sc=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pk=ee("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),dh="-",mk=e=>{const t=vk(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const a=i.split(dh);return a[0]===""&&a.length!==1&&a.shift(),H0(a,t)||gk(i)},getConflictingClassGroupIds:(i,a)=>{const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}}},H0=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?H0(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(dh);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},Sm=/^\[(.+)\]$/,gk=e=>{if(Sm.test(e)){const t=Sm.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},vk=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return wk(Object.entries(e.classGroups),r).forEach(([o,i])=>{jd(i,n,o,t)}),n},jd=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Em(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(yk(s)){jd(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{jd(i,Em(t,o),r,n)})})},Em=(e,t)=>{let r=e;return t.split(dh).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},yk=e=>e.isThemeGetter,wk=(e,t)=>t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[r,s]}):e,xk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}},W0="!",bk=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let c=0,d=0,f;for(let b=0;b<a.length;b++){let y=a[b];if(c===0){if(y===s&&(n||a.slice(b,b+o)===t)){l.push(a.slice(d,b)),d=b+o;continue}if(y==="/"){f=b;continue}}y==="["?c++:y==="]"&&c--}const p=l.length===0?a:a.substring(d),h=p.startsWith(W0),x=h?p.substring(1):p,g=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:g}};return r?a=>r({className:a,parseClassName:i}):i},_k=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Sk=e=>({cache:xk(e.cacheSize),parseClassName:bk(e),...mk(e)}),Ek=/\s+/,kk=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(Ek);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:h}=r(c);let x=!!h,g=n(x?p.substring(0,h):p);if(!g){if(!x){a=c+(a.length>0?" "+a:a);continue}if(g=n(p),!g){a=c+(a.length>0?" "+a:a);continue}x=!1}const b=_k(d).join(":"),y=f?b+W0:b,v=y+g;if(o.includes(v))continue;o.push(v);const w=s(g,x);for(let _=0;_<w.length;++_){const S=w[_];o.push(y+S)}a=c+(a.length>0?" "+a:a)}return a};function Ck(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=q0(t))&&(n&&(n+=" "),n+=r);return n}const q0=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=q0(e[n]))&&(r&&(r+=" "),r+=t);return r};function Tk(e,...t){let r,n,s,o=i;function i(l){const c=t.reduce((d,f)=>f(d),e());return r=Sk(c),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const c=n(l);if(c)return c;const d=kk(l,r);return s(l,d),d}return function(){return o(Ck.apply(null,arguments))}}const de=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},K0=/^\[(?:([a-z-]+):)?(.+)\]$/i,Pk=/^\d+\/\d+$/,Ak=new Set(["px","full","screen"]),Rk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Nk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ok=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ik=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xr=e=>qs(e)||Ak.has(e)||Pk.test(e),Wr=e=>wo(e,"length",Bk),qs=e=>!!e&&!Number.isNaN(Number(e)),iu=e=>wo(e,"number",qs),Lo=e=>!!e&&Number.isInteger(Number(e)),Lk=e=>e.endsWith("%")&&qs(e.slice(0,-1)),Y=e=>K0.test(e),qr=e=>Rk.test(e),Mk=new Set(["length","size","percentage"]),Dk=e=>wo(e,Mk,G0),$k=e=>wo(e,"position",G0),Uk=new Set(["image","url"]),Fk=e=>wo(e,Uk,Hk),zk=e=>wo(e,"",Vk),Mo=()=>!0,wo=(e,t,r)=>{const n=K0.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Bk=e=>jk.test(e)&&!Nk.test(e),G0=()=>!1,Vk=e=>Ok.test(e),Hk=e=>Ik.test(e),Wk=()=>{const e=de("colors"),t=de("spacing"),r=de("blur"),n=de("brightness"),s=de("borderColor"),o=de("borderRadius"),i=de("borderSpacing"),a=de("borderWidth"),l=de("contrast"),c=de("grayscale"),d=de("hueRotate"),f=de("invert"),p=de("gap"),h=de("gradientColorStops"),x=de("gradientColorStopPositions"),g=de("inset"),b=de("margin"),y=de("opacity"),v=de("padding"),w=de("saturate"),_=de("scale"),S=de("sepia"),E=de("skew"),k=de("space"),T=de("translate"),j=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",Y,t],M=()=>[Y,t],K=()=>["",xr,Wr],L=()=>["auto",qs,Y],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],C=()=>["","0",Y],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[qs,Y];return{cacheSize:500,separator:":",theme:{colors:[Mo],spacing:[xr,Wr],blur:["none","",qr,Y],brightness:z(),borderColor:[e],borderRadius:["none","","full",qr,Y],borderSpacing:M(),borderWidth:K(),contrast:z(),grayscale:C(),hueRotate:z(),invert:C(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Lk,Wr],inset:V(),margin:V(),opacity:z(),padding:M(),saturate:z(),scale:z(),sepia:C(),skew:z(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[qr]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),Y]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lo,Y]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",Lo,Y]}],"grid-cols":[{"grid-cols":[Mo]}],"col-start-end":[{col:["auto",{span:["full",Lo,Y]},Y]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Mo]}],"row-start-end":[{row:["auto",{span:[Lo,Y]},Y]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[qr]},qr]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qr,Wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",iu]}],"font-family":[{font:[Mo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",qs,iu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xr,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xr,Wr]}],"underline-offset":[{"underline-offset":["auto",xr,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),$k]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Fk]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:F()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[xr,Y]}],"outline-w":[{outline:[xr,Wr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[xr,Wr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qr,zk]}],"shadow-color":[{shadow:[Mo]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",qr,Y]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Lo,Y]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xr,Wr,iu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},qk=Tk(Wk);function le(...e){return qk(D0(e))}const Kk=FE,Q0=m.forwardRef(({className:e,...t},r)=>u.jsx(R0,{ref:r,className:le("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Q0.displayName=R0.displayName;const Gk=$0("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),J0=m.forwardRef(({className:e,variant:t,...r},n)=>u.jsx(j0,{ref:n,className:le(Gk({variant:t}),e),...r}));J0.displayName=j0.displayName;const Qk=m.forwardRef(({className:e,...t},r)=>u.jsx(I0,{ref:r,className:le("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));Qk.displayName=I0.displayName;const Y0=m.forwardRef(({className:e,...t},r)=>u.jsx(L0,{ref:r,className:le("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:u.jsx(sc,{className:"h-4 w-4"})}));Y0.displayName=L0.displayName;const X0=m.forwardRef(({className:e,...t},r)=>u.jsx(N0,{ref:r,className:le("text-sm font-semibold",e),...t}));X0.displayName=N0.displayName;const Z0=m.forwardRef(({className:e,...t},r)=>u.jsx(O0,{ref:r,className:le("text-sm opacity-90",e),...t}));Z0.displayName=O0.displayName;function Jk(){const{toasts:e}=QS();return u.jsxs(Kk,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return u.jsxs(J0,{...o,children:[u.jsxs("div",{className:"grid gap-1",children:[r&&u.jsx(X0,{children:r}),n&&u.jsx(Z0,{children:n})]}),s,u.jsx(Y0,{})]},t)}),u.jsx(Q0,{})]})}var km=["light","dark"],Yk="(prefers-color-scheme: dark)",Xk=m.createContext(void 0),Zk={setTheme:e=>{},themes:[]},eC=()=>{var e;return(e=m.useContext(Xk))!=null?e:Zk};m.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let c=o==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,f=s?km.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(x,g=!1,b=!0)=>{let y=i?i[x]:x,v=g?x+"|| ''":`'${y}'`,w="";return s&&b&&!g&&km.includes(x)&&(w+=`d.style.colorScheme = '${x}';`),r==="class"?g||y?w+=`c.add(${v})`:w+="null":y&&(w+=`d[s](n,${v})`),w},h=e?`!function(){${d}${p(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${Yk}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${c?"":"else{"+p(o,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${f}}catch(t){}}();`;return m.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var tC=e=>{switch(e){case"success":return sC;case"info":return iC;case"warning":return oC;case"error":return aC;default:return null}},rC=Array(12).fill(0),nC=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},rC.map((r,n)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),sC=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),oC=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),iC=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),aC=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),lC=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),cC=()=>{let[e,t]=R.useState(document.hidden);return R.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Nd=1,uC=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Nd++,o=this.toasts.find(a=>a.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:i,title:r}):a):this.addToast({title:r,...n,dismissible:i,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,o,i=n.then(async l=>{if(o=["resolve",l],R.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(fC(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:c,description:d})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:c,description:d})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:c,description:d})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>i.then(()=>o[0]==="reject"?c(o[1]):l(o[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Nd++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},st=new uC,dC=(e,t)=>{let r=(t==null?void 0:t.id)||Nd++;return st.addToast({title:e,...t,id:r}),r},fC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",hC=dC,pC=()=>st.toasts,mC=()=>st.getActiveToasts(),Rn=Object.assign(hC,{success:st.success,info:st.info,warning:st.warning,error:st.error,custom:st.custom,message:st.message,promise:st.promise,dismiss:st.dismiss,loading:st.loading},{getHistory:pC,getToasts:mC});function gC(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}gC(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
`);function ba(e){return e.label!==void 0}var vC=3,yC="32px",wC="16px",Cm=4e3,xC=356,bC=14,_C=20,SC=200;function Dt(...e){return e.filter(Boolean).join(" ")}function EC(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var kC=e=>{var t,r,n,s,o,i,a,l,c,d,f;let{invert:p,toast:h,unstyled:x,interacting:g,setHeights:b,visibleToasts:y,heights:v,index:w,toasts:_,expanded:S,removeToast:E,defaultRichColors:k,closeButton:T,style:j,cancelButtonStyle:O,actionButtonStyle:V,className:M="",descriptionClassName:K="",duration:L,position:X,gap:F,loadingIcon:q,expandByDefault:P,classNames:C,icons:I,closeButtonAriaLabel:z="Close toast",pauseWhenPageIsHidden:$}=e,[J,Z]=R.useState(null),[ge,be]=R.useState(null),[te,yr]=R.useState(!1),[Ie,er]=R.useState(!1),[Ur,ls]=R.useState(!1),[Fr,Xi]=R.useState(!1),[kc,Zi]=R.useState(!1),[Cc,ko]=R.useState(0),[cs,Jh]=R.useState(0),Co=R.useRef(h.duration||L||Cm),Yh=R.useRef(null),Pn=R.useRef(null),o1=w===0,i1=w+1<=y,St=h.type,us=h.dismissible!==!1,a1=h.className||"",l1=h.descriptionClassName||"",ea=R.useMemo(()=>v.findIndex(G=>G.toastId===h.id)||0,[v,h.id]),c1=R.useMemo(()=>{var G;return(G=h.closeButton)!=null?G:T},[h.closeButton,T]),Xh=R.useMemo(()=>h.duration||L||Cm,[h.duration,L]),Tc=R.useRef(0),ds=R.useRef(0),Zh=R.useRef(0),fs=R.useRef(null),[u1,d1]=X.split("-"),ep=R.useMemo(()=>v.reduce((G,ae,pe)=>pe>=ea?G:G+ae.height,0),[v,ea]),tp=cC(),f1=h.invert||p,Pc=St==="loading";ds.current=R.useMemo(()=>ea*F+ep,[ea,ep]),R.useEffect(()=>{Co.current=Xh},[Xh]),R.useEffect(()=>{yr(!0)},[]),R.useEffect(()=>{let G=Pn.current;if(G){let ae=G.getBoundingClientRect().height;return Jh(ae),b(pe=>[{toastId:h.id,height:ae,position:h.position},...pe]),()=>b(pe=>pe.filter(Ot=>Ot.toastId!==h.id))}},[b,h.id]),R.useLayoutEffect(()=>{if(!te)return;let G=Pn.current,ae=G.style.height;G.style.height="auto";let pe=G.getBoundingClientRect().height;G.style.height=ae,Jh(pe),b(Ot=>Ot.find(It=>It.toastId===h.id)?Ot.map(It=>It.toastId===h.id?{...It,height:pe}:It):[{toastId:h.id,height:pe,position:h.position},...Ot])},[te,h.title,h.description,b,h.id]);let zr=R.useCallback(()=>{er(!0),ko(ds.current),b(G=>G.filter(ae=>ae.toastId!==h.id)),setTimeout(()=>{E(h)},SC)},[h,E,b,ds]);R.useEffect(()=>{if(h.promise&&St==="loading"||h.duration===1/0||h.type==="loading")return;let G;return S||g||$&&tp?(()=>{if(Zh.current<Tc.current){let ae=new Date().getTime()-Tc.current;Co.current=Co.current-ae}Zh.current=new Date().getTime()})():Co.current!==1/0&&(Tc.current=new Date().getTime(),G=setTimeout(()=>{var ae;(ae=h.onAutoClose)==null||ae.call(h,h),zr()},Co.current)),()=>clearTimeout(G)},[S,g,h,St,$,tp,zr]),R.useEffect(()=>{h.delete&&zr()},[zr,h.delete]);function h1(){var G,ae,pe;return I!=null&&I.loading?R.createElement("div",{className:Dt(C==null?void 0:C.loader,(G=h==null?void 0:h.classNames)==null?void 0:G.loader,"sonner-loader"),"data-visible":St==="loading"},I.loading):q?R.createElement("div",{className:Dt(C==null?void 0:C.loader,(ae=h==null?void 0:h.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":St==="loading"},q):R.createElement(nC,{className:Dt(C==null?void 0:C.loader,(pe=h==null?void 0:h.classNames)==null?void 0:pe.loader),visible:St==="loading"})}return R.createElement("li",{tabIndex:0,ref:Pn,className:Dt(M,a1,C==null?void 0:C.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,C==null?void 0:C.default,C==null?void 0:C[St],(r=h==null?void 0:h.classNames)==null?void 0:r[St]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:k,"data-styled":!(h.jsx||h.unstyled||x),"data-mounted":te,"data-promise":!!h.promise,"data-swiped":kc,"data-removed":Ie,"data-visible":i1,"data-y-position":u1,"data-x-position":d1,"data-index":w,"data-front":o1,"data-swiping":Ur,"data-dismissible":us,"data-type":St,"data-invert":f1,"data-swipe-out":Fr,"data-swipe-direction":ge,"data-expanded":!!(S||P&&te),style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${Ie?Cc:ds.current}px`,"--initial-height":P?"auto":`${cs}px`,...j,...h.style},onDragEnd:()=>{ls(!1),Z(null),fs.current=null},onPointerDown:G=>{Pc||!us||(Yh.current=new Date,ko(ds.current),G.target.setPointerCapture(G.pointerId),G.target.tagName!=="BUTTON"&&(ls(!0),fs.current={x:G.clientX,y:G.clientY}))},onPointerUp:()=>{var G,ae,pe,Ot;if(Fr||!us)return;fs.current=null;let It=Number(((G=Pn.current)==null?void 0:G.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Br=Number(((ae=Pn.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),An=new Date().getTime()-((pe=Yh.current)==null?void 0:pe.getTime()),Lt=J==="x"?It:Br,Vr=Math.abs(Lt)/An;if(Math.abs(Lt)>=_C||Vr>.11){ko(ds.current),(Ot=h.onDismiss)==null||Ot.call(h,h),be(J==="x"?It>0?"right":"left":Br>0?"down":"up"),zr(),Xi(!0),Zi(!1);return}ls(!1),Z(null)},onPointerMove:G=>{var ae,pe,Ot,It;if(!fs.current||!us||((ae=window.getSelection())==null?void 0:ae.toString().length)>0)return;let Br=G.clientY-fs.current.y,An=G.clientX-fs.current.x,Lt=(pe=e.swipeDirections)!=null?pe:EC(X);!J&&(Math.abs(An)>1||Math.abs(Br)>1)&&Z(Math.abs(An)>Math.abs(Br)?"x":"y");let Vr={x:0,y:0};J==="y"?(Lt.includes("top")||Lt.includes("bottom"))&&(Lt.includes("top")&&Br<0||Lt.includes("bottom")&&Br>0)&&(Vr.y=Br):J==="x"&&(Lt.includes("left")||Lt.includes("right"))&&(Lt.includes("left")&&An<0||Lt.includes("right")&&An>0)&&(Vr.x=An),(Math.abs(Vr.x)>0||Math.abs(Vr.y)>0)&&Zi(!0),(Ot=Pn.current)==null||Ot.style.setProperty("--swipe-amount-x",`${Vr.x}px`),(It=Pn.current)==null||It.style.setProperty("--swipe-amount-y",`${Vr.y}px`)}},c1&&!h.jsx?R.createElement("button",{"aria-label":z,"data-disabled":Pc,"data-close-button":!0,onClick:Pc||!us?()=>{}:()=>{var G;zr(),(G=h.onDismiss)==null||G.call(h,h)},className:Dt(C==null?void 0:C.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(o=I==null?void 0:I.close)!=null?o:lC):null,h.jsx||m.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:R.createElement(R.Fragment,null,St||h.icon||h.promise?R.createElement("div",{"data-icon":"",className:Dt(C==null?void 0:C.icon,(i=h==null?void 0:h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||h1():null,h.type!=="loading"?h.icon||(I==null?void 0:I[St])||tC(St):null):null,R.createElement("div",{"data-content":"",className:Dt(C==null?void 0:C.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},R.createElement("div",{"data-title":"",className:Dt(C==null?void 0:C.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?R.createElement("div",{"data-description":"",className:Dt(K,l1,C==null?void 0:C.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),m.isValidElement(h.cancel)?h.cancel:h.cancel&&ba(h.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:G=>{var ae,pe;ba(h.cancel)&&us&&((pe=(ae=h.cancel).onClick)==null||pe.call(ae,G),zr())},className:Dt(C==null?void 0:C.cancelButton,(d=h==null?void 0:h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,m.isValidElement(h.action)?h.action:h.action&&ba(h.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||V,onClick:G=>{var ae,pe;ba(h.action)&&((pe=(ae=h.action).onClick)==null||pe.call(ae,G),!G.defaultPrevented&&zr())},className:Dt(C==null?void 0:C.actionButton,(f=h==null?void 0:h.classNames)==null?void 0:f.actionButton)},h.action.label):null))};function Tm(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function CC(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",a=o?wC:yC;function l(c){["top","right","bottom","left"].forEach(d=>{r[`${i}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${i}-${c}`]=a:r[`${i}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var TC=m.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:l,mobileOffset:c,theme:d="light",richColors:f,duration:p,style:h,visibleToasts:x=vC,toastOptions:g,dir:b=Tm(),gap:y=bC,loadingIcon:v,icons:w,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[E,k]=R.useState([]),T=R.useMemo(()=>Array.from(new Set([n].concat(E.filter($=>$.position).map($=>$.position)))),[E,n]),[j,O]=R.useState([]),[V,M]=R.useState(!1),[K,L]=R.useState(!1),[X,F]=R.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=R.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=R.useRef(null),I=R.useRef(!1),z=R.useCallback($=>{k(J=>{var Z;return(Z=J.find(ge=>ge.id===$.id))!=null&&Z.delete||st.dismiss($.id),J.filter(({id:ge})=>ge!==$.id)})},[]);return R.useEffect(()=>st.subscribe($=>{if($.dismiss){k(J=>J.map(Z=>Z.id===$.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{d0.flushSync(()=>{k(J=>{let Z=J.findIndex(ge=>ge.id===$.id);return Z!==-1?[...J.slice(0,Z),{...J[Z],...$},...J.slice(Z+1)]:[$,...J]})})})}),[]),R.useEffect(()=>{if(d!=="system"){F(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;let $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:J})=>{F(J?"dark":"light")})}catch{$.addListener(({matches:Z})=>{try{F(Z?"dark":"light")}catch(ge){console.error(ge)}})}},[d]),R.useEffect(()=>{E.length<=1&&M(!1)},[E]),R.useEffect(()=>{let $=J=>{var Z,ge;s.every(be=>J[be]||J.code===be)&&(M(!0),(Z=q.current)==null||Z.focus()),J.code==="Escape"&&(document.activeElement===q.current||(ge=q.current)!=null&&ge.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[s]),R.useEffect(()=>{if(q.current)return()=>{C.current&&(C.current.focus({preventScroll:!0}),C.current=null,I.current=!1)}},[q.current]),R.createElement("section",{ref:t,"aria-label":`${_} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map(($,J)=>{var Z;let[ge,be]=$.split("-");return E.length?R.createElement("ol",{key:$,dir:b==="auto"?Tm():b,tabIndex:-1,ref:q,className:a,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":ge,"data-lifted":V&&E.length>1&&!o,"data-x-position":be,style:{"--front-toast-height":`${((Z=j[0])==null?void 0:Z.height)||0}px`,"--width":`${xC}px`,"--gap":`${y}px`,...h,...CC(l,c)},onBlur:te=>{I.current&&!te.currentTarget.contains(te.relatedTarget)&&(I.current=!1,C.current&&(C.current.focus({preventScroll:!0}),C.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||I.current||(I.current=!0,C.current=te.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{K||M(!1)},onDragEnd:()=>M(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},E.filter(te=>!te.position&&J===0||te.position===$).map((te,yr)=>{var Ie,er;return R.createElement(kC,{key:te.id,icons:w,index:yr,toast:te,defaultRichColors:f,duration:(Ie=g==null?void 0:g.duration)!=null?Ie:p,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:x,closeButton:(er=g==null?void 0:g.closeButton)!=null?er:i,interacting:K,position:$,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:z,toasts:E.filter(Ur=>Ur.position==te.position),heights:j.filter(Ur=>Ur.position==te.position),setHeights:O,expandByDefault:o,gap:y,loadingIcon:v,expanded:V,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const PC=({...e})=>{const{theme:t="system"}=eC();return u.jsx(TC,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var AC=mf[" useId ".trim().toString()]||(()=>{}),RC=0;function _i(e){const[t,r]=m.useState(AC());return hr(()=>{r(n=>n??String(RC++))},[e]),t?`radix-${t}`:""}const jC=["top","right","bottom","left"],bn=Math.min,ht=Math.max,El=Math.round,_a=Math.floor,fr=e=>({x:e,y:e}),NC={left:"right",right:"left",bottom:"top",top:"bottom"},OC={start:"end",end:"start"};function Od(e,t,r){return ht(e,bn(t,r))}function Ir(e,t){return typeof e=="function"?e(t):e}function Lr(e){return e.split("-")[0]}function xo(e){return e.split("-")[1]}function fh(e){return e==="x"?"y":"x"}function hh(e){return e==="y"?"height":"width"}const IC=new Set(["top","bottom"]);function cr(e){return IC.has(Lr(e))?"y":"x"}function ph(e){return fh(cr(e))}function LC(e,t,r){r===void 0&&(r=!1);const n=xo(e),s=ph(e),o=hh(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=kl(i)),[i,kl(i)]}function MC(e){const t=kl(e);return[Id(e),t,Id(t)]}function Id(e){return e.replace(/start|end/g,t=>OC[t])}const Pm=["left","right"],Am=["right","left"],DC=["top","bottom"],$C=["bottom","top"];function UC(e,t,r){switch(e){case"top":case"bottom":return r?t?Am:Pm:t?Pm:Am;case"left":case"right":return t?DC:$C;default:return[]}}function FC(e,t,r,n){const s=xo(e);let o=UC(Lr(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Id)))),o}function kl(e){return e.replace(/left|right|bottom|top/g,t=>NC[t])}function zC(e){return{top:0,right:0,bottom:0,left:0,...e}}function ew(e){return typeof e!="number"?zC(e):{top:e,right:e,bottom:e,left:e}}function Cl(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Rm(e,t,r){let{reference:n,floating:s}=e;const o=cr(t),i=ph(t),a=hh(i),l=Lr(t),c=o==="y",d=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:d,y:n.y-s.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-s.width,y:f};break;default:h={x:n.x,y:n.y}}switch(xo(t)){case"start":h[i]-=p*(r&&c?-1:1);break;case"end":h[i]+=p*(r&&c?-1:1);break}return h}const BC=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=Rm(c,n,l),p=n,h={},x=0;for(let g=0;g<a.length;g++){const{name:b,fn:y}=a[g],{x:v,y:w,data:_,reset:S}=await y({x:d,y:f,initialPlacement:n,placement:p,strategy:s,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});d=v??d,f=w??f,h={...h,[b]:{...h[b],..._}},S&&x<=50&&(x++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:d,y:f}=Rm(c,p,l)),g=-1)}return{x:d,y:f,placement:p,strategy:s,middlewareData:h}};async function Si(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=Ir(t,e),x=ew(h),b=a[p?f==="floating"?"reference":"floating":f],y=Cl(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v=f==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=Cl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(y.top-S.top+x.top)/_.y,bottom:(S.bottom-y.bottom+x.bottom)/_.y,left:(y.left-S.left+x.left)/_.x,right:(S.right-y.right+x.right)/_.x}}const VC=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=Ir(e,t)||{};if(c==null)return{};const f=ew(d),p={x:r,y:n},h=ph(s),x=hh(h),g=await i.getDimensions(c),b=h==="y",y=b?"top":"left",v=b?"bottom":"right",w=b?"clientHeight":"clientWidth",_=o.reference[x]+o.reference[h]-p[h]-o.floating[x],S=p[h]-o.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let k=E?E[w]:0;(!k||!await(i.isElement==null?void 0:i.isElement(E)))&&(k=a.floating[w]||o.floating[x]);const T=_/2-S/2,j=k/2-g[x]/2-1,O=bn(f[y],j),V=bn(f[v],j),M=O,K=k-g[x]-V,L=k/2-g[x]/2+T,X=Od(M,L,K),F=!l.arrow&&xo(s)!=null&&L!==X&&o.reference[x]/2-(L<M?O:V)-g[x]/2<0,q=F?L<M?L-M:L-K:0;return{[h]:p[h]+q,data:{[h]:X,centerOffset:L-X-q,...F&&{alignmentOffset:q}},reset:F}}}),HC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:g=!0,...b}=Ir(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const y=Lr(s),v=cr(a),w=Lr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(w||!g?[kl(a)]:MC(a)),E=x!=="none";!p&&E&&S.push(...FC(a,g,x,_));const k=[a,...S],T=await Si(t,b),j=[];let O=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&j.push(T[y]),f){const L=LC(s,i,_);j.push(T[L[0]],T[L[1]])}if(O=[...O,{placement:s,overflows:j}],!j.every(L=>L<=0)){var V,M;const L=(((V=o.flip)==null?void 0:V.index)||0)+1,X=k[L];if(X&&(!(f==="alignment"?v!==cr(X):!1)||O.every(P=>P.overflows[0]>0&&cr(P.placement)===v)))return{data:{index:L,overflows:O},reset:{placement:X}};let F=(M=O.filter(q=>q.overflows[0]<=0).sort((q,P)=>q.overflows[1]-P.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(h){case"bestFit":{var K;const q=(K=O.filter(P=>{if(E){const C=cr(P.placement);return C===v||C==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(C=>C>0).reduce((C,I)=>C+I,0)]).sort((P,C)=>P[1]-C[1])[0])==null?void 0:K[0];q&&(F=q);break}case"initialPlacement":F=a;break}if(s!==F)return{reset:{placement:F}}}return{}}}};function jm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Nm(e){return jC.some(t=>e[t]>=0)}const WC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Ir(e,t);switch(n){case"referenceHidden":{const o=await Si(t,{...s,elementContext:"reference"}),i=jm(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Nm(i)}}}case"escaped":{const o=await Si(t,{...s,altBoundary:!0}),i=jm(o,r.floating);return{data:{escapedOffsets:i,escaped:Nm(i)}}}default:return{}}}}},tw=new Set(["left","top"]);async function qC(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=Lr(r),a=xo(r),l=cr(r)==="y",c=tw.has(i)?-1:1,d=o&&l?-1:1,f=Ir(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof x=="number"&&(h=a==="end"?x*-1:x),l?{x:h*d,y:p*c}:{x:p*c,y:h*d}}const KC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await qC(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},GC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x:y,y:v}=b;return{x:y,y:v}}},...l}=Ir(e,t),c={x:r,y:n},d=await Si(t,l),f=cr(Lr(s)),p=fh(f);let h=c[p],x=c[f];if(o){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=h+d[b],w=h-d[y];h=Od(v,h,w)}if(i){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=x+d[b],w=x-d[y];x=Od(v,x,w)}const g=a.fn({...t,[p]:h,[f]:x});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[p]:o,[f]:i}}}}}},QC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ir(e,t),d={x:r,y:n},f=cr(s),p=fh(f);let h=d[p],x=d[f];const g=Ir(a,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=p==="y"?"height":"width",_=o.reference[p]-o.floating[w]+b.mainAxis,S=o.reference[p]+o.reference[w]-b.mainAxis;h<_?h=_:h>S&&(h=S)}if(c){var y,v;const w=p==="y"?"width":"height",_=tw.has(Lr(s)),S=o.reference[f]-o.floating[w]+(_&&((y=i.offset)==null?void 0:y[f])||0)+(_?0:b.crossAxis),E=o.reference[f]+o.reference[w]+(_?0:((v=i.offset)==null?void 0:v[f])||0)-(_?b.crossAxis:0);x<S?x=S:x>E&&(x=E)}return{[p]:h,[f]:x}}}},JC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:l=()=>{},...c}=Ir(e,t),d=await Si(t,c),f=Lr(s),p=xo(s),h=cr(s)==="y",{width:x,height:g}=o.floating;let b,y;f==="top"||f==="bottom"?(b=f,y=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,b=p==="end"?"top":"bottom");const v=g-d.top-d.bottom,w=x-d.left-d.right,_=bn(g-d[b],v),S=bn(x-d[y],w),E=!t.middlewareData.shift;let k=_,T=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=v),E&&!p){const O=ht(d.left,0),V=ht(d.right,0),M=ht(d.top,0),K=ht(d.bottom,0);h?T=x-2*(O!==0||V!==0?O+V:ht(d.left,d.right)):k=g-2*(M!==0||K!==0?M+K:ht(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:k});const j=await i.getDimensions(a.floating);return x!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function oc(){return typeof window<"u"}function bo(e){return rw(e)?(e.nodeName||"").toLowerCase():"#document"}function yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gr(e){var t;return(t=(rw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rw(e){return oc()?e instanceof Node||e instanceof yt(e).Node:!1}function Yt(e){return oc()?e instanceof Element||e instanceof yt(e).Element:!1}function pr(e){return oc()?e instanceof HTMLElement||e instanceof yt(e).HTMLElement:!1}function Om(e){return!oc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yt(e).ShadowRoot}const YC=new Set(["inline","contents"]);function Ki(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Xt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!YC.has(s)}const XC=new Set(["table","td","th"]);function ZC(e){return XC.has(bo(e))}const eT=[":popover-open",":modal"];function ic(e){return eT.some(t=>{try{return e.matches(t)}catch{return!1}})}const tT=["transform","translate","scale","rotate","perspective"],rT=["transform","translate","scale","rotate","perspective","filter"],nT=["paint","layout","strict","content"];function mh(e){const t=gh(),r=Yt(e)?Xt(e):e;return tT.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||rT.some(n=>(r.willChange||"").includes(n))||nT.some(n=>(r.contain||"").includes(n))}function sT(e){let t=_n(e);for(;pr(t)&&!po(t);){if(mh(t))return t;if(ic(t))return null;t=_n(t)}return null}function gh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const oT=new Set(["html","body","#document"]);function po(e){return oT.has(bo(e))}function Xt(e){return yt(e).getComputedStyle(e)}function ac(e){return Yt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _n(e){if(bo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Om(e)&&e.host||gr(e);return Om(t)?t.host:t}function nw(e){const t=_n(e);return po(t)?e.ownerDocument?e.ownerDocument.body:e.body:pr(t)&&Ki(t)?t:nw(t)}function Ei(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=nw(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=yt(s);if(o){const a=Ld(i);return t.concat(i,i.visualViewport||[],Ki(s)?s:[],a&&r?Ei(a):[])}return t.concat(s,Ei(s,[],r))}function Ld(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sw(e){const t=Xt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=pr(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=El(r)!==o||El(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function vh(e){return Yt(e)?e:e.contextElement}function Ks(e){const t=vh(e);if(!pr(t))return fr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=sw(t);let i=(o?El(r.width):r.width)/n,a=(o?El(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const iT=fr(0);function ow(e){const t=yt(e);return!gh()||!t.visualViewport?iT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aT(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==yt(e)?!1:t}function rs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=vh(e);let i=fr(1);t&&(n?Yt(n)&&(i=Ks(n)):i=Ks(e));const a=aT(o,r,n)?ow(o):fr(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const p=yt(o),h=n&&Yt(n)?yt(n):n;let x=p,g=Ld(x);for(;g&&n&&h!==x;){const b=Ks(g),y=g.getBoundingClientRect(),v=Xt(g),w=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*b.x,_=y.top+(g.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,f*=b.y,l+=w,c+=_,x=yt(g),g=Ld(x)}}return Cl({width:d,height:f,x:l,y:c})}function yh(e,t){const r=ac(e).scrollLeft;return t?t.left+r:rs(gr(e)).left+r}function iw(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:yh(e,n)),o=n.top+t.scrollTop;return{x:s,y:o}}function lT(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=gr(n),a=t?ic(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=fr(1);const d=fr(0),f=pr(n);if((f||!f&&!o)&&((bo(n)!=="body"||Ki(i))&&(l=ac(n)),pr(n))){const h=rs(n);c=Ks(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const p=i&&!f&&!o?iw(i,l,!0):fr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}}function cT(e){return Array.from(e.getClientRects())}function uT(e){const t=gr(e),r=ac(e),n=e.ownerDocument.body,s=ht(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ht(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+yh(e);const a=-r.scrollTop;return Xt(n).direction==="rtl"&&(i+=ht(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function dT(e,t){const r=yt(e),n=gr(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const c=gh();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}const fT=new Set(["absolute","fixed"]);function hT(e,t){const r=rs(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=pr(e)?Ks(e):fr(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:i,height:a,x:l,y:c}}function Im(e,t,r){let n;if(t==="viewport")n=dT(e,r);else if(t==="document")n=uT(gr(e));else if(Yt(t))n=hT(t,r);else{const s=ow(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Cl(n)}function aw(e,t){const r=_n(e);return r===t||!Yt(r)||po(r)?!1:Xt(r).position==="fixed"||aw(r,t)}function pT(e,t){const r=t.get(e);if(r)return r;let n=Ei(e,[],!1).filter(a=>Yt(a)&&bo(a)!=="body"),s=null;const o=Xt(e).position==="fixed";let i=o?_n(e):e;for(;Yt(i)&&!po(i);){const a=Xt(i),l=mh(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&fT.has(s.position)||Ki(i)&&!l&&aw(e,i))?n=n.filter(d=>d!==i):s=a,i=_n(i)}return t.set(e,n),n}function mT(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?ic(t)?[]:pT(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((c,d)=>{const f=Im(t,d,s);return c.top=ht(f.top,c.top),c.right=bn(f.right,c.right),c.bottom=bn(f.bottom,c.bottom),c.left=ht(f.left,c.left),c},Im(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gT(e){const{width:t,height:r}=sw(e);return{width:t,height:r}}function vT(e,t,r){const n=pr(t),s=gr(t),o=r==="fixed",i=rs(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=fr(0);function c(){l.x=yh(s)}if(n||!n&&!o)if((bo(t)!=="body"||Ki(s))&&(a=ac(t)),n){const h=rs(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&c();o&&!n&&s&&c();const d=s&&!n&&!o?iw(s,a):fr(0),f=i.left+a.scrollLeft-l.x-d.x,p=i.top+a.scrollTop-l.y-d.y;return{x:f,y:p,width:i.width,height:i.height}}function au(e){return Xt(e).position==="static"}function Lm(e,t){if(!pr(e)||Xt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return gr(e)===r&&(r=r.ownerDocument.body),r}function lw(e,t){const r=yt(e);if(ic(e))return r;if(!pr(e)){let s=_n(e);for(;s&&!po(s);){if(Yt(s)&&!au(s))return s;s=_n(s)}return r}let n=Lm(e,t);for(;n&&ZC(n)&&au(n);)n=Lm(n,t);return n&&po(n)&&au(n)&&!mh(n)?r:n||sT(e)||r}const yT=async function(e){const t=this.getOffsetParent||lw,r=this.getDimensions,n=await r(e.floating);return{reference:vT(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function wT(e){return Xt(e).direction==="rtl"}const xT={convertOffsetParentRelativeRectToViewportRelativeRect:lT,getDocumentElement:gr,getClippingRect:mT,getOffsetParent:lw,getElementRects:yT,getClientRects:cT,getDimensions:gT,getScale:Ks,isElement:Yt,isRTL:wT};function cw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bT(e,t){let r=null,n;const s=gr(e);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:d,top:f,width:p,height:h}=c;if(a||t(),!p||!h)return;const x=_a(f),g=_a(s.clientWidth-(d+p)),b=_a(s.clientHeight-(f+h)),y=_a(d),w={rootMargin:-x+"px "+-g+"px "+-b+"px "+-y+"px",threshold:ht(0,bn(1,l))||1};let _=!0;function S(E){const k=E[0].intersectionRatio;if(k!==l){if(!_)return i();k?i(!1,k):n=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!cw(c,e.getBoundingClientRect())&&i(),_=!1}try{r=new IntersectionObserver(S,{...w,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,w)}r.observe(e)}return i(!0),o}function _T(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=vh(e),d=s||o?[...c?Ei(c):[],...Ei(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",r,{passive:!0}),o&&y.addEventListener("resize",r)});const f=c&&a?bT(c,r):null;let p=-1,h=null;i&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let x,g=l?rs(e):null;l&&b();function b(){const y=rs(e);g&&!cw(g,y)&&r(),g=y,x=requestAnimationFrame(b)}return r(),()=>{var y;d.forEach(v=>{s&&v.removeEventListener("scroll",r),o&&v.removeEventListener("resize",r)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(x)}}const ST=KC,ET=GC,kT=HC,CT=JC,TT=WC,Mm=VC,PT=QC,AT=(e,t,r)=>{const n=new Map,s={platform:xT,...r},o={...s.platform,_c:n};return BC(e,t,{...s,platform:o})};var RT=typeof document<"u",jT=function(){},Ka=RT?m.useLayoutEffect:jT;function Tl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Tl(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!Tl(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function uw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dm(e,t){const r=uw(e);return Math.round(t*r)/r}function lu(e){const t=m.useRef(e);return Ka(()=>{t.current=e}),t}function NT(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=m.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=m.useState(n);Tl(p,n)||h(n);const[x,g]=m.useState(null),[b,y]=m.useState(null),v=m.useCallback(P=>{P!==E.current&&(E.current=P,g(P))},[]),w=m.useCallback(P=>{P!==k.current&&(k.current=P,y(P))},[]),_=o||x,S=i||b,E=m.useRef(null),k=m.useRef(null),T=m.useRef(d),j=l!=null,O=lu(l),V=lu(s),M=lu(c),K=m.useCallback(()=>{if(!E.current||!k.current)return;const P={placement:t,strategy:r,middleware:p};V.current&&(P.platform=V.current),AT(E.current,k.current,P).then(C=>{const I={...C,isPositioned:M.current!==!1};L.current&&!Tl(T.current,I)&&(T.current=I,Wi.flushSync(()=>{f(I)}))})},[p,t,r,V,M]);Ka(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[c]);const L=m.useRef(!1);Ka(()=>(L.current=!0,()=>{L.current=!1}),[]),Ka(()=>{if(_&&(E.current=_),S&&(k.current=S),_&&S){if(O.current)return O.current(_,S,K);K()}},[_,S,K,O,j]);const X=m.useMemo(()=>({reference:E,floating:k,setReference:v,setFloating:w}),[v,w]),F=m.useMemo(()=>({reference:_,floating:S}),[_,S]),q=m.useMemo(()=>{const P={position:r,left:0,top:0};if(!F.floating)return P;const C=Dm(F.floating,d.x),I=Dm(F.floating,d.y);return a?{...P,transform:"translate("+C+"px, "+I+"px)",...uw(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:C,top:I}},[r,a,F.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:K,refs:X,elements:F,floatingStyles:q}),[d,K,X,F,q])}const OT=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Mm({element:n.current,padding:s}).fn(r):{}:n?Mm({element:n,padding:s}).fn(r):{}}}},IT=(e,t)=>({...ST(e),options:[e,t]}),LT=(e,t)=>({...ET(e),options:[e,t]}),MT=(e,t)=>({...PT(e),options:[e,t]}),DT=(e,t)=>({...kT(e),options:[e,t]}),$T=(e,t)=>({...CT(e),options:[e,t]}),UT=(e,t)=>({...TT(e),options:[e,t]}),FT=(e,t)=>({...OT(e),options:[e,t]});var zT="Arrow",dw=m.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return u.jsx(oe.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});dw.displayName=zT;var BT=dw;function fw(e){const[t,r]=m.useState(void 0);return hr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var wh="Popper",[hw,lc]=mr(wh),[VT,pw]=hw(wh),mw=e=>{const{__scopePopper:t,children:r}=e,[n,s]=m.useState(null);return u.jsx(VT,{scope:t,anchor:n,onAnchorChange:s,children:r})};mw.displayName=wh;var gw="PopperAnchor",vw=m.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=pw(gw,r),i=m.useRef(null),a=ke(t,i);return m.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:u.jsx(oe.div,{...s,ref:a})});vw.displayName=gw;var xh="PopperContent",[HT,WT]=hw(xh),yw=m.forwardRef((e,t)=>{var te,yr,Ie,er,Ur,ls;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:x,...g}=e,b=pw(xh,r),[y,v]=m.useState(null),w=ke(t,Fr=>v(Fr)),[_,S]=m.useState(null),E=fw(_),k=(E==null?void 0:E.width)??0,T=(E==null?void 0:E.height)??0,j=n+(o!=="center"?"-"+o:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},V=Array.isArray(c)?c:[c],M=V.length>0,K={padding:O,boundary:V.filter(KT),altBoundary:M},{refs:L,floatingStyles:X,placement:F,isPositioned:q,middlewareData:P}=NT({strategy:"fixed",placement:j,whileElementsMounted:(...Fr)=>_T(...Fr,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[IT({mainAxis:s+T,alignmentAxis:i}),l&&LT({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?MT():void 0,...K}),l&&DT({...K}),$T({...K,apply:({elements:Fr,rects:Xi,availableWidth:kc,availableHeight:Zi})=>{const{width:Cc,height:ko}=Xi.reference,cs=Fr.floating.style;cs.setProperty("--radix-popper-available-width",`${kc}px`),cs.setProperty("--radix-popper-available-height",`${Zi}px`),cs.setProperty("--radix-popper-anchor-width",`${Cc}px`),cs.setProperty("--radix-popper-anchor-height",`${ko}px`)}}),_&&FT({element:_,padding:a}),GT({arrowWidth:k,arrowHeight:T}),p&&UT({strategy:"referenceHidden",...K})]}),[C,I]=bw(F),z=xt(x);hr(()=>{q&&(z==null||z())},[q,z]);const $=(te=P.arrow)==null?void 0:te.x,J=(yr=P.arrow)==null?void 0:yr.y,Z=((Ie=P.arrow)==null?void 0:Ie.centerOffset)!==0,[ge,be]=m.useState();return hr(()=>{y&&be(window.getComputedStyle(y).zIndex)},[y]),u.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:q?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(er=P.transformOrigin)==null?void 0:er.x,(Ur=P.transformOrigin)==null?void 0:Ur.y].join(" "),...((ls=P.hide)==null?void 0:ls.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(HT,{scope:r,placedSide:C,onArrowChange:S,arrowX:$,arrowY:J,shouldHideArrow:Z,children:u.jsx(oe.div,{"data-side":C,"data-align":I,...g,ref:w,style:{...g.style,animation:q?void 0:"none"}})})})});yw.displayName=xh;var ww="PopperArrow",qT={top:"bottom",right:"left",bottom:"top",left:"right"},xw=m.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=WT(ww,n),i=qT[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(BT,{...s,ref:r,style:{...s.style,display:"block"}})})});xw.displayName=ww;function KT(e){return e!==null}var GT=e=>({name:"transformOrigin",options:e,fn(t){var b,y,v;const{placement:r,rects:n,middlewareData:s}=t,i=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=bw(r),f={start:"0%",center:"50%",end:"100%"}[d],p=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,h=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let x="",g="";return c==="bottom"?(x=i?f:`${p}px`,g=`${-l}px`):c==="top"?(x=i?f:`${p}px`,g=`${n.floating.height+l}px`):c==="right"?(x=`${-l}px`,g=i?f:`${h}px`):c==="left"&&(x=`${n.floating.width+l}px`,g=i?f:`${h}px`),{data:{x,y:g}}}});function bw(e){const[t,r="center"]=e.split("-");return[t,r]}var QT=mw,_w=vw,Sw=yw,Ew=xw,[cc,rM]=mr("Tooltip",[lc]),bh=lc(),kw="TooltipProvider",JT=700,$m="tooltip.open",[YT,Cw]=cc(kw),Tw=e=>{const{__scopeTooltip:t,delayDuration:r=JT,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,i=m.useRef(!0),a=m.useRef(!1),l=m.useRef(0);return m.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),u.jsx(YT,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:m.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:m.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:o})};Tw.displayName=kw;var Pw="Tooltip",[nM,uc]=cc(Pw),Md="TooltipTrigger",XT=m.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=uc(Md,r),o=Cw(Md,r),i=bh(r),a=m.useRef(null),l=ke(t,a,s.onTriggerChange),c=m.useRef(!1),d=m.useRef(!1),f=m.useCallback(()=>c.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(_w,{asChild:!0,...i,children:u.jsx(oe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:B(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:B(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:B(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:B(e.onBlur,s.onClose),onClick:B(e.onClick,s.onClose)})})});XT.displayName=Md;var ZT="TooltipPortal",[sM,eP]=cc(ZT,{forceMount:void 0}),mo="TooltipContent",Aw=m.forwardRef((e,t)=>{const r=eP(mo,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=uc(mo,e.__scopeTooltip);return u.jsx(Cn,{present:n||i.open,children:i.disableHoverableContent?u.jsx(Rw,{side:s,...o,ref:t}):u.jsx(tP,{side:s,...o,ref:t})})}),tP=m.forwardRef((e,t)=>{const r=uc(mo,e.__scopeTooltip),n=Cw(mo,e.__scopeTooltip),s=m.useRef(null),o=ke(t,s),[i,a]=m.useState(null),{trigger:l,onClose:c}=r,d=s.current,{onPointerInTransitChange:f}=n,p=m.useCallback(()=>{a(null),f(!1)},[f]),h=m.useCallback((x,g)=>{const b=x.currentTarget,y={x:x.clientX,y:x.clientY},v=iP(y,b.getBoundingClientRect()),w=aP(y,v),_=lP(g.getBoundingClientRect()),S=uP([...w,..._]);a(S),f(!0)},[f]);return m.useEffect(()=>()=>p(),[p]),m.useEffect(()=>{if(l&&d){const x=b=>h(b,d),g=b=>h(b,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[l,d,h,p]),m.useEffect(()=>{if(i){const x=g=>{const b=g.target,y={x:g.clientX,y:g.clientY},v=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),w=!cP(y,i);v?p():w&&(p(),c())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,i,c,p]),u.jsx(Rw,{...e,ref:o})}),[rP,nP]=cc(Pw,{isInside:!1}),sP=ZS("TooltipContent"),Rw=m.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=uc(mo,r),c=bh(r),{onClose:d}=l;return m.useEffect(()=>(document.addEventListener($m,d),()=>document.removeEventListener($m,d)),[d]),m.useEffect(()=>{if(l.trigger){const f=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(tc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(Sw,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(sP,{children:n}),u.jsx(rP,{scope:r,isInside:!0,children:u.jsx(_E,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Aw.displayName=mo;var jw="TooltipArrow",oP=m.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=bh(r);return nP(jw,r).isInside?null:u.jsx(Ew,{...s,...n,ref:t})});oP.displayName=jw;function iP(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function aP(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function lP(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function cP(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o],l=t[i],c=a.x,d=a.y,f=l.x,p=l.y;d>n!=p>n&&r<(f-c)*(n-d)/(p-d)+c&&(s=!s)}return s}function uP(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),dP(t)}function dP(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var fP=Tw,Nw=Aw;const hP=fP,pP=m.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(Nw,{ref:n,sideOffset:t,className:le("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));pP.displayName=Nw.displayName;var dc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fc=typeof window>"u"||"Deno"in globalThis;function Ft(){}function mP(e,t){return typeof e=="function"?e(t):e}function gP(e){return typeof e=="number"&&e>=0&&e!==1/0}function vP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Dd(e,t){return typeof e=="function"?e(t):e}function yP(e,t){return typeof e=="function"?e(t):e}function Um(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(n){if(t.queryHash!==_h(i,t.options))return!1}else if(!Ci(t.queryKey,i))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function Fm(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(ki(t.options.mutationKey)!==ki(o))return!1}else if(!Ci(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function _h(e,t){return((t==null?void 0:t.queryKeyHashFn)||ki)(e)}function ki(e){return JSON.stringify(e,(t,r)=>$d(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Ci(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ci(e[r],t[r])):!1}function Ow(e,t){if(e===t)return e;const r=zm(e)&&zm(t);if(r||$d(e)&&$d(t)){const n=r?e:Object.keys(e),s=n.length,o=r?t:Object.keys(t),i=o.length,a=r?[]:{},l=new Set(n);let c=0;for(let d=0;d<i;d++){const f=r?d:o[d];(!r&&l.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,c++):(a[f]=Ow(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&c++)}return s===i&&c===s?e:a}return t}function zm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $d(e){if(!Bm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Bm(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Bm(e){return Object.prototype.toString.call(e)==="[object Object]"}function wP(e){return new Promise(t=>{setTimeout(t,e)})}function xP(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Ow(e,t):t}function bP(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function _P(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Sh=Symbol();function Iw(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Sh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Bn,tn,Xs,Wg,SP=(Wg=class extends dc{constructor(){super();se(this,Bn);se(this,tn);se(this,Xs);Q(this,Xs,t=>{if(!fc&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){A(this,tn)||this.setEventListener(A(this,Xs))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,tn))==null||t.call(this),Q(this,tn,void 0))}setEventListener(t){var r;Q(this,Xs,t),(r=A(this,tn))==null||r.call(this),Q(this,tn,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){A(this,Bn)!==t&&(Q(this,Bn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof A(this,Bn)=="boolean"?A(this,Bn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Bn=new WeakMap,tn=new WeakMap,Xs=new WeakMap,Wg),Lw=new SP,Zs,rn,eo,qg,EP=(qg=class extends dc{constructor(){super();se(this,Zs,!0);se(this,rn);se(this,eo);Q(this,eo,t=>{if(!fc&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){A(this,rn)||this.setEventListener(A(this,eo))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,rn))==null||t.call(this),Q(this,rn,void 0))}setEventListener(t){var r;Q(this,eo,t),(r=A(this,rn))==null||r.call(this),Q(this,rn,t(this.setOnline.bind(this)))}setOnline(t){A(this,Zs)!==t&&(Q(this,Zs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return A(this,Zs)}},Zs=new WeakMap,rn=new WeakMap,eo=new WeakMap,qg),Pl=new EP;function kP(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function CP(e){return Math.min(1e3*2**e,3e4)}function Mw(e){return(e??"online")==="online"?Pl.isOnline():!0}var Dw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function cu(e){return e instanceof Dw}function $w(e){let t=!1,r=0,n=!1,s;const o=kP(),i=g=>{var b;n||(p(new Dw(g)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Lw.isFocused()&&(e.networkMode==="always"||Pl.isOnline())&&e.canRun(),d=()=>Mw(e.networkMode)&&e.canRun(),f=g=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,g),s==null||s(),o.resolve(g))},p=g=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,g),s==null||s(),o.reject(g))},h=()=>new Promise(g=>{var b;s=y=>{(n||c())&&g(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;s=void 0,n||(g=e.onContinue)==null||g.call(e)}),x=()=>{if(n)return;let g;const b=r===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(f).catch(y=>{var E;if(n)return;const v=e.retry??(fc?0:3),w=e.retryDelay??CP,_=typeof w=="function"?w(r,y):w,S=v===!0||typeof v=="number"&&r<v||typeof v=="function"&&v(r,y);if(t||!S){p(y);return}r++,(E=e.onFail)==null||E.call(e,r,y),wP(_).then(()=>c()?void 0:h()).then(()=>{t?p(y):x()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?x():h().then(x),o)}}var TP=e=>setTimeout(e,0);function PP(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=TP;const o=a=>{t?e.push(a):s(()=>{r(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Ze=PP(),Vn,Kg,Uw=(Kg=class{constructor(){se(this,Vn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gP(this.gcTime)&&Q(this,Vn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fc?1/0:5*60*1e3))}clearGcTimeout(){A(this,Vn)&&(clearTimeout(A(this,Vn)),Q(this,Vn,void 0))}},Vn=new WeakMap,Kg),to,Hn,kt,Wn,qe,Di,qn,Bt,br,Gg,AP=(Gg=class extends Uw{constructor(t){super();se(this,Bt);se(this,to);se(this,Hn);se(this,kt);se(this,Wn);se(this,qe);se(this,Di);se(this,qn);Q(this,qn,!1),Q(this,Di,t.defaultOptions),this.setOptions(t.options),this.observers=[],Q(this,Wn,t.client),Q(this,kt,A(this,Wn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Q(this,to,jP(this.options)),this.state=t.state??A(this,to),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=A(this,qe))==null?void 0:t.promise}setOptions(t){this.options={...A(this,Di),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,kt).remove(this)}setData(t,r){const n=xP(this.state.data,t,this.options);return Ve(this,Bt,br).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Ve(this,Bt,br).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=A(this,qe))==null?void 0:n.promise;return(s=A(this,qe))==null||s.cancel(t),r?r.then(Ft).catch(Ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,to))}isActive(){return this.observers.some(t=>yP(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Sh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Dd(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!vP(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,qe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,qe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),A(this,kt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(A(this,qe)&&(A(this,qn)?A(this,qe).cancel({revert:!0}):A(this,qe).cancelRetry()),this.scheduleGc()),A(this,kt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ve(this,Bt,br).call(this,{type:"invalidate"})}fetch(t,r){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(A(this,qe))return A(this,qe).continueRetry(),A(this,qe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(h=>h.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(Q(this,qn,!0),n.signal)})},o=()=>{const p=Iw(this.options,r),x=(()=>{const g={client:A(this,Wn),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return Q(this,qn,!1),this.options.persister?this.options.persister(p,x,this):p(x)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:A(this,Wn),state:this.state,fetchFn:o};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),Q(this,Hn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&Ve(this,Bt,br).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const l=p=>{var h,x,g,b;cu(p)&&p.silent||Ve(this,Bt,br).call(this,{type:"error",error:p}),cu(p)||((x=(h=A(this,kt).config).onError)==null||x.call(h,p,this),(b=(g=A(this,kt).config).onSettled)==null||b.call(g,this.state.data,p,this)),this.scheduleGc()};return Q(this,qe,$w({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var h,x,g,b;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(y){l(y);return}(x=(h=A(this,kt).config).onSuccess)==null||x.call(h,p,this),(b=(g=A(this,kt).config).onSettled)==null||b.call(g,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,h)=>{Ve(this,Bt,br).call(this,{type:"failed",failureCount:p,error:h})},onPause:()=>{Ve(this,Bt,br).call(this,{type:"pause"})},onContinue:()=>{Ve(this,Bt,br).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),A(this,qe).start()}},to=new WeakMap,Hn=new WeakMap,kt=new WeakMap,Wn=new WeakMap,qe=new WeakMap,Di=new WeakMap,qn=new WeakMap,Bt=new WeakSet,br=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...RP(n.data,this.options),fetchMeta:t.meta??null};case"success":return Q(this,Hn,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return cu(s)&&s.revert&&A(this,Hn)?{...A(this,Hn),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ze.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),A(this,kt).notify({query:this,type:"updated",action:t})})},Gg);function RP(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Mw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var nr,Qg,NP=(Qg=class extends dc{constructor(t={}){super();se(this,nr);this.config=t,Q(this,nr,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??_h(s,r);let i=this.get(o);return i||(i=new AP({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){A(this,nr).has(t.queryHash)||(A(this,nr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=A(this,nr).get(t.queryHash);r&&(t.destroy(),r===t&&A(this,nr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return A(this,nr).get(t)}getAll(){return[...A(this,nr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Um(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Um(t,n)):r}notify(t){Ze.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nr=new WeakMap,Qg),sr,Ye,Kn,or,Kr,Jg,OP=(Jg=class extends Uw{constructor(t){super();se(this,or);se(this,sr);se(this,Ye);se(this,Kn);this.mutationId=t.mutationId,Q(this,Ye,t.mutationCache),Q(this,sr,[]),this.state=t.state||IP(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,sr).includes(t)||(A(this,sr).push(t),this.clearGcTimeout(),A(this,Ye).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Q(this,sr,A(this,sr).filter(r=>r!==t)),this.scheduleGc(),A(this,Ye).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,sr).length||(this.state.status==="pending"?this.scheduleGc():A(this,Ye).remove(this))}continue(){var t;return((t=A(this,Kn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,l,c,d,f,p,h,x,g,b,y,v,w,_,S,E,k,T;const r=()=>{Ve(this,or,Kr).call(this,{type:"continue"})};Q(this,Kn,$w({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,O)=>{Ve(this,or,Kr).call(this,{type:"failed",failureCount:j,error:O})},onPause:()=>{Ve(this,or,Kr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,Ye).canRun(this)}));const n=this.state.status==="pending",s=!A(this,Kn).canStart();try{if(n)r();else{Ve(this,or,Kr).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(o=A(this,Ye).config).onMutate)==null?void 0:i.call(o,t,this));const O=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));O!==this.state.context&&Ve(this,or,Kr).call(this,{type:"pending",context:O,variables:t,isPaused:s})}const j=await A(this,Kn).start();return await((d=(c=A(this,Ye).config).onSuccess)==null?void 0:d.call(c,j,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,j,t,this.state.context)),await((x=(h=A(this,Ye).config).onSettled)==null?void 0:x.call(h,j,null,this.state.variables,this.state.context,this)),await((b=(g=this.options).onSettled)==null?void 0:b.call(g,j,null,t,this.state.context)),Ve(this,or,Kr).call(this,{type:"success",data:j}),j}catch(j){try{throw await((v=(y=A(this,Ye).config).onError)==null?void 0:v.call(y,j,t,this.state.context,this)),await((_=(w=this.options).onError)==null?void 0:_.call(w,j,t,this.state.context)),await((E=(S=A(this,Ye).config).onSettled)==null?void 0:E.call(S,void 0,j,this.state.variables,this.state.context,this)),await((T=(k=this.options).onSettled)==null?void 0:T.call(k,void 0,j,t,this.state.context)),j}finally{Ve(this,or,Kr).call(this,{type:"error",error:j})}}finally{A(this,Ye).runNext(this)}}},sr=new WeakMap,Ye=new WeakMap,Kn=new WeakMap,or=new WeakSet,Kr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ze.batch(()=>{A(this,sr).forEach(n=>{n.onMutationUpdate(t)}),A(this,Ye).notify({mutation:this,type:"updated",action:t})})},Jg);function IP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kr,Vt,$i,Yg,LP=(Yg=class extends dc{constructor(t={}){super();se(this,kr);se(this,Vt);se(this,$i);this.config=t,Q(this,kr,new Set),Q(this,Vt,new Map),Q(this,$i,0)}build(t,r,n){const s=new OP({mutationCache:this,mutationId:++ta(this,$i)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){A(this,kr).add(t);const r=Sa(t);if(typeof r=="string"){const n=A(this,Vt).get(r);n?n.push(t):A(this,Vt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(A(this,kr).delete(t)){const r=Sa(t);if(typeof r=="string"){const n=A(this,Vt).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&A(this,Vt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Sa(t);if(typeof r=="string"){const n=A(this,Vt).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Sa(t);if(typeof r=="string"){const s=(n=A(this,Vt).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ze.batch(()=>{A(this,kr).forEach(t=>{this.notify({type:"removed",mutation:t})}),A(this,kr).clear(),A(this,Vt).clear()})}getAll(){return Array.from(A(this,kr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Fm(r,n))}findAll(t={}){return this.getAll().filter(r=>Fm(t,r))}notify(t){Ze.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ze.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ft))))}},kr=new WeakMap,Vt=new WeakMap,$i=new WeakMap,Yg);function Sa(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Vm(e){return{onFetch:(t,r)=>{var d,f,p,h,x;const n=t.options,s=(p=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],i=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},y=Iw(t.options,t.fetchOptions),v=async(w,_,S)=>{if(g)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const k=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return b(V),V})(),T=await y(k),{maxPages:j}=t.options,O=S?_P:bP;return{pages:O(w.pages,T,j),pageParams:O(w.pageParams,_,j)}};if(s&&o.length){const w=s==="backward",_=w?MP:Hm,S={pages:o,pageParams:i},E=_(n,S);a=await v(S,E,w)}else{const w=e??o.length;do{const _=l===0?i[0]??n.initialPageParam:Hm(n,a);if(l>0&&_==null)break;a=await v(a,_),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function Hm(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function MP(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var _e,nn,sn,ro,no,on,so,oo,Xg,DP=(Xg=class{constructor(e={}){se(this,_e);se(this,nn);se(this,sn);se(this,ro);se(this,no);se(this,on);se(this,so);se(this,oo);Q(this,_e,e.queryCache||new NP),Q(this,nn,e.mutationCache||new LP),Q(this,sn,e.defaultOptions||{}),Q(this,ro,new Map),Q(this,no,new Map),Q(this,on,0)}mount(){ta(this,on)._++,A(this,on)===1&&(Q(this,so,Lw.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,_e).onFocus())})),Q(this,oo,Pl.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,_e).onOnline())})))}unmount(){var e,t;ta(this,on)._--,A(this,on)===0&&((e=A(this,so))==null||e.call(this),Q(this,so,void 0),(t=A(this,oo))==null||t.call(this),Q(this,oo,void 0))}isFetching(e){return A(this,_e).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return A(this,nn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,_e).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=A(this,_e).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Dd(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return A(this,_e).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=A(this,_e).get(n.queryHash),o=s==null?void 0:s.state.data,i=mP(t,o);if(i!==void 0)return A(this,_e).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Ze.batch(()=>A(this,_e).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,_e).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=A(this,_e);Ze.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=A(this,_e);return Ze.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ze.batch(()=>A(this,_e).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Ft).catch(Ft)}invalidateQueries(e,t={}){return Ze.batch(()=>(A(this,_e).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ze.batch(()=>A(this,_e).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(Ft)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Ft)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=A(this,_e).build(this,t);return r.isStaleByTime(Dd(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ft).catch(Ft)}fetchInfiniteQuery(e){return e.behavior=Vm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ft).catch(Ft)}ensureInfiniteQueryData(e){return e.behavior=Vm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Pl.isOnline()?A(this,nn).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,_e)}getMutationCache(){return A(this,nn)}getDefaultOptions(){return A(this,sn)}setDefaultOptions(e){Q(this,sn,e)}setQueryDefaults(e,t){A(this,ro).set(ki(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...A(this,ro).values()],r={};return t.forEach(n=>{Ci(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){A(this,no).set(ki(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...A(this,no).values()],r={};return t.forEach(n=>{Ci(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...A(this,sn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=_h(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Sh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...A(this,sn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){A(this,_e).clear(),A(this,nn).clear()}},_e=new WeakMap,nn=new WeakMap,sn=new WeakMap,ro=new WeakMap,no=new WeakMap,on=new WeakMap,so=new WeakMap,oo=new WeakMap,Xg),$P=m.createContext(void 0),UP=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx($P.Provider,{value:e,children:t}));/**
 * @remix-run/router v1.23.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Ti(){return Ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ti.apply(this,arguments)}var cn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(cn||(cn={}));const Wm="popstate";function FP(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:i,hash:a}=n.location;return Ud("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Al(s)}return BP(t,r,null,e)}function Te(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Fw(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zP(){return Math.random().toString(36).substr(2,8)}function qm(e,t){return{usr:e.state,key:e.key,idx:t}}function Ud(e,t,r,n){return r===void 0&&(r=null),Ti({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?_o(t):t,{state:r,key:t&&t.key||n||zP()})}function Al(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function _o(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function BP(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=cn.Pop,l=null,c=d();c==null&&(c=0,i.replaceState(Ti({},i.state,{idx:c}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=cn.Pop;let b=d(),y=b==null?null:b-c;c=b,l&&l({action:a,location:g.location,delta:y})}function p(b,y){a=cn.Push;let v=Ud(g.location,b,y);c=d()+1;let w=qm(v,c),_=g.createHref(v);try{i.pushState(w,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}o&&l&&l({action:a,location:g.location,delta:1})}function h(b,y){a=cn.Replace;let v=Ud(g.location,b,y);c=d();let w=qm(v,c),_=g.createHref(v);i.replaceState(w,"",_),o&&l&&l({action:a,location:g.location,delta:0})}function x(b){let y=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof b=="string"?b:Al(b);return v=v.replace(/ $/,"%20"),Te(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let g={get action(){return a},get location(){return e(s,i)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Wm,f),l=b,()=>{s.removeEventListener(Wm,f),l=null}},createHref(b){return t(s,b)},createURL:x,encodeLocation(b){let y=x(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:h,go(b){return i.go(b)}};return g}var Km;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Km||(Km={}));function VP(e,t,r){return r===void 0&&(r="/"),HP(e,t,r,!1)}function HP(e,t,r,n){let s=typeof t=="string"?_o(t):t,o=Eh(s.pathname||"/",r);if(o==null)return null;let i=zw(e);WP(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=rA(o);a=eA(i[l],c,n)}return a}function zw(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(Te(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=yn([n,l.relativePath]),d=r.concat(l);o.children&&o.children.length>0&&(Te(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),zw(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:XP(c,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of Bw(o.path))s(o,i,l)}),t}function Bw(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=Bw(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function WP(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ZP(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const qP=/^:[\w-]+$/,KP=3,GP=2,QP=1,JP=10,YP=-2,Gm=e=>e==="*";function XP(e,t){let r=e.split("/"),n=r.length;return r.some(Gm)&&(n+=YP),t&&(n+=GP),r.filter(s=>!Gm(s)).reduce((s,o)=>s+(qP.test(o)?KP:o===""?QP:JP),n)}function ZP(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function eA(e,t,r){let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=Qm({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),p=l.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=Qm({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:yn([o,f.pathname]),pathnameBase:iA(yn([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=yn([o,f.pathnameBase]))}return i}function Qm(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=tA(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,d,f)=>{let{paramName:p,isOptional:h}=d;if(p==="*"){let g=a[f]||"";i=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const x=a[f];return h&&!x?c[p]=void 0:c[p]=(x||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function tA(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Fw(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function rA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Fw(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Eh(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function nA(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?_o(e):e;return{pathname:r?r.startsWith("/")?r:sA(r,t):t,search:aA(n),hash:lA(s)}}function sA(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function uu(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function oA(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function kh(e,t){let r=oA(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ch(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=_o(e):(s=Ti({},e),Te(!s.pathname||!s.pathname.includes("?"),uu("?","pathname","search",s)),Te(!s.pathname||!s.pathname.includes("#"),uu("#","pathname","hash",s)),Te(!s.search||!s.search.includes("#"),uu("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let f=t.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}a=f>=0?t[f]:"/"}let l=nA(s,a),c=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const yn=e=>e.join("/").replace(/\/\/+/g,"/"),iA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),aA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function cA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Vw=["post","put","patch","delete"];new Set(Vw);const uA=["get",...Vw];new Set(uA);/**
 * React Router v6.30.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Pi(){return Pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pi.apply(this,arguments)}const Th=m.createContext(null),dA=m.createContext(null),Tn=m.createContext(null),hc=m.createContext(null),Dr=m.createContext({outlet:null,matches:[],isDataRoute:!1}),Hw=m.createContext(null);function fA(e,t){let{relative:r}=t===void 0?{}:t;So()||Te(!1);let{basename:n,navigator:s}=m.useContext(Tn),{hash:o,pathname:i,search:a}=qw(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:yn([n,i])),s.createHref({pathname:l,search:a,hash:o})}function So(){return m.useContext(hc)!=null}function vr(){return So()||Te(!1),m.useContext(hc).location}function Ww(e){m.useContext(Tn).static||m.useLayoutEffect(e)}function pc(){let{isDataRoute:e}=m.useContext(Dr);return e?kA():hA()}function hA(){So()||Te(!1);let e=m.useContext(Th),{basename:t,future:r,navigator:n}=m.useContext(Tn),{matches:s}=m.useContext(Dr),{pathname:o}=vr(),i=JSON.stringify(kh(s,r.v7_relativeSplatPath)),a=m.useRef(!1);return Ww(()=>{a.current=!0}),m.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let f=Ch(c,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:yn([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,i,o,e])}function oM(){let{matches:e}=m.useContext(Dr),t=e[e.length-1];return t?t.params:{}}function qw(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=m.useContext(Tn),{matches:s}=m.useContext(Dr),{pathname:o}=vr(),i=JSON.stringify(kh(s,n.v7_relativeSplatPath));return m.useMemo(()=>Ch(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function pA(e,t){return mA(e,t)}function mA(e,t,r,n){So()||Te(!1);let{navigator:s}=m.useContext(Tn),{matches:o}=m.useContext(Dr),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=vr(),d;if(t){var f;let b=typeof t=="string"?_o(t):t;l==="/"||(f=b.pathname)!=null&&f.startsWith(l)||Te(!1),d=b}else d=c;let p=d.pathname||"/",h=p;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=VP(e,{pathname:h}),g=xA(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:yn([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:yn([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),o,r,n);return t&&g?m.createElement(hc.Provider,{value:{location:Pi({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:cn.Pop}},g):g}function gA(){let e=EA(),t=cA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),r?m.createElement("pre",{style:s},r):null,null)}const vA=m.createElement(gA,null);class yA extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?m.createElement(Dr.Provider,{value:this.props.routeContext},m.createElement(Hw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function wA(e){let{routeContext:t,match:r,children:n}=e,s=m.useContext(Th);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),m.createElement(Dr.Provider,{value:t},n)}function xA(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Te(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:p,errors:h}=r,x=f.route.loader&&p[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||x){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((d,f,p)=>{let h,x=!1,g=null,b=null;r&&(h=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||vA,l&&(c<0&&p===0?(x=!0,b=null):c===p&&(x=!0,b=f.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,p+1)),v=()=>{let w;return h?w=g:x?w=b:f.route.Component?w=m.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,m.createElement(wA,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:r!=null},children:w})};return r&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?m.createElement(yA,{location:r.location,revalidation:r.revalidation,component:g,error:h,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var Kw=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Kw||{}),Rl=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Rl||{});function bA(e){let t=m.useContext(Th);return t||Te(!1),t}function _A(e){let t=m.useContext(dA);return t||Te(!1),t}function SA(e){let t=m.useContext(Dr);return t||Te(!1),t}function Gw(e){let t=SA(),r=t.matches[t.matches.length-1];return r.route.id||Te(!1),r.route.id}function EA(){var e;let t=m.useContext(Hw),r=_A(Rl.UseRouteError),n=Gw(Rl.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function kA(){let{router:e}=bA(Kw.UseNavigateStable),t=Gw(Rl.UseNavigateStable),r=m.useRef(!1);return Ww(()=>{r.current=!0}),m.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Pi({fromRouteId:t},o)))},[e,t])}function CA(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function TA(e){let{to:t,replace:r,state:n,relative:s}=e;So()||Te(!1);let{future:o,static:i}=m.useContext(Tn),{matches:a}=m.useContext(Dr),{pathname:l}=vr(),c=pc(),d=Ch(t,kh(a,o.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return m.useEffect(()=>c(JSON.parse(f),{replace:r,state:n,relative:s}),[c,f,s,r,n]),null}function Re(e){Te(!1)}function PA(e){let{basename:t="/",children:r=null,location:n,navigationType:s=cn.Pop,navigator:o,static:i=!1,future:a}=e;So()&&Te(!1);let l=t.replace(/^\/*/,"/"),c=m.useMemo(()=>({basename:l,navigator:o,static:i,future:Pi({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=_o(n));let{pathname:d="/",search:f="",hash:p="",state:h=null,key:x="default"}=n,g=m.useMemo(()=>{let b=Eh(d,l);return b==null?null:{location:{pathname:b,search:f,hash:p,state:h,key:x},navigationType:s}},[l,d,f,p,h,x,s]);return g==null?null:m.createElement(Tn.Provider,{value:c},m.createElement(hc.Provider,{children:r,value:g}))}function AA(e){let{children:t,location:r}=e;return pA(Fd(t),r)}new Promise(()=>{});function Fd(e,t){t===void 0&&(t=[]);let r=[];return m.Children.forEach(e,(n,s)=>{if(!m.isValidElement(n))return;let o=[...t,s];if(n.type===m.Fragment){r.push.apply(r,Fd(n.props.children,o));return}n.type!==Re&&Te(!1),!n.props.index||!n.props.children||Te(!1);let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Fd(n.props.children,o)),r.push(i)}),r}/**
 * React Router DOM v6.30.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function zd(){return zd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zd.apply(this,arguments)}function RA(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function jA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function NA(e,t){return e.button===0&&(!t||t==="_self")&&!jA(e)}function Bd(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function OA(e,t){let r=Bd(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const IA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],LA="6";try{window.__reactRouterVersion=LA}catch{}const MA="startTransition",Jm=mf[MA];function DA(e){let{basename:t,children:r,future:n,window:s}=e,o=m.useRef();o.current==null&&(o.current=FP({window:s,v5Compat:!0}));let i=o.current,[a,l]=m.useState({action:i.action,location:i.location}),{v7_startTransition:c}=n||{},d=m.useCallback(f=>{c&&Jm?Jm(()=>l(f)):l(f)},[l,c]);return m.useLayoutEffect(()=>i.listen(d),[i,d]),m.useEffect(()=>CA(n),[n]),m.createElement(PA,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}const $A=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",UA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,it=m.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:c,preventScrollReset:d,viewTransition:f}=t,p=RA(t,IA),{basename:h}=m.useContext(Tn),x,g=!1;if(typeof c=="string"&&UA.test(c)&&(x=c,$A))try{let w=new URL(window.location.href),_=c.startsWith("//")?new URL(w.protocol+c):new URL(c),S=Eh(_.pathname,h);_.origin===w.origin&&S!=null?c=S+_.search+_.hash:g=!0}catch{}let b=fA(c,{relative:s}),y=FA(c,{replace:i,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:f});function v(w){n&&n(w),w.defaultPrevented||y(w)}return m.createElement("a",zd({},p,{href:x||b,onClick:g||o?n:v,ref:r,target:l}))});var Ym;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ym||(Ym={}));var Xm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xm||(Xm={}));function FA(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,viewTransition:a}=t===void 0?{}:t,l=pc(),c=vr(),d=qw(e,{relative:i});return m.useCallback(f=>{if(NA(f,r)){f.preventDefault();let p=n!==void 0?n:Al(c)===Al(d);l(e,{replace:p,state:s,preventScrollReset:o,relative:i,viewTransition:a})}},[c,l,d,n,s,r,e,o,i,a])}function iM(e){let t=m.useRef(Bd(e)),r=m.useRef(!1),n=vr(),s=m.useMemo(()=>OA(n.search,r.current?null:t.current),[n.search]),o=pc(),i=m.useCallback((a,l)=>{const c=Bd(typeof a=="function"?a(s):a);r.current=!0,o("?"+c,l)},[o,s]);return[s,i]}var zA=typeof Element<"u",BA=typeof Map=="function",VA=typeof Set=="function",HA=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Ga(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Ga(e[n],t[n]))return!1;return!0}var o;if(BA&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;for(o=e.entries();!(n=o.next()).done;)if(!Ga(n.value[1],t.get(n.value[0])))return!1;return!0}if(VA&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(HA&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;if(zA&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&e.$$typeof)&&!Ga(e[s[n]],t[s[n]]))return!1;return!0}return e!==e&&t!==t}var WA=function(t,r){try{return Ga(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const qA=Ui(WA);var KA=function(e,t,r,n,s,o,i,a){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,s,o,i,a],d=0;l=new Error(t.replace(/%s/g,function(){return c[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},GA=KA;const Zm=Ui(GA);var QA=function(t,r,n,s){var o=n?n.call(s,t,r):void 0;if(o!==void 0)return!!o;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var i=Object.keys(t),a=Object.keys(r);if(i.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(r),c=0;c<i.length;c++){var d=i[c];if(!l(d))return!1;var f=t[d],p=r[d];if(o=n?n.call(s,f,p,d):void 0,o===!1||o===void 0&&f!==p)return!1}return!0};const JA=Ui(QA);var Qw=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Qw||{}),du={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},eg=Object.values(Qw),Ph={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},YA=Object.entries(Ph).reduce((e,[t,r])=>(e[r]=t,e),{}),Kt="data-rh",Gs={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Qs=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},XA=e=>{let t=Qs(e,"title");const r=Qs(e,Gs.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=Qs(e,Gs.DEFAULT_TITLE);return t||n||void 0},ZA=e=>Qs(e,Gs.ON_CHANGE_CLIENT_STATE)||(()=>{}),fu=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),eR=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let o=0;o<s.length;o+=1){const a=s[o].toLowerCase();if(e.indexOf(a)!==-1&&n[a])return r.concat(n)}}return r},[]),tR=e=>console&&typeof console.warn=="function"&&console.warn(e),Do=(e,t,r)=>{const n={};return r.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&tR(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,o)=>{const i={};o.filter(l=>{let c;const d=Object.keys(l);for(let p=0;p<d.length;p+=1){const h=d[p],x=h.toLowerCase();t.indexOf(x)!==-1&&!(c==="rel"&&l[c].toLowerCase()==="canonical")&&!(x==="rel"&&l[x].toLowerCase()==="stylesheet")&&(c=x),t.indexOf(h)!==-1&&(h==="innerHTML"||h==="cssText"||h==="itemprop")&&(c=h)}if(!c||!l[c])return!1;const f=l[c].toLowerCase();return n[c]||(n[c]={}),i[c]||(i[c]={}),n[c][f]?!1:(i[c][f]=!0,!0)}).reverse().forEach(l=>s.push(l));const a=Object.keys(i);for(let l=0;l<a.length;l+=1){const c=a[l],d={...n[c],...i[c]};n[c]=d}return s},[]).reverse()},rR=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},nR=e=>({baseTag:eR(["href"],e),bodyAttributes:fu("bodyAttributes",e),defer:Qs(e,Gs.DEFER),encode:Qs(e,Gs.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:fu("htmlAttributes",e),linkTags:Do("link",["rel","href"],e),metaTags:Do("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Do("noscript",["innerHTML"],e),onChangeClientState:ZA(e),scriptTags:Do("script",["src","innerHTML"],e),styleTags:Do("style",["cssText"],e),title:XA(e),titleAttributes:fu("titleAttributes",e),prioritizeSeoTags:rR(e,Gs.PRIORITIZE_SEO_TAGS)}),Jw=e=>Array.isArray(e)?e.join(""):e,sR=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},hu=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(sR(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},tg=(e,t)=>({...e,[t]:void 0}),oR=["noscript","script","style"],Vd=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),Yw=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),iR=(e,t,r,n)=>{const s=Yw(r),o=Jw(t);return s?`<${e} ${Kt}="true" ${s}>${Vd(o,n)}</${e}>`:`<${e} ${Kt}="true">${Vd(o,n)}</${e}>`},aR=(e,t,r=!0)=>t.reduce((n,s)=>{const o=s,i=Object.keys(o).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,d)=>{const f=typeof o[d]>"u"?d:`${d}="${Vd(o[d],r)}"`;return c?`${c} ${f}`:f},""),a=o.innerHTML||o.cssText||"",l=oR.indexOf(e)===-1;return`${n}<${e} ${Kt}="true" ${i}${l?"/>":`>${a}</${e}>`}`},""),Xw=(e,t={})=>Object.keys(e).reduce((r,n)=>{const s=Ph[n];return r[s||n]=e[n],r},t),lR=(e,t,r)=>{const n={key:t,[Kt]:!0},s=Xw(r,n);return[R.createElement("title",s,t)]},Qa=(e,t)=>t.map((r,n)=>{const s={key:n,[Kt]:!0};return Object.keys(r).forEach(o=>{const a=Ph[o]||o;if(a==="innerHTML"||a==="cssText"){const l=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[a]=r[o]}),R.createElement(e,s)}),Et=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>lR(e,t.title,t.titleAttributes),toString:()=>iR(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Xw(t),toString:()=>Yw(t)};default:return{toComponent:()=>Qa(e,t),toString:()=>aR(e,t,r)}}},cR=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const s=hu(e,du.meta),o=hu(t,du.link),i=hu(r,du.script);return{priorityMethods:{toComponent:()=>[...Qa("meta",s.priority),...Qa("link",o.priority),...Qa("script",i.priority)],toString:()=>`${Et("meta",s.priority,n)} ${Et("link",o.priority,n)} ${Et("script",i.priority,n)}`},metaTags:s.default,linkTags:o.default,scriptTags:i.default}},uR=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:o,styleTags:i,title:a="",titleAttributes:l,prioritizeSeoTags:c}=e;let{linkTags:d,metaTags:f,scriptTags:p}=e,h={toComponent:()=>{},toString:()=>""};return c&&({priorityMethods:h,linkTags:d,metaTags:f,scriptTags:p}=cR(e)),{priority:h,base:Et("base",t,n),bodyAttributes:Et("bodyAttributes",r,n),htmlAttributes:Et("htmlAttributes",s,n),link:Et("link",d,n),meta:Et("meta",f,n),noscript:Et("noscript",o,n),script:Et("script",p,n),style:Et("style",i,n),title:Et("title",{title:a,titleAttributes:l},n)}},Hd=uR,Ea=[],Zw=!!(typeof window<"u"&&window.document&&window.document.createElement),Wd=class{constructor(e,t){wr(this,"instances",[]);wr(this,"canUseDOM",Zw);wr(this,"context");wr(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ea:this.instances,add:e=>{(this.canUseDOM?Ea:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Ea:this.instances).indexOf(e);(this.canUseDOM?Ea:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Hd({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},dR={},ex=R.createContext(dR),Gn,tx=(Gn=class extends m.Component{constructor(r){super(r);wr(this,"helmetData");this.helmetData=new Wd(this.props.context||{},Gn.canUseDOM)}render(){return R.createElement(ex.Provider,{value:this.helmetData.value},this.props.children)}},wr(Gn,"canUseDOM",Zw),Gn),ps=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${Kt}]`),s=[].slice.call(n),o=[];let i;return t&&t.length&&t.forEach(a=>{const l=document.createElement(e);for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c))if(c==="innerHTML")l.innerHTML=a.innerHTML;else if(c==="cssText")l.styleSheet?l.styleSheet.cssText=a.cssText:l.appendChild(document.createTextNode(a.cssText));else{const d=c,f=typeof a[d]>"u"?"":a[d];l.setAttribute(c,f)}l.setAttribute(Kt,"true"),s.some((c,d)=>(i=d,l.isEqualNode(c)))?s.splice(i,1):o.push(l)}),s.forEach(a=>{var l;return(l=a.parentNode)==null?void 0:l.removeChild(a)}),o.forEach(a=>r.appendChild(a)),{oldTags:s,newTags:o}},qd=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(Kt),s=n?n.split(","):[],o=[...s],i=Object.keys(t);for(const a of i){const l=t[a]||"";r.getAttribute(a)!==l&&r.setAttribute(a,l),s.indexOf(a)===-1&&s.push(a);const c=o.indexOf(a);c!==-1&&o.splice(c,1)}for(let a=o.length-1;a>=0;a-=1)r.removeAttribute(o[a]);s.length===o.length?r.removeAttribute(Kt):r.getAttribute(Kt)!==i.join(",")&&r.setAttribute(Kt,i.join(","))},fR=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=Jw(e)),qd("title",t)},rg=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:o,metaTags:i,noscriptTags:a,onChangeClientState:l,scriptTags:c,styleTags:d,title:f,titleAttributes:p}=e;qd("body",n),qd("html",s),fR(f,p);const h={baseTag:ps("base",r),linkTags:ps("link",o),metaTags:ps("meta",i),noscriptTags:ps("noscript",a),scriptTags:ps("script",c),styleTags:ps("style",d)},x={},g={};Object.keys(h).forEach(b=>{const{newTags:y,oldTags:v}=h[b];y.length&&(x[b]=y),v.length&&(g[b]=h[b].oldTags)}),t&&t(),l(e,x,g)},$o=null,hR=e=>{$o&&cancelAnimationFrame($o),e.defer?$o=requestAnimationFrame(()=>{rg(e,()=>{$o=null})}):(rg(e),$o=null)},pR=hR,ng=class extends m.Component{constructor(){super(...arguments);wr(this,"rendered",!1)}shouldComponentUpdate(t){return!JA(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const s=nR(t.get().map(o=>{const i={...o.props};return delete i.context,i}));tx.canUseDOM?pR(s):Hd&&(n=Hd(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Nu,Ah=(Nu=class extends m.Component{shouldComponentUpdate(e){return!qA(tg(this.props,"helmetData"),tg(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return Zm(eg.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${eg.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Zm(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return R.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:s,...o}=n.props,i=Object.keys(o).reduce((l,c)=>(l[YA[c]||c]=o[c],l),{});let{type:a}=n;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(n,s),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,i,s);break;default:t=this.mapObjectTypeChildren(n,t,i,s);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof Wd)){const s=n;n=new Wd(s.context,!0),delete r.helmetData}return n?R.createElement(ng,{...r,context:n.value}):R.createElement(ex.Consumer,null,s=>R.createElement(ng,{...r,context:s}))}},wr(Nu,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Nu);const mR=$0("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ge=m.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?YS:"button";return u.jsx(i,{className:le(mR({variant:t,size:r,className:e})),ref:o,...s})});Ge.displayName="Button";const gR="/assets/logo-symbol-BpUXh4Si.png";function rx({className:e="",size:t="md"}){const n={sm:{symbol:"h-6",text:"text-lg"},md:{symbol:"h-8",text:"text-xl"},lg:{symbol:"h-9",text:"text-2xl"}}[t];return u.jsxs("div",{className:`flex items-center gap-2 ${e}`,children:[u.jsx("img",{src:gR,alt:"ProParking.ai",width:36,height:36,className:`${n.symbol} w-auto`,loading:"eager",decoding:"async"}),u.jsx("span",{className:`${n.text} font-normal text-foreground tracking-wide`,style:{fontFamily:"'GC Palioka', serif"},children:"ProParking.ai"})]})}var lr=function(){return lr=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},lr.apply(this,arguments)};function Eo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function vR(e,t,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(d){try{c(n.next(d))}catch(f){i(f)}}function l(d){try{c(n.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}function yR(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}const wR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Rh extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class xR extends Rh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class sg extends Rh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class og extends Rh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Kd;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Kd||(Kd={}));class bR{constructor(t,{headers:r={},customFetch:n,region:s=Kd.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=wR(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return vR(this,arguments,void 0,function*(r,n={}){var s;let o,i;try{const{headers:a,method:l,body:c,signal:d,timeout:f}=n;let p={},{region:h}=n;h||(h=this.region);const x=new URL(`${this.url}/${r}`);h&&h!=="any"&&(p["x-region"]=h,x.searchParams.set("forceFunctionRegion",h));let g;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",g=c):typeof c=="string"?(p["Content-Type"]="text/plain",g=c):typeof FormData<"u"&&c instanceof FormData?g=c:(p["Content-Type"]="application/json",g=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?g=JSON.stringify(c):g=c;let b=d;f&&(i=new AbortController,o=setTimeout(()=>i.abort(),f),d?(b=i.signal,d.addEventListener("abort",()=>i.abort())):b=i.signal);const y=yield this.fetch(x.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:g,signal:b}).catch(S=>{throw new xR(S)}),v=y.headers.get("x-relay-error");if(v&&v==="true")throw new sg(y);if(!y.ok)throw new og(y);let w=((s=y.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return w==="application/json"?_=yield y.json():w==="application/octet-stream"||w==="application/pdf"?_=yield y.blob():w==="text/event-stream"?_=y:w==="multipart/form-data"?_=yield y.formData():_=yield y.text(),{data:_,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof og||a instanceof sg?a.context:void 0}}finally{o&&clearTimeout(o)}})}}var _R=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},SR=class{constructor(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{let i=null,a=null,l=null,c=o.status,d=o.statusText;if(o.ok){var f,p;if(r.method!=="HEAD"){var h;const y=await o.text();y===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((h=r.headers.get("Accept"))===null||h===void 0)&&h.includes("application/vnd.pgrst.plan+text"))?a=y:a=JSON.parse(y))}const g=(f=r.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),b=(p=o.headers.get("content-range"))===null||p===void 0?void 0:p.split("/");g&&b&&b.length>1&&(l=parseInt(b[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(a)&&(a.length>1?(i={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,c=406,d="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var x;const g=await o.text();try{i=JSON.parse(g),Array.isArray(i)&&o.status===404&&(a=[],i=null,c=200,d="OK")}catch{o.status===404&&g===""?(c=204,d="No Content"):i={message:g}}if(i&&r.isMaybeSingle&&(!(i==null||(x=i.details)===null||x===void 0)&&x.includes("0 rows"))&&(i=null,c=200,d="OK"),i&&r.shouldThrowOnError)throw new _R(i)}return{error:i,data:a,count:l,status:c,statusText:d}});return this.shouldThrowOnError||(s=s.catch(o=>{var i;let a="";const l=o==null?void 0:o.cause;if(l){var c,d,f,p;const x=(c=l==null?void 0:l.message)!==null&&c!==void 0?c:"",g=(d=l==null?void 0:l.code)!==null&&d!==void 0?d:"";a=`${(f=o==null?void 0:o.name)!==null&&f!==void 0?f:"FetchError"}: ${o==null?void 0:o.message}`,a+=`

Caused by: ${(p=l==null?void 0:l.name)!==null&&p!==void 0?p:"Error"}: ${x}`,g&&(a+=` (${g})`),l!=null&&l.stack&&(a+=`
${l.stack}`)}else{var h;a=(h=o==null?void 0:o.stack)!==null&&h!==void 0?h:""}return{error:{message:`${(i=o==null?void 0:o.name)!==null&&i!==void 0?i:"FetchError"}: ${o==null?void 0:o.message}`,details:a,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},ER=class extends SR{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const o=s?`${s}.order`:"order",i=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${i?`${i},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,o=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:o="text"}={}){var i;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(i=this.headers.get("Accept"))!==null&&i!==void 0?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${l}"; options=${a};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const ig=new RegExp("[,()]");var Es=class extends ER{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&ig.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&ig.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},kR=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let o=!1;const i=(e??"*").split("").map(c=>/\s/.test(c)&&!o?"":(c==='"'&&(o=!o),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",i),n&&l.append("Prefer",`count=${n}`),new Es({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:o,headers:i}=this.cloneRequestState();if(t&&i.append("Prefer",`count=${t}`),r||i.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>0){const l=[...new Set(a)].map(c=>`"${c}"`);o.searchParams.set("columns",l.join(","))}}return new Es({method:s,url:o,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var o;const i="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(c.length>0){const d=[...new Set(c)].map(f=>`"${f}"`);a.searchParams.set("columns",d.join(","))}}return new Es({method:i,url:a,headers:l,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new Es({method:n,url:s,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Es({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},CR=class nx{constructor(t,{headers:r={},schema:n,fetch:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.fetch=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new kR(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new nx(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,r={},{head:n=!1,get:s=!1,count:o}={}){var i;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const d=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(d)),f=n&&Object.values(r).some(d);f?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([h,x])=>x!==void 0).map(([h,x])=>[h,Array.isArray(x)?`{${x.join(",")}}`:`${x}`]).forEach(([h,x])=>{l.searchParams.append(h,x)})):(a="POST",c=r);const p=new Headers(this.headers);return f?p.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&p.set("Prefer",`count=${o}`),new Es({method:a,url:l,headers:p,schema:this.schemaName,body:c,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}};class TR{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,o=parseInt(s.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
import ws from "ws"
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`

Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const PR="2.90.1",AR=`realtime-js/${PR}`,sx="1.0.0",RR="2.0.0",ag=sx,Gd=1e4,jR=1e3,NR=100;var Yr;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Yr||(Yr={}));var je;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(je||(je={}));var Wt;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Wt||(Wt={}));var Qd;(function(e){e.websocket="websocket"})(Qd||(Qd={}));var Mn;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Mn||(Mn={}));class OR{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},i=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,r,n){var s,o;const i=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(o=t.join_ref)!==null&&o!==void 0?o:"",c=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},f=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+i.length+c.length+f.length,h=new ArrayBuffer(this.HEADER_LENGTH+p);let x=new DataView(h),g=0;x.setUint8(g++,this.KINDS.userBroadcastPush),x.setUint8(g++,l.length),x.setUint8(g++,a.length),x.setUint8(g++,i.length),x.setUint8(g++,c.length),x.setUint8(g++,f.length),x.setUint8(g++,r),Array.from(l,y=>x.setUint8(g++,y.charCodeAt(0))),Array.from(a,y=>x.setUint8(g++,y.charCodeAt(0))),Array.from(i,y=>x.setUint8(g++,y.charCodeAt(0))),Array.from(c,y=>x.setUint8(g++,y.charCodeAt(0))),Array.from(f,y=>x.setUint8(g++,y.charCodeAt(0)));var b=new Uint8Array(h.byteLength+n.byteLength);return b.set(new Uint8Array(h),0),b.set(new Uint8Array(n),h.byteLength),b.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,o,i,a,l]=n;return r({join_ref:s,ref:o,topic:i,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(t.slice(l,l+s));l=l+s;const d=n.decode(t.slice(l,l+o));l=l+o;const f=n.decode(t.slice(l,l+i));l=l+i;const p=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,x={type:this.BROADCAST_EVENT,event:d,payload:h};return i>0&&(x.meta=JSON.parse(f)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:x}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class ox{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var ce;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(ce||(ce={}));const lg=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,i)=>(o[i]=IR(i,e,t,s),o),{}):{}},IR=(e,t,r,n)=>{const s=t.find(a=>a.name===e),o=s==null?void 0:s.type,i=r[e];return o&&!n.includes(o)?ix(o,i):Jd(i)},ix=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return $R(t,r)}switch(e){case ce.bool:return LR(t);case ce.float4:case ce.float8:case ce.int2:case ce.int4:case ce.int8:case ce.numeric:case ce.oid:return MR(t);case ce.json:case ce.jsonb:return DR(t);case ce.timestamp:return UR(t);case ce.abstime:case ce.date:case ce.daterange:case ce.int4range:case ce.int8range:case ce.money:case ce.reltime:case ce.text:case ce.time:case ce.timestamptz:case ce.timetz:case ce.tsrange:case ce.tstzrange:return Jd(t);default:return Jd(t)}},Jd=e=>e,LR=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},MR=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},DR=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},$R=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const i=e.slice(1,r);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>ix(t,a))}return e},UR=e=>typeof e=="string"?e.replace(" ","T"):e,ax=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class pu{constructor(t,r,n={},s=Gd){this.channel=t,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var cg;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(cg||(cg={}));class ti{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=ti.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=ti.syncDiff(this.state,l,o,i)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=ti.syncDiff(this.state,s,o,i),a())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i})}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const o=this.cloneDeep(t),i=this.transformState(r),a={},l={};return this.map(o,(c,d)=>{i[c]||(l[c]=d)}),this.map(i,(c,d)=>{const f=o[c];if(f){const p=d.map(b=>b.presence_ref),h=f.map(b=>b.presence_ref),x=d.filter(b=>h.indexOf(b.presence_ref)<0),g=f.filter(b=>p.indexOf(b.presence_ref)<0);x.length>0&&(a[c]=x),g.length>0&&(l[c]=g)}else a[c]=d}),this.syncDiff(o,{joins:a,leaves:l},n,s)}static syncDiff(t,r,n,s){const{joins:o,leaves:i}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(o,(a,l)=>{var c;const d=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),d.length>0){const f=t[a].map(h=>h.presence_ref),p=d.filter(h=>f.indexOf(h.presence_ref)<0);t[a].unshift(...p)}n(a,d,l)}),this.map(i,(a,l)=>{let c=t[a];if(!c)return;const d=l.map(f=>f.presence_ref);c=c.filter(f=>d.indexOf(f.presence_ref)<0),t[a]=c,s(a,c,l),c.length===0&&delete t[a]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return"metas"in s?r[n]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):r[n]=s,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var ug;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(ug||(ug={}));var ri;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ri||(ri={}));var Sr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Sr||(Sr={}));class Us{constructor(t,r={config:{}},n){var s,o;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=je.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new pu(this,Wt.join,this.params,this.timeout),this.rejoinTimer=new ox(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=je.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=je.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=je.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=je.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=je.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Wt.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new ti(this),this.broadcastEndpointURL=ax(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.state==je.closed){const{config:{broadcast:i,presence:a,private:l}}=this.params,c=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[ri.PRESENCE]&&this.bindings[ri.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,f={},p={broadcast:i,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(h=>t==null?void 0:t(Sr.CHANNEL_ERROR,h)),this._onClose(()=>t==null?void 0:t(Sr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},f)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var x;if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(Sr.SUBSCRIBED);return}else{const g=this.bindings.postgres_changes,b=(x=g==null?void 0:g.length)!==null&&x!==void 0?x:0,y=[];for(let v=0;v<b;v++){const w=g[v],{filter:{event:_,schema:S,table:E,filter:k}}=w,T=h&&h[v];if(T&&T.event===_&&Us.isFilterValueEqual(T.schema,S)&&Us.isFilterValueEqual(T.table,E)&&Us.isFilterValueEqual(T.filter,k))y.push(Object.assign(Object.assign({},w),{id:T.id}));else{this.unsubscribe(),this.state=je.errored,t==null||t(Sr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,t&&t(Sr.SUBSCRIBED);return}}).receive("error",h=>{this.state=je.errored,t==null||t(Sr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Sr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===je.joined&&t===ri.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const i={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,i,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:i}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,l;const c=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),c.receive("ok",()=>o("ok")),c.receive("error",()=>o("error")),c.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=je.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Wt.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new pu(this,Wt.leave,{},t),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=je.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),i=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),i}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new pu(this,t,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>NR){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,o;const i=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:d}=Wt;if(n&&[a,l,c,d].indexOf(i)>=0&&n!==this._joinRef())return;let p=this._onMessage(i,r,n);if(r&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(h=>{var x,g,b;return((x=h.filter)===null||x===void 0?void 0:x.event)==="*"||((b=(g=h.filter)===null||g===void 0?void 0:g.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===i}).map(h=>h.callback(p,n)):(o=this.bindings[i])===null||o===void 0||o.filter(h=>{var x,g,b,y,v,w,_,S;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in h){const E=h.id,k=(x=h.filter)===null||x===void 0?void 0:x.event;return E&&((g=r.ids)===null||g===void 0?void 0:g.includes(E))&&(k==="*"||(k==null?void 0:k.toLocaleLowerCase())===((b=r.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))&&(!(!((y=h.filter)===null||y===void 0)&&y.table)||h.filter.table===((v=r.data)===null||v===void 0?void 0:v.table))}else{const E=(_=(w=h==null?void 0:h.filter)===null||w===void 0?void 0:w.event)===null||_===void 0?void 0:_.toLocaleLowerCase();return E==="*"||E===((S=r==null?void 0:r.event)===null||S===void 0?void 0:S.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===i}).map(h=>{if(typeof p=="object"&&"ids"in p){const x=p.data,{schema:g,table:b,commit_timestamp:y,type:v,errors:w}=x;p=Object.assign(Object.assign({},{schema:g,table:b,commit_timestamp:y,eventType:v,new:{},old:{},errors:w}),this._getPayloadRecords(x))}h.callback(p,n)})}_isClosed(){return this.state===je.closed}_isJoined(){return this.state===je.joined}_isJoining(){return this.state===je.joining}_isLeaving(){return this.state===je.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),o={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===n&&Us.isEqual(s.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Wt.close,{},t)}_onError(t){this._on(Wt.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=je.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=lg(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=lg(t.columns,t.old_record)),r}}const mu=()=>{},ka={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},FR=[1e3,2e3,5e3,1e4],zR=1e4,BR=`
  addEventListener("message", (e) => {
    if (e.data.event === "start") {
      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
    }
  });`;class VR{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Gd,this.transport=null,this.heartbeatIntervalMs=ka.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=mu,this.ref=0,this.reconnectTimer=null,this.vsn=ag,this.logger=mu,this.conn=null,this.sendBuffer=[],this.serializer=new OR,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...o)=>s(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${Qd.websocket}`,this.httpEndpoint=ax(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=TR.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r}

To use Realtime in Node.js, you need to provide a WebSocket implementation:

Option 1: Use Node.js 22+ which has native WebSocket support
Option 2: Install and provide the "ws" package:

  npm install ws

  import ws from "ws"
  const client = new RealtimeClient(url, {
    ...options,
    transport: ws
  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Yr.connecting:return Mn.Connecting;case Yr.open:return Mn.Open;case Yr.closing:return Mn.Closing;default:return Mn.Closed}}isConnected(){return this.connectionState()===Mn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new Us(`realtime:${t}`,r,this);return this.channels.push(o),o}}push(t){const{topic:r,event:n,payload:s,ref:o}=t,i=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${o})`,s),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(jR,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout()},ka.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const c=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",c)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:s,payload:o,ref:i}=r,a=i?`(${i})`:"",l=o.status||"";this.log("receive",`${l} ${n} ${s} ${a}`.trim(),o),this.channels.filter(c=>c._isMember(n)).forEach(c=>c._trigger(s,o,i)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Yr.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Yr.open||this.conn.readyState===Yr.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(Wt.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${t}${n}${s}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([BR],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const o={access_token:r,version:AR};r&&s.updateJoinPayload(o),s.joinedOnce&&s._isJoined()&&s._push(Wt.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new ox(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},ka.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,o,i,a,l,c,d,f,p,h;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:Gd,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:ka.HEARTBEAT_INTERVAL,this.worker=(o=t==null?void 0:t.worker)!==null&&o!==void 0?o:!1,this.accessToken=(i=t==null?void 0:t.accessToken)!==null&&i!==void 0?i:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:mu,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:ag,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:x=>FR[x-1]||zR,this.vsn){case sx:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(x,g)=>g(JSON.stringify(x)),this.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:(x,g)=>g(JSON.parse(x));break;case RR:this.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:this.serializer.encode.bind(this.serializer),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Ai=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function HR(e,t,r){const n=new URL(t,e);if(r)for(const[s,o]of Object.entries(r))o!==void 0&&n.searchParams.set(s,o);return n.toString()}async function WR(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function qR(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:i}){const a=HR(e.baseUrl,n,s),l=await WR(e.auth),c=await t(a,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...l,...i},body:o?JSON.stringify(o):void 0}),d=await c.text(),f=(c.headers.get("content-type")||"").includes("application/json"),p=f&&d?JSON.parse(d):d;if(!c.ok){const h=f?p:void 0,x=h==null?void 0:h.error;throw new Ai((x==null?void 0:x.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:x==null?void 0:x.type,icebergCode:x==null?void 0:x.code,details:h})}return{status:c.status,headers:c.headers,data:p}}}}function Ca(e){return e.join("")}var KR=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Ca(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ca(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ca(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ca(e.namespace)}`}),!0}catch(t){if(t instanceof Ai&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Ai&&r.status===409)return;throw r}}};function ms(e){return e.join("")}var GR=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ms(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ms(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ms(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ms(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ms(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ms(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Ai&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Ai&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},QR=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=qR({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new KR(this.client,t),this.tableOps=new GR(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},mc=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function ve(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var JR=class extends mc{constructor(e,t,r){super(e),this.name="StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Yd=class extends mc{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const jh=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),YR=()=>Response,Xd=e=>{if(Array.isArray(e))return e.map(r=>Xd(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Xd(n)}),t},XR=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ZR=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Ri(e){"@babel/helpers - typeof";return Ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ri(e)}function ej(e,t){if(Ri(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ri(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tj(e){var t=ej(e,"string");return Ri(t)=="symbol"?t:t+""}function rj(e,t,r){return(t=tj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function W(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dg(Object(r),!0).forEach(function(n){rj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const gu=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},nj=async(e,t,r)=>{e instanceof await YR()&&!(r!=null&&r.noResolveJson)?e.json().then(n=>{const s=e.status||500,o=(n==null?void 0:n.statusCode)||s+"";t(new JR(gu(n),s,o))}).catch(n=>{t(new Yd(gu(n),n))}):t(new Yd(gu(e),e))},sj=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?s:(XR(n)?(s.headers=W({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),W(W({},s),r))};async function Gi(e,t,r,n,s,o){return new Promise((i,a)=>{e(r,sj(t,n,s,o)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>nj(l,a,n))})}async function ji(e,t,r,n){return Gi(e,"GET",t,r,n)}async function zt(e,t,r,n,s){return Gi(e,"POST",t,n,s,r)}async function Zd(e,t,r,n,s){return Gi(e,"PUT",t,n,s,r)}async function oj(e,t,r,n){return Gi(e,"HEAD",t,W(W({},r),{},{noResolveJson:!0}),n)}async function Nh(e,t,r,n,s){return Gi(e,"DELETE",t,n,s,r)}var ij=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ve(t))return{data:null,error:t};throw t}}};let lx;lx=Symbol.toStringTag;var aj=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[lx]="BlobDownloadBuilder",this.promise=null}asStream(){return new ij(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ve(t))return{data:null,error:t};throw t}}};const lj={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},fg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var cj=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=r,this.fetch=jh(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,r,n){var s=this;try{let o;const i=W(W({},fg),n);let a=W(W({},s.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",s.encodeMetadata(l)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.has("cacheControl")||o.append("cacheControl",i.cacheControl),l&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(l))):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!i.duplex&&(i.duplex="half")),n!=null&&n.headers&&(a=W(W({},a),n.headers));const c=s._removeEmptyFolders(t),d=s._getFinalPath(c),f=await(e=="PUT"?Zd:zt)(s.fetch,`${s.url}/object/${d}`,o,W({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{data:{path:c,id:f.Id,fullPath:f.Key},error:null}}catch(o){if(s.shouldThrowOnError)throw o;if(ve(o))return{data:null,error:o};throw o}}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const o=s._removeEmptyFolders(e),i=s._getFinalPath(o),a=new URL(s.url+`/object/upload/sign/${i}`);a.searchParams.set("token",t);try{let l;const c=W({upsert:fg.upsert},n),d=W(W({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType),{data:{path:o,fullPath:(await Zd(s.fetch,a.toString(),l,{headers:d})).Key},error:null}}catch(l){if(s.shouldThrowOnError)throw l;if(ve(l))return{data:null,error:l};throw l}}async createSignedUploadUrl(e,t){var r=this;try{let n=r._getFinalPath(e);const s=W({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await zt(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),i=new URL(r.url+o.url),a=i.searchParams.get("token");if(!a)throw new mc("No token returned by API");return{data:{signedUrl:i.toString(),path:e,token:a},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;try{return{data:await zt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}async copy(e,t,r){var n=this;try{return{data:{path:(await zt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key},error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}async createSignedUrl(e,t,r){var n=this;try{let s=n._getFinalPath(e),o=await zt(n.fetch,`${n.url}/object/sign/${s}`,W({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return o={signedUrl:encodeURI(`${n.url}${o.signedURL}${i}`)},{data:o,error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}async createSignedUrls(e,t,r){var n=this;try{const s=await zt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(i=>W(W({},i),{},{signedUrl:i.signedURL?encodeURI(`${n.url}${i.signedURL}${o}`):null})),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}download(e,t){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",n=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=n?`?${n}`:"",o=this._getFinalPath(e),i=()=>ji(this.fetch,`${this.url}/${r}/${o}${s}`,{headers:this.headers,noResolveJson:!0});return new aj(i,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);try{return{data:Xd(await ji(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await oj(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ve(n)&&n instanceof Yd){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});i!==""&&n.push(i);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${a}`)}}}async remove(e){var t=this;try{return{data:await Nh(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async list(e,t,r){var n=this;try{const s=W(W(W({},lj),t),{},{prefix:e||""});return{data:await zt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r),error:null}}catch(s){if(n.shouldThrowOnError)throw s;if(ve(s))return{data:null,error:s};throw s}}async listV2(e,t){var r=this;try{const n=W({},e);return{data:await zt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const cx="2.90.1",ux={"X-Client-Info":`storage-js/${cx}`};var uj=class{constructor(e,t={},r,n){this.shouldThrowOnError=!1;const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href.replace(/\/$/,""),this.headers=W(W({},ux),t),this.fetch=jh(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const r=t.listBucketOptionsToQueryString(e);return{data:await ji(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await ji(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async createBucket(e,t={public:!1}){var r=this;try{return{data:await zt(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}async updateBucket(e,t){var r=this;try{return{data:await Zd(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(ve(n))return{data:null,error:n};throw n}}async emptyBucket(e){var t=this;try{return{data:await zt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Nh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},dj=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=W(W({},ux),t),this.fetch=jh(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await zt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async listBuckets(e){var t=this;try{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return{data:await ji(t.fetch,s,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await Nh(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(ve(r))return{data:null,error:r};throw r}}from(e){var t=this;if(!ZR(e))throw new mc("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new QR({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,o){const i=s[o];return typeof i!="function"?i:async(...a)=>{try{return{data:await i.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}};const Oh={"X-Client-Info":`storage-js/${cx}`,"Content-Type":"application/json"};var dx=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function pt(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var vu=class extends dx{constructor(e,t,r){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},fj=class extends dx{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const Ih=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),hj=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},hg=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),pj=async(e,t,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const n=e.status||500,s=e;if(typeof s.json=="function")s.json().then(o=>{const i=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||n+"";t(new vu(hg(o),n,i))}).catch(()=>{const o=n+"";t(new vu(s.statusText||`HTTP ${n} error`,n,o))});else{const o=n+"";t(new vu(s.statusText||`HTTP ${n} error`,n,o))}}else t(new fj(hg(e),e))},mj=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(hj(n)?(s.headers=W({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,W(W({},s),r)):s};async function gj(e,t,r,n,s,o){return new Promise((i,a)=>{e(r,mj(t,n,s,o)).then(l=>{if(!l.ok)throw l;if(n!=null&&n.noResolveJson)return l;const c=l.headers.get("content-type");return!c||!c.includes("application/json")?{}:l.json()}).then(l=>i(l)).catch(l=>pj(l,a,n))})}async function mt(e,t,r,n,s){return gj(e,"POST",t,n,s,r)}var vj=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=W(W({},Oh),t),this.fetch=Ih(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await mt(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}async getIndex(e,t){var r=this;try{return{data:await mt(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}),error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(pt(n))return{data:null,error:n};throw n}}async listIndexes(e){var t=this;try{return{data:await mt(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}async deleteIndex(e,t){var r=this;try{return{data:await mt(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{},error:null}}catch(n){if(r.shouldThrowOnError)throw n;if(pt(n))return{data:null,error:n};throw n}}},yj=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=W(W({},Oh),t),this.fetch=Ih(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await mt(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}async getVectors(e){var t=this;try{return{data:await mt(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await mt(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}async queryVectors(e){var t=this;try{return{data:await mt(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await mt(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}},wj=class{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=W(W({},Oh),t),this.fetch=Ih(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await mt(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}async getBucket(e){var t=this;try{return{data:await mt(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}async listBuckets(e={}){var t=this;try{return{data:await mt(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}async deleteBucket(e){var t=this;try{return{data:await mt(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(pt(r))return{data:null,error:r};throw r}}},xj=class extends wj{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new bj(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},bj=class extends vj{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new _j(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},_j=class extends yj{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,W(W({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},Sj=class extends uj{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new cj(this.url,this.headers,e,this.fetch)}get vectors(){return new xj(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new dj(this.url+"/iceberg",this.headers,this.fetch)}};const fx="2.90.1",ks=30*1e3,ef=3,yu=ef*ks,Ej="http://localhost:9999",kj="supabase.auth.token",Cj={"X-Client-Info":`gotrue-js/${fx}`},tf="X-Supabase-Api-Version",hx={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Tj=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Pj=10*60*1e3;class Ni extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function U(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class Aj extends Ni{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function Rj(e){return U(e)&&e.name==="AuthApiError"}class Dn extends Ni{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class $r extends Ni{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class dt extends $r{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function jj(e){return U(e)&&e.name==="AuthSessionMissingError"}class gs extends $r{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Ta extends $r{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Pa extends $r{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function Nj(e){return U(e)&&e.name==="AuthImplicitGrantRedirectError"}class pg extends $r{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Oj extends $r{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class rf extends $r{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function wu(e){return U(e)&&e.name==="AuthRetryableFetchError"}class mg extends $r{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class nf extends $r{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const jl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),gg=` 	
\r=`.split(""),Ij=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<gg.length;t+=1)e[gg[t].charCodeAt(0)]=-2;for(let t=0;t<jl.length;t+=1)e[jl[t].charCodeAt(0)]=t;return e})();function vg(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(jl[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(jl[n]),t.queuedBits-=6}}function px(e,t,r){const n=Ij[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function yg(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{Dj(i,n,r)};for(let i=0;i<e.length;i+=1)px(e.charCodeAt(i),s,o);return t.join("")}function Lj(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Mj(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}Lj(n,t)}}function Dj(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Js(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)px(e.charCodeAt(s),r,n);return new Uint8Array(t)}function $j(e){const t=[];return Mj(e,r=>t.push(r)),new Uint8Array(t)}function zn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>vg(s,r,n)),vg(null,r,n),t.join("")}function Uj(e){return Math.round(Date.now()/1e3)+e}function Fj(){return Symbol("auth-callback")}const Ue=()=>typeof window<"u"&&typeof document<"u",jn={tested:!1,writable:!1},mx=()=>{if(!Ue())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(jn.tested)return jn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),jn.tested=!0,jn.writable=!0}catch{jn.tested=!0,jn.writable=!1}return jn.writable};function zj(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const gx=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Bj=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Cs=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Nn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},De=async(e,t)=>{await e.removeItem(t)};class gc{constructor(){this.promise=new gc.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}gc.promiseConstructor=Promise;function xu(e){const t=e.split(".");if(t.length!==3)throw new nf("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!Tj.test(t[n]))throw new nf("JWT not in base64url format");return{header:JSON.parse(yg(t[0])),payload:JSON.parse(yg(t[1])),signature:Js(t[2]),raw:{header:t[0],payload:t[1]}}}async function Vj(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Hj(e,t){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){n(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function Wj(e){return("0"+e.toString(16)).substr(-2)}function qj(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,Wj).join("")}async function Kj(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function Gj(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await Kj(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function vs(e,t,r=!1){const n=qj();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Cs(e,`${t}-code-verifier`,s);const o=await Gj(n);return[o,n===o?"plain":"s256"]}const Qj=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Jj(e){const t=e.headers.get(tf);if(!t||!t.match(Qj))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Yj(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function Xj(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const Zj=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ys(e){if(!Zj.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function bu(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function eN(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function wg(e){return JSON.parse(JSON.stringify(e))}const Ln=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),tN=[502,503,504];async function xg(e){var t;if(!Bj(e))throw new rf(Ln(e),0);if(tN.includes(e.status))throw new rf(Ln(e),e.status);let r;try{r=await e.json()}catch(o){throw new Dn(Ln(o),o)}let n;const s=Jj(e);if(s&&s.getTime()>=hx["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new mg(Ln(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new dt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,i)=>o&&typeof i=="string",!0))throw new mg(Ln(r),e.status,r.weak_password.reasons);throw new Aj(Ln(r),e.status||500,n)}const rN=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function H(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[tf]||(o[tf]=hx["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const i=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(i.redirect_to=n.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await nN(e,t,r+a,{headers:o,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function nN(e,t,r,n,s,o){const i=rN(t,n,s,o);let a;try{a=await e(r,Object.assign({},i))}catch(l){throw console.error(l),new rf(Ln(l),0)}if(a.ok||await xg(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await xg(l)}}function $t(e){var t;let r=null;iN(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=Uj(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function bg(e){const t=$t(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function en(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function sN(e){return{data:e,error:null}}function oN(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,i=Eo(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function _g(e){return e}function iN(e){return e.access_token&&e.refresh_token&&e.expires_in}const _u=["global","local","others"];class aN{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=gx(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=_u[0]){if(_u.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${_u.join(", ")}`);try{return await H(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(U(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await H(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:en})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Eo(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await H(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:oN,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(U(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await H(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:en})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,o,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await H(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:_g});if(d.error)throw d.error;const f=await d.json(),p=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(x=>{const g=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(x.split(";")[1].split("=")[1]);c[`${b}Page`]=g}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(U(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){ys(t);try{return await H(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:en})}catch(r){if(U(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){ys(t);try{return await H(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:en})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){ys(t);try{return await H(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:en})}catch(n){if(U(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){ys(t.userId);try{const{data:r,error:n}=await H(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(U(r))return{data:null,error:r};throw r}}async _deleteFactor(t){ys(t.userId),ys(t.id);try{return{data:await H(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,o,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await H(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:_g});if(d.error)throw d.error;const f=await d.json(),p=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(x=>{const g=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(x.split(";")[1].split("=")[1]);c[`${b}Page`]=g}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(U(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await H(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await H(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await H(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(U(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await H(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(U(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await H(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(U(r))return{data:null,error:r};throw r}}}function Sg(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const ws={debug:!!(globalThis&&mx()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class vx extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class lN extends vx{}async function cN(e,t,r){ws.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),ws.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){ws.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{ws.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw ws.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new lN(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(ws.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function uN(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function yx(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function dN(e){return parseInt(e,16)}function fN(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function hN(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:a,requestId:l,resources:c,scheme:d,uri:f,version:p}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=yx(e.address),x=d?`${d}://${n}`:n,g=e.statement?`${e.statement}
`:"",b=`${x} wants you to sign in with your Ethereum account:
${h}

${g}`;let y=`URI: ${f}
Version: ${p}
Chain ID: ${r}${i?`
Nonce: ${i}`:""}
Issued At: ${o.toISOString()}`;if(s&&(y+=`
Expiration Time: ${s.toISOString()}`),a&&(y+=`
Not Before: ${a.toISOString()}`),l&&(y+=`
Request ID: ${l}`),c){let v=`
Resources:`;for(const w of c){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);v+=`
- ${w}`}y+=v}return`${b}
${y}`}class Pe extends Error{constructor({message:t,code:r,cause:n,name:s}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class Nl extends Pe{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function pN({error:e,options:t}){var r,n,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Pe({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Pe({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Pe({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Pe({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Pe({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Pe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Pe({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Pe({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(wx(i)){if(o.rp.id!==i)return new Pe({message:`The RP ID "${o.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Pe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Pe({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Pe({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Pe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function mN({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Pe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Pe({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(wx(n)){if(r.rpId!==n)return new Pe({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Pe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Pe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Pe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class gN{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const vN=new gN;function yN(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=Eo(e,["challenge","user","excludeCredentials"]),o=Js(t).buffer,i=Object.assign(Object.assign({},r),{id:Js(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:o,user:i});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Js(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function wN(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Eo(e,["challenge","allowCredentials"]),s=Js(t).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const a=r[i];o.allowCredentials[i]=Object.assign(Object.assign({},a),{id:Js(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function xN(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:zn(new Uint8Array(e.response.attestationObject)),clientDataJSON:zn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function bN(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:zn(new Uint8Array(s.authenticatorData)),clientDataJSON:zn(new Uint8Array(s.clientDataJSON)),signature:zn(new Uint8Array(s.signature)),userHandle:s.userHandle?zn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function wx(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Eg(){var e,t;return!!(Ue()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function _N(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Nl("Browser returned unexpected credential type",t)}:{data:null,error:new Nl("Empty credential response",t)}}catch(t){return{data:null,error:pN({error:t,options:e})}}}async function SN(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Nl("Browser returned unexpected credential type",t)}:{data:null,error:new Nl("Empty credential response",t)}}catch(t){return{data:null,error:mN({error:t,options:e})}}}const EN={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},kN={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ol(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))n[o]=i;else if(r(i))n[o]=i;else if(t(i)){const a=n[o];t(a)?n[o]=Ol(a,i):n[o]=Ol(i)}else n[o]=i}return n}function CN(e,t){return Ol(EN,e,t||{})}function TN(e,t){return Ol(kN,e,t||{})}class PN{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},o){try{const{data:i,error:a}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!i)return{data:null,error:a};const l=s??vN.createNewAbortSignal();if(i.webauthn.type==="create"){const{user:c}=i.webauthn.credential_options.publicKey;c.name||(c.name=`${c.id}:${n}`),c.displayName||(c.displayName=c.name)}switch(i.webauthn.type){case"create":{const c=CN(i.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:d,error:f}=await _N({publicKey:c,signal:l});return d?{data:{factorId:t,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const c=TN(i.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:d,error:f}=await SN(Object.assign(Object.assign({},i.webauthn.credential_options),{publicKey:c,signal:l}));return d?{data:{factorId:t,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(i){return U(i)?{data:null,error:i}:{data:null,error:new Dn("Unexpected error in challenge",i)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new Ni("rpId is required for WebAuthn authentication")};try{if(!Eg())return{data:null,error:new Dn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!i)return{data:null,error:a};const{webauthn:l}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(i){return U(i)?{data:null,error:i}:{data:null,error:new Dn("Unexpected error in authenticate",i)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new Ni("rpId is required for WebAuthn registration")};try{if(!Eg())return{data:null,error:new Dn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(d=>{var f;return(f=d.data)===null||f===void 0?void 0:f.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:i.id,friendlyName:i.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:o});return l?this._verify({factorId:i.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(i){return U(i)?{data:null,error:i}:{data:null,error:new Dn("Unexpected error in register",i)}}}}uN();const AN={url:Ej,storageKey:kj,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Cj,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function kg(e,t,r){return await r()}const xs={};class Oi{get jwks(){var t,r;return(r=(t=xs[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){xs[this.storageKey]=Object.assign(Object.assign({},xs[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=xs[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){xs[this.storageKey]=Object.assign(Object.assign({},xs[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},AN),t);if(this.storageKey=o.storageKey,this.instanceID=(r=Oi.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Oi.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&Ue()){const i=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new aN({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=gx(o.fetch),this.lock=o.lock||kg,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&Ue()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=cN:this.lock=kg,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new PN(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:mx()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Sg(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Sg(this.memoryStorage)),Ue()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${fx}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Ue()&&(r=zj(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Ue()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),Nj(o)){const l=(t=o.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:i,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return U(r)?this._returnResult({error:r}):this._returnResult({error:new Dn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const o=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:$t}),{data:i,error:a}=o;if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(U(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,s;try{let o;if("email"in t){const{email:d,password:f,options:p}=t;let h=null,x=null;this.flowType==="pkce"&&([h,x]=await vs(this.storage,this.storageKey)),o=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:d,password:f,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:h,code_challenge_method:x},xform:$t})}else if("phone"in t){const{phone:d,password:f,options:p}=t;o=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:$t})}else throw new Ta("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return await De(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(await De(this.storage,`${this.storageKey}-code-verifier`),U(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:i,options:a}=t;r=await H(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:bg})}else if("phone"in t){const{phone:o,password:i,options:a}=t;r=await H(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:bg})}else throw new Ta("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const o=new gs;return this._returnResult({data:{user:null,session:null},error:o})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,o,i,a,l,c,d,f,p;let h,x;if("message"in t)h=t.message,x=t.signature;else{const{chain:g,wallet:b,statement:y,options:v}=t;let w;if(Ue())if(typeof b=="object")w=b;else{const j=window;if("ethereum"in j&&typeof j.ethereum=="object"&&"request"in j.ethereum&&typeof j.ethereum.request=="function")w=j.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=b}const _=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href),S=await w.request({method:"eth_requestAccounts"}).then(j=>j).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=yx(S[0]);let k=(n=v==null?void 0:v.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!k){const j=await w.request({method:"eth_chainId"});k=dN(j)}const T={domain:_.host,address:E,statement:y,uri:_.href,version:"1",chainId:k,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=v==null?void 0:v.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=v==null?void 0:v.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(d=v==null?void 0:v.signInWithEthereum)===null||d===void 0?void 0:d.resources};h=hN(T),x=await w.request({method:"personal_sign",params:[fN(h),E]})}try{const{data:g,error:b}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:x},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:$t});if(b)throw b;if(!g||!g.session||!g.user){const y=new gs;return this._returnResult({data:{user:null,session:null},error:y})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:b})}catch(g){if(U(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var r,n,s,o,i,a,l,c,d,f,p,h;let x,g;if("message"in t)x=t.message,g=t.signature;else{const{chain:b,wallet:y,statement:v,options:w}=t;let _;if(Ue())if(typeof y=="object")_=y;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))_=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=y}const S=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const E=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),v?{statement:v}:null));let k;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")k=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)k=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)x=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),g=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");x=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((f=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...w.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(`
`);const E=await _.signMessage(new TextEncoder().encode(x),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=E}}try{const{data:b,error:y}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:x,signature:zn(g)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:$t});if(y)throw y;if(!b||!b.session||!b.user){const v=new gs;return this._returnResult({data:{user:null,session:null},error:v})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:y})}catch(b){if(U(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const r=await Nn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new Oj;const{data:o,error:i}=await H(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:$t});if(await De(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const a=new gs;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(await De(this.storage,`${this.storageKey}-code-verifier`),U(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:o,nonce:i}=t,a=await H(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:$t}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const d=new gs;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,o,i;try{if("email"in t){const{email:a,options:l}=t;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await vs(this.storage,this.storageKey));const{error:f}=await H(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:d}=await H(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d})}throw new Ta("You must provide either an email or phone number.")}catch(a){if(await De(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,o;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:a}=await H(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:$t});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,c=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,o,i;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await vs(this.storage,this.storageKey));const c=await H(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:sN});return!((o=c.data)===null||o===void 0)&&o.url&&Ue()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await De(this.storage,`${this.storageKey}-code-verifier`),U(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new dt;const{error:s}=await H(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(U(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:o}=t,{error:i}=await H(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in t){const{phone:n,type:s,options:o}=t,{data:i,error:a}=await H(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a})}throw new Ta("You must provide either an email or phone number and a type")}catch(r){if(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Nn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<yu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await Nn(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=bu()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=eN(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await H(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:en}):await this._useSession(async r=>{var n,s,o;const{data:i,error:a}=r;if(a)throw a;return!(!((n=i.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new dt}:await H(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:en})})}catch(r){if(U(r))return jj(r)&&(await this._removeSession(),await De(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new dt;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await vs(this.storage,this.storageKey));const{data:c,error:d}=await H(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:en});if(d)throw d;return i.user=c.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(await De(this.storage,`${this.storageKey}-code-verifier`),U(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new dt;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=xu(t.access_token);if(i.exp&&(n=i.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};o=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;o={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(U(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:i,error:a}=r;if(a)throw a;t=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new dt;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(U(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Ue())throw new Pa("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Pa(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new pg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Pa("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new pg("No code detected.");const{data:v,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:c}=t;if(!o||!a||!i||!c)throw new Pa("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(a);let p=d+f;l&&(p=parseInt(l));const h=p-d;h*1e3<=ks&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${f}s`);const x=p-f;d-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,p,d):d-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,p,d);const{data:g,error:b}=await this._getUser(o);if(b)throw b;const y={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:f,expires_at:p,refresh_token:i,token_type:c,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(n){if(U(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Nn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({error:o});const i=(n=s.session)===null||n===void 0?void 0:n.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(Rj(a)&&(a.status===404||a.status===401||a.status===403)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await De(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=Fj(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await vs(this.storage,this.storageKey,!0));try{return await H(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(await De(this.storage,`${this.storageKey}-code-verifier`),U(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async o=>{var i,a,l,c,d;const{data:f,error:p}=o;if(p)throw p;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await H(this.fetch,"GET",h,{headers:this.headers,jwt:(d=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Ue()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(U(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:o}}=r;if(s)throw s;const{options:i,provider:a,token:l,access_token:c,nonce:d}=t,f=await H(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:$t}),{data:p,error:h}=f;return h?this._returnResult({data:{user:null,session:null},error:h}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new gs}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:h}))}catch(s){if(await De(this.storage,`${this.storageKey}-code-verifier`),U(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)throw i;return await H(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await Hj(async s=>(s>0&&await Vj(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await H(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:$t})),(s,o)=>{const i=200*Math.pow(2,s);return o&&wu(o)&&Date.now()+i-n<ks})}catch(n){if(this._debug(r,"error",n),U(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Ue()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Nn(this.storage,this.storageKey);if(s&&this.userStorage){let i=await Nn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await Cs(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:bu()}else if(s&&!s.user&&!s.user){const i=await Nn(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await De(this.storage,this.storageKey+"-user"),await Cs(this.storage,this.storageKey,s)):s.user=bu()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<yu;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${yu}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),wu(i)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(s.access_token);!a&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(n,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new dt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new gc;const{data:o,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!o.session)throw new dt;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={data:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(s,"error",o),U(o)){const i={data:null,error:o};return wu(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){o.push(l)}});if(await Promise.all(i),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await De(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Cs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=wg(s);await Cs(this.storage,this.storageKey,o)}else{const s=wg(r);await Cs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await De(this.storage,this.storageKey),await De(this.storage,this.storageKey+"-code-verifier"),await De(this.storage,this.storageKey+"-user"),this.userStorage&&await De(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ue()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ks);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/ks);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ks}ms, refresh threshold is ${ef} ticks`),s<=ef&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof vx)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ue()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,i]=await vs(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?this._returnResult({data:null,error:o}):await H(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await H(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?xN(t.webauthn.credential_response):bN(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await H(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:i,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=await H(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(i.error)return i;const{data:a}=i;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:yN(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:wN(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:s}=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=xu(n.access_token);let i=null;o.aal&&(i=o.aal);let a=i;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(a="aal2");const c=o.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:c},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await H(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new dt})})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new dt});const i=await H(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&Ue()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new dt});const i=await H(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&Ue()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await H(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new dt})})}catch(t){if(U(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await H(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new dt})})}catch(r){if(U(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+Pj>s)return n;const{data:o,error:i}=await H(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,n=o.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:x}=await this.getSession();if(x||!h.session)return this._returnResult({data:null,error:x});n=h.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:l}}=xu(n);r!=null&&r.allowExpired||Yj(o.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:o,header:s,signature:i},error:null}}const d=Xj(s.alg),f=await crypto.subtle.importKey("jwk",c,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,i,$j(`${a}.${l}`)))throw new nf("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if(U(n))return this._returnResult({data:null,error:n});throw n}}}Oi.nextInstanceID={};const RN=Oi,jN="2.90.1";let Vo="";typeof Deno<"u"?Vo="deno":typeof document<"u"?Vo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Vo="react-native":Vo="node";const NN={"X-Client-Info":`supabase-js-${Vo}/${jN}`},ON={headers:NN},IN={schema:"public"},LN={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},MN={};function Ii(e){"@babel/helpers - typeof";return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ii(e)}function DN(e,t){if(Ii(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $N(e){var t=DN(e,"string");return Ii(t)=="symbol"?t:t+""}function UN(e,t,r){return(t=$N(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cg(Object(r),!0).forEach(function(n){UN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const FN=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),zN=()=>Headers,BN=(e,t,r)=>{const n=FN(r),s=zN();return async(o,i)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(i==null?void 0:i.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(o,Se(Se({},i),{},{headers:c}))}};function VN(e){return e.endsWith("/")?e:e+"/"}function HN(e,t){var r,n;const{db:s,auth:o,realtime:i,global:a}=e,{db:l,auth:c,realtime:d,global:f}=t,p={db:Se(Se({},l),s),auth:Se(Se({},c),o),realtime:Se(Se({},d),i),storage:{},global:Se(Se(Se({},f),a),{},{headers:Se(Se({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function WN(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(VN(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var qN=class extends RN{constructor(e){super(e)}},KN=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const o=WN(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const i=`sb-${o.hostname.split(".")[0]}-auth-token`,a={db:IN,realtime:MN,auth:Se(Se({},LN),{},{storageKey:i}),global:ON},l=HN(r??{},a);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=BN(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Se({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&this.accessToken().then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new CR(new URL("rest/v1",o).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this.storage=new Sj(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new bR(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:o,flowType:i,lock:a,debug:l,throwOnError:c},d,f){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new qN({url:this.authUrl.href,headers:Se(Se({},p),d),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:i,lock:a,debug:l,throwOnError:c,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new VR(this.realtimeUrl.href,Se(Se({},e),{},{params:Se(Se({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const GN=(e,t,r)=>new KN(e,t,r);function QN(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}QN()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const JN="https://biwzvplkgkrfbuxsasgg.supabase.co",YN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJpd3p2cGxrZ2tyZmJ1eHNhc2dnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjgzMDg0NTgsImV4cCI6MjA4Mzg4NDQ1OH0.AOS5Lpd7CdF0LeKpcRVnkHDLymZeMbGvrYra0MSfVLY",ir=GN(JN,YN,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),xx=m.createContext(void 0);function XN({children:e}){const[t,r]=m.useState(null),[n,s]=m.useState(null),[o,i]=m.useState(!1),[a,l]=m.useState(!0);m.useEffect(()=>{const{data:{subscription:h}}=ir.auth.onAuthStateChange((x,g)=>{s(g),r((g==null?void 0:g.user)??null),g!=null&&g.user?setTimeout(()=>{c(g.user.id)},0):i(!1)});return ir.auth.getSession().then(({data:{session:x}})=>{s(x),r((x==null?void 0:x.user)??null),x!=null&&x.user&&c(x.user.id),l(!1)}),()=>h.unsubscribe()},[]);const c=async h=>{try{const{data:x,error:g}=await ir.rpc("has_role",{_user_id:h,_role:"admin"});g?(console.error("Error checking admin role:",g),i(!1)):i(x===!0)}catch(x){console.error("Error checking admin role:",x),i(!1)}},d=async(h,x)=>{const{error:g}=await ir.auth.signInWithPassword({email:h,password:x});return{error:g}},f=async(h,x)=>{const g=`${window.location.origin}/`,{error:b}=await ir.auth.signUp({email:h,password:x,options:{emailRedirectTo:g}});return{error:b}},p=async()=>{await ir.auth.signOut(),i(!1)};return u.jsx(xx.Provider,{value:{user:t,session:n,isAdmin:o,isLoading:a,signIn:d,signUp:f,signOut:p},children:e})}function ZN(){const e=m.useContext(xx);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}var eO=m.createContext(void 0);function Lh(e){const t=m.useContext(eO);return e||t||"ltr"}var Su=0;function tO(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Tg()),document.body.insertAdjacentElement("beforeend",e[1]??Tg()),Su++,()=>{Su===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Su--}},[])}function Tg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Eu="focusScope.autoFocusOnMount",ku="focusScope.autoFocusOnUnmount",Pg={bubbles:!1,cancelable:!0},rO="FocusScope",bx=m.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=m.useState(null),c=xt(s),d=xt(o),f=m.useRef(null),p=ke(t,g=>l(g)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let g=function(w){if(h.paused||!a)return;const _=w.target;a.contains(_)?f.current=_:Gr(f.current,{select:!0})},b=function(w){if(h.paused||!a)return;const _=w.relatedTarget;_!==null&&(a.contains(_)||Gr(f.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Gr(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),v.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){Rg.add(h);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(Eu,Pg);a.addEventListener(Eu,c),a.dispatchEvent(y),y.defaultPrevented||(nO(lO(_x(a)),{select:!0}),document.activeElement===g&&Gr(a))}return()=>{a.removeEventListener(Eu,c),setTimeout(()=>{const y=new CustomEvent(ku,Pg);a.addEventListener(ku,d),a.dispatchEvent(y),y.defaultPrevented||Gr(g??document.body,{select:!0}),a.removeEventListener(ku,d),Rg.remove(h)},0)}}},[a,c,d,h]);const x=m.useCallback(g=>{if(!r&&!n||h.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const v=g.currentTarget,[w,_]=sO(v);w&&_?!g.shiftKey&&y===_?(g.preventDefault(),r&&Gr(w,{select:!0})):g.shiftKey&&y===w&&(g.preventDefault(),r&&Gr(_,{select:!0})):y===v&&g.preventDefault()}},[r,n,h.paused]);return u.jsx(oe.div,{tabIndex:-1,...i,ref:p,onKeyDown:x})});bx.displayName=rO;function nO(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Gr(n,{select:t}),document.activeElement!==r)return}function sO(e){const t=_x(e),r=Ag(t,e),n=Ag(t.reverse(),e);return[r,n]}function _x(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ag(e,t){for(const r of e)if(!oO(r,{upTo:t}))return r}function oO(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function iO(e){return e instanceof HTMLInputElement&&"select"in e}function Gr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&iO(e)&&t&&e.select()}}var Rg=aO();function aO(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=jg(e,t),e.unshift(t)},remove(t){var r;e=jg(e,t),(r=e[0])==null||r.resume()}}}function jg(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function lO(e){return e.filter(t=>t.tagName!=="A")}var Cu="rovingFocusGroup.onEntryFocus",cO={bubbles:!1,cancelable:!0},Qi="RovingFocusGroup",[sf,Sx,uO]=ec(Qi),[dO,Ex]=mr(Qi,[uO]),[fO,hO]=dO(Qi),kx=m.forwardRef((e,t)=>u.jsx(sf.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(sf.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(pO,{...e,ref:t})})}));kx.displayName=Qi;var pO=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=e,p=m.useRef(null),h=ke(t,p),x=Lh(o),[g,b]=os({prop:i,defaultProp:a??null,onChange:l,caller:Qi}),[y,v]=m.useState(!1),w=xt(c),_=Sx(r),S=m.useRef(!1),[E,k]=m.useState(0);return m.useEffect(()=>{const T=p.current;if(T)return T.addEventListener(Cu,w),()=>T.removeEventListener(Cu,w)},[w]),u.jsx(fO,{scope:r,orientation:n,dir:x,loop:s,currentTabStopId:g,onItemFocus:m.useCallback(T=>b(T),[b]),onItemShiftTab:m.useCallback(()=>v(!0),[]),onFocusableItemAdd:m.useCallback(()=>k(T=>T+1),[]),onFocusableItemRemove:m.useCallback(()=>k(T=>T-1),[]),children:u.jsx(oe.div,{tabIndex:y||E===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{S.current=!0}),onFocus:B(e.onFocus,T=>{const j=!S.current;if(T.target===T.currentTarget&&j&&!y){const O=new CustomEvent(Cu,cO);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const V=_().filter(F=>F.focusable),M=V.find(F=>F.active),K=V.find(F=>F.id===g),X=[M,K,...V].filter(Boolean).map(F=>F.ref.current);Px(X,d)}}S.current=!1}),onBlur:B(e.onBlur,()=>v(!1))})})}),Cx="RovingFocusGroupItem",Tx=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:i,...a}=e,l=_i(),c=o||l,d=hO(Cx,r),f=d.currentTabStopId===c,p=Sx(r),{onFocusableItemAdd:h,onFocusableItemRemove:x,currentTabStopId:g}=d;return m.useEffect(()=>{if(n)return h(),()=>x()},[n,h,x]),u.jsx(sf.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:u.jsx(oe.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:B(e.onMouseDown,b=>{n?d.onItemFocus(c):b.preventDefault()}),onFocus:B(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:B(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=vO(b,d.orientation,d.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=p().filter(_=>_.focusable).map(_=>_.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const _=w.indexOf(b.currentTarget);w=d.loop?yO(w,_+1):w.slice(_+1)}setTimeout(()=>Px(w))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:g!=null}):i})})});Tx.displayName=Cx;var mO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function vO(e,t,r){const n=gO(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return mO[n]}function Px(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function yO(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var wO=kx,xO=Tx,bO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bs=new WeakMap,Aa=new WeakMap,Ra={},Tu=0,Ax=function(e){return e&&(e.host||Ax(e.parentNode))},_O=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ax(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},SO=function(e,t,r,n){var s=_O(t,Array.isArray(e)?e:[e]);Ra[r]||(Ra[r]=new WeakMap);var o=Ra[r],i=[],a=new Set,l=new Set(s),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};s.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))d(p);else try{var h=p.getAttribute(n),x=h!==null&&h!=="false",g=(bs.get(p)||0)+1,b=(o.get(p)||0)+1;bs.set(p,g),o.set(p,b),i.push(p),g===1&&x&&Aa.set(p,!0),b===1&&p.setAttribute(r,"true"),x||p.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return d(t),a.clear(),Tu++,function(){i.forEach(function(f){var p=bs.get(f)-1,h=o.get(f)-1;bs.set(f,p),o.set(f,h),p||(Aa.has(f)||f.removeAttribute(n),Aa.delete(f)),h||f.removeAttribute(r)}),Tu--,Tu||(bs=new WeakMap,bs=new WeakMap,Aa=new WeakMap,Ra={})}},EO=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=bO(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),SO(n,s,r,"aria-hidden")):function(){return null}},Ja="right-scroll-bar-position",Ya="width-before-scroll-bar",kO="with-scroll-bars-hidden",CO="--removed-body-scroll-bar-size";function Pu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function TO(e,t){var r=m.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var PO=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ng=new WeakMap;function AO(e,t){var r=TO(null,function(n){return e.forEach(function(s){return Pu(s,n)})});return PO(function(){var n=Ng.get(r);if(n){var s=new Set(n),o=new Set(e),i=r.current;s.forEach(function(a){o.has(a)||Pu(a,null)}),o.forEach(function(a){s.has(a)||Pu(a,i)})}Ng.set(r,e)},[e]),r}function RO(e){return e}function jO(e,t){t===void 0&&(t=RO);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var i=t(o,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(n=!0;r.length;){var i=r;r=[],i.forEach(o)}r={push:function(a){return o(a)},filter:function(){return r}}},assignMedium:function(o){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(o),i=r}var l=function(){var d=i;i=[],d.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),r}}}};return s}function NO(e){e===void 0&&(e={});var t=jO(null);return t.options=lr({async:!0,ssr:!1},e),t}var Rx=function(e){var t=e.sideCar,r=Eo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return m.createElement(n,lr({},r))};Rx.isSideCarExport=!0;function OO(e,t){return e.useMedium(t),Rx}var jx=NO(),Au=function(){},vc=m.forwardRef(function(e,t){var r=m.useRef(null),n=m.useState({onScrollCapture:Au,onWheelCapture:Au,onTouchMoveCapture:Au}),s=n[0],o=n[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noRelative,x=e.noIsolation,g=e.inert,b=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,w=e.gapMode,_=Eo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,E=AO([r,t]),k=lr(lr({},_),s);return m.createElement(m.Fragment,null,d&&m.createElement(S,{sideCar:jx,removeScrollBar:c,shards:f,noRelative:h,noIsolation:x,inert:g,setCallbacks:o,allowPinchZoom:!!b,lockRef:r,gapMode:w}),i?m.cloneElement(m.Children.only(a),lr(lr({},k),{ref:E})):m.createElement(v,lr({},k,{className:l,ref:E}),a))});vc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vc.classNames={fullWidth:Ya,zeroRight:Ja};var IO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function LO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=IO();return t&&e.setAttribute("nonce",t),e}function MO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function DO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $O=function(){var e=0,t=null;return{add:function(r){e==0&&(t=LO())&&(MO(t,r),DO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},UO=function(){var e=$O();return function(t,r){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Nx=function(){var e=UO(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},FO={left:0,top:0,right:0,gap:0},Ru=function(e){return parseInt(e||"",10)||0},zO=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Ru(r),Ru(n),Ru(s)]},BO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return FO;var t=zO(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},VO=Nx(),Ys="data-scroll-locked",HO=function(e,t,r,n){var s=e.left,o=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
  .`.concat(kO,` {
   overflow: hidden `).concat(n,`;
   padding-right: `).concat(a,"px ").concat(n,`;
  }
  body[`).concat(Ys,`] {
    overflow: hidden `).concat(n,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
    padding-left: `.concat(s,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(i,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(n,`;
    `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Ja,` {
    right: `).concat(a,"px ").concat(n,`;
  }
  
  .`).concat(Ya,` {
    margin-right: `).concat(a,"px ").concat(n,`;
  }
  
  .`).concat(Ja," .").concat(Ja,` {
    right: 0 `).concat(n,`;
  }
  
  .`).concat(Ya," .").concat(Ya,` {
    margin-right: 0 `).concat(n,`;
  }
  
  body[`).concat(Ys,`] {
    `).concat(CO,": ").concat(a,`px;
  }
`)},Og=function(){var e=parseInt(document.body.getAttribute(Ys)||"0",10);return isFinite(e)?e:0},WO=function(){m.useEffect(function(){return document.body.setAttribute(Ys,(Og()+1).toString()),function(){var e=Og()-1;e<=0?document.body.removeAttribute(Ys):document.body.setAttribute(Ys,e.toString())}},[])},qO=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;WO();var o=m.useMemo(function(){return BO(s)},[s]);return m.createElement(VO,{styles:HO(o,!t,s,r?"":"!important")})},of=!1;if(typeof window<"u")try{var ja=Object.defineProperty({},"passive",{get:function(){return of=!0,!0}});window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch{of=!1}var _s=of?{passive:!1}:!1,KO=function(e){return e.tagName==="TEXTAREA"},Ox=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!KO(e)&&r[t]==="visible")},GO=function(e){return Ox(e,"overflowY")},QO=function(e){return Ox(e,"overflowX")},Ig=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Ix(e,n);if(s){var o=Lx(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},JO=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},YO=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Ix=function(e,t){return e==="v"?GO(t):QO(t)},Lx=function(e,t){return e==="v"?JO(t):YO(t)},XO=function(e,t){return e==="h"&&t==="rtl"?-1:1},ZO=function(e,t,r,n,s){var o=XO(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),c=!1,d=i>0,f=0,p=0;do{if(!a)break;var h=Lx(e,a),x=h[0],g=h[1],b=h[2],y=g-b-o*x;(x||y)&&Ix(e,a)&&(f+=y,p+=x);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(p)<1||!s))&&(c=!0),c},Na=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Lg=function(e){return[e.deltaX,e.deltaY]},Mg=function(e){return e&&"current"in e?e.current:e},e2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},t2=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},r2=0,Ss=[];function n2(e){var t=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(r2++)[0],o=m.useState(Nx)[0],i=m.useRef(e);m.useEffect(function(){i.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=yR([e.lockRef.current],(e.shards||[]).map(Mg),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=m.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var y=Na(g),v=r.current,w="deltaX"in g?g.deltaX:v[0]-y[0],_="deltaY"in g?g.deltaY:v[1]-y[1],S,E=g.target,k=Math.abs(w)>Math.abs(_)?"h":"v";if("touches"in g&&k==="h"&&E.type==="range")return!1;var T=Ig(k,E);if(!T)return!0;if(T?S=k:(S=k==="v"?"h":"v",T=Ig(k,E)),!T)return!1;if(!n.current&&"changedTouches"in g&&(w||_)&&(n.current=S),!S)return!0;var j=n.current||S;return ZO(j,b,g,j==="h"?w:_,!0)},[]),l=m.useCallback(function(g){var b=g;if(!(!Ss.length||Ss[Ss.length-1]!==o)){var y="deltaY"in b?Lg(b):Na(b),v=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&e2(S.delta,y)})[0];if(v&&v.should){b.cancelable&&b.preventDefault();return}if(!v){var w=(i.current.shards||[]).map(Mg).filter(Boolean).filter(function(S){return S.contains(b.target)}),_=w.length>0?a(b,w[0]):!i.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),c=m.useCallback(function(g,b,y,v){var w={name:g,delta:b,target:y,should:v,shadowParent:s2(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(_){return _!==w})},1)},[]),d=m.useCallback(function(g){r.current=Na(g),n.current=void 0},[]),f=m.useCallback(function(g){c(g.type,Lg(g),g.target,a(g,e.lockRef.current))},[]),p=m.useCallback(function(g){c(g.type,Na(g),g.target,a(g,e.lockRef.current))},[]);m.useEffect(function(){return Ss.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,_s),document.addEventListener("touchmove",l,_s),document.addEventListener("touchstart",d,_s),function(){Ss=Ss.filter(function(g){return g!==o}),document.removeEventListener("wheel",l,_s),document.removeEventListener("touchmove",l,_s),document.removeEventListener("touchstart",d,_s)}},[]);var h=e.removeScrollBar,x=e.inert;return m.createElement(m.Fragment,null,x?m.createElement(o,{styles:t2(s)}):null,h?m.createElement(qO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function s2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const o2=OO(jx,n2);var Mx=m.forwardRef(function(e,t){return m.createElement(vc,lr({},e,{ref:t,sideCar:o2}))});Mx.classNames=vc.classNames;var af=["Enter"," "],i2=["ArrowDown","PageUp","Home"],Dx=["ArrowUp","PageDown","End"],a2=[...i2,...Dx],l2={ltr:[...af,"ArrowRight"],rtl:[...af,"ArrowLeft"]},c2={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ji="Menu",[Li,u2,d2]=ec(Ji),[is,$x]=mr(Ji,[d2,lc,Ex]),yc=lc(),Ux=Ex(),[f2,as]=is(Ji),[h2,Yi]=is(Ji),Fx=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:s,onOpenChange:o,modal:i=!0}=e,a=yc(t),[l,c]=m.useState(null),d=m.useRef(!1),f=xt(o),p=Lh(s);return m.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),u.jsx(QT,{...a,children:u.jsx(f2,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:c,children:u.jsx(h2,{scope:t,onClose:m.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:i,children:n})})})};Fx.displayName=Ji;var p2="MenuAnchor",Mh=m.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=yc(r);return u.jsx(_w,{...s,...n,ref:t})});Mh.displayName=p2;var Dh="MenuPortal",[m2,zx]=is(Dh,{forceMount:void 0}),Bx=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:s}=e,o=as(Dh,t);return u.jsx(m2,{scope:t,forceMount:r,children:u.jsx(Cn,{present:r||o.open,children:u.jsx(ah,{asChild:!0,container:s,children:n})})})};Bx.displayName=Dh;var Rt="MenuContent",[g2,$h]=is(Rt),Vx=m.forwardRef((e,t)=>{const r=zx(Rt,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=as(Rt,e.__scopeMenu),i=Yi(Rt,e.__scopeMenu);return u.jsx(Li.Provider,{scope:e.__scopeMenu,children:u.jsx(Cn,{present:n||o.open,children:u.jsx(Li.Slot,{scope:e.__scopeMenu,children:i.modal?u.jsx(v2,{...s,ref:t}):u.jsx(y2,{...s,ref:t})})})})}),v2=m.forwardRef((e,t)=>{const r=as(Rt,e.__scopeMenu),n=m.useRef(null),s=ke(t,n);return m.useEffect(()=>{const o=n.current;if(o)return EO(o)},[]),u.jsx(Uh,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),y2=m.forwardRef((e,t)=>{const r=as(Rt,e.__scopeMenu);return u.jsx(Uh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),w2=xi("MenuContent.ScrollLock"),Uh=m.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,disableOutsideScroll:x,...g}=e,b=as(Rt,r),y=Yi(Rt,r),v=yc(r),w=Ux(r),_=u2(r),[S,E]=m.useState(null),k=m.useRef(null),T=ke(t,k,b.onContentChange),j=m.useRef(0),O=m.useRef(""),V=m.useRef(0),M=m.useRef(null),K=m.useRef("right"),L=m.useRef(0),X=x?Mx:m.Fragment,F=x?{as:w2,allowPinchZoom:!0}:void 0,q=C=>{var te,yr;const I=O.current+C,z=_().filter(Ie=>!Ie.disabled),$=document.activeElement,J=(te=z.find(Ie=>Ie.ref.current===$))==null?void 0:te.textValue,Z=z.map(Ie=>Ie.textValue),ge=j2(Z,I,J),be=(yr=z.find(Ie=>Ie.textValue===ge))==null?void 0:yr.ref.current;(function Ie(er){O.current=er,window.clearTimeout(j.current),er!==""&&(j.current=window.setTimeout(()=>Ie(""),1e3))})(I),be&&setTimeout(()=>be.focus())};m.useEffect(()=>()=>window.clearTimeout(j.current),[]),tO();const P=m.useCallback(C=>{var z,$;return K.current===((z=M.current)==null?void 0:z.side)&&O2(C,($=M.current)==null?void 0:$.area)},[]);return u.jsx(g2,{scope:r,searchRef:O,onItemEnter:m.useCallback(C=>{P(C)&&C.preventDefault()},[P]),onItemLeave:m.useCallback(C=>{var I;P(C)||((I=k.current)==null||I.focus(),E(null))},[P]),onTriggerLeave:m.useCallback(C=>{P(C)&&C.preventDefault()},[P]),pointerGraceTimerRef:V,onPointerGraceIntentChange:m.useCallback(C=>{M.current=C},[]),children:u.jsx(X,{...F,children:u.jsx(bx,{asChild:!0,trapped:s,onMountAutoFocus:B(o,C=>{var I;C.preventDefault(),(I=k.current)==null||I.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:u.jsx(tc,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,children:u.jsx(wO,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:S,onCurrentTabStopIdChange:E,onEntryFocus:B(l,C=>{y.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(Sw,{role:"menu","aria-orientation":"vertical","data-state":ob(b.open),"data-radix-menu-content":"",dir:y.dir,...v,...g,ref:T,style:{outline:"none",...g.style},onKeyDown:B(g.onKeyDown,C=>{const z=C.target.closest("[data-radix-menu-content]")===C.currentTarget,$=C.ctrlKey||C.altKey||C.metaKey,J=C.key.length===1;z&&(C.key==="Tab"&&C.preventDefault(),!$&&J&&q(C.key));const Z=k.current;if(C.target!==Z||!a2.includes(C.key))return;C.preventDefault();const be=_().filter(te=>!te.disabled).map(te=>te.ref.current);Dx.includes(C.key)&&be.reverse(),A2(be)}),onBlur:B(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(j.current),O.current="")}),onPointerMove:B(e.onPointerMove,Mi(C=>{const I=C.target,z=L.current!==C.clientX;if(C.currentTarget.contains(I)&&z){const $=C.clientX>L.current?"right":"left";K.current=$,L.current=C.clientX}}))})})})})})})});Vx.displayName=Rt;var x2="MenuGroup",Fh=m.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return u.jsx(oe.div,{role:"group",...n,ref:t})});Fh.displayName=x2;var b2="MenuLabel",Hx=m.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return u.jsx(oe.div,{...n,ref:t})});Hx.displayName=b2;var Il="MenuItem",Dg="menu.itemSelect",wc=m.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...s}=e,o=m.useRef(null),i=Yi(Il,e.__scopeMenu),a=$h(Il,e.__scopeMenu),l=ke(t,o),c=m.useRef(!1),d=()=>{const f=o.current;if(!r&&f){const p=new CustomEvent(Dg,{bubbles:!0,cancelable:!0});f.addEventListener(Dg,h=>n==null?void 0:n(h),{once:!0}),ih(f,p),p.defaultPrevented?c.current=!1:i.onClose()}};return u.jsx(Wx,{...s,ref:l,disabled:r,onClick:B(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),c.current=!0},onPointerUp:B(e.onPointerUp,f=>{var p;c.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:B(e.onKeyDown,f=>{const p=a.searchRef.current!=="";r||p&&f.key===" "||af.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});wc.displayName=Il;var Wx=m.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=e,i=$h(Il,r),a=Ux(r),l=m.useRef(null),c=ke(t,l),[d,f]=m.useState(!1),[p,h]=m.useState("");return m.useEffect(()=>{const x=l.current;x&&h((x.textContent??"").trim())},[o.children]),u.jsx(Li.ItemSlot,{scope:r,disabled:n,textValue:s??p,children:u.jsx(xO,{asChild:!0,...a,focusable:!n,children:u.jsx(oe.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:c,onPointerMove:B(e.onPointerMove,Mi(x=>{n?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,Mi(x=>i.onItemLeave(x))),onFocus:B(e.onFocus,()=>f(!0)),onBlur:B(e.onBlur,()=>f(!1))})})})}),_2="MenuCheckboxItem",qx=m.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...s}=e;return u.jsx(Yx,{scope:e.__scopeMenu,checked:r,children:u.jsx(wc,{role:"menuitemcheckbox","aria-checked":Ll(r)?"mixed":r,...s,ref:t,"data-state":Bh(r),onSelect:B(s.onSelect,()=>n==null?void 0:n(Ll(r)?!0:!r),{checkForDefaultPrevented:!1})})})});qx.displayName=_2;var Kx="MenuRadioGroup",[S2,E2]=is(Kx,{value:void 0,onValueChange:()=>{}}),Gx=m.forwardRef((e,t)=>{const{value:r,onValueChange:n,...s}=e,o=xt(n);return u.jsx(S2,{scope:e.__scopeMenu,value:r,onValueChange:o,children:u.jsx(Fh,{...s,ref:t})})});Gx.displayName=Kx;var Qx="MenuRadioItem",Jx=m.forwardRef((e,t)=>{const{value:r,...n}=e,s=E2(Qx,e.__scopeMenu),o=r===s.value;return u.jsx(Yx,{scope:e.__scopeMenu,checked:o,children:u.jsx(wc,{role:"menuitemradio","aria-checked":o,...n,ref:t,"data-state":Bh(o),onSelect:B(n.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,r)},{checkForDefaultPrevented:!1})})})});Jx.displayName=Qx;var zh="MenuItemIndicator",[Yx,k2]=is(zh,{checked:!1}),Xx=m.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...s}=e,o=k2(zh,r);return u.jsx(Cn,{present:n||Ll(o.checked)||o.checked===!0,children:u.jsx(oe.span,{...s,ref:t,"data-state":Bh(o.checked)})})});Xx.displayName=zh;var C2="MenuSeparator",Zx=m.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return u.jsx(oe.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Zx.displayName=C2;var T2="MenuArrow",eb=m.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,s=yc(r);return u.jsx(Ew,{...s,...n,ref:t})});eb.displayName=T2;var P2="MenuSub",[aM,tb]=is(P2),Ho="MenuSubTrigger",rb=m.forwardRef((e,t)=>{const r=as(Ho,e.__scopeMenu),n=Yi(Ho,e.__scopeMenu),s=tb(Ho,e.__scopeMenu),o=$h(Ho,e.__scopeMenu),i=m.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=o,c={__scopeMenu:e.__scopeMenu},d=m.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return m.useEffect(()=>d,[d]),m.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),u.jsx(Mh,{asChild:!0,...c,children:u.jsx(Wx,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":ob(r.open),...e,ref:Zl(t,s.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,Mi(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:B(e.onPointerLeave,Mi(f=>{var h,x;d();const p=(h=r.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(x=r.content)==null?void 0:x.dataset.side,b=g==="right",y=b?-5:5,v=p[b?"left":"right"],w=p[b?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:v,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x:v,y:p.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,f=>{var h;const p=o.searchRef.current!=="";e.disabled||p&&f.key===" "||l2[n.dir].includes(f.key)&&(r.onOpenChange(!0),(h=r.content)==null||h.focus(),f.preventDefault())})})})});rb.displayName=Ho;var nb="MenuSubContent",sb=m.forwardRef((e,t)=>{const r=zx(Rt,e.__scopeMenu),{forceMount:n=r.forceMount,...s}=e,o=as(Rt,e.__scopeMenu),i=Yi(Rt,e.__scopeMenu),a=tb(nb,e.__scopeMenu),l=m.useRef(null),c=ke(t,l);return u.jsx(Li.Provider,{scope:e.__scopeMenu,children:u.jsx(Cn,{present:n||o.open,children:u.jsx(Li.Slot,{scope:e.__scopeMenu,children:u.jsx(Uh,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:B(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:B(e.onKeyDown,d=>{var h;const f=d.currentTarget.contains(d.target),p=c2[i.dir].includes(d.key);f&&p&&(o.onOpenChange(!1),(h=a.trigger)==null||h.focus(),d.preventDefault())})})})})})});sb.displayName=nb;function ob(e){return e?"open":"closed"}function Ll(e){return e==="indeterminate"}function Bh(e){return Ll(e)?"indeterminate":e?"checked":"unchecked"}function A2(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function R2(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function j2(e,t,r){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=R2(e,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function N2(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o],l=t[i],c=a.x,d=a.y,f=l.x,p=l.y;d>n!=p>n&&r<(f-c)*(n-d)/(p-d)+c&&(s=!s)}return s}function O2(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return N2(r,t)}function Mi(e){return t=>t.pointerType==="mouse"?e(t):void 0}var I2=Fx,L2=Mh,M2=Bx,D2=Vx,$2=Fh,U2=Hx,F2=wc,z2=qx,B2=Gx,V2=Jx,H2=Xx,W2=Zx,q2=eb,K2=rb,G2=sb,xc="DropdownMenu",[Q2,lM]=mr(xc,[$x]),nt=$x(),[J2,ib]=Q2(xc),ab=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=nt(t),c=m.useRef(null),[d,f]=os({prop:s,defaultProp:o??!1,onChange:i,caller:xc});return u.jsx(J2,{scope:t,triggerId:_i(),triggerRef:c,contentId:_i(),open:d,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(p=>!p),[f]),modal:a,children:u.jsx(I2,{...l,open:d,onOpenChange:f,dir:n,modal:a,children:r})})};ab.displayName=xc;var lb="DropdownMenuTrigger",cb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=e,o=ib(lb,r),i=nt(r);return u.jsx(L2,{asChild:!0,...i,children:u.jsx(oe.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:Zl(t,o.triggerRef),onPointerDown:B(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:B(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});cb.displayName=lb;var Y2="DropdownMenuPortal",ub=e=>{const{__scopeDropdownMenu:t,...r}=e,n=nt(t);return u.jsx(M2,{...n,...r})};ub.displayName=Y2;var db="DropdownMenuContent",fb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=ib(db,r),o=nt(r),i=m.useRef(!1);return u.jsx(D2,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...n,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,a=>{var l;i.current||(l=s.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:B(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!s.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fb.displayName=db;var X2="DropdownMenuGroup",Z2=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx($2,{...s,...n,ref:t})});Z2.displayName=X2;var eI="DropdownMenuLabel",hb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(U2,{...s,...n,ref:t})});hb.displayName=eI;var tI="DropdownMenuItem",pb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(F2,{...s,...n,ref:t})});pb.displayName=tI;var rI="DropdownMenuCheckboxItem",mb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(z2,{...s,...n,ref:t})});mb.displayName=rI;var nI="DropdownMenuRadioGroup",sI=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(B2,{...s,...n,ref:t})});sI.displayName=nI;var oI="DropdownMenuRadioItem",gb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(V2,{...s,...n,ref:t})});gb.displayName=oI;var iI="DropdownMenuItemIndicator",vb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(H2,{...s,...n,ref:t})});vb.displayName=iI;var aI="DropdownMenuSeparator",yb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(W2,{...s,...n,ref:t})});yb.displayName=aI;var lI="DropdownMenuArrow",cI=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(q2,{...s,...n,ref:t})});cI.displayName=lI;var uI="DropdownMenuSubTrigger",wb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(K2,{...s,...n,ref:t})});wb.displayName=uI;var dI="DropdownMenuSubContent",xb=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,s=nt(r);return u.jsx(G2,{...s,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xb.displayName=dI;var fI=ab,hI=cb,pI=ub,bb=fb,_b=hb,Sb=pb,Eb=mb,kb=gb,Cb=vb,Tb=yb,Pb=wb,Ab=xb;const mI=fI,gI=hI,vI=m.forwardRef(({className:e,inset:t,children:r,...n},s)=>u.jsxs(Pb,{ref:s,className:le("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...n,children:[r,u.jsx(z0,{className:"ml-auto h-4 w-4"})]}));vI.displayName=Pb.displayName;const yI=m.forwardRef(({className:e,...t},r)=>u.jsx(Ab,{ref:r,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));yI.displayName=Ab.displayName;const Rb=m.forwardRef(({className:e,sideOffset:t=4,...r},n)=>u.jsx(pI,{children:u.jsx(bb,{ref:n,sideOffset:t,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Rb.displayName=bb.displayName;const lf=m.forwardRef(({className:e,inset:t,...r},n)=>u.jsx(Sb,{ref:n,className:le("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...r}));lf.displayName=Sb.displayName;const wI=m.forwardRef(({className:e,children:t,checked:r,...n},s)=>u.jsxs(Eb,{ref:s,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:r,...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Cb,{children:u.jsx(F0,{className:"h-4 w-4"})})}),t]}));wI.displayName=Eb.displayName;const xI=m.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(kb,{ref:n,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Cb,{children:u.jsx(XE,{className:"h-2 w-2 fill-current"})})}),t]}));xI.displayName=kb.displayName;const bI=m.forwardRef(({className:e,inset:t,...r},n)=>u.jsx(_b,{ref:n,className:le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));bI.displayName=_b.displayName;const jb=m.forwardRef(({className:e,...t},r)=>u.jsx(Tb,{ref:r,className:le("-mx-1 my-1 h-px bg-muted",e),...t}));jb.displayName=Tb.displayName;function _I(e){return{utm_source:e.get("utm_source")||void 0,utm_medium:e.get("utm_medium")||void 0,utm_campaign:e.get("utm_campaign")||void 0,utm_content:e.get("utm_content")||void 0,utm_term:e.get("utm_term")||void 0}}function SI(){const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"}let $e=null,$g=null;function Vh(){const e=vr(),t=m.useRef(Date.now()),r=m.useRef(new Set),n=m.useRef("");m.useEffect(()=>{if($e===null){const f=new URLSearchParams(window.location.search);$e=_I(f),$g=document.referrer||null}},[]);const s=m.useCallback(f=>({...f,referrer:f.referrer||$g,utm_source:f.utm_source||($e==null?void 0:$e.utm_source),utm_medium:f.utm_medium||($e==null?void 0:$e.utm_medium),utm_campaign:f.utm_campaign||($e==null?void 0:$e.utm_campaign),utm_content:f.utm_content||($e==null?void 0:$e.utm_content),utm_term:f.utm_term||($e==null?void 0:$e.utm_term),device_type:f.device_type||SI(),screen_width:f.screen_width||window.innerWidth}),[]),o=m.useCallback(async f=>{try{if(navigator.doNotTrack==="1")return;await ir.functions.invoke("track-analytics",{body:s(f)})}catch(p){console.debug("Analytics event failed:",p)}},[s]),i=m.useCallback(f=>{try{if(navigator.doNotTrack==="1")return;const p="https://biwzvplkgkrfbuxsasgg.supabase.co/functions/v1/track-analytics",h=s(f);navigator.sendBeacon(p,new Blob([JSON.stringify(h)],{type:"application/json"}))}catch(p){console.debug("Analytics beacon failed:",p)}},[s]),a=m.useCallback((f,p)=>{const h=f||e.pathname;Date.now()-t.current,n.current&&n.current,n.current=h,t.current=Date.now(),r.current.clear(),o({event_type:"pageview",page_path:h,page_title:p||document.title})},[e.pathname,o]),l=m.useCallback((f,p)=>{o({event_type:"click",event_name:f,page_path:e.pathname,page_title:document.title,metadata:p})},[e.pathname,o]),c=m.useCallback((f,p,h)=>{const x={event_type:"form",event_name:`${f}_${p}`,page_path:e.pathname,page_title:document.title,metadata:{form_id:f,action:p,...h}};p==="abandon"?i(x):o(x)},[e.pathname,o,i]),d=m.useCallback(f=>{const p=Math.floor(f/25)*25;p>0&&p<=100&&!r.current.has(p)&&(r.current.add(p),o({event_type:"scroll",event_name:`scroll_${p}`,page_path:e.pathname,page_title:document.title,scroll_depth:p}))},[e.pathname,o]);return m.useEffect(()=>{a()},[e.pathname,a]),m.useEffect(()=>{const f=()=>{const p=window.scrollY,h=document.documentElement.scrollHeight-window.innerHeight,x=h>0?p/h*100:0;d(x)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[d]),{trackPageView:a,trackClick:l,trackForm:c,trackScroll:d}}const EI=m.forwardRef(({trackingName:e,trackingMetadata:t,onClick:r,children:n,...s},o)=>{const{trackClick:i}=Vh(),a=l=>{i(e,t),r==null||r(l)};return u.jsx(Ge,{ref:o,onClick:a,...s,children:n})});EI.displayName="TrackedButton";function Pr({trackingName:e,trackingMetadata:t,onClick:r,children:n,...s}){const{trackClick:o}=Vh(),i=()=>{o(e,t),r==null||r()};return u.jsx(it,{onClick:i,...s,children:n})}const Ug=[{href:"/fonctionnalites",label:"Fonctionnalités"},{href:"/tarifs",label:"Prix"},{href:"/faq",label:"FAQ"},{href:"/contact",label:"Contact"}];function kI(){var d;const[e,t]=m.useState(!1),[r,n]=m.useState(!1),s=vr(),o=pc(),{user:i,isAdmin:a,signOut:l}=ZN();m.useEffect(()=>{const f=()=>{n(window.scrollY>20)};return window.addEventListener("scroll",f),()=>window.removeEventListener("scroll",f)},[]);const c=async()=>{await l(),o("/")};return u.jsxs("header",{className:le("fixed top-0 left-0 right-0 z-50 transition-all duration-300",r?"glass shadow-lg":"bg-transparent"),children:[u.jsx("div",{className:"container mx-auto px-4",children:u.jsxs("div",{className:"flex h-20 items-center justify-between",children:[u.jsx(it,{to:"/",className:"flex items-center gap-3 group",children:u.jsx(rx,{size:"lg"})}),u.jsx("nav",{className:"hidden lg:flex items-center gap-8",children:Ug.map(f=>u.jsxs(it,{to:f.href,className:le("text-sm font-medium transition-all duration-200 hover:text-primary relative group py-2",s.pathname===f.href?"text-primary":"text-foreground/80"),children:[f.label,u.jsx("span",{className:le("absolute bottom-0 left-0 h-0.5 bg-gradient-to-r from-primary to-secondary transition-all duration-300 rounded-full",s.pathname===f.href?"w-full":"w-0 group-hover:w-full")})]},f.href))}),u.jsxs("div",{className:"hidden lg:flex items-center gap-3",children:[u.jsxs(Pr,{to:"/demo",trackingName:"header_cta_demo",className:"inline-flex items-center gap-2 text-sm font-medium text-foreground/80 hover:text-primary hover:bg-primary/5 px-4 py-2 rounded-md transition-colors",children:[u.jsx(Sl,{className:"w-4 h-4"}),"Essayer la démo"]}),i?u.jsxs(mI,{children:[u.jsx(gI,{asChild:!0,children:u.jsxs(Ge,{className:"gap-2 btn-neon bg-primary hover:bg-primary/90",children:[u.jsx(ou,{className:"w-4 h-4"}),(d=i.email)==null?void 0:d.split("@")[0]]})}),u.jsxs(Rb,{align:"end",className:"w-48",children:[a&&u.jsxs(u.Fragment,{children:[u.jsx(lf,{asChild:!0,children:u.jsxs(it,{to:"/admin",className:"flex items-center gap-2 cursor-pointer",children:[u.jsx(Ad,{className:"w-4 h-4"}),"Administration"]})}),u.jsx(jb,{})]}),u.jsxs(lf,{onClick:c,className:"flex items-center gap-2 cursor-pointer text-destructive focus:text-destructive",children:[u.jsx(_m,{className:"w-4 h-4"}),"Déconnexion"]})]})]}):u.jsxs(Pr,{to:"/auth",trackingName:"header_cta_auth",className:"inline-flex items-center gap-2 text-sm font-medium btn-neon bg-primary hover:bg-primary/90 text-primary-foreground px-4 py-2 rounded-md transition-colors",children:[u.jsx(ou,{className:"w-4 h-4"}),"Accès Pro"]})]}),u.jsx("button",{className:"lg:hidden p-2 text-foreground rounded-lg hover:bg-muted transition-colors",onClick:()=>t(!e),"aria-label":"Toggle menu",children:e?u.jsx(sc,{className:"w-6 h-6"}):u.jsx(lk,{className:"w-6 h-6"})})]})}),u.jsx("div",{className:le("lg:hidden fixed inset-x-0 top-20 bottom-0 bg-background transition-all duration-300 ease-out",e?"opacity-100 pointer-events-auto translate-y-0":"opacity-0 pointer-events-none -translate-y-4"),children:u.jsxs("nav",{className:"container mx-auto px-4 py-8 flex flex-col gap-2",children:[Ug.map((f,p)=>u.jsx(it,{to:f.href,className:le("text-xl font-medium py-4 px-4 rounded-xl transition-all duration-200","animate-fade-in-up",s.pathname===f.href?"text-primary bg-primary/10":"text-foreground hover:bg-muted"),style:{animationDelay:`${p*50}ms`},onClick:()=>t(!1),children:f.label},f.href)),u.jsxs("div",{className:"flex flex-col gap-3 pt-6 mt-4 border-t border-border",children:[u.jsxs(Pr,{to:"/demo",trackingName:"header_mobile_cta_demo",onClick:()=>t(!1),className:"inline-flex items-center justify-center gap-2 text-base font-medium border border-primary/50 text-primary px-4 py-3 rounded-md transition-colors hover:bg-primary/5",children:[u.jsx(Sl,{className:"w-4 h-4"}),"Essayer la démo"]}),i?u.jsxs(u.Fragment,{children:[a&&u.jsx(Ge,{asChild:!0,variant:"outline",size:"lg",className:"justify-center gap-2",children:u.jsxs(it,{to:"/admin",onClick:()=>t(!1),children:[u.jsx(Ad,{className:"w-4 h-4"}),"Administration"]})}),u.jsxs(Ge,{size:"lg",variant:"ghost",onClick:()=>{c(),t(!1)},className:"justify-center gap-2 text-destructive hover:text-destructive hover:bg-destructive/10",children:[u.jsx(_m,{className:"w-4 h-4"}),"Déconnexion"]})]}):u.jsxs(Pr,{to:"/auth",trackingName:"header_mobile_cta_auth",onClick:()=>t(!1),className:"inline-flex items-center justify-center gap-2 text-base font-medium btn-neon bg-primary text-primary-foreground px-4 py-3 rounded-md transition-colors",children:[u.jsx(ou,{className:"w-4 h-4"}),"Accès Pro"]})]})]})})]})}const cf=m.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:le("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));cf.displayName="Input";function CI({variant:e="default",className:t=""}){const[r,n]=m.useState(""),[s,o]=m.useState(!1),[i,a]=m.useState(!1),{trackForm:l}=Vh(),c=f=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f),d=async f=>{if(f.preventDefault(),!r.trim()){Rn.error("Veuillez entrer votre email");return}if(!c(r)){Rn.error("Format d'email invalide");return}o(!0);try{const{data:p}=await ir.from("newsletter_subscribers").select("status").eq("email",r.toLowerCase().trim()).maybeSingle();if(p){if(p.status==="active"){Rn.info("Vous êtes déjà inscrit à notre newsletter !"),a(!0);return}else if(p.status==="pending"){Rn.info("Un email de confirmation vous a déjà été envoyé. Vérifiez votre boîte de réception."),a(!0);return}}const{error:h}=await ir.from("newsletter_subscribers").upsert({email:r.toLowerCase().trim(),source:"newsletter",status:"pending",gdpr_consent:!0},{onConflict:"email"});if(h)throw h;try{await ir.functions.invoke("send-admin-notification",{body:{type:"newsletter_confirmation",data:{email:r.toLowerCase().trim()}}})}catch(x){console.error("Error sending confirmation email:",x),Rn.error("Erreur lors de l'envoi de l'email de confirmation.");return}l("newsletter","submit",{source:"footer"}),a(!0),Rn.success("Vérifiez votre boîte mail pour confirmer votre inscription !"),n("")}catch(p){console.error("Error subscribing to newsletter:",p),Rn.error("Une erreur est survenue. Veuillez réessayer.")}finally{o(!1)}};return i?u.jsxs("div",{className:`flex items-center justify-center gap-2 text-primary ${t}`,children:[u.jsx(JE,{className:"w-5 h-5"}),u.jsx("span",{className:"font-medium text-sm",children:"Vérifiez votre email !"})]}):e==="compact"?u.jsxs("form",{onSubmit:d,className:`flex gap-2 ${t}`,children:[u.jsx(cf,{type:"email",placeholder:"votre@email.com",value:r,onChange:f=>n(f.target.value),className:"flex-1 h-10 bg-muted/50 border-border",disabled:s}),u.jsx(Ge,{type:"submit",size:"sm",disabled:s,children:s?u.jsx(bm,{className:"w-4 h-4 animate-spin"}):u.jsx(bi,{className:"w-4 h-4"})})]}):u.jsxs("form",{onSubmit:d,className:`flex flex-col sm:flex-row gap-3 ${t}`,children:[u.jsx(cf,{type:"email",placeholder:"votre@email.com",value:r,onChange:f=>n(f.target.value),className:"flex-1 px-4 py-3 h-12 rounded-xl bg-card border border-border focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all",disabled:s}),u.jsx(Ge,{type:"submit",disabled:s,className:"h-12 px-6",children:s?u.jsxs(u.Fragment,{children:[u.jsx(bm,{className:"w-4 h-4 animate-spin mr-2"}),"Inscription..."]}):u.jsxs(u.Fragment,{children:["S'abonner",u.jsx(bi,{className:"ml-2 h-4 w-4"})]})})]})}const ju={product:[{label:"Fonctionnalités",href:"/fonctionnalites"},{label:"Prix",href:"/tarifs"},{label:"FAQ",href:"/faq"},{label:"Voir la démo",href:"/demo"}],company:[{label:"À propos",href:"/a-propos"},{label:"Blog",href:"/blog"},{label:"Carrières",href:"#"},{label:"Partenaires",href:"#"}],legal:[{label:"Mentions légales",href:"/mentions-legales"},{label:"Politique de confidentialité",href:"/politique-confidentialite"},{label:"CGU",href:"/cgu"},{label:"Cookies",href:"/politique-confidentialite#10"}]},TI=()=>{window.dispatchEvent(new CustomEvent("openCookiePreferences"))};function PI(){return u.jsx("footer",{className:"bg-card border-t border-border relative",children:u.jsxs("div",{className:"container mx-auto px-4 py-16",children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-12",children:[u.jsxs("div",{className:"lg:col-span-2",children:[u.jsx(it,{to:"/",className:"inline-block mb-6",children:u.jsx(rx,{size:"lg"})}),u.jsx("p",{className:"text-muted-foreground mb-6 max-w-sm leading-relaxed",children:"La solution SaaS complète pour digitaliser et optimiser la gestion de vos parkings. Propulsée par l'intelligence artificielle."}),u.jsx("div",{className:"flex gap-3",children:[{icon:ok,href:"https://www.linkedin.com/company/proparking-ai",label:"LinkedIn"}].map(({icon:e,href:t,label:r})=>u.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":`Suivez-nous sur ${r}`,className:"w-10 h-10 rounded-xl bg-muted flex items-center justify-center text-muted-foreground hover:text-primary hover:bg-primary/10 transition-all duration-200",children:u.jsx(e,{className:"w-5 h-5","aria-hidden":"true"})},r))})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground mb-5",children:"Produit"}),u.jsx("ul",{className:"space-y-3",children:ju.product.map(e=>u.jsx("li",{children:e.href==="/demo"?u.jsx(Pr,{to:e.href,trackingName:"footer_cta_demo",className:"text-muted-foreground hover:text-primary transition-colors duration-200",children:e.label}):u.jsx(it,{to:e.href,className:"text-muted-foreground hover:text-primary transition-colors duration-200",children:e.label})},e.label))})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground mb-5",children:"Entreprise"}),u.jsx("ul",{className:"space-y-3",children:ju.company.map(e=>u.jsx("li",{children:u.jsx(it,{to:e.href,className:"text-muted-foreground hover:text-primary transition-colors duration-200",children:e.label})},e.label))})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-semibold text-foreground mb-5",children:"Contact"}),u.jsxs("ul",{className:"space-y-4 mb-6",children:[u.jsx("li",{children:u.jsxs("a",{href:"tel:+33285523228",className:"flex items-center gap-3 text-muted-foreground hover:text-primary transition-colors duration-200 group",children:[u.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center group-hover:bg-primary/20 transition-colors",children:u.jsx(uk,{className:"w-4 h-4 text-primary"})}),u.jsx("span",{className:"text-sm",children:"+33 2 85 52 32 28"})]})}),u.jsxs("li",{className:"flex items-start gap-3 text-muted-foreground",children:[u.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:u.jsx(ak,{className:"w-4 h-4 text-primary"})}),u.jsx("span",{className:"text-sm",children:"Nantes, France"})]})]}),u.jsxs("div",{className:"pt-4 border-t border-border",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[u.jsx(ik,{className:"w-4 h-4 text-primary"}),u.jsx("span",{className:"text-sm font-medium text-foreground",children:"Newsletter"})]}),u.jsx(CI,{variant:"compact"}),u.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Actualités et conseils. Pas de spam."})]})]})]}),u.jsxs("div",{className:"mt-12 pt-8 border-t border-border flex flex-col md:flex-row justify-between items-center gap-4",children:[u.jsxs("p",{className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," ",u.jsx("span",{className:"brand-name",children:"ProParking.ai - Parking Artificial Intelligence "}),". Tous droits réservés."]}),u.jsxs("div",{className:"flex flex-wrap justify-center items-center gap-6",children:[ju.legal.map(e=>u.jsx(it,{to:e.href,className:"text-sm text-muted-foreground hover:text-primary transition-colors duration-200",children:e.label},e.label)),u.jsxs("button",{onClick:TI,className:"text-sm text-muted-foreground hover:text-primary transition-colors duration-200 flex items-center gap-1.5",children:[u.jsx(B0,{className:"w-3.5 h-3.5"}),"Gérer les cookies"]})]})]})]})})}const AI={"/":"Accueil","/fonctionnalites":"Fonctionnalités","/tarifs":"Tarifs","/faq":"FAQ","/contact":"Contact","/demo":"Demander une démo","/auth":"Connexion","/admin":"Administration"};function RI(){const e=vr();if(e.pathname==="/")return null;const t=e.pathname.split("/").filter(Boolean),r=[{name:"Accueil",path:"/"}];let n="";t.forEach(o=>{n+=`/${o}`;const i=AI[n]||o.charAt(0).toUpperCase()+o.slice(1);r.push({name:i,path:n})});const s={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:r.map((o,i)=>({"@type":"ListItem",position:i+1,name:o.name,item:`https://www.proparking.ai${o.path}`}))};return u.jsxs(u.Fragment,{children:[u.jsx(Ah,{children:u.jsx("script",{type:"application/ld+json",children:JSON.stringify(s)})}),u.jsx("nav",{"aria-label":"Fil d'Ariane",className:"container mx-auto px-4 pt-6 pb-2",children:u.jsx("ol",{className:"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground",children:r.map((o,i)=>{const a=i===r.length-1;return u.jsxs("li",{className:"inline-flex items-center gap-1.5",children:[i>0&&u.jsx(z0,{className:"w-3.5 h-3.5 text-muted-foreground/50","aria-hidden":"true"}),a?u.jsxs("span",{"aria-current":"page",className:"font-medium text-foreground",children:[i===0&&u.jsx(xm,{className:"w-3.5 h-3.5 inline mr-1","aria-hidden":"true"}),o.name]}):u.jsxs(it,{to:o.path,className:"hover:text-primary transition-colors inline-flex items-center",children:[i===0&&u.jsx(xm,{className:"w-3.5 h-3.5 mr-1","aria-hidden":"true"}),o.name]})]},o.path)})})})]})}function jI(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var bc="Switch",[NI,cM]=mr(bc),[OI,II]=NI(bc),Nb=m.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:i,disabled:a,value:l="on",onCheckedChange:c,form:d,...f}=e,[p,h]=m.useState(null),x=ke(t,w=>h(w)),g=m.useRef(!1),b=p?d||!!p.closest("form"):!0,[y,v]=os({prop:s,defaultProp:o??!1,onChange:c,caller:bc});return u.jsxs(OI,{scope:r,checked:y,disabled:a,children:[u.jsx(oe.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Mb(y),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:x,onClick:B(e.onClick,w=>{v(_=>!_),b&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),b&&u.jsx(Lb,{control:p,bubbles:!g.current,name:n,value:l,checked:y,required:i,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});Nb.displayName=bc;var Ob="SwitchThumb",Ib=m.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=II(Ob,r);return u.jsx(oe.span,{"data-state":Mb(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});Ib.displayName=Ob;var LI="SwitchBubbleInput",Lb=m.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const i=m.useRef(null),a=ke(i,o),l=jI(r),c=fw(t);return m.useEffect(()=>{const d=i.current;if(!d)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==r&&h){const x=new Event("click",{bubbles:n});h.call(d,r),d.dispatchEvent(x)}},[l,r,n]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:a,style:{...s.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Lb.displayName=LI;function Mb(e){return e?"checked":"unchecked"}var Db=Nb,MI=Ib;const Xa=m.forwardRef(({className:e,...t},r)=>u.jsx(Db,{className:le("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:u.jsx(MI,{className:le("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Xa.displayName=Db.displayName;const Fg="proparking_cookie_consent",zg="proparking_cookie_preferences";function DI(){const[e,t]=m.useState(!1),[r,n]=m.useState(!1),[s,o]=m.useState({essential:!0,analytics:!1,preferences:!1});m.useEffect(()=>{if(localStorage.getItem(Fg)){const f=localStorage.getItem(zg);f&&o(JSON.parse(f))}else{const f=setTimeout(()=>t(!0),1e3);return()=>clearTimeout(f)}},[]),m.useEffect(()=>{const d=()=>{t(!0),n(!0)};return window.addEventListener("openCookiePreferences",d),()=>window.removeEventListener("openCookiePreferences",d)},[]);const i=d=>{localStorage.setItem(Fg,"true"),localStorage.setItem(zg,JSON.stringify(d)),o(d),t(!1),n(!1)},a=()=>{i({essential:!0,analytics:!0,preferences:!0})},l=()=>{i({essential:!0,analytics:!1,preferences:!1})},c=()=>{i(s)};return e?u.jsxs(u.Fragment,{children:[r&&u.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-[99]",onClick:()=>n(!1)}),u.jsx("div",{className:`fixed bottom-0 left-0 right-0 z-[100] transition-transform duration-500 ${r?"translate-y-full":"translate-y-0"}`,children:u.jsx("div",{className:"container mx-auto px-4 pb-4",children:u.jsx("div",{className:"bg-card border border-border rounded-2xl shadow-2xl p-6 max-w-4xl mx-auto",children:u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center flex-shrink-0",children:u.jsx(B0,{className:"w-6 h-6 text-primary"})}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Nous respectons votre vie privée"}),u.jsxs("p",{className:"text-muted-foreground text-sm mb-4",children:["Nous utilisons des cookies pour améliorer votre expérience, analyser le trafic et personnaliser le contenu. Vous pouvez accepter tous les cookies, les refuser ou personnaliser vos préférences."," ",u.jsx(it,{to:"/politique-confidentialite#10",className:"text-primary hover:underline",children:"En savoir plus"})]}),u.jsxs("div",{className:"flex flex-wrap gap-3",children:[u.jsx(Ge,{onClick:a,className:"flex-1 sm:flex-none",children:"Tout accepter"}),u.jsx(Ge,{variant:"outline",onClick:l,className:"flex-1 sm:flex-none",children:"Tout refuser"}),u.jsxs(Ge,{variant:"ghost",onClick:()=>n(!0),className:"flex-1 sm:flex-none",children:[u.jsx(dk,{className:"w-4 h-4 mr-2"}),"Personnaliser"]})]})]})]})})})}),r&&u.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:u.jsxs("div",{className:"bg-card border border-border rounded-2xl shadow-2xl w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[u.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-border",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:u.jsx(Ad,{className:"w-5 h-5 text-primary"})}),u.jsx("h2",{className:"text-xl font-semibold",children:"Préférences de cookies"})]}),u.jsx("button",{onClick:()=>n(!1),className:"w-8 h-8 rounded-lg hover:bg-muted flex items-center justify-center transition-colors",children:u.jsx(sc,{className:"w-5 h-5"})})]}),u.jsxs("div",{className:"p-6 space-y-6",children:[u.jsx("p",{className:"text-sm text-muted-foreground",children:"Gérez vos préférences de cookies. Les cookies essentiels sont nécessaires au fonctionnement du site et ne peuvent pas être désactivés."}),u.jsxs("div",{className:"p-4 rounded-xl bg-muted/50 border border-border",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("h3",{className:"font-medium",children:"Cookies essentiels"}),u.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-primary/20 text-primary",children:"Requis"})]}),u.jsx(Xa,{checked:!0,disabled:!0})]}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Ces cookies sont nécessaires au fonctionnement du site. Ils permettent la navigation, l'accès aux zones sécurisées et les fonctionnalités de base."})]}),u.jsxs("div",{className:"p-4 rounded-xl bg-muted/50 border border-border",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("h3",{className:"font-medium",children:"Cookies analytiques"}),u.jsx(Xa,{checked:s.analytics,onCheckedChange:d=>o(f=>({...f,analytics:d}))})]}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Ces cookies nous permettent de mesurer l'audience du site de manière anonyme pour améliorer son contenu et ses performances."})]}),u.jsxs("div",{className:"p-4 rounded-xl bg-muted/50 border border-border",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("h3",{className:"font-medium",children:"Cookies de préférences"}),u.jsx(Xa,{checked:s.preferences,onCheckedChange:d=>o(f=>({...f,preferences:d}))})]}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Ces cookies mémorisent vos choix (langue, région) pour personnaliser votre expérience sur le site."})]}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Pour plus d'informations, consultez notre"," ",u.jsx(it,{to:"/politique-confidentialite",className:"text-primary hover:underline",onClick:()=>n(!1),children:"politique de confidentialité"}),"."]})]}),u.jsxs("div",{className:"p-6 border-t border-border flex flex-col sm:flex-row gap-3",children:[u.jsx(Ge,{variant:"outline",onClick:l,className:"flex-1",children:"Tout refuser"}),u.jsx(Ge,{onClick:c,className:"flex-1",children:"Enregistrer mes préférences"})]})]})})]}):null}function $I({children:e}){return u.jsxs("div",{className:"min-h-screen flex flex-col",children:[u.jsx(kI,{}),u.jsxs("main",{className:"flex-1 pt-20",role:"main",id:"main-content",children:[u.jsx(RI,{}),e]}),u.jsx(PI,{}),u.jsx(DI,{})]})}function UI(){const e="2026-01-27",t={"@context":"https://schema.org","@type":"Organization","@id":"https://www.proparking.ai/#organization",name:"ProParking.ai",url:"https://www.proparking.ai",logo:"https://www.proparking.ai/logo.png",description:"Logiciel SaaS de gestion de parking avec IA - Centralisation des réservations de 36+ plateformes",foundingDate:"2020",areaServed:"FR",sameAs:["https://www.linkedin.com/company/proparking-ai"],contactPoint:{"@type":"ContactPoint",contactType:"customer service",availableLanguage:["French","English"],areaServed:"FR",hoursAvailable:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],opens:"08:00",closes:"20:00"}}},r={"@context":"https://schema.org","@type":"WebSite","@id":"https://www.proparking.ai/#website",name:"ProParking.ai",url:"https://www.proparking.ai",description:"Logiciel de gestion de parking avec centralisation des réservations et optimisation IA",publisher:{"@id":"https://www.proparking.ai/#organization"},datePublished:"2024-01-01",dateModified:e,potentialAction:{"@type":"SearchAction",target:"https://www.proparking.ai/faq?q={search_term_string}","query-input":"required name=search_term_string"}},n={"@context":"https://schema.org","@type":"WebPage",isPartOf:{"@id":"https://www.proparking.ai/#website"},publisher:{"@id":"https://www.proparking.ai/#organization"},datePublished:"2024-01-01",dateModified:e,inLanguage:"fr-FR"};return u.jsxs(Ah,{children:[u.jsx("link",{rel:"alternate",hrefLang:"fr",href:"https://www.proparking.ai"}),u.jsx("link",{rel:"alternate",hrefLang:"x-default",href:"https://www.proparking.ai"}),u.jsx("script",{type:"application/ld+json",children:JSON.stringify(t)}),u.jsx("script",{type:"application/ld+json",children:JSON.stringify(r)}),u.jsx("script",{type:"application/ld+json",children:JSON.stringify(n)})]})}function FI(){const{pathname:e}=vr();return m.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[e]),null}function zI({startPrice:e,endPrice:t,duration:r=2e3}){const[n,s]=m.useState(e),[o,i]=m.useState(!1),a=m.useRef(null);m.useEffect(()=>{const c=new IntersectionObserver(d=>{d[0].isIntersecting&&!o&&(i(!0),l())},{threshold:.5});return a.current&&c.observe(a.current),()=>c.disconnect()},[o]);const l=()=>{const c=Date.now(),d=e-t,f=h=>h===1?1:1-Math.pow(2,-10*h),p=()=>{const h=Date.now()-c,x=Math.min(h/r,1),g=f(x),b=Math.round(e-d*g);s(b),x<1&&requestAnimationFrame(p)};requestAnimationFrame(p)};return u.jsxs("div",{ref:a,className:"relative",children:[u.jsxs("span",{className:"text-5xl md:text-6xl font-display font-bold text-secondary tabular-nums",children:[n,"€"]},n),n===t&&u.jsx("div",{className:"absolute -top-2 -right-2 px-2 py-0.5 rounded-full bg-primary text-primary-foreground text-xs font-bold animate-scale-in",children:"-82%"})]})}const BI="/assets/hero-dashboard-BI5PswCs.webp",VI=[{icon:ZE,text:"Prise en main : 2h"},{icon:V0,text:"Support français 6j/7"},{icon:ek,text:"Essai gratuit 30 jours"}],HI=["36+ plateformes centralisées","IA optimisation placement","Gestion navettes incluse"];function WI(){return u.jsxs("section",{className:"relative min-h-[100svh] flex flex-col justify-center overflow-hidden pt-16 pb-8 lg:pt-20 lg:pb-12",children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute top-0 left-0 w-full h-full bg-gradient-to-b from-primary/5 via-transparent to-background"}),u.jsx("div",{className:"absolute top-1/4 left-1/4 w-[400px] h-[400px] bg-primary/10 rounded-full blur-[100px]"}),u.jsx("div",{className:"absolute bottom-1/3 right-1/4 w-[300px] h-[300px] bg-secondary/10 rounded-full blur-[80px]"})]}),u.jsx("div",{className:"absolute inset-0 opacity-[0.015] pointer-events-none",style:{backgroundImage:"radial-gradient(circle at 1px 1px, hsl(var(--primary)) 1px, transparent 0)",backgroundSize:"48px 48px"}}),u.jsx("div",{className:"container mx-auto px-4 relative z-10 flex-1 flex flex-col justify-center",children:u.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-12 items-center",children:[u.jsxs("div",{className:"text-center lg:text-left order-2 lg:order-1",children:[u.jsxs("div",{className:"inline-flex max-w-full flex-wrap items-center justify-center gap-2 px-4 py-2 rounded-full bg-primary/15 border border-primary/30 mb-6 animate-fade-in",children:[u.jsx(Rd,{className:"w-4 h-4 text-primary"}),u.jsx("span",{className:"text-sm font-semibold text-primary text-center leading-tight",children:"Logiciel SaaS de gestion de parking"})]}),u.jsxs("h1",{className:"text-3xl sm:text-4xl md:text-5xl lg:text-[3.25rem] xl:text-6xl font-display font-bold leading-[1.15] mb-5 animate-fade-in-up",children:[u.jsx("span",{className:"gradient-text",children:"Centralisez"}),u.jsx("span",{className:"text-foreground",children:" vos réservations."})," ",u.jsx("br",{className:"hidden sm:block"}),u.jsx("span",{className:"text-secondary",children:"Automatisez"}),u.jsx("span",{className:"text-foreground",children:" votre parking."})]}),u.jsxs("p",{className:"text-base sm:text-lg md:text-xl text-muted-foreground max-w-lg mx-auto lg:mx-0 mb-6 leading-relaxed animate-fade-in-up animation-delay-200",children:[u.jsx("strong",{className:"text-foreground brand-name",children:"ProParking.ai"})," unifie 36+ plateformes de réservation et optimise le placement par IA."]}),u.jsx("div",{className:"flex flex-col sm:flex-row sm:flex-wrap items-stretch sm:items-center justify-center lg:justify-start gap-2 sm:gap-3 mb-8 animate-fade-in-up animation-delay-200",children:HI.map(e=>u.jsxs("div",{className:"flex items-center justify-center sm:justify-start gap-1.5 px-3 py-1.5 rounded-full bg-muted/50 border border-border text-xs sm:text-sm text-foreground w-full sm:w-auto whitespace-normal text-center sm:text-left leading-tight",children:[u.jsx(YE,{className:"w-3 sm:w-3.5 h-3 sm:h-3.5 text-primary flex-shrink-0"}),u.jsx("span",{className:"min-w-0",children:e})]},e))}),u.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center lg:justify-start gap-3 sm:gap-4 mb-8 animate-fade-in-up animation-delay-300",children:[u.jsx(Pr,{to:"/demo",trackingName:"hero_cta_demo",className:"w-full sm:w-auto",children:u.jsxs(Ge,{size:"lg",className:"btn-neon bg-primary hover:bg-primary/90 text-base sm:text-lg px-6 sm:px-8 h-12 sm:h-14 rounded-xl w-full sm:w-auto font-semibold",children:[u.jsx(Sl,{className:"mr-2 w-5 h-5"}),"Demander une démo"]})}),u.jsx(Pr,{to:"/tarifs",trackingName:"hero_cta_tarifs",className:"w-full sm:w-auto",children:u.jsxs(Ge,{size:"lg",variant:"outline",className:"text-base sm:text-lg px-6 sm:px-8 h-12 sm:h-14 rounded-xl border-border hover:bg-muted hover:border-primary/50 transition-all w-full sm:w-auto",children:["Voir les tarifs",u.jsx(bi,{className:"ml-2 w-5 h-5"})]})})]}),u.jsx("div",{className:"flex flex-col min-[420px]:flex-row min-[420px]:flex-wrap items-stretch min-[420px]:items-center justify-center lg:justify-start gap-3 sm:gap-6 animate-fade-in-up animation-delay-400",children:VI.map(e=>u.jsxs("div",{className:"flex items-center justify-center min-[420px]:justify-start gap-1.5 sm:gap-2 text-xs sm:text-sm text-muted-foreground hover:text-foreground transition-colors w-full min-[420px]:w-auto",children:[u.jsx("div",{className:"w-7 h-7 sm:w-8 sm:h-8 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:u.jsx(e.icon,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-primary"})}),u.jsx("span",{className:"text-center min-[420px]:text-left leading-tight",children:e.text})]},e.text))})]}),u.jsxs("div",{className:"relative animate-fade-in-up animation-delay-300 order-1 lg:order-2",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/15 to-secondary/15 rounded-3xl blur-3xl scale-95 opacity-60"}),u.jsxs("div",{className:"relative",children:[u.jsxs("div",{className:"relative rounded-2xl overflow-hidden border border-border/50 shadow-2xl bg-card/50",children:[u.jsx("img",{src:BI,alt:"ProParking.ai - Interface du logiciel de gestion de parking avec tableau de bord des réservations",className:"w-full h-auto",width:1200,height:675,loading:"eager",fetchPriority:"high"}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/20 via-transparent to-transparent pointer-events-none"})]}),u.jsxs("div",{className:"absolute -bottom-4 right-2 sm:-bottom-6 sm:-right-2 lg:right-0 lg:-bottom-6 bg-card/95 backdrop-blur-xl border border-border rounded-xl sm:rounded-2xl p-4 sm:p-5 shadow-2xl z-20 min-w-[140px]",children:[u.jsx("p",{className:"text-primary font-semibold text-xs sm:text-sm mb-0.5",children:"À partir de"}),u.jsx(zI,{startPrice:399,endPrice:69,duration:2500}),u.jsx("p",{className:"text-muted-foreground text-xs mt-1",children:"€ HT / mois"})]})]})]})]})}),u.jsx("div",{className:"container mx-auto px-4 relative z-10 mt-8 lg:mt-12",children:u.jsx("aside",{className:"max-w-2xl mx-auto lg:mx-0 bg-muted/30 border border-border/50 rounded-xl p-4 sm:p-5",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:u.jsx(Rd,{className:"w-5 h-5 text-primary"})}),u.jsxs("div",{children:[u.jsx("p",{className:"font-semibold text-foreground text-sm mb-1",children:"À retenir"}),u.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:[u.jsx("span",{className:"brand-name",children:"ProParking.ai"})," centralise 36+ plateformes en une interface unique. Tarif : à partir de 69€/mois. Essai gratuit 30 jours sans carte bancaire."]})]})]})})}),u.jsxs("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 animate-bounce hidden lg:flex flex-col items-center gap-2 opacity-50",children:[u.jsx("span",{className:"text-xs text-muted-foreground",children:"Défiler"}),u.jsx("div",{className:"w-5 h-8 rounded-full border border-muted-foreground/30 flex items-start justify-center p-1.5",children:u.jsx("div",{className:"w-1 h-2 bg-primary rounded-full"})})]})]})}function qI({src:e,name:t,className:r}){return u.jsx("img",{src:e,alt:`${t} - Plateforme partenaire ProParking.ai`,width:100,height:40,loading:"lazy",decoding:"async",className:le("max-h-10 max-w-[100px] object-contain",r)})}const KI="data:image/webp;base64,UklGRjYDAABXRUJQVlA4ICoDAADwDwCdASoyADIAPkkgjESioiEVCzXQKASEoAzeG/PY4AG2A/Yz1Afqr6QHqA3h/0AP0A9Nb2Mv7150tLo/FZA7RfY5vPT/zvJ99IewP+sHVRNfzKZ7RStj1tlTdxLt4rGu68AXMu9ASBvBGNjJacYfGlSLkPYGxiP7oc+W8nf8N/iWuSOAj/1AAP7/vcV4Oj1XPUpGvIgGJNOslVoFdYJONCzJ1dvbHgH7sRqiv2jJ1tjJRBVuBXodI0QaqBuOswRvZS/CsrWim7ZlB+z3/EBWzCn6bs+6gvgyHRzaIUkxh9qcWJBRlahO2csnY2K8FlrybM4SFmCa5IQ/n9yClbQaGJzs85cM8mnJgfvoICeTF/nESlvDLaZGBql3/RAayTxIl0z/xH0seo9vqGJYFILUoiE783ObhVr5/sqWa++P0uEYv4brxEDtp1LlGxe8m/WQ/YJCbggbG0wIQ6xU9fSt6R6AhQ9HrYnGbG787VArqW7u+1vRDAS2A1EfX5rwIzgwssNiplamLWyXo1nRIe1sJmcMaNQryxXxWvnXkSqF/ecUoT+WHkDfm75CEbdmUUVbYbKRTWOxisKxQZmsABR9/EPpokqaosdAWlTmJbScqB2dywVUfq/rRs+hO+6s//JDMYpu4AZUpwPOv1mHmIu4N6cIdHDLIyR7P+Vg9N+L6cXlOzP/lx6V/zbVU/q6MtBnk1lTOvD8Js3LGqbasp2G6KePncuH9L759lKBHl5+rTXH4wtebZN24X3kXkPWE/LXrzUneOTDX2LDm31eqTtPYbbQ0gDRMG3BtV5qtM+zRHdreDw8kz2QxTspjv/vD6K0phPqsfILSEueTfr+UDEABpT4LpdkOT5qCfRta79mtZWuWa0K5peR22WG7m+MsvHVvcxyoWTm5DT4RHf7Ghia/elBH1Kt7OfBO3dLyWdGfGY0v2fhW76UWsFZoL/G5h2NYAVszdOP1IkqW1dA4AuQZo62n8/XdLbKIHp2+3+8hDO03PgOHJAeISW1cu5+XQxiq/rssjdbKXw3Vpj+TjNNHw/D4wCeJtZd70Bw9ERQcGVwQjON5jAAAAA=",GI="data:image/webp;base64,UklGRtoGAABXRUJQVlA4IM4GAACwIACdASqPADIAPkkgjUQioiEWOt10KASEtgBpVLx/APyA7oiXHIPx6/Lr5gaS/Q/xtkv/Od+y/ofo5/S/3PfkX/Re4B+nn6x9Yv+QegD+Xf4L9qPdg/t/68e4b9avYI/bPrBvQS8tj91fhO/uP/V9Li7oT21Rv5K4p/wruc7p2AD6w8Q2k7mc+Rj629hDpVftidGg335/8mdVIkzL0ElSicYZIiCIss7rx7Xxo5YosARf7mdU4HgXEhwH1/Ps0eP+HhdVVLGDLSInnfSYzHUPG4lhnP0zyXPU9ZsGOfPyYl55KCPIi/BmsuxfCCsi0aYHwWkaZhwJElwCPSc9Xp9mY619hVWvleQTIK111wAA/orp+U0+fuMsZfNMOA/aB6INsHLn1SA7blA5zWHvfwLpnj5s6fUN9yHrXo4CWWJ4jnl3vfWiczUzRP9L72X4wWXGnjrxGhG6oK4wkxQbivJHJvpB+B9sBZhN0b49pkLpXlEiwjzXcwg+8iiSX8SVKPljf2lJfG/yAVYoqSM6hBNbmuG6AaPrL2/Rf/Wxvn1Q4k+7rvPywUJPtjRh9tIzT50A9V76oebKn0H8//X+XBqY/jkOQcbJJIXadSeQC/AD1nax0Pr9LoVjAGSxtgCLRD1FBnM3XZ6XM8AKWN/i3hAXxX5zp+xZMr3OW6hBZL4xl1EPZruJoFpU/00dQ9nJei2gmr7VQC8gHDOU5tL9rtQSaOz/bgM2AGIfud9tYKm3xLHPBYsSNlY/fWZIU12iZYbdCaXX1S+rVxCFl5VN6Fb8/eBZ0oFIAfXX15Wyv9MQEu2jfPNsCPPIjF8NrV8dvwGtpg2tMJUIO8WdbfgNobgw58br4b/typKkHvjP+rD93X6USD1FzIZjfv4q8v7QfDxvf3K/9n2/Rt96qrmhiLE7P+un89hAF5CjlvlXj0xBizK4zfaiEpcQUv38285oA6XDA24hwcG/gabPkKtM4uFV7rOYW6VoflfMgQ3MYJQGKcrEZIu2fX62fqsq0Ir2jFURzYNmkLiYC6Fk0McW78QQm+9bAJgNmzX3eRBgx1ZIemMB61MKvkzXGOANL7xWu8E6VpMEQyZryzc+zuRkeHN63SfoN/fRa7QKNih2uit4znTvZKZzB6YTiA89yD8/sGAv4dp9nfKiqkqDKPEdSRQb73SyxbsV/SfE6fTXr2ZryvBx08Dm3mpwH7KI0I43BTBjRRkXJF9H3GmK/+2EMaaElJvdA/mHHbslpZclX26Px3loBB8f2djRgzCHEDNXgvgJE40/OKAL2UXow/i95reuDW/zyJoKLXPjUUbeu/moUA1L6vI8x1By7S4AfdHiGc1lqA/Lx1wk6bM1G6X6eVz1f09RjetkLoLDt+iGzKgk7MpKMqAFEXDut/neM7rIO6GJaggjSDMA/VARoEbB13YwfDohwpmWvsTgLQGDBBlMXZHdKF6TxyinDCnb4c1kJCLtfAk4ZtP6abr9va9KeQxkFYvZWAMMM/Alipqtt38cjF+OmAMw7LsLN7OczLHigAp/QNKSGkaSS6CVAWs5x07wPNWQcqmYD312wtGOblwY1oCvc64sLdIBUu91HiWnp/AeBW4SyDcC0VCMqV6yQsR0sDCPqR73kn4oSkw+CmO8UiptkPa4Yar65ybVcV63NKrYpL1ptc9w7YlaUq4PhfoK0ItCFUGcWifgQ0iarPNy7oC1j7feL5CkJFoKBX59vuYCMsCvce1rZBPwBpUz9OwyM5bSRD762mDpoGyVqTXuKxugKt517dIfV6WNTgHIFhjbs1Y1F2YUmmmawBgv2nOqpS+qj46tgqY7vqLe6ITCBx6v9/n+djoBPGvehb30RnTXvjQOxToHql9vXD1dFTBCFVMbxemMiUA18MaxzTAhCTF8rJfh+dBzRovjRh3vvI8PmkToMabPclBLNcwciM7tAZ+JVXTFKgTy0D+vk+7DwJZiFBnOHN8TyM1uTrP/OqxPwDnhL0bENHDeZYX7b1Xn23GJfrHz27UqSh7bnR6Jrh75ATRMAZKq7hRBhS2K/Za+di5fl2gknSH6JL7ZeRm/h0fvlZIZfdyb8UEh3856jL0DlVZ/6w1TZf3NmfW5U37APPl3BFvNFixI2sCFH0/+OiHBGzGmmTOo6pG5wn2Gds+8XFTnR7PxPVWdoVd9c2w1rtCMVhaEsZNYt376/KEgpsn5d7jfHkN9zIZK919d5i1CycXJZPrGgT4gnFBofwPbluRraf5Af00kgM9693nWEZvhTa+WSHU4uphZjUC+A1XM9NWQIpFj7ILbRA/eLEJIhUAAQJQAAAAAAAAAAA==",QI="data:image/webp;base64,UklGRqoJAABXRUJQVlA4WAoAAAAQAAAATAAAMQAAQUxQSPECAAAB8PRq27Ft2rbvaMrIniNlu1mXbbTYsm37us7WZds2W1eutm3btm3rzJ61sW7bUXVtFRETEDQLJaQiiRCVSFJSJUFlCtOiVKiieY0qqiQpUqlIM0klUZlkaiFIJqmUaFkslFItUVJFRFITSVbCSuTINk9pWetSx2hWpezGNs9PLlCOuf1SpWyppCyo5CmXXjGlLV2It32jFrXQhiiH0mV/edVmzYrtzEtKdcoX37lbOPSGtK5q94b9dSpZkG1VlkoeuP/gQatCZTPWi7j23/c3NoesbigtEGf9cHz6YAEVbYykxO6dY9yeJLLSZqJQpSeO8dVjUlBleUtI4aZHx7i3LJbtUSG5+G/H+P4xEOSQGyKikz45xjgimhJCbae13avGGL8+ITiMtmUB996PMR7tkFksthThmn8dY/zxlKVEpSIbIpz13THGeIZUMkekNpOa3jzGGH8/L5VKpcq8GYs9dswvshopKLWdlBsenf558SRJkmRTJef/esyvowuuYiuXjE74+Jj/fcUWpEyKajOfv+Gu3cvG4pt0YWreyti/85p3P7rw32tnyYKJbGmMf/97LL7zlFOOWTq0Fje0evTuf/7z/bOmEJWLwEfPH+OIUlmoqLS9/Q0PLn/FM8ru4GC3pjRv7ovOeec7b+6MF337j3/88sOPWVp0Ubhl549xxEfH/rd/HuM5WhU28+6Vb+8WLr0fjz/mtPeOX+5WKNnKFb+8dPcWTrrBDc665G2/O47uUoKymfMv+8fph8dZcON3//K/Yz/GznpsyJ33Y4yHauHa/x0/fsEtXze1VNF2dq8a4+enrDxx/PeSefs0l5DN5KTPjkeT6Sljf+9rvmw/VZqpzeDSXz9j7bJ/HWPsfz7NWd2Ss4QT7njnS7r4o1/1tOucf+c7U+ZI2ylIVptluVSObPOUJEqSKosRCiWZUyIVlCAmSRYkVbSItEwIClIFIShaRRaT0qw0qxCkCqkIiTKR1CRNWqaZUkpRJf1ftQoAVlA4IJIGAAAwHwCdASpNADIAPkkejEQioaEU3AaQKASEtQBmf1d5LTdGPM5j5P+Un4Aeo38l/6rfNeYD9kfWA/rn6we4D0AP1g6wD0APLP/bf4Pv3C/Z72uMwA7M/71+PXWn+cPaHj6MmPvvCnta/4DeROQf0D/S+BF/Aehfcaf7L1N/wHgDeOewB+YP996Y//T/mPOV9C/9r3Bv5X/Uv+r/efaH9cP7b+xP+tJ/iUfhQ6X6stq6tQKJDYy49L290lSf6m4OWBg29sB6/tGThDJfJg4uP8xziaPwa+2EXXmcZSY3OfaCXFo1j/Jc4jdyikRf270MdoD5X6Rv5u8QhG+5qNfI3lKTYAAA/v176HbtmAFu5v5niUOq/b8hy6+ziy0kbOhj6O+jZES+nL1mtZ2rE8sN8cUqpOz802XVxBKD5Dl4PKV7di6XKvzrQ+K9L0FlFdBoTHwu8sN2Wd5hXeiyhoqySTwbQktKLmy62vbW7tlI98DrJHoO1G4enFmEec0OZo/wMo2UrJpsFwMKse4mKTvX/Gor+z5gm1+WPW9TF3mh//A+e5NpbT/XUZBo9aGq2lX+B/8jHDY+aL9cfa4F/XUngy49joi/7Wrhqk84hymZJQa8uT7G2HiwwihwaEkSdhkp3/lPWh+Rq6to5mmPBZexuTtSedrXBE2/GXJamgctKHKXR80Ig8f4saubwYHtcwHApbz9CuP1Hixkz5PkK/aEKnd/MC9C9ht0jAallwyjiLe+cmiH61CuDHAASPQXwXX8YZi/ggkbkx+gUa9yMjF63giCygC99gt/G7WFfn3CAvk+AYxgRe6TiFf15EfTvf97xSpzhOSjiza17CnzDBq3yXPOejvpVfoW94r5fsibGwddGTa0h7lI97LtxO/dYvx/oYg0HFLOp249cjyLd7GlT1GVllz6OgK1xA4T/jqsfDNztgEW546ZZ9YrQjmxlPuBlithsXAaogYH7cJn2y6Yt+5O9RWcWy97NJlUU/hXJ0QC2EQa9+OVEdz/7PSX9vFgf9j9BL3PDZUCb+kf/gqTtYLdCbL/WWnXVZxOBMfm72/B5P626NZ108/bsf6B2j5cnmHO+zOl4dPfyFedagL5FO6p3sfsctpeKz30QMbsJiE5qJUZ2Smk8Kcu5+fpZTIo7skOk/AZUoCOok/A4oCFe3H67Yt1YwyCPq2SsYsg3RTAoMpg5ZdpVCk4UDB3OrVQ0HTSdoP0hXKzuYzVtAE1AQPn+6OdLhZB+N5hK1n7yPkBxYQNNG/JLFrebk7YLVauVnXm1/0JZ9BVV05n5LsJlDoIs7/rE18ddxoRoFwG1+p/9Hf7zKwe1AHPLstwa/dMmP3q4IoxsD3W9ZDF4FnUaa9vaUa3SgxZPdE0/1u5UAvDNGZ8YQZy6whsZ+Fx9y7n4kQSBT+N2qE9ZItdOcpP62KFDGotXBGRFLNg+P4idSUNfq/G6yFV2CEteNrsMJ3bE7fjBRMtvYLmMMsomOqj8njoGbZhWAx5TewSbauY/mbOxSjYx1ER1JJUdxCo2SWsU3/JN+KEMm3PhKGnkpr/i/pVe5oz2v8et/j6gsGvaeuKu2k5iIypSWcl//XsWWbuSB63X9b25Pf5GcPdoFefe+HcGhfEg3PifGExkFDf4GqBc+A0kWTMz0Yw3MHOrj++s8o7WjYhrgd0ICMwmb0spcP7JH0ZEYVx+QSMcvIloFVYjCBOzr5CG9TInP9IqYaamIsomlMxmKbsCXPj8FLx03d5TpIVPsv1VmUtMpgtHJLlxHeU/45pP4SXpdUvgfe1i0/i7Bi95ISYaJ3692eLzppV/o3Vh+pG/YXVUNwyDFIpeDmp3tJctFfMvEhQhpWbqRThdcB1wQml+lmcirZN8ARtovR/IK52iGJeDQ1TflIr0LV/1GdyhN404+lsXp3FU/mK1DFNr7COFkOiIK40iz8t7oe2xVmtLtMR2vESzioenl7rPQHOn1BCE5CHegBWiEGDKFfXyv5WAL4sI1UaAiudw74aiuV9C8gmfFz44VnJ6NypX747AtSlJUG22MWIhW5+i1LUbown9zXuiIOjyNsMbaYHITqafLf/VC0TbCo0sv6P5OOEhRXECYfQxEicmi9/FYzd3BDb9t0vMipD5MWDJT5iIB+xXagJquiVi6lnAsE2bKKnpO8TtCRdbP2/fcd17ZfQy8CnddBjNPv8n0Tv+t1FyWnjjenDHbHWTVlb/3TuD0Rm/bX9t48aOgACLxAAAA==",JI="data:image/webp;base64,UklGRuoCAABXRUJQVlA4IN4CAAAwDwCdASoyADIAPkkejUQioaEWDAU0KASEsgBmdsO9bvtJ7S3iAf3fdAfbNwgH6q9aT6AH7R+mB7DX7Z+j5R9sfn/JcIMqmGCmJ+MfUJ6LhtI+aeTQqfySOrxi8uU6l1YtT1obSRUDN/9zwXUAqAHRowKV4MQyNBGkiRdntfrAq6wAAP7/dihL171l4bJi5GmDJwDyf3xsAl0JV/zeHHerGXNVVt5Qgik+VBlD8UTTM2MMixWM6F/CLIqbJXO8YTUA8foffbh1YDOJ2iONxCEUrRXTWYQffyrSoa9tXkCmkG/LH4/+Uuxxlmc9yaWl+7gYRd/WM7r4n/+I5ZhNvopR8MnaFavXxOqfQAkbP7D/kkOXAwds/+ffBJ/Bzr3QPJ/6jq2qH9Pm9Jz4Y3yQzTJ2o5OYzJC6Z8TiG7KGEMCFeCOT5ImDn67KPFYh5Nbb673uROsaxOl2s1Q7UGqeYSW1uky2MOfnx7gEk0rzzLxTKnkqRAruecckeMZnZcWiXnLev/j/+zne7YVBEP9wk2PCeR8PN/V6DbnblNgFgRagB4lqrHyQLm43xpoxme+Aol5klxSdqSB748pXFAjNlAAKAAXzF/pJPRcwMNUVCbx9mGLD23fl/ngBexINaWMEMkZ0otb9G0x5jPYUUgjv5l83PUTrJ+9FSpHBg06Klgk4lfqmF//IZg9bv2p0cdDs38ISqERvfDL+VfnqP+SrpBqWgXkz2GUfTOBc41+bZ5cYfvTcL+7MoqcvF//KKGSmfaAB9Jpg5aGgV6XMg7kgwm0bd/yIjTaxNHznuqet3k9Liu9Z+KE7arF+9tV7sjWgpNOJCU+5W4YPl8MKFkrxfgmKxlDCvrtmCmvT6HwPgLLiyXOW7ff9wZ9wp9wP2FGzUJkpL3yjrcanxlULy+ijZsvLq0M5oCMP+a3Vx+mFXp8MlpasfLPFBCm3Pk+AvcWywEwpUYrSVYVRhdMQAAAAAA==",YI="data:image/webp;base64,UklGRioFAABXRUJQVlA4IB4FAAAwGwCdASp/ADIAPkkijkUioiETBTgoBISzAGGV4WLv7n+sfq7+t3xA2T/NcHOjHlD08PE76eX8L/2vqI/Xz0h/1g9z/m5dRf6AHSp/up6YlNC/HZCv+l4ld4V/Nche7IpjnRadXe5QEI/8YFn2rhJ4N384DhjOp8ncuzT0iXzhSvvVR3K4bN0bily9ULI/WENhzr+EXXTkcdacv3CQXN/Rlro/jphuo4fxoat/ug9bSp40JTaFkQBP5UqtWecNHN34nfXeRx/odfcj/GBAsCOG/GLi/2DAc1t+lj3Rl5j5kjQAAP7iRr/+UpDAvhfylT//Xglpnrb/XWgNnOXMZsvE0cU5BWLQcT85Rvet5by8D64BYalkn0YyHqg2xFcn4a5vqCqJrLh6V2HC8/ZmpfdCizNoLIlNGx5cP0kfD1CUoK5SeIHKzAeG6z1cUHexYyqTzfyVYywq2mkK5pEtAbLwlDTnkMJY9YtohDMM4Y4C4kUyIYQSKv3n/ESnhwnD9iS/cPTbZlSqZ6WPkAtZk4QcxuUUErZpgABMAfU7wnLfuv/uPvj6YVbS0AjBCCN8NGmDZ1eLWn4rrV+JBl+TLAwRghH9qdYwI77AgEfG4Hjxg8NeJTVboWFf70hTO144dnzeLd+Tmyf5iUEwURzBhFjVuQe15+msKCRZa6ieqORjXVtWF8z3IEf7vSdUYdNB28TnomDAXfLoHfOWjbbGoUQab/WJ7bT/wdLPwCfJOKquz3k9LbfQYruB7S07Yjs+1jyAM3R1CvHFNnaXUDrORpZVqXtWQHBaseRqWvPLE+yyRuMk9g9dvAsnu+zT1caB3SDyPwYveyQp7TT3ByFALGkjeyps4Jk0NgQ3u1TcrJr9OjQ4RoBRf4JIWTYJa0Ms8o50QZZ4yTQLHoV4Zy27Eu31+JFg/7bqcmdNLfQvgGAQUh9w+0s/VrDZr0RXgZwXIbXicobzu064+wH/NflqsWIF9BEG/XE45hpCMk7rLO9f8Nwps4uJjXU94O9WzupQVt7QFdn9GhnVRnG3LIKXhc7KRSMVXMkUHMK1opiX+0YmH13f6DKLYd+q6YpaWUyHkIL5701yAMf6nc2qjURv0Hex8kXjrH7PP5e0XyyEB7nrLPR38+Tj7cRG6f9bDof/amVt7scm57ADalpwMezZ72R7B78vBj6ri1p01VS4hHZZMmJocpn7MR4Rqb88N9zU1CdmIIuehZjF4S0MUC+/Lkj5VigK32kt5VX12+BQbbAQf8Z37Wpdj4O3oe0U41lMwFztKu6Te+bob8chE0B/GAQWFb8Bc7sH27yHgpB1fzPUCWGoxD/Va2Sk8wilDtlE/CIjpJ00c8M9ezOPKqBjVXZDHlBUOvT04t6/BeWEZSiIJCsJDvXF6yt4azXg9qqOLXXrdRb1OyQPZfWU9Q6GGatmbjChBrfY3c3RFdjZ+cb4LZBTfkRgPYap4q0beYASCv/Jey/SOLsAZzqoa/mKmRGiEACB41R7dOrGW3QcQ3jBo/wCtfERSUDHZKpKKR5zJUFGo43H4P2bwk91bXQsMWA3lXy5CPZjyiXU/UklAXURw+yNYxi7ntrqJGBQOMGUvv5jdxRCoNDy+rCF9RtGRIP1Yww5rrQykvPnGUvPCTrSDDBmxSB65mUsLz50gw6R1BJwCchYV91LWsCHY9pM8Egw2YsTPPEwBRMAvYh7Ni6+aQ8C35SW9WCTRLKFBeCPfzACRV197n6fuhA6QAAAAA==",XI="data:image/webp;base64,UklGRmQIAABXRUJQVlA4IFgIAABwJwCdASqnADIAPkkejEQioaEWOeZcKASEsYBqulw+D0N5QPJvjA9Wfic9JnzJdCv0Cv59/vOtL9DPy1P3A+F39pf169o28efyHhz5BfXHtH67OUu0r+Tfgr9h+Wvr7368AL2BvM4AvzTu2dTvvlrMNAb86ehhny+rvYQ8tj2U/t4NvDjgbS9yM0K09fiY08MWXmS6ER851/m7A+HzsSYg9nJihc7tTYxTzmDe+n4IUiKTQ4Pj055SDv1ZqgBxCd+0YPN/zi2n/8PlnCpn6E9R6R90Q1vMkcHVCwzMM9KiTetMgTugKUJ1j4vu3KvKQntUzAaJGz3/zsyvwwfZsM5J2GUmJaEXvBGgm7JcumSoIMOmYhFrXXNo2nF2Dng7axMhOxkG/UgQV92bYQps2fyyVNyfvPP0ZGbRm36+KXahyCUC6AAA/v9qHcHdYcIWZuuVBBgxrkYIevwKau3x3nd/9OdutsmVJT6DF2Rvv3LSTxP5HuyQ6qO0SHX1wcbMos0DKTv7dqrzd3HegfnX6tRYbZGKuHCOVa2IgLPH1S1IjIxL1PbZ/VW2Jh+WnElUO73sBCLRYudZXq4z47rBz98HeX2shKAC54wqYU52qac8oidrt/qq+J2cKOWQFbu7tVtrxZRNpALREbSSqIu9EgSRn04VyKs0a1S6FTZYIMadIa4Gg0mPnaCrlZDmcLNTLqRB10TvfKJ+8PRSfbyjdESqeHaZn3GuFIzhBoueTFxBc78n7v/NkSfvhmRL8eOL2EGdmIISJf+ruvnhhwbLq6sqQ7TK9aVoVkmTNNNRXv/bPsy9CQ/IyV8ssZi74wgWL1eIz4xuGT3OkW83EtiTH99gkUTt/N/JAv/d2howwz/W/L5IjZnijb33XovWKIRAo6FAGS9f9DqwR0pUB9tLF6jW5YNBY1rOyl2klH4E4T979fYK8s0B/PJ3qaCBSQOdOOPOazg8V+NxK1E223WqYCgcVHLdUE0YtNyiz+UxtuMULue+QMEu6iM8YdlExGYbjRqKAPf4bRogiO9mbZktvaiA0PSAQqsmMd+rP/DfvzGmv9u0Jvl+UeG0jDtZwUt77ayKFaejYt3lREXKEy/Pmpuso4qzv8zOkgHlg9AKv6Sg9YJgJKNi6zC2a92ae5zfHQby1g4seM5tL5qSyunniaVqLPZHkoUSZGg/+qGypTefS8qMVyOjtoBBG66sUHO70NN8/ca/KKiY/RQ0YWpobYjW4MTpwrHZIx5c6l3jDZxge3s+wbu8PtY0vdGRlYczJc0WnR10C0W9LgFGpMLHJQSTWf38U59+7Vo5y2tcjuGGpUpgPtJ9/z1SZtsyHUTYe0valrPPhHZ2BQV9xpCuyyLXwQ1AWy7UTXOEw0Rm+JVS4+00aNK4MyrOdSgbu3x+TMYYMPwd634XQcoAYbSUHdsoTCmf+/23Azq9Fx30VKiCFB9N7pGLsiPzF88M0U34V6kxDzadbWptTKyPgvTYZCcNeBb9Q3LP/N3b8USu8uRO38L59uq9okPeCdJf5Pc/WEfxwYBfuGbKPd4YZt45AXixi9M0H6o6dypVabeVfXbACDLx6IeOzNOdZViCEZjkZb8pmY+S+4VbYdUufG2cmPw/W/H8t8zEkqPDQ4Yxvvh9aQoig7Rg9/xkVsvikcHU/gMCSweheHV6KCKfh7xQgUwEb+DJ79Yx5y2BCgQDzCMlN0mkygLTo1W2pPFbRHyAqJC6Yj0+74MDs6eikUTFvCodH9mrgrrWVKoFZYMpxADq2WdbQR/lLvMUCc2whQlUrBcjd+V9hSnj7PKk0jJTOjYgziRkPCYM2uLSP7XAzAK98WS9YRULObfanOnmBW3YZJAkXRL98Q4Z3e76gC40Zj6BPb4nnoEU5ljpQJ+YlGpaOE/VzwNJR0+Y/2OMiAY/RxayJYevwK/QNUeIyyEmQMrGzGybbLg6H3fHVb2DEnOmAHuKzmr3DxDCQPnt8fJu3uaPbelOLQ844ySHxVCj69LV4at+c35NLUlHASGan/U/tlCBIM85qLEJwO2A8wdsfxD8uInsFSGRZC2UtGyFzrfZfPHaOK3sfjL2UU67xskg5YNvlJUi7Cng0viGWysZ1pZjID3uV/QeVfcWMQDXmGB1CQEqTv0LVoEKoEucibO26xTYBTF4gyaCdQYLFFtgi8MQnQBAbnUz31T9HRkagIz/Ukk/M+z6KTo/8+B7/2gJBFPfHf165keZTL6X16ZvYIWn09j64FCCYdr4MVGfGWFRtk94mD/nevp8XNugpWFb/NDnfgzziCC8nnXR2vlAi6Uk433/tpr9XCB3oJRC3QhX2dfWaMz4GtlbdTTHscsdpgZreP/z6Dt9UZmPjKDaoQKqnlveDJxBsfUrGVpbSOi/p83kxbPd3x0GCFr9ri1s1A9Vtt6pHhpPR1rOaQEjL4rjgAzf6nJJqxIusHYZsVM6xeADPoTLfK3Reiof+grfCBnEHm83Bb+O8Y6JOpkjBqCzlHjV0AsWXZylZtmAxUe7fevEYno6R9/OThCp30iFpn5yyDSTy/zpW1Yp5P1buy5r5hXU9sv9mFNfvo7yixwNs4Fcu8llPFTJvvsG4xymsH0qfxPgGO9Rzvtm0Zrgj8jJAl3QEjePMV7EG/sh3pvDrbVxwRtdxxGLtkGReWD/qEBIlmq6ryh4uefbkDWbwp8t8QboWbv5w/LQVdtIHqRrYUOPqyiJvNt9lt/OZuhAcvPJ6n7EcWof7EXA0hj+44Bv8KmNqX1Zo75g2VsVpdlwWOcs8MyfFh8nF/638ti9ZpBLjCx2gxIL+y5m4qG+MYSUesx1DMgggxAOXJgWMheAAYG8UwAAAAA=",ZI="data:image/webp;base64,UklGRngEAABXRUJQVlA4IGwEAADQFACdASpRADIAPkkejUSioaEWDHSIKASEsQBqnuBf1Ta/N5OA8QDcAftBvgH84/znWAegB5X37S/CJ+23pK1h3k39Bez2UJfVcIO1zutmT+I/SlY5P9d6jf0X55fqX2CuksQ4iXAt7x8ej9H+RpbaU7Fa/JIx2ZKs5iLeb9MaZxC1tpdnq8WVaDCNXrDxeXNz2JDoyIeTFbx4TRI6LcsrkEF5Ty/4uRhJUeSTBEmAAP7/djtZZTGoOz/6JF/ZpX0LuW3kIW2WnYxaDoT0d3RB8P2wwMxRGcKTSZFdsiNa+t89SO1B3CMTOKPz3xJ/geUqkqv2z6LPmobFXZ9BqZP+F37yfA5Px/U/Rs+nhQAPRWFB+4KXLREMN4CCWMXs7CGfqv3QA09oAknrQR1YRKm5T5djJ3RadzcQyIQtpVdV2HcWAu/eDf38UapIPsYEuVbiS7JjSN/aR0Fo/id3hPZsOvDFSF+fiqQbTyZK09Gqv8peDQPRRw1dbQGJLIuHrjHvEe0jhzssGafdoQKKLICmr5SGjSy5oTN7ykrv64GPNZ4FjIjLFs3r3y4OM2jH4d5Xv+4cywHuy0h/HgEmB7h1+Q9tcR6uQqUb0IX+l2vd+ZpT3qDDyiA1JMR0UbAH8H7729633itLPixbNz014kNeg9/+dvJdSCq2NgLcxlGw+vRycfK59fH+WztGWVxI/A096/bpmZoxxQtdxpiUQA/a/FgBxZ4PfJMnRIuF/SE+cHMtgtzE9mifY+itHyOzn/hLvO5wER4R9zgNiRbFy9cnb0B2du03hdQ6Fj7sfXm1pXBB8Lf9lA//eq251HGggQyn7V7lkAs13v3shtdPdhL/xxfG3pHqSAZVRjBhhLDEbo066U9mIncfLtXg2aBe+y8r8n78NgpbKGj9l9/EzxOw5WbfG5fWNnKmH/6aWHoEEhogfqcbcz30ggweZ2bOnrh7PlXnHdmrhnq6uKtN32PyXZ/RRtT9MTIKv8Sl5RzNqY4LR0uvAaQAjrWs4MPD/x2jw+872ehA5HehFQ7PHoiyBx7S03mUXn7T+74R3HWQ9vvVf7z7seleyr/xi99mj7sOp73PpsrINT+1SEDqJNy/jjG+Y5WZXGv//i73D+SuVGlYT03oIpd/IsUJzNHAh/BPugKy8p3y0iQZDTY/srd/2+DVn+LrKuLpKOLJWxjgd0bW4sFLf4EL+FO71qLfKkGYezJPZu39qEotDt7sa0YoVOoRj6/8WMHdV3bfz/4VJWDQ/LsxQc5ZPueCKKVDrY+zXvOZFBWUWaNx78aa0Qo43tlogT6OJgBbrNY59JBzZt4cf1pG2RVNtz/kur9Txg3v+P2zPA2/Ii+2x/viQNNBSovTkFxfYqCvg7bYQa+DhG0Z7LBPoZh2XULLqMJBxRZkSsMwzAfrS/HfscIZv8d6Tn/uptR8TnfGGB5Rt4SovL3Ag233m+Ou4fwLS4sg1TFuVNmxuFoDMndT2BFtMhy0YHE5Mdi7QQAW3oAA",eL="/assets/mobypark-B2Klazxs.webp",tL=[{name:"Onepark",logo:KI},{name:"Parkos",logo:GI},{name:"Parkvia",logo:QI},{name:"Mobian",logo:JI},{name:"Easyjet",logo:YI},{name:"Zenpark",logo:XI},{name:"Parclick",logo:ZI},{name:"Mobypark",logo:eL}];function rL(){return u.jsxs("section",{className:"py-20 relative overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 bg-muted/30"}),u.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[u.jsxs("div",{className:"text-center mb-12",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-secondary/10 text-secondary text-sm font-medium mb-4",children:"Intégrations"}),u.jsxs("h2",{className:"text-2xl md:text-3xl lg:text-4xl font-display font-bold mb-4",children:["Plus de ",u.jsx("span",{className:"text-primary",children:"36 plateformes"})," de réservation intégrées"]}),u.jsxs("p",{className:"text-muted-foreground max-w-3xl mx-auto leading-relaxed",children:["Notre logiciel recueille grâce à l'IA toutes les réservations provenant des plateformes ainsi que vos propres résas pour les regrouper dans ",u.jsx("span",{className:"brand-name",children:"ProParking.ai"}),"."]})]}),u.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-4",children:tL.map(e=>u.jsxs("div",{className:"group flex flex-col items-center justify-center p-4 rounded-xl bg-card border border-border hover:border-primary/30 hover:shadow-lg hover:shadow-primary/5 transition-all duration-300",children:[u.jsx("div",{className:"w-full h-12 flex items-center justify-center mb-2",children:u.jsx(qI,{src:e.logo,name:e.name})}),u.jsx("span",{className:"text-xs text-muted-foreground group-hover:text-foreground transition-colors",children:e.name})]},e.name))}),u.jsx("p",{className:"text-center text-sm text-muted-foreground mt-8",children:"Et bien plus : Parkimeter, Elparking, Parqer, Parkapp, Allopark, Indigo neo, Myparking, Parkcloud, Parkive, Parkingo, Adopteunparking, Looking4parking, Holiday-extra, Free2move..."})]})]})}const nL=[{id:"centralisation",icon:rk,title:"Centralisation des réservations",definition:"Agrégation automatique des réservations de 36+ plateformes ET de votre système interne en une interface unique.",facts:["Plateformes : Parkos, Parclick, Zenpark, ParkVia, Onepark, Mobypark, Mobian, EasyJet","Système interne : site web, téléphone, email, comptoir","Synchronisation : temps réel","Export : CSV, API REST"],useCase:"Si vous recevez des réservations de plusieurs canaux (plateformes + direct), cette fonctionnalité élimine toute saisie manuelle."},{id:"blockparking-ia",icon:HE,title:"Blockparking IA — Optimisation du placement",definition:"Algorithme d'intelligence artificielle qui optimise le placement des véhicules selon leur durée de stationnement.",facts:["Méthode : prédiction de la durée de séjour","Résultat : réduction des manœuvres de déplacement","Prérequis : historique de 3 mois de données"],useCase:"Si votre parking gère plus de 50 véhicules simultanément, l'IA améliore le taux de remplissage."},{id:"flux-es",icon:nk,title:"Gestion des flux entrées/sorties",definition:"Visualisation en temps réel des entrées et sorties avec contrôle d'accès intégré.",facts:["Affichage : tableau de bord temps réel","Contrôle : badge, plaque, QR code","Historique : traçabilité complète"],useCase:"Si vous gérez un parking sécurisé, cette fonctionnalité automatise le contrôle d'accès."},{id:"navettes",icon:WE,title:"Organisation des navettes",definition:"Suivi en temps réel des véhicules de navette avec génération automatique des manifestes.",facts:["Suivi : géolocalisation temps réel","Manifestes : génération automatique","Capacité : optimisation des trajets","Compatible Flight Tracker : synchronisation vols temps réel"],useCase:"Si vous opérez des navettes aéroport, cette fonctionnalité optimise les rotations."},{id:"reservation-ligne",icon:tk,title:"Réservation en ligne",definition:"Module de réservation intégrable pour les clients directs, par téléphone ou via votre site web.",facts:["Canaux : site web, téléphone, email","Paiement : CB, virement, sur place","Confirmation : automatique par email/SMS"],useCase:"Si vous souhaitez développer les réservations directes, ce module réduit les commissions plateformes."},{id:"evenements",icon:qE,title:"Gestion des événements",definition:"Historique complet des actions avec traçabilité pour chaque véhicule et réservation.",facts:["Traçabilité : qui, quoi, quand","Recherche : par plaque, nom, réservation","Export : rapports personnalisables"],useCase:"Si vous avez besoin de retrouver l'historique d'un véhicule, cette fonctionnalité accélère la recherche."},{id:"occupation",icon:KE,title:"Gestion de l'occupation",definition:"Vision claire de l'occupation par créneau horaire avec prévisions de remplissage.",facts:["Vue : journalière, hebdomadaire, mensuelle","Prévisions : basées sur l'historique","Alertes : surbooking, sous-occupation"],useCase:"Si vous voulez anticiper les pics d'activité, cette fonctionnalité permet d'ajuster les capacités."},{id:"statistiques",icon:GE,title:"Tableau de bord statistiques",definition:"Indicateurs clés de performance (KPI) pour piloter l'activité du parking.",facts:["KPI : CA, taux d'occupation, durée moyenne","Comparaison : période à période","Export : PDF, Excel"],useCase:"Si vous devez reporter à votre direction, ce tableau centralise tous les indicateurs."}];function sL(){return u.jsxs("section",{className:"py-24 relative",id:"features",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background via-muted/30 to-background"}),u.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[u.jsxs("div",{className:"text-center max-w-4xl mx-auto mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"Fonctionnalités"}),u.jsx("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-display font-bold mb-6",children:"8 fonctionnalités pour gérer votre parking"}),u.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed",children:[u.jsx("strong",{className:"text-foreground brand-name",children:"ProParking.ai"})," est un logiciel SaaS qui centralise les réservations, gère les flux entrées/sorties et optimise le placement des véhicules par intelligence artificielle."]})]}),u.jsx("div",{className:"grid md:grid-cols-2 gap-6 max-w-6xl mx-auto",children:nL.map(e=>u.jsxs("article",{className:"group p-8 rounded-2xl bg-card border border-border hover:border-primary/30 transition-all duration-300 hover:shadow-xl hover:shadow-primary/5",children:[u.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center flex-shrink-0 group-hover:bg-primary/20 transition-colors",children:u.jsx(e.icon,{className:"w-6 h-6 text-primary"})}),u.jsx("h3",{className:"text-xl font-semibold group-hover:text-primary transition-colors pt-2",children:e.title})]}),u.jsx("p",{className:"text-muted-foreground mb-4 leading-relaxed",children:e.definition}),u.jsx("ul",{className:"space-y-1 mb-4 text-sm",children:e.facts.map(t=>u.jsxs("li",{className:"text-muted-foreground flex items-start gap-2",children:[u.jsx("span",{className:"text-primary mt-1",children:"•"}),u.jsx("span",{children:t})]},t))}),u.jsxs("p",{className:"text-sm text-primary/80 bg-primary/5 rounded-lg px-4 py-3 border border-primary/10",children:[u.jsx("strong",{children:"Cas d'usage :"})," ",e.useCase]})]},e.id))}),u.jsxs("aside",{className:"max-w-2xl mx-auto mt-12 border-l-4 border-primary pl-4 bg-card/50 rounded-r-lg p-4",children:[u.jsx("p",{className:"font-semibold text-primary text-sm mb-1",children:"À retenir"}),u.jsxs("p",{className:"text-muted-foreground text-sm",children:[u.jsx("span",{className:"brand-name",children:"ProParking.ai"})," : 8 fonctionnalités intégrées. Blockparking IA : prérequis 3 mois de données historiques. Centralisation de 36+ plateformes + système interne (site web, téléphone, comptoir) en temps réel."]})]}),u.jsx("div",{className:"text-center mt-8",children:u.jsxs(it,{to:"/fonctionnalites",className:"inline-flex items-center gap-2 px-6 py-3 rounded-xl bg-muted hover:bg-primary/10 text-foreground hover:text-primary font-medium transition-all duration-300 group",children:["Voir toutes les fonctionnalités en détail",u.jsx(bi,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})})]})]})}const oL=[{criteria:"Centralisation multi-plateformes",proparking:"36+ plateformes natives",classic:"Saisie manuelle"},{criteria:"Intégration système interne",proparking:"Site web + téléphone + comptoir",classic:"Configuration complexe"},{criteria:"Optimisation IA du placement",proparking:!0,classic:!1},{criteria:"Gestion des navettes temps réel",proparking:"GPS + manifestes auto",classic:"Feuilles papier"},{criteria:"Temps de déploiement",proparking:"48 heures",classic:"2-4 semaines"},{criteria:"Synchronisation réservations",proparking:"Temps réel",classic:"Manuel / quotidien"},{criteria:"Support client",proparking:"Français 6j/7, 8h-20h",classic:"Variable"},{criteria:"Tarif d'entrée",proparking:"69€ HT/mois",classic:"200-500€/mois"},{criteria:"Essai gratuit",proparking:"30 jours sans CB",classic:"Rare ou limité"}];function Bg({value:e}){return typeof e=="boolean"?e?u.jsx(F0,{className:"w-5 h-5 text-primary mx-auto"}):u.jsx(sc,{className:"w-5 h-5 text-destructive mx-auto"}):u.jsx("span",{children:e})}function iL(){const e={"@context":"https://schema.org","@type":"Table",about:"Comparatif ProParking.ai vs solutions classiques de gestion de parking"};return u.jsxs("section",{className:"py-24 relative",id:"comparison",children:[u.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}}),u.jsx("div",{className:"absolute inset-0",children:u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background via-primary/5 to-background"})}),u.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"Comparatif"}),u.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-display font-bold mb-6",children:[u.jsx("span",{className:"brand-name",children:"ProParking.ai"})," vs Solutions classiques"]}),u.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed",children:["Comparaison factuelle des fonctionnalités entre ",u.jsx("span",{className:"brand-name",children:"ProParking.ai"})," et les solutions traditionnelles de gestion de parking."]})]}),u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsx("div",{className:"overflow-x-auto rounded-2xl border border-border bg-card",children:u.jsxs("table",{className:"w-full",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[u.jsx("th",{className:"px-6 py-4 text-left font-semibold text-foreground",children:"Critère"}),u.jsx("th",{className:"px-6 py-4 text-center font-semibold text-primary",children:u.jsx("span",{className:"brand-name",children:"ProParking.ai"})}),u.jsx("th",{className:"px-6 py-4 text-center font-semibold text-muted-foreground",children:"Solution classique"})]})}),u.jsx("tbody",{children:oL.map((t,r)=>u.jsxs("tr",{className:`border-b border-border last:border-0 ${r%2===0?"bg-card":"bg-muted/20"}`,children:[u.jsx("td",{className:"px-6 py-4 font-medium text-foreground",children:t.criteria}),u.jsx("td",{className:"px-6 py-4 text-center text-primary",children:u.jsx(Bg,{value:t.proparking})}),u.jsx("td",{className:"px-6 py-4 text-center text-muted-foreground",children:u.jsx(Bg,{value:t.classic})})]},t.criteria))})]})}),u.jsx("p",{className:"text-sm text-muted-foreground mt-6 text-center",children:`Données basées sur l'analyse des offres du marché français en 2024. "Solution classique" = moyenne des logiciels de gestion de parking traditionnels.`})]})]})]})}const aL=[{icon:pk,title:"Optimisation de l'espace",metric:"+15%",metricLabel:"taux d'occupation cible",description:"L'algorithme Blockparking IA optimise le placement des véhicules selon leur durée de séjour prévue.",condition:"Résultat mesuré après 3 mois d'utilisation sur parkings de 100+ places.",gradient:"from-primary to-primary/50"},{icon:V0,title:"Support client réactif",metric:"2h",metricLabel:"délai de réponse moyen",description:"Équipe francophone disponible 6 jours sur 7 par chat, email et téléphone.",condition:"Horaires : 8h-20h du lundi au samedi.",gradient:"from-secondary to-secondary/50"},{icon:sk,title:"Mises à jour régulières",metric:"4/an",metricLabel:"versions majeures",description:"Nouvelles fonctionnalités déployées sans interruption de service.",condition:"Changelog disponible dans l'interface utilisateur.",gradient:"from-accent to-accent/50"}],lL=[{icon:fk,title:"Déploiement rapide",metric:"48h",metricLabel:"temps de mise en place",description:"Configuration complète incluant connexion API, paramétrage des places et formation de l'équipe."},{icon:ck,title:"Solution tout-en-un",metric:"8",metricLabel:"fonctionnalités intégrées",description:"Réservations, navettes, contrôle d'accès, stats, IA — tout dans une seule interface."},{icon:hk,title:"ROI mesurable",metric:"-30%",metricLabel:"temps de gestion",description:"Automatisation des tâches répétitives : import réservations, manifestes, reporting."}];function cL(){return u.jsxs("section",{className:"py-24 relative overflow-hidden",children:[u.jsxs("div",{className:"absolute inset-0",children:[u.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-primary/10 rounded-full blur-[100px]"}),u.jsx("div",{className:"absolute bottom-0 left-0 w-96 h-96 bg-secondary/10 rounded-full blur-[100px]"})]}),u.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[u.jsxs("div",{className:"mb-32",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-primary/10 text-primary text-sm font-medium mb-6",children:"Avantages mesurables"}),u.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-display font-bold mb-4",children:["Résultats chiffrés avec ",u.jsx("span",{className:"brand-name",children:"ProParking.ai"})]}),u.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Des métriques vérifiables, pas des promesses vagues."})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-6xl mx-auto",children:aL.map((e,t)=>u.jsx("article",{className:"group relative",children:u.jsxs("div",{className:"relative p-8 rounded-3xl bg-card border border-border hover:border-primary/30 transition-all duration-500 h-full hover:shadow-2xl hover:shadow-primary/10",children:[u.jsx("div",{className:`absolute -top-5 left-8 w-10 h-10 rounded-xl bg-gradient-to-br ${e.gradient} flex items-center justify-center text-primary-foreground font-bold shadow-lg`,children:t+1}),u.jsxs("div",{className:"mb-6 mt-2",children:[u.jsx("span",{className:"text-4xl font-bold text-primary",children:e.metric}),u.jsx("span",{className:"text-sm text-muted-foreground ml-2",children:e.metricLabel})]}),u.jsx("h3",{className:"text-xl font-semibold mb-4 group-hover:text-primary transition-colors",children:e.title}),u.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:e.description}),u.jsx("p",{className:"text-xs text-muted-foreground/80 border-t border-border pt-4",children:e.condition})]})},e.title))})]}),u.jsxs("div",{className:"max-w-6xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-secondary/10 text-secondary text-sm font-medium mb-6",children:"Notre différence"}),u.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-display font-bold mb-6",children:["Pourquoi choisir ",u.jsx("span",{className:"brand-name",children:"ProParking.ai"})," ?"]}),u.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto",children:"3 avantages concurrentiels mesurables pour les exploitants de parking professionnels."})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:lL.map((e,t)=>u.jsxs("article",{className:"group p-8 rounded-3xl bg-gradient-to-br from-muted/50 to-card border border-border hover:border-secondary/30 transition-all duration-300 hover:shadow-xl hover:shadow-secondary/5",children:[u.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[u.jsx("div",{className:"w-14 h-14 rounded-2xl bg-secondary/10 flex items-center justify-center group-hover:bg-secondary/20 transition-colors",children:u.jsx(e.icon,{className:"w-7 h-7 text-secondary"})}),u.jsxs("div",{children:[u.jsx("span",{className:"text-3xl font-bold text-secondary",children:e.metric}),u.jsx("p",{className:"text-xs text-muted-foreground",children:e.metricLabel})]})]}),u.jsx("h3",{className:"text-xl font-semibold mb-3 group-hover:text-secondary transition-colors",children:e.title}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e.description})]},e.title))})]})]})]})}var _c="Collapsible",[uL,$b]=mr(_c),[dL,Hh]=uL(_c),Ub=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:o,onOpenChange:i,...a}=e,[l,c]=os({prop:n,defaultProp:s??!1,onChange:i,caller:_c});return u.jsx(dL,{scope:r,disabled:o,contentId:_i(),open:l,onOpenToggle:m.useCallback(()=>c(d=>!d),[c]),children:u.jsx(oe.div,{"data-state":qh(l),"data-disabled":o?"":void 0,...a,ref:t})})});Ub.displayName=_c;var Fb="CollapsibleTrigger",zb=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,s=Hh(Fb,r);return u.jsx(oe.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":qh(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:t,onClick:B(e.onClick,s.onOpenToggle)})});zb.displayName=Fb;var Wh="CollapsibleContent",Bb=m.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Hh(Wh,e.__scopeCollapsible);return u.jsx(Cn,{present:r||s.open,children:({present:o})=>u.jsx(fL,{...n,ref:t,present:o})})});Bb.displayName=Wh;var fL=m.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:s,...o}=e,i=Hh(Wh,r),[a,l]=m.useState(n),c=m.useRef(null),d=ke(t,c),f=m.useRef(0),p=f.current,h=m.useRef(0),x=h.current,g=i.open||a,b=m.useRef(g),y=m.useRef(void 0);return m.useEffect(()=>{const v=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(v)},[]),hr(()=>{const v=c.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();f.current=w.height,h.current=w.width,b.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),l(n)}},[i.open,n]),u.jsx(oe.div,{"data-state":qh(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...o,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:g&&s})});function qh(e){return e?"open":"closed"}var hL=Ub,pL=zb,mL=Bb,Zt="Accordion",gL=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Kh,vL,yL]=ec(Zt),[Sc,uM]=mr(Zt,[yL,$b]),Gh=$b(),Vb=R.forwardRef((e,t)=>{const{type:r,...n}=e,s=n,o=n;return u.jsx(Kh.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?u.jsx(_L,{...o,ref:t}):u.jsx(bL,{...s,ref:t})})});Vb.displayName=Zt;var[Hb,wL]=Sc(Zt),[Wb,xL]=Sc(Zt,{collapsible:!1}),bL=R.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:o=!1,...i}=e,[a,l]=os({prop:r,defaultProp:n??"",onChange:s,caller:Zt});return u.jsx(Hb,{scope:e.__scopeAccordion,value:R.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:R.useCallback(()=>o&&l(""),[o,l]),children:u.jsx(Wb,{scope:e.__scopeAccordion,collapsible:o,children:u.jsx(qb,{...i,ref:t})})})}),_L=R.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...o}=e,[i,a]=os({prop:r,defaultProp:n??[],onChange:s,caller:Zt}),l=R.useCallback(d=>a((f=[])=>[...f,d]),[a]),c=R.useCallback(d=>a((f=[])=>f.filter(p=>p!==d)),[a]);return u.jsx(Hb,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:u.jsx(Wb,{scope:e.__scopeAccordion,collapsible:!0,children:u.jsx(qb,{...o,ref:t})})})}),[SL,Ec]=Sc(Zt),qb=R.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:o="vertical",...i}=e,a=R.useRef(null),l=ke(a,t),c=vL(r),f=Lh(s)==="ltr",p=B(e.onKeyDown,h=>{var T;if(!gL.includes(h.key))return;const x=h.target,g=c().filter(j=>{var O;return!((O=j.ref.current)!=null&&O.disabled)}),b=g.findIndex(j=>j.ref.current===x),y=g.length;if(b===-1)return;h.preventDefault();let v=b;const w=0,_=y-1,S=()=>{v=b+1,v>_&&(v=w)},E=()=>{v=b-1,v<w&&(v=_)};switch(h.key){case"Home":v=w;break;case"End":v=_;break;case"ArrowRight":o==="horizontal"&&(f?S():E());break;case"ArrowDown":o==="vertical"&&S();break;case"ArrowLeft":o==="horizontal"&&(f?E():S());break;case"ArrowUp":o==="vertical"&&E();break}const k=v%y;(T=g[k].ref.current)==null||T.focus()});return u.jsx(SL,{scope:r,disabled:n,direction:s,orientation:o,children:u.jsx(Kh.Slot,{scope:r,children:u.jsx(oe.div,{...i,"data-orientation":o,ref:l,onKeyDown:n?void 0:p})})})}),Ml="AccordionItem",[EL,Qh]=Sc(Ml),Kb=R.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...s}=e,o=Ec(Ml,r),i=wL(Ml,r),a=Gh(r),l=_i(),c=n&&i.value.includes(n)||!1,d=o.disabled||e.disabled;return u.jsx(EL,{scope:r,open:c,disabled:d,triggerId:l,children:u.jsx(hL,{"data-orientation":o.orientation,"data-state":Zb(c),...a,...s,ref:t,disabled:d,open:c,onOpenChange:f=>{f?i.onItemOpen(n):i.onItemClose(n)}})})});Kb.displayName=Ml;var Gb="AccordionHeader",Qb=R.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Ec(Zt,r),o=Qh(Gb,r);return u.jsx(oe.h3,{"data-orientation":s.orientation,"data-state":Zb(o.open),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Qb.displayName=Gb;var uf="AccordionTrigger",Jb=R.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Ec(Zt,r),o=Qh(uf,r),i=xL(uf,r),a=Gh(r);return u.jsx(Kh.ItemSlot,{scope:r,children:u.jsx(pL,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...a,...n,ref:t})})});Jb.displayName=uf;var Yb="AccordionContent",Xb=R.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Ec(Zt,r),o=Qh(Yb,r),i=Gh(r);return u.jsx(mL,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Xb.displayName=Yb;function Zb(e){return e?"open":"closed"}var kL=Vb,CL=Kb,TL=Qb,e1=Jb,t1=Xb;const PL=kL,r1=m.forwardRef(({className:e,...t},r)=>u.jsx(CL,{ref:r,className:le("border-b",e),...t}));r1.displayName="AccordionItem";const n1=m.forwardRef(({className:e,children:t,...r},n)=>u.jsx(TL,{className:"flex",children:u.jsxs(e1,{ref:n,className:le("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,u.jsx(QE,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));n1.displayName=e1.displayName;const s1=m.forwardRef(({className:e,children:t,...r},n)=>u.jsx(t1,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:u.jsx("div",{className:le("pb-4 pt-0",e),children:t})}));s1.displayName=t1.displayName;const Vg=[{question:"Qu'est-ce que ProParking.ai ?",answer:"ProParking.ai est un logiciel SaaS de gestion de parking qui centralise les réservations, gère les flux entrées/sorties et optimise le placement des véhicules par intelligence artificielle. Il s'adresse aux exploitants de parkings en ville, aux aéroports et aux services de voiturier."},{question:"Quelles plateformes de réservation sont supportées ?",answer:"ProParking.ai s'intègre avec 36+ plateformes majeures dont Parkos, Parclick, Zenpark, ParkVia, Onepark, Mobypark, Mobian et EasyJet. L'intégration se fait par API en moins de 48 heures."},{question:"Combien coûte ProParking.ai ?",answer:"L'abonnement mensuel démarre à 69€ HT/mois. Un essai gratuit de 30 jours est disponible sans carte bancaire. Le tarif varie selon le nombre de places gérées."},{question:"Comment fonctionne le Blockparking IA ?",answer:"Le Blockparking IA analyse l'historique des réservations pour prédire la durée de séjour de chaque véhicule. Il recommande ensuite un emplacement optimal pour minimiser les manœuvres de déplacement. Prérequis : 3 mois de données historiques."},{question:"Combien de temps pour déployer ProParking.ai ?",answer:"Le déploiement standard prend 48 heures : création du compte (2h), connexion des plateformes (24-48h), configuration des places et zones (2h), formation de l'équipe (2h). L'IA Blockparking s'active après 3 mois d'historique."},{question:"ProParking.ai gère-t-il les navettes aéroport ?",answer:"Oui. Le module navettes inclut : suivi GPS temps réel des véhicules, génération automatique des manifestes passagers, optimisation des rotations selon les horaires de vol, et notification automatique aux clients."},{question:"Quels types de parkings peuvent utiliser ProParking.ai ?",answer:"ProParking.ai convient aux : parkings urbains (centre-ville, gares), parkings d'aéroport (avec ou sans navette), services de voiturier, parkings d'entreprise avec réservation. Capacité : de 20 à 2000+ places."},{question:"Comment contacter le support ?",answer:"Le support français est disponible 6 jours sur 7 (lundi-samedi, 8h-20h) par : chat en direct dans l'application, email avec réponse sous 2h en moyenne, téléphone pour les urgences. Une session de formation est incluse à la souscription."},{question:"Quelles sont les meilleures solutions de gestion de parking pour les réservations multicanaux ?",answer:"ProParking.ai centralise 36+ plateformes (Parkos, Parclick, Zenpark, ParkVia, Onepark, Mobian, EasyJet) et le système interne de l'exploitant (site web, téléphone, email, comptoir) en une interface unique. Synchronisation temps réel < 1 seconde, bidirectionnelle. À partir de 69€ HT/mois. Si vous recevez des réservations de 3+ sources différentes, la centralisation élimine les doubles réservations et la saisie manuelle."},{question:"Meilleurs outils SaaS pour prévoir le taux d'occupation des parkings et générer des rapports KPI",answer:"ProParking.ai propose des prévisions d'occupation jusqu'à 90 jours et un tableau de bord KPI complet : CA par plateforme, taux d'occupation, durée moyenne de séjour, revenus par place. Exports disponibles en CSV, Excel (.xlsx) et PDF. Rapports automatisés programmables par email (quotidien, hebdomadaire, mensuel). Si vous exploitez plusieurs parkings, la vue consolidée agrège les KPI de tous vos sites en un seul tableau de bord."}];function AL(){const e={"@context":"https://schema.org","@type":"FAQPage",mainEntity:Vg.map(t=>({"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:t.answer}}))};return u.jsxs("section",{className:"py-24 relative",id:"faq",children:[u.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background via-muted/20 to-background"}),u.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[u.jsxs("div",{className:"text-center max-w-3xl mx-auto mb-16",children:[u.jsx("span",{className:"inline-block px-4 py-1.5 rounded-full bg-secondary/10 text-secondary text-sm font-medium mb-6",children:"Questions fréquentes"}),u.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-display font-bold mb-6",children:["FAQ ",u.jsx("span",{className:"brand-name",children:"ProParking.ai"})]}),u.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed",children:["Réponses aux questions les plus posées sur le logiciel de gestion de parking ",u.jsx("span",{className:"brand-name",children:"ProParking.ai"}),"."]})]}),u.jsx("div",{className:"max-w-3xl mx-auto",children:u.jsx(PL,{type:"single",collapsible:!0,className:"space-y-4",children:Vg.map((t,r)=>u.jsxs(r1,{value:`faq-${r}`,className:"bg-card border border-border rounded-xl px-6 data-[state=open]:border-primary/30 transition-colors",children:[u.jsx(n1,{className:"text-left hover:text-primary py-6 text-lg font-medium",children:t.question}),u.jsx(s1,{className:"text-muted-foreground pb-6 leading-relaxed",children:t.answer})]},r))})})]})]})}const Hg=["Créez votre compte d'essai gratuit (2 minutes)","Connectez vos plateformes de réservation (48h max)","Configurez vos places et zones de parking","Activez le Blockparking IA après 3 mois de données"],RL=[{label:"Essai gratuit",value:"30 jours, toutes fonctionnalités, sans carte bancaire"},{label:"Prérequis",value:"Navigateur web moderne (Chrome, Firefox, Safari)"},{label:"Accompagnement",value:"Session de formation incluse à la souscription"}];function jL(){const e={"@context":"https://schema.org","@type":"HowTo",name:"Démarrer avec ProParking.ai",description:"Guide pour commencer à utiliser le logiciel de gestion de parking ProParking.ai",step:Hg.map((t,r)=>({"@type":"HowToStep",position:r+1,text:t}))};return u.jsxs("section",{className:"py-24 relative overflow-hidden",children:[u.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}}),u.jsxs("div",{className:"absolute inset-0",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background via-primary/5 to-background"}),u.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-primary/10 rounded-full blur-[150px]"})]}),u.jsx("div",{className:"container mx-auto px-4 relative z-10",children:u.jsx("div",{className:"max-w-4xl mx-auto",children:u.jsxs("div",{className:"relative p-12 md:p-20 rounded-[2.5rem] overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 rounded-[2.5rem] p-[2px] bg-gradient-to-br from-primary via-secondary to-accent",children:u.jsx("div",{className:"absolute inset-[2px] rounded-[2.4rem] bg-card"})}),u.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-primary/20 rounded-full blur-[80px]"}),u.jsx("div",{className:"absolute bottom-0 left-0 w-64 h-64 bg-secondary/20 rounded-full blur-[80px]"}),u.jsxs("div",{className:"relative z-10",children:[u.jsxs("div",{className:"text-center mb-10",children:[u.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary/10 border border-primary/20 mb-8",children:[u.jsx(Rd,{className:"w-4 h-4 text-primary"}),u.jsx("span",{className:"text-sm font-medium text-primary",children:"Essai gratuit 30 jours • Sans carte bancaire"})]}),u.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-display font-bold mb-6 leading-tight",children:["Démarrer avec ",u.jsx("span",{className:"brand-name",children:"ProParking.ai"})]}),u.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto leading-relaxed",children:"4 étapes pour centraliser vos réservations et optimiser votre parking."})]}),u.jsx("div",{className:"grid md:grid-cols-2 gap-4 mb-10",children:Hg.map((t,r)=>u.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl bg-muted/50 border border-border",children:[u.jsx("span",{className:"w-7 h-7 rounded-full bg-primary/20 text-primary font-bold text-sm flex items-center justify-center flex-shrink-0",children:r+1}),u.jsx("p",{className:"text-foreground text-sm leading-relaxed pt-0.5",children:t})]},r))}),u.jsx("div",{className:"border-t border-border pt-8 mb-10",children:u.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:RL.map(t=>u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"text-primary font-semibold text-sm mb-1",children:t.label}),u.jsx("p",{className:"text-muted-foreground text-xs",children:t.value})]},t.label))})}),u.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[u.jsx(Pr,{to:"/demo",trackingName:"cta_section_demo",children:u.jsxs(Ge,{size:"lg",className:"btn-neon bg-primary hover:bg-primary/90 text-lg px-10 h-14 rounded-xl",children:[u.jsx(Sl,{className:"mr-2 w-5 h-5"}),"Voir la démo"]})}),u.jsx(Pr,{to:"/tarifs",trackingName:"cta_section_tarifs",children:u.jsxs(Ge,{size:"lg",variant:"outline",className:"text-lg px-10 h-14 rounded-xl border-border hover:bg-muted hover:border-primary/50",children:["Voir les tarifs",u.jsx(bi,{className:"ml-2 w-5 h-5"})]})})]})]})]})})})]})}const NL=()=>{const e={"@context":"https://schema.org","@type":"SoftwareApplication",name:"ProParking.ai",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"Logiciel SaaS de gestion de parking avec centralisation des réservations de 36+ plateformes et optimisation IA du placement des véhicules",dateModified:"2026-01-27",offers:{"@type":"Offer",price:"69",priceCurrency:"EUR",priceValidUntil:"2026-12-31",availability:"https://schema.org/InStock"},featureList:["Centralisation des réservations multi-plateformes","Intégration du système de réservation interne (site web, téléphone, email, comptoir)","Optimisation IA du placement (Blockparking)","Gestion des flux entrées/sorties","Organisation des navettes aéroport","Contrôle d'accès intégré","Tableau de bord statistiques","Export CSV et API REST"],screenshot:"https://www.proparking.ai/assets/hero-dashboard.webp",softwareVersion:"2026",provider:{"@type":"Organization",name:"ProParking.ai"}};return u.jsxs(u.Fragment,{children:[u.jsxs(Ah,{children:[u.jsx("title",{children:"ProParking.ai — Logiciel de gestion de parking avec IA | Réservations, Navettes, Contrôle d'accès"}),u.jsx("meta",{name:"description",content:"ProParking.ai centralise 36+ plateformes de réservation + votre système interne (site web, téléphone, comptoir) en une interface unique. IA d'optimisation du placement. Essai gratuit 30 jours - À partir de 69€/mois."}),u.jsx("meta",{name:"keywords",content:"logiciel gestion parking, parking aéroport, centralisation réservations, Blockparking IA, navettes parking, contrôle accès parking, SaaS parking"}),u.jsx("link",{rel:"canonical",href:"https://www.proparking.ai/"}),u.jsx("meta",{property:"og:title",content:"ProParking.ai — Logiciel de gestion de parking avec IA"}),u.jsx("meta",{property:"og:description",content:"Centralisez vos réservations de 36+ plateformes. Optimisez le placement par IA. Essai gratuit 30 jours."}),u.jsx("meta",{property:"og:type",content:"website"}),u.jsx("meta",{property:"og:url",content:"https://www.proparking.ai/"}),u.jsx("meta",{property:"og:image",content:"https://www.proparking.ai/og-image.jpg"}),u.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),u.jsx("meta",{name:"twitter:title",content:"ProParking.ai — Logiciel de gestion de parking avec IA"}),u.jsx("meta",{name:"twitter:description",content:"Centralisez vos réservations de 36+ plateformes. Optimisez le placement par IA. Essai gratuit 30 jours."}),u.jsx("meta",{name:"twitter:image",content:"https://www.proparking.ai/og-image.jpg"}),u.jsx("script",{type:"application/ld+json",children:JSON.stringify(e)})]}),u.jsx(WI,{}),u.jsx(sL,{}),u.jsx(rL,{}),u.jsx(iL,{}),u.jsx(cL,{}),u.jsx(AL,{}),u.jsx(jL,{})]})},OL=m.lazy(()=>Je(()=>import("./Fonctionnalites-BrJAZjBK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))),IL=m.lazy(()=>Je(()=>import("./Tarifs-WQOmZRy7.js"),__vite__mapDeps([12,13,14,15,9,7,1,2,8,16,11]))),LL=m.lazy(()=>Je(()=>import("./FAQ-D-JHoFPq.js"),__vite__mapDeps([17,10]))),ML=m.lazy(()=>Je(()=>import("./Contact-CwHusd9N.js"),__vite__mapDeps([18,13,19,6,20,9,21,22,11]))),DL=m.lazy(()=>Je(()=>import("./Demo-jVIFJ71p.js"),__vite__mapDeps([23,6,13,9,7,14,15,19,24,5,25,20]))),$L=m.lazy(()=>Je(()=>import("./Auth-BIiqteH7.js"),__vite__mapDeps([26,13,6,3,25]))),UL=m.lazy(()=>Je(()=>import("./Admin-B4DFFZPK.js"),__vite__mapDeps([27,6,1,3,24,15,5,8,16,10,4,7,9,21]))),FL=m.lazy(()=>Je(()=>import("./MentionsLegales-CkADropn.js"),[])),zL=m.lazy(()=>Je(()=>import("./PolitiqueConfidentialite-9-tWkpZA.js"),[])),BL=m.lazy(()=>Je(()=>import("./APropos-DTigiQF5.js"),__vite__mapDeps([28,22,9,5,10]))),VL=m.lazy(()=>Je(()=>import("./CGU-DTRqvqGK.js"),[])),HL=m.lazy(()=>Je(()=>import("./Blog-CGKLqvMp.js").then(e=>e.B),__vite__mapDeps([29,1,5]))),WL=m.lazy(()=>Je(()=>import("./BlogArticle-Bk1r9l5n.js"),__vite__mapDeps([30,1,29,5,20]))),qL=m.lazy(()=>Je(()=>import("./NewsletterUnsubscribe-BsUzlZ1W.js"),__vite__mapDeps([31,6,13,20,25]))),KL=m.lazy(()=>Je(()=>import("./NewsletterConfirm-Qk-6d6B-.js"),__vite__mapDeps([32,6,20,25]))),GL=m.lazy(()=>Je(()=>import("./NotFound-Di7oBiZ0.js"),[])),QL=new DP,JL=()=>u.jsx("div",{className:"min-h-screen flex items-center justify-center",children:u.jsx("div",{className:"w-8 h-8 border-2 border-primary border-t-transparent rounded-full animate-spin"})}),YL=()=>u.jsx(tx,{children:u.jsx(UP,{client:QL,children:u.jsx(hP,{children:u.jsxs(XN,{children:[u.jsx(UI,{}),u.jsx(Jk,{}),u.jsx(PC,{}),u.jsxs(DA,{children:[u.jsx(FI,{}),u.jsx($I,{children:u.jsx(m.Suspense,{fallback:u.jsx(JL,{}),children:u.jsxs(AA,{children:[u.jsx(Re,{path:"/",element:u.jsx(NL,{})}),u.jsx(Re,{path:"/fonctionnalites",element:u.jsx(OL,{})}),u.jsx(Re,{path:"/fonctionnalites-logiciel-gestion-reservation-parking",element:u.jsx(TA,{to:"/fonctionnalites",replace:!0})}),u.jsx(Re,{path:"/tarifs",element:u.jsx(IL,{})}),u.jsx(Re,{path:"/faq",element:u.jsx(LL,{})}),u.jsx(Re,{path:"/contact",element:u.jsx(ML,{})}),u.jsx(Re,{path:"/demo",element:u.jsx(DL,{})}),u.jsx(Re,{path:"/auth",element:u.jsx($L,{})}),u.jsx(Re,{path:"/admin",element:u.jsx(UL,{})}),u.jsx(Re,{path:"/mentions-legales",element:u.jsx(FL,{})}),u.jsx(Re,{path:"/politique-confidentialite",element:u.jsx(zL,{})}),u.jsx(Re,{path:"/a-propos",element:u.jsx(BL,{})}),u.jsx(Re,{path:"/cgu",element:u.jsx(VL,{})}),u.jsx(Re,{path:"/blog",element:u.jsx(HL,{})}),u.jsx(Re,{path:"/blog/:slug",element:u.jsx(WL,{})}),u.jsx(Re,{path:"/newsletter/unsubscribe",element:u.jsx(qL,{})}),u.jsx(Re,{path:"/newsletter/confirm",element:u.jsx(KL,{})}),u.jsx(Re,{path:"*",element:u.jsx(GL,{})})]})})})]})]})})})});f0(document.getElementById("root")).render(u.jsx(YL,{}));export{n1 as $,bi as A,WE as B,ZE as C,B as D,Cn as E,jI as F,tk as G,V0 as H,fw as I,Ex as J,Lh as K,rk as L,ik as M,os as N,xO as O,uk as P,le as Q,wO as R,XE as S,Pr as T,Sl as U,F0 as V,sk as W,Ad as X,PL as Y,pk as Z,r1 as _,YE as a,s1 as a0,dk as a1,JE as a2,cf as a3,ou as a4,ir as a5,Rn as a6,Rd as a7,bm as a8,ec as a9,xt as aA,ak as aB,oM as aC,TA as aD,CI as aE,$0 as aF,iM as aG,vr as aH,ZN as aa,Mx as ab,EO as ac,tO as ad,bx as ae,tc as af,eM as ag,_i as ah,ah as ai,xi as aj,sc as ak,ZL as al,Ui as am,D0 as an,R as ao,lc as ap,_w as aq,Sw as ar,Ew as as,QT as at,QE as au,_m as av,mR as aw,hr as ax,Wi as ay,xE as az,ek as b,ee as c,hk as d,KE as e,z0 as f,qE as g,HE as h,Vh as i,u as j,Ge as k,it as l,QI as m,JI as n,KI as o,GI as p,YI as q,m as r,ZI as s,eL as t,pc as u,Ah as v,mr as w,ke as x,oe as y,XI as z};