vendor: 6,903 bytes, lines 1-17
1(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function i(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(o){if(o.ep)return;o.ep=!0;const c=i(o);fetch(o.href,c)}})();var Bd={exports:{}},pr={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var t0;function LS(){if(t0)return pr;t0=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(s,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:t,type:s,key:u,ref:o!==void 0?o:null,props:c}}return pr.Fragment=e,pr.jsx=i,pr.jsxs=i,pr}var n0;function PS(){return n0||(n0=1,Bd.exports=LS()),Bd.exports}var g=PS(),zd={exports:{}},le={};/** 10 * @license React 11 * react.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var a0;function US(){if(a0)return le;a0=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function _(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,k={};function E(R,$,Y){this.props=R,this.context=$,this.refs=k,this.updater=Y||S}E.prototype.isReactComponent={},E.prototype.setState=function(R,$){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,$,"setState")},E.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function D(){}D.prototype=E.prototype;function j(R,$,Y){this.props=R,this.context=$,this.refs=k,this.updater=Y||S}var U=j.prototype=new D;U.constructor=j,T(U,E.prototype),U.isPureReactComponent=!0;var G=Array.isArray;function F(){}var I={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function oe(R,$,Y){var te=Y.ref;return{$$typeof:t,type:R,key:$,ref:te!==void 0?te:null,props:Y}}function ae(R,$){return oe(R.type,$,R.props)}function de(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function me(R){var $={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(Y){return $[Y]})}var Ue=/\/+/g;function Me(R,$){return typeof R=="object"&&R!==null&&R.key!=null?me(""+R.key):$.toString(36)}function Se(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(F,F):(R.status="pending",R.then(function($){R.status==="pending"&&(R.status="fulfilled",R.value=$)},function($){R.status==="pending"&&(R.status="rejected",R.reason=$)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function z(R,$,Y,te,ce){var pe=typeof R;(pe==="undefined"||pe==="boolean")&&(R=null);var ke=!1;if(R===null)ke=!0;else switch(pe){case"bigint":case"string":case"number":ke=!0;break;case"object":switch(R.$$typeof){case t:case e:ke=!0;break;case y:return ke=R._init,z(ke(R._payload),$,Y,te,ce)}}if(ke)return ce=ce(R),ke=te===""?"."+Me(R,0):te,G(ce)?(Y="",ke!=null&&(Y=ke.replace(Ue,"$&/")+"/"),z(ce,$,Y,"",function(ws){return ws})):ce!=null&&(de(ce)&&(ce=ae(ce,Y+(ce.key==null||R&&R.key===ce.key?"":(""+ce.key).replace(Ue,"$&/")+"/")+ke)),$.push(ce)),1;ke=0;var bt=te===""?".":te+":";if(G(R))for(var Ke=0;Ke<R.length;Ke++)te=R[Ke],pe=bt+Me(te,Ke),ke+=z(te,$,Y,pe,ce);else if(Ke=_(R),typeof Ke=="function")for(R=Ke.call(R),Ke=0;!(te=R.next()).done;)te=te.value,pe=bt+Me(te,Ke++),ke+=z(te,$,Y,pe,ce);else if(pe==="object"){if(typeof R.then=="function")return z(Se(R),$,Y,te,ce);throw $=String(R),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return ke}function K(R,$,Y){if(R==null)return R;var te=[],ce=0;return z(R,te,"","",function(pe){return $.call(Y,pe,ce++)}),te}function W(R){if(R._status===-1){var $=R._result;$=$(),$.then(function(Y){(R._status===0||R._status===-1)&&(R._status=1,R._result=Y)},function(Y){(R._status===0||R._status===-1)&&(R._status=2,R._result=Y)}),R._status===-1&&(R._status=0,R._result=$)}if(R._status===1)return R._result.default;throw R._result}var he=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},xe={map:K,forEach:function(R,$,Y){K(R,function(){$.apply(this,arguments)},Y)},count:function(R){var $=0;return K(R,function(){$++}),$},toArray:function(R){return K(R,function($){return $})||[]},only:function(R){if(!de(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return le.Activity=v,le.Children=xe,le.Component=E,le.Fragment=i,le.Profiler=o,le.PureComponent=j,le.StrictMode=s,le.Suspense=m,le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,le.__COMPILER_RUNTIME={__proto__:null,c:function(R){return I.H.useMemoCache(R)}},le.cache=function(R){return function(){return R.apply(null,arguments)}},le.cacheSignal=function(){return null},le.cloneElement=function(R,$,Y){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var te=T({},R.props),ce=R.key;if($!=null)for(pe in $.key!==void 0&&(ce=""+$.key),$)!Q.call($,pe)||pe==="key"||pe==="__self"||pe
vendor: 10,696 bytes, lines 17-41
17==="__source"||pe==="ref"&&$.ref===void 0||(te[pe]=$[pe]);var pe=arguments.length-2;if(pe===1)te.children=Y;else if(1<pe){for(var ke=Array(pe),bt=0;bt<pe;bt++)ke[bt]=arguments[bt+2];te.children=ke}return oe(R.type,ce,te)},le.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:c,_context:R},R},le.createElement=function(R,$,Y){var te,ce={},pe=null;if($!=null)for(te in $.key!==void 0&&(pe=""+$.key),$)Q.call($,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ce[te]=$[te]);var ke=arguments.length-2;if(ke===1)ce.children=Y;else if(1<ke){for(var bt=Array(ke),Ke=0;Ke<ke;Ke++)bt[Ke]=arguments[Ke+2];ce.children=bt}if(R&&R.defaultProps)for(te in ke=R.defaultProps,ke)ce[te]===void 0&&(ce[te]=ke[te]);return oe(R,pe,ce)},le.createRef=function(){return{current:null}},le.forwardRef=function(R){return{$$typeof:h,render:R}},le.isValidElement=de,le.lazy=function(R){return{$$typeof:y,_payload:{_status:-1,_result:R},_init:W}},le.memo=function(R,$){return{$$typeof:p,type:R,compare:$===void 0?null:$}},le.startTransition=function(R){var $=I.T,Y={};I.T=Y;try{var te=R(),ce=I.S;ce!==null&&ce(Y,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(F,he)}catch(pe){he(pe)}finally{$!==null&&Y.types!==null&&($.types=Y.types),I.T=$}},le.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},le.use=function(R){return I.H.use(R)},le.useActionState=function(R,$,Y){return I.H.useActionState(R,$,Y)},le.useCallback=function(R,$){return I.H.useCallback(R,$)},le.useContext=function(R){return I.H.useContext(R)},le.useDebugValue=function(){},le.useDeferredValue=function(R,$){return I.H.useDeferredValue(R,$)},le.useEffect=function(R,$){return I.H.useEffect(R,$)},le.useEffectEvent=function(R){return I.H.useEffectEvent(R)},le.useId=function(){return I.H.useId()},le.useImperativeHandle=function(R,$,Y){return I.H.useImperativeHandle(R,$,Y)},le.useInsertionEffect=function(R,$){return I.H.useInsertionEffect(R,$)},le.useLayoutEffect=function(R,$){return I.H.useLayoutEffect(R,$)},le.useMemo=function(R,$){return I.H.useMemo(R,$)},le.useOptimistic=function(R,$){return I.H.useOptimistic(R,$)},le.useReducer=function(R,$,Y){return I.H.useReducer(R,$,Y)},le.useRef=function(R){return I.H.useRef(R)},le.useState=function(R){return I.H.useState(R)},le.useSyncExternalStore=function(R,$,Y){return I.H.useSyncExternalStore(R,$,Y)},le.useTransition=function(){return I.H.useTransition()},le.version="19.2.6",le}var i0;function of(){return i0||(i0=1,zd.exports=US()),zd.exports}var N=of(),Vd={exports:{}},gr={},Hd={exports:{}},qd={};/** 18 * @license React 19 * scheduler.production.js 20 * 21 * Copyright (c) Meta Platforms, Inc. and affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var s0;function BS(){return s0||(s0=1,(function(t){function e(z,K){var W=z.length;z.push(K);e:for(;0<W;){var he=W-1>>>1,xe=z[he];if(0<o(xe,K))z[he]=K,z[W]=xe,W=he;else break e}}function i(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var K=z[0],W=z.pop();if(W!==K){z[0]=W;e:for(var he=0,xe=z.length,R=xe>>>1;he<R;){var $=2*(he+1)-1,Y=z[$],te=$+1,ce=z[te];if(0>o(Y,W))te<xe&&0>o(ce,Y)?(z[he]=ce,z[te]=W,he=te):(z[he]=Y,z[$]=W,he=$);else if(te<xe&&0>o(ce,W))z[he]=ce,z[te]=W,he=te;else break e}}return K}function o(z,K){var W=z.sortIndex-K.sortIndex;return W!==0?W:z.id-K.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();t.unstable_now=function(){return u.now()-h}}var m=[],p=[],y=1,v=null,x=3,_=!1,S=!1,T=!1,k=!1,E=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function U(z){for(var K=i(p);K!==null;){if(K.callback===null)s(p);else if(K.startTime<=z)s(p),K.sortIndex=K.expirationTime,e(m,K);else break;K=i(p)}}function G(z){if(T=!1,U(z),!S)if(i(m)!==null)S=!0,F||(F=!0,me());else{var K=i(p);K!==null&&Se(G,K.startTime-z)}}var F=!1,I=-1,Q=5,oe=-1;function ae(){return k?!0:!(t.unstable_now()-oe<Q)}function de(){if(k=!1,F){var z=t.unstable_now();oe=z;var K=!0;try{e:{S=!1,T&&(T=!1,D(I),I=-1),_=!0;var W=x;try{t:{for(U(z),v=i(m);v!==null&&!(v.expirationTime>z&&ae());){var he=v.callback;if(typeof he=="function"){v.callback=null,x=v.priorityLevel;var xe=he(v.expirationTime<=z);if(z=t.unstable_now(),typeof xe=="function"){v.callback=xe,U(z),K=!0;break t}v===i(m)&&s(m),U(z)}else s(m);v=i(m)}if(v!==null)K=!0;else{var R=i(p);R!==null&&Se(G,R.startTime-z),K=!1}}break e}finally{v=null,x=W,_=!1}K=void 0}}finally{K?me():F=!1}}}var me;if(typeof j=="function")me=function(){j(de)};else if(typeof MessageChannel<"u"){var Ue=new MessageChannel,Me=Ue.port2;Ue.port1.onmessage=de,me=function(){Me.postMessage(null)}}else me=function(){E(de,0)};function Se(z,K){I=E(function(){z(t.unstable_now())},K)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<z?Math.floor(1e3/z):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(z){switch(x){case 1:case 2:case 3:var K=3;break;default:K=x}var W=x;x=K;try{return z()}finally{x=W}},t.unstable_requestPaint=function(){k=!0},t.unstable_runWithPriority=function(z,K){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var W=x;x=z;try{return K()}finally{x=W}},t.unstable_scheduleCallback=function(z,K,W){var he=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?he+W:he):W=he,z){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=W+xe,z={id:y++,callback:K,priorityLevel:z,startTime:W,expirationTime:xe,sortIndex:-1},W>he?(z.sortIndex=W,e(p,z),i(m)===null&&z===i(p)&&(T?(D(I),I=-1):T=!0,Se(G,W-he))):(z.sortIndex=xe,e(m,z),S||_||(S=!0,F||(F=!0,me()))),z},t.unstable_shouldYield=ae,t.unstable_wrapCallback=function(z){var K=x;return function(){var W=x;x=K;try{return z.apply(this,arguments)}finally{x=W}}}})(qd)),qd}var r0;function zS(){return r0||(r0=1,Hd.exports=BS()),Hd.exports}var $d={exports:{}},yt={};/** 26 * @license React 27 * react-dom.production.js 28 * 29 * Copyright (c) Meta Platforms, Inc. and affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var o0;function VS(){if(o0)return yt;o0=1;var t=of();function e(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(m,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:m,containerInfo:p,implementation:y}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,yt.createPortal=function(m,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return c(m,p,null,y)},yt.flushSync=function(m){var p=u.T,y=s.p;try{if(u.T=null,s.p=2,m)return m()}finally{u.T=p,s.p=y,s.d.f()}},yt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(m,p))},yt.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},yt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var y=p.as,v=h(y,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,_=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?s.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:_}):y==="script"&&s.d.X(m,{crossOrigin:v,integrity:x,fetchPriority:_,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},yt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=h(p.as,p.crossOrigin);s.d.M(m,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(m)},yt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=h(y,p.crossOrigin);s.d.L(m,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},yt.preloadModule=function(m,p){if(typeof m=="string")if(p){var y=h(p.as,p.crossOrigin);s.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(m)},yt.requestFormReset=function(m){s.d.r(m)},yt.unstable_batchedUpdates=function(m,p){return m(p)},yt.useFormState=function(m,p,y){return u.H.useFormState(m,p,y)},yt.useFormStatus=function(){return u.H.useHostTransitionStatus()},yt.version="19.2.6",yt}var l0;function HS(){if(l0)return $d.exports;l0=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),$d.exports=VS(),$d.exports}/** 34 * @license React 35 * react-dom-client.production.js 36 * 37 * Copyright (c) Meta Platforms, Inc. and affiliates. 38 * 39 * This source code is licensed under the MIT license found in the 40 * LICENSE file in the root directory of this source tree. 41 */var c0;function qS(){if(c0)return gr;
vendor: 11,382 bytes, lines 41-48
41c0=1;var t=zS(),e=of(),i=HS();function s(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)a+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var a=n,r=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(r=a.return),n=a.return;while(n)}return a.tag===3?r:null}function u(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function h(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function m(n){if(c(n)!==n)throw Error(s(188))}function p(n){var a=n.alternate;if(!a){if(a=c(n),a===null)throw Error(s(188));return a!==n?null:n}for(var r=n,l=a;;){var d=r.return;if(d===null)break;var f=d.alternate;if(f===null){if(l=d.return,l!==null){r=l;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===r)return m(d),n;if(f===l)return m(d),a;f=f.sibling}throw Error(s(188))}if(r.return!==l.return)r=d,l=f;else{for(var b=!1,w=d.child;w;){if(w===r){b=!0,r=d,l=f;break}if(w===l){b=!0,l=d,r=f;break}w=w.sibling}if(!b){for(w=f.child;w;){if(w===r){b=!0,r=f,l=d;break}if(w===l){b=!0,l=f,r=d;break}w=w.sibling}if(!b)throw Error(s(189))}}if(r.alternate!==l)throw Error(s(190))}if(r.tag!==3)throw Error(s(188));return r.stateNode.current===r?n:a}function y(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=y(n),a!==null)return a;n=n.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),j=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function me(n){return n===null||typeof n!="object"?null:(n=de&&n[de]||n["@@iterator"],typeof n=="function"?n:null)}var Ue=Symbol.for("react.client.reference");function Me(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Ue?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case T:return"Fragment";case E:return"Profiler";case k:return"StrictMode";case G:return"Suspense";case F:return"SuspenseList";case oe:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case j:return n.displayName||"Context";case D:return(n._context.displayName||"Context")+".Consumer";case U:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case I:return a=n.displayName||null,a!==null?a:Me(n.type)||"Memo";case Q:a=n._payload,n=n._init;try{return Me(n(a))}catch{}}return null}var Se=Array.isArray,z=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},he=[],xe=-1;function R(n){return{current:n}}function $(n){0>xe||(n.current=he[xe],he[xe]=null,xe--)}function Y(n,a){xe++,he[xe]=n.current,n.current=a}var te=R(null),ce=R(null),pe=R(null),ke=R(null);function bt(n,a){switch(Y(pe,a),Y(ce,n),Y(te,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?Ty(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=Ty(a),n=Ay(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}$(te),Y(te,n)}function Ke(){$(te),$(ce),$(pe)}function ws(n){n.memoizedState!==null&&Y(ke,n);var a=te.current,r=Ay(a,n.type);a!==r&&(Y(ce,n),Y(te,r))}function Zr(n){ce.current===n&&($(te),$(ce)),ke.current===n&&($(ke),dr._currentValue=W)}var xc,em;function La(n){if(xc===void 0)try{throw Error()}catch(r){var a=r.stack.trim().match(/\n( *(at )?)/);xc=a&&a[1]||"",em=-1<r.stack.indexOf(` 42 at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return` 43`+xc+n+em}var _c=!1;function wc(n,a){if(!n||_c)return"";_c=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(B){var P=B}Reflect.construct(n,[],q)}else{try{q.call()}catch(B){P=B}n.call(q.prototype)}}else{try{throw Error()}catch(B){P=B}(q=n())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(B){if(B&&P&&typeof B.stack=="string")return[B.stack,P.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],w=f[1];if(b&&w){var A=b.split(` 44`),L=w.split(` 45`);for(d=l=0;l<A.length&&!A[l].includes("DetermineComponentFrameRoot");)l++;for(;d<L.length&&!L[d].includes("DetermineComponentFrameRoot");)d++;if(l===A.length||d===L.length)for(l=A.length-1,d=L.length-1;1<=l&&0<=d&&A[l]!==L[d];)d--;for(;1<=l&&0<=d;l--,d--)if(A[l]!==L[d]){if(l!==1||d!==1)do if(l--,d--,0>d||A[l]!==L[d]){var V=` 46`+A[l].replace(" at new "," at ");return n.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",n.displayName)),V}while(1<=l&&0<=d);break}}}finally{_c=!1,Error.prepareStackTrace=r}return(r=n?n.displayName||n.name:"")?La(r):""}function hw(n,a){switch(n.tag){case 26:case 27:case 5:return La(n.type);case 16:return La("Lazy");case 13:return n.child!==a&&a!==null?La("Suspense Fallback"):La("Suspense");case 19:return La("SuspenseList");case 0:case 15:return wc(n.type,!1);case 11:return wc(n.type.render,!1);case 1:return wc(n.type,!0);case 31:return La("Activity");default:return""}}function tm(n){try{var a="",r=null;do a+=hw(n,r),r=n,n=n.return;while(n);return a}catch(l){return` 47Error generating stack: `+l.message+` 48`+l.stack}}var Sc=Object.prototype.hasOwnProperty,Tc=t.unstable_scheduleCallback,Ac=t.unstable_cancelCallback,fw=t.unstable_shouldYield,mw=t.unstable_requestPaint,Mt=t.unstable_now,pw=t.unstable_getCurrentPriorityLevel,nm=t.unstable_ImmediatePriority,am=t.unstable_UserBlockingPriority,eo=t.unstable_NormalPriority,gw=t.unstable_LowPriority,im=t.unstable_IdlePriority,yw=t.log,vw=t.unstable_setDisableYieldValue,Ss=null,Lt=null;function aa(n){if(typeof yw=="function"&&vw(n),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(Ss,n)}catch{}}var Pt=Math.clz32?Math.clz32:_w,bw=Math.log,xw=Math.LN2;function _w(n){return n>>>=0,n===0?32:31-(bw(n)/xw|0)|0}var to=256,no=262144,ao=4194304;function Pa(n){var a=n&42;if(a!==0)return a;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function io(n,a,r){var l=n.pendingLanes;if(l===0)return 0;var d=0,f=n.suspendedLanes,b=n.pingedLanes;n=n.warmLanes;var w=l&134217727;return w!==0?(l=w&~f,l!==0?d=Pa(l):(b&=w,b!==0?d=Pa(b):r||(r=w&~n,r!==0&&(d=Pa(r))))):(w=l&~f,w!==0?d=Pa(w):b!==0?d=Pa(b):r||(r=l&~n,r!==0&&(d=Pa(r)))),d===0?0:a!==0&&a!==d&&(a&f)===0&&(f=d&-d,r=a&-a,f>=r||f===32&&(r&4194048)!==0)?a:d}function Ts(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function ww(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sm(){var n=ao;return ao<<=1,(ao&62914560)===0&&(ao=4194304),n}function Ec(n){for(var a=[],r=0;31>r;r++)a.push(n);return a}function As(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Sw(n,a,r,l,d,f){var b=n.pendingLanes;n.pendingLanes=r,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=r,n.entangledLanes&=r,n.errorRecoveryDisabledLanes&=r,n.shellSuspendCounter=0;var w=n.entanglements,A=n.expirationTimes,L=n.hiddenUpdates;for(r=b&~r;0<r;){var V=31-Pt(r),q=1<<V;w[V]=0,A[V]=-1;var P=L[V];if(P!==null)for(L[V]=null,V=0;V<P.length;V++){var B=P[V];B!==null&&(B.lane&=-536870913)}r&=~q}l!==0&&rm(n,l,0),f!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=f&~(b&~a))}function rm(n,a,r){n.pendingLanes|=a,n.suspendedLanes&=~a;var l=31-Pt(a);n.entangledLanes|=a,n.entanglements[l]=n.entanglements[l]|1073741824|r&261930}function om(n,a){var r=n.entangledLanes|=a;for(n=n.entanglements;r;){var l=31-Pt(r),d=1<<l;d&a|n[l]&a&&(n[l]|=a),r&=~d}}function lm(n,a){var r=a&-a;return r=(r&42)!==0?1:Nc(r),(r&(n.suspendedLanes|a))!==0?0:r}function Nc(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function kc(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function cm(){var n=K.p;return n!==0?n:(n=window.event,n===void 0?32:Xy(n.type))}function um(n,a){var r=K.p;try{return K.p=n,a()}finally{K.p=r}}var ia=Math.random().toString(36).slice(2),ct="__reactFiber$"+ia,At="__reactProps$"+ia,ui="__reactContainer$"+ia,jc="__reactEvents$"+ia,Tw="__reactListeners$"+ia,Aw="__reactHandles$"+ia,dm="__reactResources$"+ia,Es="__reactMarker$"+ia;function Cc(n){delete n[ct],delete n[At],delete n[jc],delete n[Tw],delete n[Aw]}function di(n){var a=n[ct];if(a)return a;for(var r=n.parentNode;r;){if(a=r[ui]||r[ct]){if(r=a.alternate,a.child!==null||r!==null&&r.child!==null)for(n=Oy(n);n!==null;){if(r=n[ct])return r;n=Oy(n)}return a}n=r,r=n.parentNode}return null}function hi(n){if(n=n[ct]||n[ui]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function Ns(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(s(33))}function fi(n){var a=n[dm];return a||(a=n[dm]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function st(n){n[Es]=!0}var hm=new Set,fm={};function Ua(n,a){mi(n,a),mi(n+"Capture",a)}function mi(n,a){for(fm[n]=a,n=0;n<a.length;n++)hm.add(a[n])}var Ew=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
vendor: 6,765 bytes, line 48
48037D\\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]*$"),mm={},pm={};function Nw(n){return Sc.call(pm,n)?!0:Sc.call(mm,n)?!1:Ew.test(n)?pm[n]=!0:(mm[n]=!0,!1)}function so(n,a,r){if(Nw(a))if(r===null)n.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var l=a.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+r)}}function ro(n,a,r){if(r===null)n.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+r)}}function Dn(n,a,r,l){if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttributeNS(a,r,""+l)}}function Ft(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function gm(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function kw(n,a,r){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,f=l.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return d.call(this)},set:function(b){r=""+b,f.call(this,b)}}),Object.defineProperty(n,a,{enumerable:l.enumerable}),{getValue:function(){return r},setValue:function(b){r=""+b},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function Rc(n){if(!n._valueTracker){var a=gm(n)?"checked":"value";n._valueTracker=kw(n,a,""+n[a])}}function ym(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var r=a.getValue(),l="";return n&&(l=gm(n)?n.checked?"true":"false":n.value),n=l,n!==r?(a.setValue(n),!0):!1}function oo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var jw=/[\n"\\]/g;function Kt(n){return n.replace(jw,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Oc(n,a,r,l,d,f,b,w){n.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?n.type=b:n.removeAttribute("type"),a!=null?b==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+Ft(a)):n.value!==""+Ft(a)&&(n.value=""+Ft(a)):b!=="submit"&&b!=="reset"||n.removeAttribute("value"),a!=null?Dc(n,b,Ft(a)):r!=null?Dc(n,b,Ft(r)):l!=null&&n.removeAttribute("value"),d==null&&f!=null&&(n.defaultChecked=!!f),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.name=""+Ft(w):n.removeAttribute("name")}function vm(n,a,r,l,d,f,b,w){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(n.type=f),a!=null||r!=null){if(!(f!=="submit"&&f!=="reset"||a!=null)){Rc(n);return}r=r!=null?""+Ft(r):"",a=a!=null?""+Ft(a):r,w||a===n.value||(n.value=a),n.defaultValue=a}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=w?n.checked:!!l,n.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.name=b),Rc(n)}function Dc(n,a,r){a==="number"&&oo(n.ownerDocument)===n||n.defaultValue===""+r||(n.defaultValue=""+r)}function pi(n,a,r,l){if(n=n.options,a){a={};for(var d=0;d<r.length;d++)a["$"+r[d]]=!0;for(r=0;r<n.length;r++)d=a.hasOwnProperty("$"+n[r].value),n[r].selected!==d&&(n[r].selected=d),d&&l&&(n[r].defaultSelected=!0)}else{for(r=""+Ft(r),a=null,d=0;d<n.length;d++){if(n[d].value===r){n[d].selected=!0,l&&(n[d].defaultSelected=!0);return}a!==null||n[d].disabled||(a=n[d])}a!==null&&(a.selected=!0)}}function bm(n,a,r){if(a!=null&&(a=""+Ft(a),a!==n.value&&(n.value=a),r==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=r!=null?""+Ft(r):""}function xm(n,a,r,l){if(a==null){if(l!=null){if(r!=null)throw Error(s(92));if(Se(l)){if(1<l.length)throw Error(s(93));l=l[0]}r=l}r==null&&(r=""),a=r}r=Ft(a),n.defaultValue=r,l=n.textContent,l===r&&l!==""&&l!==null&&(n.value=l),Rc(n)}function gi(n,a){if(a){var r=n.firstChild;if(r&&r===n.lastChild&&r.nodeType===3){r.nodeValue=a;return}}n.textContent=a}var Cw=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function _m(n,a,r){var l=a.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?l?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":l?n.setProperty(a,r):typeof r!="number"||r===0||Cw.has(a)?a==="float"?n.cssFloat=r:n[a]=(""+r).trim():n[a]=r+"px"}function wm(n,a,r){if(a!=null&&typeof a!="object")throw Error(s(62));if(n=n.style,r!=null){for(var l in r)!r.hasOwnProperty(l)||a!=null&&a.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var d in a)l=a[d],a.hasOwnProperty(d)&&r[d]!==l&&_m(n,d,l)}else for(var f in a)a.hasOwnProperty(f)&&_m(n,f,a[f])}function Mc(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Rw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
48dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ow=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function lo(n){return Ow.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Mn(){}var Lc=null;function Pc(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var yi=null,vi=null;function Sm(n){var a=hi(n);if(a&&(n=a.stateNode)){var r=n[At]||null;e:switch(n=a.stateNode,a.type){case"input":if(Oc(n,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),a=r.name,r.type==="radio"&&a!=null){for(r=n;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Kt(""+a)+'"][type="radio"]'),a=0;a<r.length;a++){var l=r[a];if(l!==n&&l.form===n.form){var d=l[At]||null;if(!d)throw Error(s(90));Oc(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(a=0;a<r.length;a++)l=r[a],l.form===n.form&&ym(l)}break e;case"textarea":bm(n,r.value,r.defaultValue);break e;case"select":a=r.value,a!=null&&pi(n,!!r.multiple,a,!1)}}}var Uc=!1;function Tm(n,a,r){if(Uc)return n(a,r);Uc=!0;try{var l=n(a);return l}finally{if(Uc=!1,(yi!==null||vi!==null)&&(Qo(),yi&&(a=yi,n=vi,vi=yi=null,Sm(a),n)))for(a=0;a<n.length;a++)Sm(n[a])}}function ks(n,a){var r=n.stateNode;if(r===null)return null;var l=r[At]||null;if(l===null)return null;r=l[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(r&&typeof r!="function")throw Error(s(231,a,typeof r));return r}var Ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bc=!1;if(Ln)try{var js={};Object.defineProperty(js,"passive",{get:function(){Bc=!0}}),window.addEventListener("test",js,js),window.removeEventListener("test",js,js)}catch{Bc=!1}var sa=null,zc=null,co=null;function Am(){if(co)return co;var n,a=zc,r=a.length,l,d="value"in sa?sa.value:sa.textContent,f=d.length;for(n=0;n<r&&a[n]===d[n];n++);var b=r-n;for(l=1;l<=b&&a[r-l]===d[f-l];l++);return co=d.slice(n,1<l?1-l:void 0)}function uo(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function ho(){return!0}function Em(){return!1}function Et(n){function a(r,l,d,f,b){this._reactName=r,this._targetInst=d,this.type=l,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var w in n)n.hasOwnProperty(w)&&(r=n[w],this[w]=r?r(f):f[w]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ho:Em,this.isPropagationStopped=Em,this}return v(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ho)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ho)},persist:function(){},isPersistent:ho}),a}var Ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fo=Et(Ba),Cs=v({},Ba,{view:0,detail:0}),Dw=Et(Cs),Vc,Hc,Rs,mo=v({},Cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$c,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Rs&&(Rs&&n.type==="mousemove"?(Vc=n.screenX-Rs.screenX,Hc=n.screenY-Rs.screenY):Hc=Vc=0,Rs=n),Vc)},movementY:function(n){return"movementY"in n?n.movementY:Hc}}),Nm=Et(mo),Mw=v({},mo,{dataTransfer:0}),Lw=Et(Mw),Pw=v({},Cs,{relatedTarget:0}),qc=Et(Pw),Uw=v({},Ba,{animationName:0,elapsedTime:0,pseudoElement:0}),Bw=Et(Uw),zw=v({},Ba,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Vw=Et(zw),Hw=v({},Ba,{data:0}),km=Et(Hw),qw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$w={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"},Gw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iw(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=Gw[n])?!!a[n]:!1}function $c(){return Iw}var Fw=v({},Cs,{key:function(n){if(n.key){var a=qw[n.key]||n.key;if(a!=="Unidentified")return a}
vendor: 2,411 bytes, line 48
48return n.type==="keypress"?(n=uo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?$w[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$c,charCode:function(n){return n.type==="keypress"?uo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?uo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Kw=Et(Fw),Xw=v({},mo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jm=Et(Xw),Yw=v({},Cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$c}),Qw=Et(Yw),Ww=v({},Ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jw=Et(Ww),Zw=v({},mo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),e1=Et(Zw),t1=v({},Ba,{newState:0,oldState:0}),n1=Et(t1),a1=[9,13,27,32],Gc=Ln&&"CompositionEvent"in window,Os=null;Ln&&"documentMode"in document&&(Os=document.documentMode);var i1=Ln&&"TextEvent"in window&&!Os,Cm=Ln&&(!Gc||Os&&8<Os&&11>=Os),Rm=" ",Om=!1;function Dm(n,a){switch(n){case"keyup":return a1.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mm(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var bi=!1;function s1(n,a){switch(n){case"compositionend":return Mm(a);case"keypress":return a.which!==32?null:(Om=!0,Rm);case"textInput":return n=a.data,n===Rm&&Om?null:n;default:return null}}function r1(n,a){if(bi)return n==="compositionend"||!Gc&&Dm(n,a)?(n=Am(),co=zc=sa=null,bi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Cm&&a.locale!=="ko"?null:a.data;default:return null}}var o1={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 Lm(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!o1[n.type]:a==="textarea"}
vendor: 5,223 bytes, line 48
48function Pm(n,a,r,l){yi?vi?vi.push(l):vi=[l]:yi=l,a=al(a,"onChange"),0<a.length&&(r=new fo("onChange","change",null,r,l),n.push({event:r,listeners:a}))}var Ds=null,Ms=null;function l1(n){vy(n,0)}function po(n){var a=Ns(n);if(ym(a))return n}function Um(n,a){if(n==="change")return a}var Bm=!1;if(Ln){var Ic;if(Ln){var Fc="oninput"in document;if(!Fc){var zm=document.createElement("div");zm.setAttribute("oninput","return;"),Fc=typeof zm.oninput=="function"}Ic=Fc}else Ic=!1;Bm=Ic&&(!document.documentMode||9<document.documentMode)}function Vm(){Ds&&(Ds.detachEvent("onpropertychange",Hm),Ms=Ds=null)}function Hm(n){if(n.propertyName==="value"&&po(Ms)){var a=[];Pm(a,Ms,n,Pc(n)),Tm(l1,a)}}function c1(n,a,r){n==="focusin"?(Vm(),Ds=a,Ms=r,Ds.attachEvent("onpropertychange",Hm)):n==="focusout"&&Vm()}function u1(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return po(Ms)}function d1(n,a){if(n==="click")return po(a)}function h1(n,a){if(n==="input"||n==="change")return po(a)}function f1(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var Ut=typeof Object.is=="function"?Object.is:f1;function Ls(n,a){if(Ut(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var r=Object.keys(n),l=Object.keys(a);if(r.length!==l.length)return!1;for(l=0;l<r.length;l++){var d=r[l];if(!Sc.call(a,d)||!Ut(n[d],a[d]))return!1}return!0}function qm(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function $m(n,a){var r=qm(n);n=0;for(var l;r;){if(r.nodeType===3){if(l=n+r.textContent.length,n<=a&&l>=a)return{node:r,offset:a-n};n=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=qm(r)}}function Gm(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Gm(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function Im(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=oo(n.document);a instanceof n.HTMLIFrameElement;){try{var r=typeof a.contentWindow.location.href=="string"}catch{r=!1}if(r)n=a.contentWindow;else break;a=oo(n.document)}return a}function Kc(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var m1=Ln&&"documentMode"in document&&11>=document.documentMode,xi=null,Xc=null,Ps=null,Yc=!1;function Fm(n,a,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Yc||xi==null||xi!==oo(l)||(l=xi,"selectionStart"in l&&Kc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ps&&Ls(Ps,l)||(Ps=l,l=al(Xc,"onSelect"),0<l.length&&(a=new fo("onSelect","select",null,a,r),n.push({event:a,listeners:l}),a.target=xi)))}function za(n,a){var r={};return r[n.toLowerCase()]=a.toLowerCase(),r["Webkit"+n]="webkit"+a,r["Moz"+n]="moz"+a,r}var _i={animationend:za("Animation","AnimationEnd"),animationiteration:za("Animation","AnimationIteration"),animationstart:za("Animation","AnimationStart"),transitionrun:za("Transition","TransitionRun"),transitionstart:za("Transition","TransitionStart"),transitioncancel:za("Transition","TransitionCancel"),transitionend:za("Transition","TransitionEnd")},Qc={},Km={};Ln&&(Km=document.createElement("div").style,"AnimationEvent"in window||(delete _i.animationend.animation,delete _i.animationiteration.animation,delete _i.animationstart.animation),"TransitionEvent"in window||delete _i.transitionend.transition);function Va(n){if(Qc[n])return Qc[n];if(!_i[n])return n;var a=_i[n],r;for(r in a)if(a.hasOwnProperty(r)&&r in Km)return Qc[n]=a[r];return n}var Xm=Va("animationend"),Ym=Va("animationiteration"),Qm=Va("animationstart"),p1=Va("transitionrun"),g1=Va("transitionstart"),y1=Va("transitioncancel"),Wm=Va("transitionend"),Jm=new Map,Wc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Wc.push("scrollEnd");function ln(n,a){Jm.set(n,a),Ua(a,[n])}var go=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Xt=[],wi=0,Jc=0;function yo(){for(var n=wi,a=Jc=wi=0;a<n;
vendor: 15,959 bytes, line 48
48){var r=Xt[a];Xt[a++]=null;var l=Xt[a];Xt[a++]=null;var d=Xt[a];Xt[a++]=null;var f=Xt[a];if(Xt[a++]=null,l!==null&&d!==null){var b=l.pending;b===null?d.next=d:(d.next=b.next,b.next=d),l.pending=d}f!==0&&Zm(r,d,f)}}function vo(n,a,r,l){Xt[wi++]=n,Xt[wi++]=a,Xt[wi++]=r,Xt[wi++]=l,Jc|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function Zc(n,a,r,l){return vo(n,a,r,l),bo(n)}function Ha(n,a){return vo(n,null,null,a),bo(n)}function Zm(n,a,r){n.lanes|=r;var l=n.alternate;l!==null&&(l.lanes|=r);for(var d=!1,f=n.return;f!==null;)f.childLanes|=r,l=f.alternate,l!==null&&(l.childLanes|=r),f.tag===22&&(n=f.stateNode,n===null||n._visibility&1||(d=!0)),n=f,f=f.return;return n.tag===3?(f=n.stateNode,d&&a!==null&&(d=31-Pt(r),n=f.hiddenUpdates,l=n[d],l===null?n[d]=[a]:l.push(a),a.lane=r|536870912),f):null}function bo(n){if(50<ir)throw ir=0,ld=null,Error(s(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var Si={};function v1(n,a,r,l){this.tag=n,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(n,a,r,l){return new v1(n,a,r,l)}function eu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Pn(n,a){var r=n.alternate;return r===null?(r=Bt(n.tag,a,n.key,n.mode),r.elementType=n.elementType,r.type=n.type,r.stateNode=n.stateNode,r.alternate=n,n.alternate=r):(r.pendingProps=a,r.type=n.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=n.flags&65011712,r.childLanes=n.childLanes,r.lanes=n.lanes,r.child=n.child,r.memoizedProps=n.memoizedProps,r.memoizedState=n.memoizedState,r.updateQueue=n.updateQueue,a=n.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},r.sibling=n.sibling,r.index=n.index,r.ref=n.ref,r.refCleanup=n.refCleanup,r}function ep(n,a){n.flags&=65011714;var r=n.alternate;return r===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=r.childLanes,n.lanes=r.lanes,n.child=r.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=r.memoizedProps,n.memoizedState=r.memoizedState,n.updateQueue=r.updateQueue,n.type=r.type,a=r.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function xo(n,a,r,l,d,f){var b=0;if(l=n,typeof n=="function")eu(n)&&(b=1);else if(typeof n=="string")b=SS(n,r,te.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case oe:return n=Bt(31,r,a,d),n.elementType=oe,n.lanes=f,n;case T:return qa(r.children,d,f,a);case k:b=8,d|=24;break;case E:return n=Bt(12,r,a,d|2),n.elementType=E,n.lanes=f,n;case G:return n=Bt(13,r,a,d),n.elementType=G,n.lanes=f,n;case F:return n=Bt(19,r,a,d),n.elementType=F,n.lanes=f,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:b=10;break e;case D:b=9;break e;case U:b=11;break e;case I:b=14;break e;case Q:b=16,l=null;break e}b=29,r=Error(s(130,n===null?"null":typeof n,"")),l=null}return a=Bt(b,r,a,d),a.elementType=n,a.type=l,a.lanes=f,a}function qa(n,a,r,l){return n=Bt(7,n,l,a),n.lanes=r,n}function tu(n,a,r){return n=Bt(6,n,null,a),n.lanes=r,n}function tp(n){var a=Bt(18,null,null,0);return a.stateNode=n,a}function nu(n,a,r){return a=Bt(4,n.children!==null?n.children:[],n.key,a),a.lanes=r,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var np=new WeakMap;function Yt(n,a){if(typeof n=="object"&&n!==null){var r=np.get(n);return r!==void 0?r:(a={value:n,source:a,stack:tm(a)},np.set(n,a),a)}return{value:n,source:a,stack:tm(a)}}var Ti=[],Ai=0,_o=null,Us=0,Qt=[],Wt=0,ra=null,_n=1,wn="";function Un(n,a){Ti[Ai++]=Us,Ti[Ai++]=_o,_o=n,Us=a}function ap(n,a,r){Qt[Wt++]=_n,Qt[Wt++]=wn,Qt[Wt++]=ra,ra=n;var l=_n;n=wn;var d=32-Pt(l)-1;l&=~(1<<d),r+=1;var f=32-Pt(a)+d;if(30<f){var b=d-d%5;f=(l&(1<<b)-1).toString(32),l>>=b,d-=b,_n=1<<32-Pt(a)+d|r<<d|l,wn=f+n}else _n=1<<f|r<<d|l,wn=n}function au(n){n.return!==null&&(Un(n,1),ap(n,1,0))}function iu(n){for(;n===_o;)_o=Ti[--Ai],Ti[Ai]=null,Us=Ti[--Ai],Ti[Ai]=null;for(;n===ra;)ra=Qt[--Wt],Qt[Wt]=null,wn=Qt[--Wt],Qt[Wt]=null,_n=Qt[--Wt],Qt[Wt]=null}function ip(n,a){Qt[Wt++]=_n,Qt[Wt++]=wn,Qt[Wt++]=ra,_n=a.id,wn=a.overflow,ra=n}var ut=null,Be=null,_e=!1,oa=null,Jt=!1,su=Error(s(519));function la(n){var a=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bs(Yt(a,n)),su}function sp(n){var a=n.stateNode,r=n.type,l=n.memoizedProps;switch(a[ct]=n,a[At]=l,r){case"dialog":ye("cancel",a),ye("close",a);break;case"iframe":case"object":case"embed":ye("load",a);break;case"video":case"audio":for(r=0;r<rr.length;r++)ye(rr[r],a);break;case"source":ye("error",a);break;case"img":case"image":case"link":ye("error",a),ye("load",a);break;case"details":ye("toggle",a);break;case"input":ye("invalid",a),vm(a,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ye("invalid",a);break;case"textarea":ye("invalid",a),xm(a,l.value,l.defaultValue,l.children)}r=l.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||a.textContent===""+r||l.suppressHydrationWarning===!0||wy(a.textContent,r)?(l.popover!=null&&(ye("beforetoggle",a),ye("toggle",a)),l.onScroll!=null&&ye("scroll",a),l.onScrollEnd!=null&&ye("scrollend",a),l.onClick!=null&&(a.onclick=Mn),a=!0):a=!1,a||la(n,!0)}function rp(n){for(ut=n.return;ut;)switch(ut.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:ut=ut.return}}function Ei(n){if(n!==ut)return!1;if(!_e)return rp(n),_e=!0,!1;var a=n.tag,r;if((r=a!==3&&a!==27)&&((r=a===5)&&(r=n.type,r=!(r!=="form"&&r!=="button")||Sd(n.type,n.memoizedProps)),r=!r),r&&Be&&la(n),rp(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Be=Ry(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Be=Ry(n)}else a===27?(a=Be,wa(n.type)?(n=kd,kd=null,Be=n):Be=a):Be=ut?en(n.stateNode.nextSibling):null;return!0}function $a(){Be=ut=null,_e=!1}function ru(){var n=oa;return n!==null&&(Ct===null?Ct=n:Ct.push.apply(Ct,n),oa=null),n}function Bs(n){oa===null?oa=[n]:oa.push(n)}var ou=R(null),Ga=null,Bn=null;function ca(n,a,r){Y(ou,a._currentValue),a._currentValue=r}function zn(n){n._currentValue=ou.current,$(ou)}function lu(n,a,r){for(;n!==null;){var l=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,l!==null&&(l.childLanes|=a)):l!==null&&(l.childLanes&a)!==a&&(l.childLanes|=a),n===r)break;n=n.return}}function cu(n,a,r,l){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var f=d.dependencies;if(f!==null){var b=d.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=d;for(var A=0;A<a.length;A++)if(w.context===a[A]){f.lanes|=r,w=f.alternate,w!==null&&(w.lanes|=r),lu(f.return,r,n),l||(b=null);break e}f=w.next}}else if(d.tag===18){if(b=d.return,b===null)throw Error(s(341));b.lanes|=r,f=b.alternate,f!==null&&(f.lanes|=r),lu(b,r,n),b=null}else b=d.child;if(b!==null)b.return=d;else for(b=d;b!==null;){if(b===n){b=null;break}if(d=b.sibling,d!==null){d.return=b.return,b=d;break}b=b.return}d=b}}function Ni(n,a,r,l){n=null;for(var d=a,f=!1;d!==null;){if(!f){if((d.flags&524288)!==0)f=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var b=d.alternate;if(b===null)throw Error(s(387));if(b=b.memoizedProps,b!==null){var w=d.type;Ut(d.pendingProps.value,b.value)||(n!==null?n.push(w):n=[w])}}else if(d===ke.current){if(b=d.alternate,b===null)throw Error(s(387));b.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(dr):n=[dr])}d=d.return}n!==null&&cu(a,n,r,l),a.flags|=262144}function wo(n){for(n=n.firstContext;n!==null;){if(!Ut(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ia(n){Ga=n,Bn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function dt(n){return op(Ga,n)}function So(n,a){return Ga===null&&Ia(n),op(n,a)}function op(n,a){var r=a._currentValue;if(a={context:a,memoizedValue:r,next:null},Bn===null){if(n===null)throw Error(s(308));Bn=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else Bn=Bn.next=a;return r}var b1=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(r,l){n.push(l)}};this.abort=function(){a.aborted=!0,n.forEach(function(r){return r()})}},x1=t.unstable_scheduleCallback,_1=t.unstable_NormalPriority,We={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uu(){return{controller:new b1,data:new Map,refCount:0}}function zs(n){n.refCount--,n.refCount===0&&x1(_1,function(){n.controller.abort()})}var Vs=null,du=0,ki=0,ji=null;function w1(n,a){if(Vs===null){var r=Vs=[];du=0,ki=md(),ji={status:"pending",value:void 0,then:function(l){r.push(l)}}}return du++,a.then(lp,lp),a}function lp(){if(--du===0&&Vs!==null){ji!==null&&(ji.status="fulfilled");var n=Vs;Vs=null,ki=0,ji=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function S1(n,a){var r=[],l={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return n.then(function(){l.status="fulfilled",l.value=a;for(var d=0;d<r.length;d++)(0,r[d])(a)},function(d){for(l.status="rejected",l.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),l}var cp=z.S;z.S=function(n,a){Fg=Mt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&w1(n,a),cp!==null&&cp(n,a)};var Fa=R(null);function hu(){var n=Fa.current;return n!==null?n:Le.pooledCache}function To(n,a){a===null?Y(Fa,Fa.current):Y(Fa,a.pool)}function up(){var n=hu();return n===null?null:{parent:We._currentValue,pool:n}}var Ci=Error(s(460)),fu=Error(s(474)),Ao=Error(s(542)),Eo={then:function(){}};function dp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function hp(n,a,r){switch(r=n[r],r===void 0?n.push(a):r!==a&&(a.then(Mn,Mn),a=r),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,mp(n),n;default:if(typeof a.status=="string")a.then(Mn,Mn);else{if(n=Le,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=a,n.status="pending",n.then(function(l){if(a.status==="pending"){var d=a;d.status="fulfilled",d.value=l}},function(l){if(a.status==="pending"){var d=a;d.status="rejected",d.reason=l}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,mp(n),n}throw Xa=a,Ci}}function Ka(n){try{var a=n._init;return a(n._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Xa=r,Ci):r}}var Xa=null;function fp(){if(Xa===null)throw Error(s(459));var n=Xa;return Xa=null,n}function mp(n){if(n===Ci||n===Ao)throw Error(s(483))}var Ri=null,Hs=0;function No(n){var a=Hs;return Hs+=1,Ri===null&&(Ri=[]),hp(Ri,n,a)}function qs(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function ko(n,a){throw a.$$typeof===x?Error(s(525)):(n=Object.prototype.toString.call(a),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function pp(n){function a(O,C){if(n){var M=O.deletions;M===null?(O.deletions=[C],O.flags|=16):M.push(C)}}function r(O,C){if(!n)return null;for(;C!==null;)a(O,C),C=C.sibling;return null}function l(O){for(var C=new Map;O!==null;)O.key!==null?C.set(O.key,O):C.set(O.index,O),O=O.sibling;return C}function d(O,C){return O=Pn(O,C),O.index=0,O.sibling=null,O}function f(O,C,M){return O.index=M,n?(M=O.alternate,M!==null?(M=M.index,M<C?(O.flags|=67108866,C):M):(O.flags|=67108866,C)):(O.flags|=1048576,C)}function b(O){return n&&O.alternate===null&&(O.flags|=67108866),O}function w(O,C,M,H){return C===null||C.tag!==6?(C=tu(M,O.mode,H),C.return=O,C):(C=d(C,M),C.return=O,C)}function A(O,C,M,H){var ie=M.type;return ie===T?V(O,C,M.props.children,H,M.key):C!==null&&(C.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===Q&&Ka(ie)===C.type)?(C=d(C,M.props),qs(C,M),C.return=O,C):(C=xo(M.type,M.key,M.props,null,O.mode,H),qs(C,M),C.return=O,C)}function L(O,C,M,H){return C===null||C.tag!==4||C.stateNode.containerInfo!==M.containerInfo||C.stateNode.implementation!==M.implementation?(C=nu(M,O.mode,H),C.return=O,C):(C=d(C,M.children||[]),C.return=O,C)}function V(O,C,M,H,ie){return C===null||C.tag!==7?(C=qa(M,O.mode,H,ie),C.return=O,C):(C=d(C,M),C.return=O,C)}function q(O,C,M){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=tu(""+C,O.mode,M),C.return=O,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case _:return M=xo(C.type,C.key,C.props,null,O.mode,M),qs(M,C),M.return=O,M;case S:return C=nu(C,O.mode,M),C.return=O,C;case Q:return C=Ka(C),q(O,C,M)}if(Se(C)||me(C))return C=qa(C,O.mode,M,null),C.return=O,C;if(typeof C.then=="function")return q(O,No(C),M);if(C.$$typeof===j)return q(O,So(O,C),M);ko(O,C)}return null}function P(O,C,M,H){var ie=C!==null?C.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ie!==null?null:w(O,C,""+M,H);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case _:return M.key===ie?A(O,C,M,H):null;case S:return M.key===ie?L(O,C,M,H):null;case Q:return M=Ka(M),P(O,C,M,H)}if(Se(M)||me(M))return ie!==null?null:V(O,C,M,H,null);if(typeof M.then=="function")return P(O,C,No(M),H);if(M.$$typeof===j)return P(O,C,So(O,M),H);ko(O,M)}return null}function B(O,C,M,H,ie){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return O=O.get(M)||null,w(C,O,""+H,ie);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case _:return O=O.get(H.key===null?M:H.key)||null,A(C,O,H,ie);case S:return O=O.get(H.key===null?M:H.key)||null,L(C,O,H,ie);case Q:return H=Ka(H),B(O,C,M,H,ie)}if(Se(H)||me(H))return O=O.get(M)||null,V(C,O,H,ie,null);if(typeof H.then=="function")return B(O,C,M,No(H),ie);if(H.$$typeof===j)return B(O,C,M,So(C,H),ie);ko(C,H)}return null}function J(O,C,M,H){for(var ie=null,Te=null,ne=C,fe=C=0,be=null;ne!==null&&fe<M.length;fe++){ne.index>fe?(be=ne,ne=null):be=ne.sibling;var Ae=P(O,ne,M[fe],H);if(Ae===null){ne===null&&(ne=be);break}n&&ne&&Ae.alternate===null&&a(O,ne),C=f(Ae,C,fe),Te===null?ie=Ae:Te.sibling=Ae,Te=Ae,ne=be}if(fe===M.length)return r(O,ne),_e&&Un(O,fe),ie;if(ne===null){for(;fe<M.length;fe++)ne=q(O,M[fe],H),ne!==null&&(C=f(ne,C,fe),Te===null?ie=ne:Te.sibling=ne,Te=ne);return _e&&Un(O,fe),ie}for(ne=l(ne);fe<M.length;fe++)be=B(ne,O,fe,M[fe],H),be!==null&&(n&&be.alternate!==null&&ne.delete(be.key===null?fe:be.key),C=f(be,C,fe),Te===null?ie=be:Te.sibling=be,Te=be);return n&&ne.forEach(function(Na){return a(O,Na)}),_e&&Un(O,fe),ie}function se(O,C,M,H){if(M==null)throw Error(s(151));for(var ie=null,Te=null,ne=C,fe=C=0,be=null,Ae=M.next();ne!==null&&!Ae.done;fe++,Ae=M.next()){ne.index>fe?(be=ne,ne=null):be=ne.sibling;var Na=P(O,ne,Ae.value,H);if(Na===null){ne===null&&(ne=be);break}n&&ne&&Na.alternate===null&&a(O,ne),C=f(Na,C,fe),Te===null?ie=Na:Te.sibling=Na,Te=Na,ne=be}if(Ae.done)return r(O,ne),_e&&Un(O,fe),ie;if(ne===null){for(;!Ae.done;fe++,Ae=M.next())Ae=q(O,Ae.value,H),Ae!==null&&(C=f(Ae,C,fe),Te===null?ie=Ae:Te.sibling=Ae,Te=Ae);return _e&&Un(O,fe),ie}for(ne=l(ne);!Ae.done;fe++,Ae=M.next())Ae=B(ne,O,fe,Ae.value,H),Ae!==null&&(n&&Ae.alternate!==null&&ne.delete(Ae.key===null?fe:Ae.key),C=f(Ae,C,fe),Te===null?ie=Ae:Te.sibling=Ae,Te=Ae);return n&&ne.forEach(function(MS){return a(O,MS)}),_e&&Un(O,fe),ie}function De(O,C,M,H){if(typeof M=="object"&&M!==null&&M.type===T&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case _:e:{for(var ie=M.key;C!==null;){if(C.key===ie){if(ie=M.type,ie===T){if(C.tag===7){r(O,C.sibling),H=d(C,M.props.children),H.return=O,O=H;break e}}else if(C.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===Q&&Ka(ie)===C.type){r(O,C.sibling),H=d(C,M.props),qs(H,M),H.return=O,O=H;break e}r(O,C);break}else a(O,C);C=C.sibling}M.type===T?(H=qa(M.props.children,O.mode,H,M.key),H.return=O,O=H):(H=xo(M.type,M.key,M.props,null,O.mode,H),qs(
vendor: 6,241 bytes, line 48
48H,M),H.return=O,O=H)}return b(O);case S:e:{for(ie=M.key;C!==null;){if(C.key===ie)if(C.tag===4&&C.stateNode.containerInfo===M.containerInfo&&C.stateNode.implementation===M.implementation){r(O,C.sibling),H=d(C,M.children||[]),H.return=O,O=H;break e}else{r(O,C);break}else a(O,C);C=C.sibling}H=nu(M,O.mode,H),H.return=O,O=H}return b(O);case Q:return M=Ka(M),De(O,C,M,H)}if(Se(M))return J(O,C,M,H);if(me(M)){if(ie=me(M),typeof ie!="function")throw Error(s(150));return M=ie.call(M),se(O,C,M,H)}if(typeof M.then=="function")return De(O,C,No(M),H);if(M.$$typeof===j)return De(O,C,So(O,M),H);ko(O,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,C!==null&&C.tag===6?(r(O,C.sibling),H=d(C,M),H.return=O,O=H):(r(O,C),H=tu(M,O.mode,H),H.return=O,O=H),b(O)):r(O,C)}return function(O,C,M,H){try{Hs=0;var ie=De(O,C,M,H);return Ri=null,ie}catch(ne){if(ne===Ci||ne===Ao)throw ne;var Te=Bt(29,ne,null,O.mode);return Te.lanes=H,Te.return=O,Te}finally{}}}var Ya=pp(!0),gp=pp(!1),ua=!1;function mu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pu(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function da(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ha(n,a,r){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Ee&2)!==0){var d=l.pending;return d===null?a.next=a:(a.next=d.next,d.next=a),l.pending=a,a=bo(n),Zm(n,null,r),a}return vo(n,l,a,r),bo(n)}function $s(n,a,r){if(a=a.updateQueue,a!==null&&(a=a.shared,(r&4194048)!==0)){var l=a.lanes;l&=n.pendingLanes,r|=l,a.lanes=r,om(n,r)}}function gu(n,a){var r=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,r===l)){var d=null,f=null;if(r=r.firstBaseUpdate,r!==null){do{var b={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};f===null?d=f=b:f=f.next=b,r=r.next}while(r!==null);f===null?d=f=a:f=f.next=a}else d=f=a;r={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},n.updateQueue=r;return}n=r.lastBaseUpdate,n===null?r.firstBaseUpdate=a:n.next=a,r.lastBaseUpdate=a}var yu=!1;function Gs(){if(yu){var n=ji;if(n!==null)throw n}}function Is(n,a,r,l){yu=!1;var d=n.updateQueue;ua=!1;var f=d.firstBaseUpdate,b=d.lastBaseUpdate,w=d.shared.pending;if(w!==null){d.shared.pending=null;var A=w,L=A.next;A.next=null,b===null?f=L:b.next=L,b=A;var V=n.alternate;V!==null&&(V=V.updateQueue,w=V.lastBaseUpdate,w!==b&&(w===null?V.firstBaseUpdate=L:w.next=L,V.lastBaseUpdate=A))}if(f!==null){var q=d.baseState;b=0,V=L=A=null,w=f;do{var P=w.lane&-536870913,B=P!==w.lane;if(B?(ve&P)===P:(l&P)===P){P!==0&&P===ki&&(yu=!0),V!==null&&(V=V.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var J=n,se=w;P=a;var De=r;switch(se.tag){case 1:if(J=se.payload,typeof J=="function"){q=J.call(De,q,P);break e}q=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=se.payload,P=typeof J=="function"?J.call(De,q,P):J,P==null)break e;q=v({},q,P);break e;case 2:ua=!0}}P=w.callback,P!==null&&(n.flags|=64,B&&(n.flags|=8192),B=d.callbacks,B===null?d.callbacks=[P]:B.push(P))}else B={lane:P,tag:w.tag,payload:w.payload,callback:w.callback,next:null},V===null?(L=V=B,A=q):V=V.next=B,b|=P;if(w=w.next,w===null){if(w=d.shared.pending,w===null)break;B=w,w=B.next,B.next=null,d.lastBaseUpdate=B,d.shared.pending=null}}while(!0);V===null&&(A=q),d.baseState=A,d.firstBaseUpdate=L,d.lastBaseUpdate=V,f===null&&(d.shared.lanes=0),ya|=b,n.lanes=b,n.memoizedState=q}}function yp(n,a){if(typeof n!="function")throw Error(s(191,n));n.call(a)}function vp(n,a){var r=n.callbacks;if(r!==null)for(n.callbacks=null,n=0;n<r.length;n++)yp(r[n],a)}var Oi=R(null),jo=R(0);function bp(n,a){n=Xn,Y(jo,n),Y(Oi,a),Xn=n|a.baseLanes}function vu(){Y(jo,Xn),Y(Oi,Oi.current)}function bu(){Xn=jo.current,$(Oi),$(jo)}var zt=R(null),Zt=null;function fa(n){var a=n.alternate;Y(Xe,Xe.current&1),Y(zt,n),Zt===null&&(a===null||Oi.current!==null||a.memoizedState!==null)&&(Zt=n)}function xu(n){Y(Xe,Xe.current),Y(zt,n),Zt===null&&(Zt=n)}function xp(n){n.tag===22?(Y(Xe,Xe.current),Y(zt,n),Zt===null&&(Zt=n)):ma()}function ma(){Y(Xe,Xe.current),Y(zt,zt.current)}function Vt(n){$(zt),Zt===n&&(Zt=null),$(Xe)}var Xe=R(0);function Co(n){for(var a=n;a!==null;){if(a.tag===13){var r=a.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Ed(r)||Nd(r)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Vn=0,ue=null,Re=null,Je=null,Ro=!1,Di=!1,Qa=!1,Oo=0,Fs=0,Mi=null,T1=0;function $e(){throw Error(s(321))}function _u(n,a){if(a===null)return!1;for(var r=0;r<a.length&&r<n.length;r++)if(!Ut(n[r],a[r]))return!1;return!0}function wu(n,a,r,l,d,f){return Vn=f,ue=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,z.H=n===null||n.memoizedState===null?ag:Uu,Qa=!1,f=r(l,d),Qa=!1,Di&&(f=wp(a,r,l,d)),_p(n),f}function _p(n){z.H=Ys;var a=Re!==null&&Re.next!==null;if(Vn=0,Je=Re=ue=null,Ro=!1,Fs=0,Mi=null,a)throw Error(s(300));n===null||Ze||(n=n.dependencies,n!==null&&wo(n)&&(Ze=!0))}function wp(n,a,r,l){ue=n;var d=0;do{if(Di&&(Mi=null),Fs=0,Di=!1,25<=d)throw Error(s(301));if(d+=1,Je=Re=null,n.updateQueue!=null){var f=n.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}z.H=ig,f=a(r,l)}while(Di);return f}function A1(){var n=z.H,a=n.useState()[0];return a=typeof a.then=="function"?Ks(a):a,n=n.useState()[0],(Re!==null?Re.memoizedState:null)!==n&&(ue.flags|=1024),a}function Su(){var n=Oo!==0;return Oo=0,n}function Tu(n,a,r){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~r}function Au(n){if(Ro){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}Ro=!1}Vn=0,Je=Re=ue=null,Di=!1,Fs=Oo=0,Mi=null}
vendor: 18,065 bytes, line 48
48function xt(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?ue.memoizedState=Je=n:Je=Je.next=n,Je}function Ye(){if(Re===null){var n=ue.alternate;n=n!==null?n.memoizedState:null}else n=Re.next;var a=Je===null?ue.memoizedState:Je.next;if(a!==null)Je=a,Re=n;else{if(n===null)throw ue.alternate===null?Error(s(467)):Error(s(310));Re=n,n={memoizedState:Re.memoizedState,baseState:Re.baseState,baseQueue:Re.baseQueue,queue:Re.queue,next:null},Je===null?ue.memoizedState=Je=n:Je=Je.next=n}return Je}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ks(n){var a=Fs;return Fs+=1,Mi===null&&(Mi=[]),n=hp(Mi,n,a),a=ue,(Je===null?a.memoizedState:Je.next)===null&&(a=a.alternate,z.H=a===null||a.memoizedState===null?ag:Uu),n}function Mo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ks(n);if(n.$$typeof===j)return dt(n)}throw Error(s(438,String(n)))}function Eu(n){var a=null,r=ue.updateQueue;if(r!==null&&(a=r.memoCache),a==null){var l=ue.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(a={data:l.data.map(function(d){return d.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),r===null&&(r=Do(),ue.updateQueue=r),r.memoCache=a,r=a.data[a.index],r===void 0)for(r=a.data[a.index]=Array(n),l=0;l<n;l++)r[l]=ae;return a.index++,r}function Hn(n,a){return typeof a=="function"?a(n):a}function Lo(n){var a=Ye();return Nu(a,Re,n)}function Nu(n,a,r){var l=n.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=r;var d=n.baseQueue,f=l.pending;if(f!==null){if(d!==null){var b=d.next;d.next=f.next,f.next=b}a.baseQueue=d=f,l.pending=null}if(f=n.baseState,d===null)n.memoizedState=f;else{a=d.next;var w=b=null,A=null,L=a,V=!1;do{var q=L.lane&-536870913;if(q!==L.lane?(ve&q)===q:(Vn&q)===q){var P=L.revertLane;if(P===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),q===ki&&(V=!0);else if((Vn&P)===P){L=L.next,P===ki&&(V=!0);continue}else q={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(w=A=q,b=f):A=A.next=q,ue.lanes|=P,ya|=P;q=L.action,Qa&&r(f,q),f=L.hasEagerState?L.eagerState:r(f,q)}else P={lane:q,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(w=A=P,b=f):A=A.next=P,ue.lanes|=q,ya|=q;L=L.next}while(L!==null&&L!==a);if(A===null?b=f:A.next=w,!Ut(f,n.memoizedState)&&(Ze=!0,V&&(r=ji,r!==null)))throw r;n.memoizedState=f,n.baseState=b,n.baseQueue=A,l.lastRenderedState=f}return d===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function ku(n){var a=Ye(),r=a.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=n;var l=r.dispatch,d=r.pending,f=a.memoizedState;if(d!==null){r.pending=null;var b=d=d.next;do f=n(f,b.action),b=b.next;while(b!==d);Ut(f,a.memoizedState)||(Ze=!0),a.memoizedState=f,a.baseQueue===null&&(a.baseState=f),r.lastRenderedState=f}return[f,l]}function Sp(n,a,r){var l=ue,d=Ye(),f=_e;if(f){if(r===void 0)throw Error(s(407));r=r()}else r=a();var b=!Ut((Re||d).memoizedState,r);if(b&&(d.memoizedState=r,Ze=!0),d=d.queue,Ru(Ep.bind(null,l,d,n),[n]),d.getSnapshot!==a||b||Je!==null&&Je.memoizedState.tag&1){if(l.flags|=2048,Li(9,{destroy:void 0},Ap.bind(null,l,d,r,a),null),Le===null)throw Error(s(349));f||(Vn&127)!==0||Tp(l,a,r)}return r}function Tp(n,a,r){n.flags|=16384,n={getSnapshot:a,value:r},a=ue.updateQueue,a===null?(a=Do(),ue.updateQueue=a,a.stores=[n]):(r=a.stores,r===null?a.stores=[n]:r.push(n))}function Ap(n,a,r,l){a.value=r,a.getSnapshot=l,Np(a)&&kp(n)}function Ep(n,a,r){return r(function(){Np(a)&&kp(n)})}function Np(n){var a=n.getSnapshot;n=n.value;try{var r=a();return!Ut(n,r)}catch{return!0}}function kp(n){var a=Ha(n,2);a!==null&&Rt(a,n,2)}function ju(n){var a=xt();if(typeof n=="function"){var r=n;if(n=r(),Qa){aa(!0);try{r()}finally{aa(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:n},a}function jp(n,a,r,l){return n.baseState=r,Nu(n,Re,typeof l=="function"?l:Hn)}function E1(n,a,r,l,d){if(Bo(n))throw Error(s(485));if(n=a.action,n!==null){var f={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};z.T!==null?r(!0):f.isTransition=!1,l(f),r=a.pending,r===null?(f.next=a.pending=f,Cp(a,f)):(f.next=r.next,a.pending=r.next=f)}}function Cp(n,a){var r=a.action,l=a.payload,d=n.state;if(a.isTransition){var f=z.T,b={};z.T=b;try{var w=r(d,l),A=z.S;A!==null&&A(b,w),Rp(n,a,w)}catch(L){Cu(n,a,L)}finally{f!==null&&b.types!==null&&(f.types=b.types),z.T=f}}else try{f=r(d,l),Rp(n,a,f)}catch(L){Cu(n,a,L)}}function Rp(n,a,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(l){Op(n,a,l)},function(l){return Cu(n,a,l)}):Op(n,a,r)}function Op(n,a,r){a.status="fulfilled",a.value=r,Dp(a),n.state=r,a=n.pending,a!==null&&(r=a.next,r===a?n.pending=null:(r=r.next,a.next=r,Cp(n,r)))}function Cu(n,a,r){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do a.status="rejected",a.reason=r,Dp(a),a=a.next;while(a!==l)}n.action=null}function Dp(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Mp(n,a){return a}function Lp(n,a){if(_e){var r=Le.formState;if(r!==null){e:{var l=ue;if(_e){if(Be){t:{for(var d=Be,f=Jt;d.nodeType!==8;){if(!f){d=null;break t}if(d=en(d.nextSibling),d===null){d=null;break t}}f=d.data,d=f==="F!"||f==="F"?d:null}if(d){Be=en(d.nextSibling),l=d.data==="F!";break e}}la(l)}l=!1}l&&(a=r[0])}}return r=xt(),r.memoizedState=r.baseState=a,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mp,lastRenderedState:a},r.queue=l,r=eg.bind(null,ue,l),l.dispatch=r,l=ju(!1),f=Pu.bind(null,ue,!1,l.queue),l=xt(),d={state:a,dispatch:null,action:n,pending:null},l.queue=d,r=E1.bind(null,ue,d,f,r),d.dispatch=r,l.memoizedState=n,[a,r,!1]}function Pp(n){var a=Ye();return Up(a,Re,n)}function Up(n,a,r){if(a=Nu(n,a,Mp)[0],n=Lo(Hn)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var l=Ks(a)}catch(b){throw b===Ci?Ao:b}else l=a;a=Ye();var d=a.queue,f=d.dispatch;return r!==a.memoizedState&&(ue.flags|=2048,Li(9,{destroy:void 0},N1.bind(null,d,r),null)),[l,f,n]}function N1(n,a){n.action=a}function Bp(n){var a=Ye(),r=Re;if(r!==null)return Up(a,r,n);Ye(),a=a.memoizedState,r=Ye();var l=r.queue.dispatch;return r.memoizedState=n,[a,l,!1]}function Li(n,a,r,l){return n={tag:n,create:r,deps:l,inst:a,next:null},a=ue.updateQueue,a===null&&(a=Do(),ue.updateQueue=a),r=a.lastEffect,r===null?a.lastEffect=n.next=n:(l=r.next,r.next=n,n.next=l,a.lastEffect=n),n}function zp(){return Ye().memoizedState}function Po(n,a,r,l){var d=xt();ue.flags|=n,d.memoizedState=Li(1|a,{destroy:void 0},r,l===void 0?null:l)}function Uo(n,a,r,l){var d=Ye();l=l===void 0?null:l;var f=d.memoizedState.inst;Re!==null&&l!==null&&_u(l,Re.memoizedState.deps)?d.memoizedState=Li(a,f,r,l):(ue.flags|=n,d.memoizedState=Li(1|a,f,r,l))}function Vp(n,a){Po(8390656,8,n,a)}function Ru(n,a){Uo(2048,8,n,a)}function k1(n){ue.flags|=4;var a=ue.updateQueue;if(a===null)a=Do(),ue.updateQueue=a,a.events=[n];else{var r=a.events;r===null?a.events=[n]:r.push(n)}}function Hp(n){var a=Ye().memoizedState;return k1({ref:a,nextImpl:n}),function(){if((Ee&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}function qp(n,a){return Uo(4,2,n,a)}function $p(n,a){return Uo(4,4,n,a)}function Gp(n,a){if(typeof a=="function"){n=n();var r=a(n);return function(){typeof r=="function"?r():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function Ip(n,a,r){r=r!=null?r.concat([n]):null,Uo(4,4,Gp.bind(null,a,n),r)}function Ou(){}function Fp(n,a){var r=Ye();a=a===void 0?null:a;var l=r.memoizedState;return a!==null&&_u(a,l[1])?l[0]:(r.memoizedState=[n,a],n)}function Kp(n,a){var r=Ye();a=a===void 0?null:a;var l=r.memoizedState;if(a!==null&&_u(a,l[1]))return l[0];if(l=n(),Qa){aa(!0);try{n()}finally{aa(!1)}}return r.memoizedState=[l,a],l}function Du(n,a,r){return r===void 0||(Vn&1073741824)!==0&&(ve&261930)===0?n.memoizedState=a:(n.memoizedState=r,n=Xg(),ue.lanes|=n,ya|=n,r)}function Xp(n,a,r,l){return Ut(r,a)?r:Oi.current!==null?(n=Du(n,r,l),Ut(n,a)||(Ze=!0),n):(Vn&42)===0||(Vn&1073741824)!==0&&(ve&261930)===0?(Ze=!0,n.memoizedState=r):(n=Xg(),ue.lanes|=n,ya|=n,a)}function Yp(n,a,r,l,d){var f=K.p;K.p=f!==0&&8>f?f:8;var b=z.T,w={};z.T=w,Pu(n,!1,a,r);try{var A=d(),L=z.S;if(L!==null&&L(w,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var V=S1(A,l);Xs(n,a,V,$t(n))}else Xs(n,a,l,$t(n))}catch(q){Xs(n,a,{then:function(){},status:"rejected",reason:q},$t())}finally{K.p=f,b!==null&&w.types!==null&&(b.types=w.types),z.T=b}}function j1(){}function Mu(n,a,r,l){if(n.tag!==5)throw Error(s(476));var d=Qp(n).queue;Yp(n,d,a,W,r===null?j1:function(){return Wp(n),r(l)})}function Qp(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:W},next:null};var r={};return a.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:r},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function Wp(n){var a=Qp(n);a.next===null&&(a=n.alternate.memoizedState),Xs(n,a.next.queue,{},$t())}function Lu(){return dt(dr)}function Jp(){return Ye().memoizedState}function Zp(){return Ye().memoizedState}function C1(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var r=$t();n=da(r);var l=ha(a,n,r);l!==null&&(Rt(l,a,r),$s(l,a,r)),a={cache:uu()},n.payload=a;return}a=a.return}}function R1(n,a,r){var l=$t();r={lane:l,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bo(n)?tg(a,r):(r=Zc(n,a,r,l),r!==null&&(Rt(r,n,l),ng(r,a,l)))}function eg(n,a,r){var l=$t();Xs(n,a,r,l)}function Xs(n,a,r,l){var d={lane:l,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Bo(n))tg(a,d);else{var f=n.alternate;if(n.lanes===0&&(f===null||f.lanes===0)&&(f=a.lastRenderedReducer,f!==null))try{var b=a.lastRenderedState,w=f(b,r);if(d.hasEagerState=!0,d.eagerState=w,Ut(w,b))return vo(n,a,d,0),Le===null&&yo(),!1}catch{}finally{}if(r=Zc(n,a,d,l),r!==null)return Rt(r,n,l),ng(r,a,l),!0}return!1}function Pu(n,a,r,l){if(l={lane:2,revertLane:md(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Bo(n)){if(a)throw Error(s(479))}else a=Zc(n,r,l,2),a!==null&&Rt(a,n,2)}function Bo(n){var a=n.alternate;return n===ue||a!==null&&a===ue}function tg(n,a){Di=Ro=!0;var r=n.pending;r===null?a.next=a:(a.next=r.next,r.next=a),n.pending=a}function ng(n,a,r){if((r&4194048)!==0){var l=a.lanes;l&=n.pendingLanes,r|=l,a.lanes=r,om(n,r)}}var Ys={readContext:dt,use:Mo,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};Ys.useEffectEvent=$e;var ag={readContext:dt,use:Mo,useCallback:function(n,a){return xt().memoizedState=[n,a===void 0?null:a],n},useContext:dt,useEffect:Vp,useImperativeHandle:function(n,a,r){r=r!=null?r.concat([n]):null,Po(4194308,4,Gp.bind(null,a,n),r)},useLayoutEffect:function(n,a){return Po(4194308,4,n,a)},useInsertionEffect:function(n,a){Po(4,2,n,a)},useMemo:function(n,a){var r=xt();a=a===void 0?null:a;var l=n();if(Qa){aa(!0);try{n()}finally{aa(!1)}}return r.memoizedState=[l,a],l},useReducer:function(n,a,r){var l=xt();if(r!==void 0){var d=r(a);if(Qa){aa(!0);try{r(a)}finally{aa(!1)}}}else d=a;return l.memoizedState=l.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},l.queue=n,n=n.dispatch=R1.bind(null,ue,n),[l.memoizedState,n]},useRef:function(n){var a=xt();return n={current:n},a.memoizedState=n},useState:function(n){n=ju(n);var a=n.queue,r=eg.bind(null,ue,a);return a.dispatch=r,[n.memoizedState,r]},useDebugValue:Ou,useDeferredValue:function(n,a){var r=xt();return Du(r,n,a)},useTransition:function(){var n=ju(!1);return n=Yp.bind(null,ue,n.queue,!0,!1),xt().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,r){var l=ue,d=xt();if(_e){if(r===void 0)throw Error(s(407));r=r()}else{if(r=a(),Le===null)throw Error(s(349));(ve&127)!==0||Tp(l,a,r)}d.memoizedState=r;var f={value:r,getSnapshot:a};return d.queue=f,Vp(Ep.bind(null,l,f,n),[n]),l.flags|=2048,Li(9,{destroy:void 0},Ap.bind(null,l,f,r,a),null),r},useId:function(){var n=xt(),a=Le.identifierPrefix;if(_e){var r=wn,l=_n;r=(l&~(1<<32-Pt(l)-1)).toString(32)+r,a="_"+a+"R_"+r,r=Oo++,0<r&&(a+="H"+r.toString(32)),a+="_"}else r=T1++,a="_"+a+"r_"+r.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:Lu,useFormState:Lp,useActionState:Lp,useOptimistic:function(n){var a=xt();a.memoizedState=a.baseState=n;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=r,a=Pu.bind(null,ue,!0,r),r.dispatch=a,[n,a]},useMemoCache:Eu,useCacheRefresh:function(){return xt().memoizedState=C1.bind(null,ue)},useEffectEvent:function(n){var a=xt(),r={impl:n};return a.memoizedState=r,function(){if((Ee&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}},Uu={readContext:dt,use:Mo,useCallback:Fp,useContext:dt,useEffect:Ru,useImperativeHandle:Ip,useInsertionEffect:qp,useLayoutEffect:$p,useMemo:Kp,useReducer:Lo,useRef:zp,useState:function(){return Lo(Hn)},useDebugValue:Ou,useDeferredValue:function(n,a){var r=Ye();return Xp(r,Re.memoizedState,n,a)},useTransition:function(){var n=Lo(Hn)[0],a=Ye().memoizedState;return[typeof n=="boolean"?n:Ks(n),a]},useSyncExternalStore:Sp,useId:Jp,useHostTransitionStatus:Lu,useFormState:Pp,useActionState:Pp,useOptimistic:function(n,a){var r=Ye();return jp(r,Re,n,a)},useMemoCache:Eu,useCacheRefresh:Zp};Uu.useEffectEvent=Hp;var ig={readContext:dt,use:Mo,useCallback:Fp,useContext:dt,useEffect:Ru,useImperativeHandle:Ip,useInsertionEffect:qp,useLayoutEffect:$p,useMemo:Kp,useReducer:ku,useRef:zp,useState:function(){return ku(Hn)},useDebugValue:Ou,useDeferredValue:function(n,a){var r=Ye();return Re===null?Du(r,n,a):Xp(r,Re.memoizedState,n,a)},useTransition:function(){var n=ku(Hn)[0],a=Ye().memoizedState;return[typeof n=="boolean"?n:Ks(n),a]},useSyncExternalStore:Sp,useId:Jp,useHostTransitionStatus:Lu,useFormState:Bp,useActionState:Bp,useOptimistic:function(n,a){var r=Ye();return Re!==null?jp(r,Re,n,a):(r.baseState=n,[n,r.queue.dispatch])},useMemoCache:Eu,useCacheRefresh:Zp};ig.useEffectEvent=Hp;function Bu(n,a,r,l){a=n.memoizedState,r=r(l,a),r=r==null?a:v({},a,r),n.memoizedState=r,n.lanes===0&&(n.updateQueue.baseState=r)}var zu={enqueueSetState:function(n,a,r){n=n._reactInternals;var l=$t(),d=da(l);d.payload=a,r!=null&&(d.callback=r),a=ha(n,d,l),a!==null&&(Rt(a,n,l),$s(a,n,l))},enqueueReplaceState:function(n,a,r){n=n._reactInternals;var l=$t(),d=da(l);d.tag=1,d.payload=a,r!=null&&(d.callback=r),a=ha(n,d,l),a!==null&&(Rt(a,n,l),$s(a,n,l))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var r=$t(),l=da(r);l.tag=2,a!=null&&(l.callback=a),a=ha(n,l,r),a!==null&&(Rt(a,n,r),$s(a,n,r))}};function sg(n,a,r,l,d,f,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,f,b):a.prototype&&a.prototype.isPureReactComponent?!Ls(r,l)||!Ls(d,f):!0}function rg(n,a,r,l){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(r,l),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(r,l),a.state!==n&&zu.enqueueReplaceState(a,a.state,null)}function Wa(n,a){var r=a;if("ref"in a){r={};for(var l in a)l!=="ref"&&(r[l]=a[l])}if(n=n.defaultProps){r===a&&(r=v({},r));for(var d in n)r[d]===void 0&&(r[d]=n[d])}return r}function og(n){go(n)}function lg(n){console.error(n)}function cg(n){go(n)}function zo(n,a){try{var r=n.onUncaughtError;r(a.value,{componentStack:a.stack})}catch(l){setTimeout(function(){throw l})}}function ug(n,a,r){try{var l=n.onCaughtError;l(r.value,{componentStack:r.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Vu(n,a,r){return r=da(r),r.tag=3,r.payload={element:null},r.callback=function(){zo(n,a)},r}function dg(n){return n=da(n),n.tag=3,n}function hg(n,a,r,l){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var f=l.value;n.payload=function(){return d(f)},n.callback=function(){ug(a,r,l)}}var b=r.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(n.callback=function(){ug(a,r,l),typeof d!="function"&&(va===null?va=new Set([this]):va.add(this));var w=l.stack;this.componentDidCatch(l.value,{componentStack:w!==null?w:""})})}function O1(n,a,r,l,d){if(r.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(a=r.alternate,a!==null&&Ni(a,r,d,!0),r=zt.current,r!==null){switch(r.tag){case 31:case 13:return Zt===null?Wo():r.alternate===null&&Ge===0&&(Ge=3),r.flags&=-257,r.flags|=65536,r.lanes=d,l===Eo?r.flags|=16384:(a=r.updateQueue,a===null?r.updateQueue=new Set([l]):a.add(l),dd(n,l,d)),!1;case 22:return r.flags|=65536,l===Eo?r.flags|=16384:(a=r.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([l])},r.updateQueue=a):(r=a.retryQueue,r===null?a.retryQueue=new Set([l]):r.add(l)),dd(n,l,d)),!1}throw Error(s(435,r.tag))}return dd(n,l,d),Wo(),!1}if(_e)return a=zt.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=d,l!==su&&(n=Error(s(422),{cause:l}),Bs(Yt(n,r)))):(l!==su&&(a=Error(s(423),{cause:l}),Bs(Yt(a,r))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,l=Yt(l,r),d=Vu(n.stateNode,l,d),gu(n,d),Ge!==4&&(Ge=2)),!1;var f=Error(s(520),{cause:l});if(f=Yt(f,r),ar===null?ar=[f]:ar.push(f),Ge!==4&&(Ge=2),a===null)return!0;l=Yt(l,r),r=a;do{switch(r.tag){case 3:return r.flags|=65536,n=d&-d,r.lanes|=n,n=Vu(r.stateNode,l,n),gu(r,
vendor: 3,377 bytes, line 48
48n),!1;case 1:if(a=r.type,f=r.stateNode,(r.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(va===null||!va.has(f))))return r.flags|=65536,d&=-d,r.lanes|=d,d=dg(d),hg(d,n,r,l),gu(r,d),!1}r=r.return}while(r!==null);return!1}var Hu=Error(s(461)),Ze=!1;function ht(n,a,r,l){a.child=n===null?gp(a,null,r,l):Ya(a,n.child,r,l)}function fg(n,a,r,l,d){r=r.render;var f=a.ref;if("ref"in l){var b={};for(var w in l)w!=="ref"&&(b[w]=l[w])}else b=l;return Ia(a),l=wu(n,a,r,b,f,d),w=Su(),n!==null&&!Ze?(Tu(n,a,d),qn(n,a,d)):(_e&&w&&au(a),a.flags|=1,ht(n,a,l,d),a.child)}function mg(n,a,r,l,d){if(n===null){var f=r.type;return typeof f=="function"&&!eu(f)&&f.defaultProps===void 0&&r.compare===null?(a.tag=15,a.type=f,pg(n,a,f,l,d)):(n=xo(r.type,null,l,a,a.mode,d),n.ref=a.ref,n.return=a,a.child=n)}if(f=n.child,!Yu(n,d)){var b=f.memoizedProps;if(r=r.compare,r=r!==null?r:Ls,r(b,l)&&n.ref===a.ref)return qn(n,a,d)}return a.flags|=1,n=Pn(f,l),n.ref=a.ref,n.return=a,a.child=n}function pg(n,a,r,l,d){if(n!==null){var f=n.memoizedProps;if(Ls(f,l)&&n.ref===a.ref)if(Ze=!1,a.pendingProps=l=f,Yu(n,d))(n.flags&131072)!==0&&(Ze=!0);else return a.lanes=n.lanes,qn(n,a,d)}return qu(n,a,r,l,d)}function gg(n,a,r,l){var d=l.children,f=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((a.flags&128)!==0){if(f=f!==null?f.baseLanes|r:r,n!==null){for(l=a.child=n.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~f}else l=0,a.child=null;return yg(n,a,f,r,l)}if((r&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&To(a,f!==null?f.cachePool:null),f!==null?bp(a,f):vu(),xp(a);else return l=a.lanes=536870912,yg(n,a,f!==null?f.baseLanes|r:r,r,l)}else f!==null?(To(a,f.cachePool),bp(a,f),ma(),a.memoizedState=null):(n!==null&&To(a,null),vu(),ma());return ht(n,a,d,r),a.child}function Qs(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function yg(n,a,r,l,d){var f=hu();return f=f===null?null:{parent:We._currentValue,pool:f},a.memoizedState={baseLanes:r,cachePool:f},n!==null&&To(a,null),vu(),xp(a),n!==null&&Ni(n,a,l,!0),a.childLanes=d,null}function Vo(n,a){return a=qo({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function vg(n,a,r){return Ya(a,n.child,null,r),n=Vo(a,a.pendingProps),n.flags|=2,Vt(a),a.memoizedState=null,n}function D1(n,a,r){var l=a.pendingProps,d=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(_e){if(l.mode==="hidden")return n=Vo(a,l),a.lanes=536870912,Qs(null,n);if(xu(a),(n=Be)?(n=Cy(n,Jt),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:ra!==null?{id:_n,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},r=tp(n),r.return=a,a.child=r,ut=a,Be=null)):n=null,n===null)throw la(a);return a.lanes=536870912,null}return Vo(a,l)}var f=n.memoizedState;if(f!==null){var b=f.dehydrated;if(xu(a),d)if(a.flags&256)a.flags&=-257,a=vg(n,a,r);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(s(558));else if(Ze||Ni(n,a,r,!1),d=(r&n.childLanes)!==0,Ze||d){if(l=Le,l!==null&&(b=lm(l,r),b!==0&&b!==f.retryLane))throw f.retryLane=b,Ha(n,b),Rt(l,n,b),Hu;Wo(),a=vg(n,a,r)}
vendor: 1,110 bytes, line 48
48else n=f.treeContext,Be=en(b.nextSibling),ut=a,_e=!0,oa=null,Jt=!1,n!==null&&ip(a,n),a=Vo(a,l),a.flags|=4096;return a}return n=Pn(n.child,{mode:l.mode,children:l.children}),n.ref=a.ref,a.child=n,n.return=a,n}function Ho(n,a){var r=a.ref;if(r===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(s(284));(n===null||n.ref!==r)&&(a.flags|=4194816)}}function qu(n,a,r,l,d){return Ia(a),r=wu(n,a,r,l,void 0,d),l=Su(),n!==null&&!Ze?(Tu(n,a,d),qn(n,a,d)):(_e&&l&&au(a),a.flags|=1,ht(n,a,r,d),a.child)}function bg(n,a,r,l,d,f){return Ia(a),a.updateQueue=null,r=wp(a,l,r,d),_p(n),l=Su(),n!==null&&!Ze?(Tu(n,a,f),qn(n,a,f)):(_e&&l&&au(a),a.flags|=1,ht(n,a,r,f),a.child)}function xg(n,a,r,l,d){if(Ia(a),a.stateNode===null){var f=Si,b=r.contextType;typeof b=="object"&&b!==null&&(f=dt(b)),f=new r(l,f),a.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=zu,a.stateNode=f,f._reactInternals=a,f=a.stateNode,f.props=l,f.state=a.memoizedState,f.refs={},mu(a),b=r.contextType,f.context=typeof b=="object"&&b!==null?dt(b):Si,f.state=a.memoizedState,b
vendor: 15,545 bytes, line 48
48=r.getDerivedStateFromProps,typeof b=="function"&&(Bu(a,r,b,l),f.state=a.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&zu.enqueueReplaceState(f,f.state,null),Is(a,l,f,d),Gs(),f.state=a.memoizedState),typeof f.componentDidMount=="function"&&(a.flags|=4194308),l=!0}else if(n===null){f=a.stateNode;var w=a.memoizedProps,A=Wa(r,w);f.props=A;var L=f.context,V=r.contextType;b=Si,typeof V=="object"&&V!==null&&(b=dt(V));var q=r.getDerivedStateFromProps;V=typeof q=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=a.pendingProps!==w,V||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||L!==b)&&rg(a,f,l,b),ua=!1;var P=a.memoizedState;f.state=P,Is(a,l,f,d),Gs(),L=a.memoizedState,w||P!==L||ua?(typeof q=="function"&&(Bu(a,r,q,l),L=a.memoizedState),(A=ua||sg(a,r,A,l,P,L,b))?(V||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(a.flags|=4194308)):(typeof f.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=l,a.memoizedState=L),f.props=l,f.state=L,f.context=b,l=A):(typeof f.componentDidMount=="function"&&(a.flags|=4194308),l=!1)}else{f=a.stateNode,pu(n,a),b=a.memoizedProps,V=Wa(r,b),f.props=V,q=a.pendingProps,P=f.context,L=r.contextType,A=Si,typeof L=="object"&&L!==null&&(A=dt(L)),w=r.getDerivedStateFromProps,(L=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==q||P!==A)&&rg(a,f,l,A),ua=!1,P=a.memoizedState,f.state=P,Is(a,l,f,d),Gs();var B=a.memoizedState;b!==q||P!==B||ua||n!==null&&n.dependencies!==null&&wo(n.dependencies)?(typeof w=="function"&&(Bu(a,r,w,l),B=a.memoizedState),(V=ua||sg(a,r,V,l,P,B,A)||n!==null&&n.dependencies!==null&&wo(n.dependencies))?(L||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,B,A),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,B,A)),typeof f.componentDidUpdate=="function"&&(a.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===n.memoizedProps&&P===n.memoizedState||(a.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&P===n.memoizedState||(a.flags|=1024),a.memoizedProps=l,a.memoizedState=B),f.props=l,f.state=B,f.context=A,l=V):(typeof f.componentDidUpdate!="function"||b===n.memoizedProps&&P===n.memoizedState||(a.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&P===n.memoizedState||(a.flags|=1024),l=!1)}return f=l,Ho(n,a),l=(a.flags&128)!==0,f||l?(f=a.stateNode,r=l&&typeof r.getDerivedStateFromError!="function"?null:f.render(),a.flags|=1,n!==null&&l?(a.child=Ya(a,n.child,null,d),a.child=Ya(a,null,r,d)):ht(n,a,r,d),a.memoizedState=f.state,n=a.child):n=qn(n,a,d),n}function _g(n,a,r,l){return $a(),a.flags|=256,ht(n,a,r,l),a.child}var $u={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gu(n){return{baseLanes:n,cachePool:up()}}function Iu(n,a,r){return n=n!==null?n.childLanes&~r:0,a&&(n|=qt),n}function wg(n,a,r){var l=a.pendingProps,d=!1,f=(a.flags&128)!==0,b;if((b=f)||(b=n!==null&&n.memoizedState===null?!1:(Xe.current&2)!==0),b&&(d=!0,a.flags&=-129),b=(a.flags&32)!==0,a.flags&=-33,n===null){if(_e){if(d?fa(a):ma(),(n=Be)?(n=Cy(n,Jt),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:ra!==null?{id:_n,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},r=tp(n),r.return=a,a.child=r,ut=a,Be=null)):n=null,n===null)throw la(a);return Nd(n)?a.lanes=32:a.lanes=536870912,null}var w=l.children;return l=l.fallback,d?(ma(),d=a.mode,w=qo({mode:"hidden",children:w},d),l=qa(l,d,r,null),w.return=a,l.return=a,w.sibling=l,a.child=w,l=a.child,l.memoizedState=Gu(r),l.childLanes=Iu(n,b,r),a.memoizedState=$u,Qs(null,l)):(fa(a),Fu(a,w))}var A=n.memoizedState;if(A!==null&&(w=A.dehydrated,w!==null)){if(f)a.flags&256?(fa(a),a.flags&=-257,a=Ku(n,a,r)):a.memoizedState!==null?(ma(),a.child=n.child,a.flags|=128,a=null):(ma(),w=l.fallback,d=a.mode,l=qo({mode:"visible",children:l.children},d),w=qa(w,d,r,null),w.flags|=2,l.return=a,w.return=a,l.sibling=w,a.child=l,Ya(a,n.child,null,r),l=a.child,l.memoizedState=Gu(r),l.childLanes=Iu(n,b,r),a.memoizedState=$u,a=Qs(null,l));else if(fa(a),Nd(w)){if(b=w.nextSibling&&w.nextSibling.dataset,b)var L=b.dgst;b=L,l=Error(s(419)),l.stack="",l.digest=b,Bs({value:l,source:null,stack:null}),a=Ku(n,a,r)}else if(Ze||Ni(n,a,r,!1),b=(r&n.childLanes)!==0,Ze||b){if(b=Le,b!==null&&(l=lm(b,r),l!==0&&l!==A.retryLane))throw A.retryLane=l,Ha(n,l),Rt(b,n,l),Hu;Ed(w)||Wo(),a=Ku(n,a,r)}else Ed(w)?(a.flags|=192,a.child=n.child,a=null):(n=A.treeContext,Be=en(w.nextSibling),ut=a,_e=!0,oa=null,Jt=!1,n!==null&&ip(a,n),a=Fu(a,l.children),a.flags|=4096);return a}return d?(ma(),w=l.fallback,d=a.mode,A=n.child,L=A.sibling,l=Pn(A,{mode:"hidden",children:l.children}),l.subtreeFlags=A.subtreeFlags&65011712,L!==null?w=Pn(L,w):(w=qa(w,d,r,null),w.flags|=2),w.return=a,l.return=a,l.sibling=w,a.child=l,Qs(null,l),l=a.child,w=n.child.memoizedState,w===null?w=Gu(r):(d=w.cachePool,d!==null?(A=We._currentValue,d=d.parent!==A?{parent:A,pool:A}:d):d=up(),w={baseLanes:w.baseLanes|r,cachePool:d}),l.memoizedState=w,l.childLanes=Iu(n,b,r),a.memoizedState=$u,Qs(n.child,l)):(fa(a),r=n.child,n=r.sibling,r=Pn(r,{mode:"visible",children:l.children}),r.return=a,r.sibling=null,n!==null&&(b=a.deletions,b===null?(a.deletions=[n],a.flags|=16):b.push(n)),a.child=r,a.memoizedState=null,r)}function Fu(n,a){return a=qo({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function qo(n,a){return n=Bt(22,n,null,a),n.lanes=0,n}function Ku(n,a,r){return Ya(a,n.child,null,r),n=Fu(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function Sg(n,a,r){n.lanes|=a;var l=n.alternate;l!==null&&(l.lanes|=a),lu(n.return,a,r)}function Xu(n,a,r,l,d,f){var b=n.memoizedState;b===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:l,tail:r,tailMode:d,treeForkCount:f}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=r,b.tailMode=d,b.treeForkCount=f)}function Tg(n,a,r){var l=a.pendingProps,d=l.revealOrder,f=l.tail;l=l.children;var b=Xe.current,w=(b&2)!==0;if(w?(b=b&1|2,a.flags|=128):b&=1,Y(Xe,b),ht(n,a,l,r),l=_e?Us:0,!w&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Sg(n,r,a);else if(n.tag===19)Sg(n,r,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(r=a.child,d=null;r!==null;)n=r.alternate,n!==null&&Co(n)===null&&(d=r),r=r.sibling;r=d,r===null?(d=a.child,a.child=null):(d=r.sibling,r.sibling=null),Xu(a,!1,d,r,f,l);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=a.child,a.child=null;d!==null;){if(n=d.alternate,n!==null&&Co(n)===null){a.child=d;break}n=d.sibling,d.sibling=r,r=d,d=n}Xu(a,!0,r,null,f,l);break;case"together":Xu(a,!1,null,null,void 0,l);break;default:a.memoizedState=null}return a.child}function qn(n,a,r){if(n!==null&&(a.dependencies=n.dependencies),ya|=a.lanes,(r&a.childLanes)===0)if(n!==null){if(Ni(n,a,r,!1),(r&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(s(153));if(a.child!==null){for(n=a.child,r=Pn(n,n.pendingProps),a.child=r,r.return=a;n.sibling!==null;)n=n.sibling,r=r.sibling=Pn(n,n.pendingProps),r.return=a;r.sibling=null}return a.child}function Yu(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&wo(n)))}function M1(n,a,r){switch(a.tag){case 3:bt(a,a.stateNode.containerInfo),ca(a,We,n.memoizedState.cache),$a();break;case 27:case 5:ws(a);break;case 4:bt(a,a.stateNode.containerInfo);break;case 10:ca(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,xu(a),null;break;case 13:var l=a.memoizedState;if(l!==null)return l.dehydrated!==null?(fa(a),a.flags|=128,null):(r&a.child.childLanes)!==0?wg(n,a,r):(fa(a),n=qn(n,a,r),n!==null?n.sibling:null);fa(a);break;case 19:var d=(n.flags&128)!==0;if(l=(r&a.childLanes)!==0,l||(Ni(n,a,r,!1),l=(r&a.childLanes)!==0),d){if(l)return Tg(n,a,r);a.flags|=128}if(d=a.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Y(Xe,Xe.current),l)break;return null;case 22:return a.lanes=0,gg(n,a,r,a.pendingProps);case 24:ca(a,We,n.memoizedState.cache)}return qn(n,a,r)}function Ag(n,a,r){if(n!==null)if(n.memoizedProps!==a.pendingProps)Ze=!0;else{if(!Yu(n,r)&&(a.flags&128)===0)return Ze=!1,M1(n,a,r);Ze=(n.flags&131072)!==0}else Ze=!1,_e&&(a.flags&1048576)!==0&&ap(a,Us,a.index);switch(a.lanes=0,a.tag){case 16:e:{var l=a.pendingProps;if(n=Ka(a.elementType),a.type=n,typeof n=="function")eu(n)?(l=Wa(n,l),a.tag=1,a=xg(null,a,n,l,r)):(a.tag=0,a=qu(null,a,n,l,r));else{if(n!=null){var d=n.$$typeof;if(d===U){a.tag=11,a=fg(null,a,n,l,r);break e}else if(d===I){a.tag=14,a=mg(null,a,n,l,r);break e}}throw a=Me(n)||n,Error(s(306,a,""))}}return a;case 0:return qu(n,a,a.type,a.pendingProps,r);case 1:return l=a.type,d=Wa(l,a.pendingProps),xg(n,a,l,d,r);case 3:e:{if(bt(a,a.stateNode.containerInfo),n===null)throw Error(s(387));l=a.pendingProps;var f=a.memoizedState;d=f.element,pu(n,a),Is(a,l,null,r);var b=a.memoizedState;if(l=b.cache,ca(a,We,l),l!==f.cache&&cu(a,[We],r,!0),Gs(),l=b.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:b.cache},a.updateQueue.baseState=f,a.memoizedState=f,a.flags&256){a=_g(n,a,l,r);break e}else if(l!==d){d=Yt(Error(s(424)),a),Bs(d),a=_g(n,a,l,r);break e}else{switch(n=a.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Be=en(n.firstChild),ut=a,_e=!0,oa=null,Jt=!0,r=gp(a,null,l,r),a.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if($a(),l===d){a=qn(n,a,r);break e}ht(n,a,l,r)}a=a.child}return a;case 26:return Ho(n,a),n===null?(r=Py(a.type,null,a.pendingProps,null))?a.memoizedState=r:_e||(r=a.type,n=a.pendingProps,l=il(pe.current).createElement(r),l[ct]=a,l[At]=n,ft(l,r,n),st(l),a.stateNode=l):a.memoizedState=Py(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return ws(a),n===null&&_e&&(l=a.stateNode=Dy(a.type,a.pendingProps,pe.current),ut=a,Jt=!0,d=Be,wa(a.type)?(kd=d,Be=en(l.firstChild)):Be=d),ht(n,a,a.pendingProps.children,r),Ho(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&_e&&((d=l=Be)&&(l=uS(l,a.type,a.pendingProps,Jt),l!==null?(a.stateNode=l,ut=a,Be=en(l.firstChild),Jt=!1,d=!0):d=!1),d||la(a)),ws(a),d=a.type,f=a.pendingProps,b=n!==null?n.memoizedProps:null,l=f.children,Sd(d,f)?l=null:b!==null&&Sd(d,b)&&(a.flags|=32),a.memoizedState!==null&&(d=wu(n,a,A1,null,null,r),dr._currentValue=d),Ho(n,a),ht(n,a,l,r),a.child;case 6:return n===null&&_e&&((n=r=Be)&&(r=dS(r,a.pendingProps,Jt),r!==null?(a.stateNode=r,ut=a,Be=null,n=!0):n=!1),n||la(a)),null;case 13:return wg(n,a,r);case 4:return bt(a,a.stateNode.containerInfo),l=a.pendingProps,n===null?a.child=Ya(a,null,l,r):ht(n,a,l,r),a.child;case 11:return fg(n,a,a.type,a.pendingProps,r);case 7:return ht(n,a,a.pendingProps,r),a.child;case 8:return ht(n,a,a.pendingProps.children,r),a.child;case 12:return ht(n,a,a.pendingProps.children,r),a.child;case 10:return l=a.pendingProps,ca(a,a.type,l.value),ht(n,a,l.children,r),a.child;case 9:return d=a.type._context,l=a.pendingProps.children,Ia(a),d=dt(d),l=l(d),a.flags|=1,ht(n,a,l,r),a.child;case 14:return mg(n,a,a.type,a.pendingProps,r);case 15:return pg(n,a,a.type,a.pendingProps,r);case 19:return Tg(n,a,r);case 31:return D1(n,a,r);case 22:return gg(n,a,r,a.pendingProps);case 24:return Ia(a),l=dt(We),n===null?(d=hu(),d===null&&(d=Le,f=uu(),d.pooledCache=f,f.refCount++,f!==null&&(d.pooledCacheLanes|=r),d=f),a.memoizedState={parent:l,cache:d},mu(a),ca(a,We,d)):((n.lanes&r)!==0&&(pu(n,a),Is(a,null,null,r),Gs()),d=n.memoizedState,f=a.memoizedState,d.parent!==l?(d={parent:l,cache:l},a.memoizedState=d,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=d),ca(a,We,l)):(l=f.cache,ca(a,We,l),l!==d.cache&&cu(a,[We],r,!0))),ht(n,a,a.pendingProps.children,r),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}function $n(n){n.flags|=4}function Qu(n,a,r,l,d){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(Jg())n.flags|=8192;else throw Xa=Eo,fu}else n.flags&=-16777217}function Eg(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Hy(a))if(Jg())n.flags|=8192;else throw Xa=Eo,fu}function $o(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?sm():536870912,n.lanes|=a,zi|=a)}function Ws(n,a){if(!_e)switch(n.tailMode){case"hidden":a=n.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?n.tail=null:r.sibling=null;break;case"collapsed":r=n.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function ze(n){var a=n.alternate!==null&&n.alternate.child===n.child,r=0,l=0;if(a)for(var d=n.child;d!==null;)r|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)r|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=l,n.childLanes=r,a}function L1(n,a,r){var l=a.pendingProps;switch(iu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(a),null;case 1:return ze(a),null;case 3:return r=a.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),zn(We),Ke(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(n===null||n.child===null)&&(Ei(a)?$n(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,ru())),ze(a),null;case 26:var d=a.type,f=a.memoizedState;return n===null?($n(a),f!==null?(ze(a),Eg(a,f)):(ze(a),Qu(a,d,null,l,r))):f?f!==n.memoizedState?($n(a),ze(a),Eg(a,f)):(ze(a),a.flags&=-16777217):(n=n.memoizedProps,n!==l&&$n(a),ze(a),Qu(a,d,n,l,r)),null;case 27:if(Zr(a),r=pe.current,d=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==l&&$n(a);else{if(!l){if(a.stateNode===null)throw Error(s(166));return ze(a),null}n=te.current,Ei(a)?sp(a):(n=Dy(d,l,r),a.stateNode=n,$n(a))}return ze(a),null;case 5:if(Zr(a),d=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==l&&$n(a);else{if(!l){if(a.stateNode===null)throw Error(s(166));return ze(a),null}if(f=te.current,Ei(a))sp(a);else{var b=il(pe.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>
48",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?b.createElement(d,{is:l.is}):b.createElement(d)}}f[ct]=a,f[At]=l;e:for(b=a.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===a)break e;for(;b.sibling===null;){if(b.return===null||b.return===a)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}a.stateNode=f;e:switch(ft(f,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&$n(a)}}return ze(a),Qu(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,r),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==l&&$n(a);else{if(typeof l!="string"&&a.stateNode===null)throw Error(s(166));if(n=pe.current,Ei(a)){if(n=a.stateNode,r=a.memoizedProps,l=null,d=ut,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}n[ct]=a,n=!!(n.nodeValue===r||l!==null&&l.suppressHydrationWarning===!0||wy(n.nodeValue,r)),n||la(a,!0)}else n=il(n).createTextNode(l),n[ct]=a,a.stateNode=n}return ze(a),null;case 31:if(r=a.memoizedState,n===null||n.memoizedState!==null){if(l=Ei(a),r!==null){if(n===null){if(!l)throw Error(s(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[ct]=a}else $a(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ze(a),n=!1}else r=ru(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=r),n=!0;if(!n)return a.flags&256?(Vt(a),a):(Vt(a),null);if((a.flags&128)!==0)throw Error(s(558))}return ze(a),null;case 13:if(l=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=Ei(a),l!==null&&l.dehydrated!==null){if(n===null){if(!d)throw Error(s(318));if(d=a.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(s(317));d[ct]=a}else $a(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ze(a),d=!1}else d=ru(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return a.flags&256?(Vt(a),a):(Vt(a),null)}return Vt(a),(a.flags&128)!==0?(a.lanes=r,a):(r=l!==null,n=n!==null&&n.memoizedState!==null,r&&(l=a.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==d&&(l.flags|=2048)),r!==n&&r&&(a.child.flags|=8192),$o(a,a.updateQueue),ze(a),null);case 4:return Ke(),n===null&&vd(a.stateNode.containerInfo),ze(a),null;case 10:return zn(a.type),ze(a),null;case 19:if($(Xe),l=a.memoizedState,l===null)return ze(a),null;if(d=(a.flags&128)!==0,f=l.rendering,f===null)if(d)Ws(l,!1);else{if(Ge!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(f=Co(n),f!==null){for(a.flags|=128,Ws(l,!1),n=f.updateQueue,a.updateQueue=n,$o(a,n),a.subtreeFlags=0,n=r,r=a.child;r!==null;)ep(r,n),r=r.sibling;return Y(Xe,Xe.current&1|2),_e&&Un(a,l.treeForkCount),a.child}n=n.sibling}l.tail!==null&&Mt()>Xo&&(a.flags|=128,d=!0,Ws(l,!1),a.lanes=4194304)}else{if(!d)if(n=Co(f),n!==null){if(a.flags|=128,d=!0,n=n.updateQueue,a.updateQueue=n,$o(a,n),Ws(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!_e)return ze(a),null}else 2*Mt()-l.renderingStartTime>Xo&&r!==536870912&&(a.flags|=128,d=!0,Ws(l,!1),a.lanes=4194304);l.isBackwards?(f.sibling=a.child,a.child=f):(n=l.last,n!==null?n.sibling=f:a.child=f,l.last=f)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=Mt(),n.sibling=null,r=Xe.current,Y(Xe,d?r&1|2:r&1),_e&&Un(a,l.treeForkCount),n):(ze(a),null);case 22:case 23:return Vt(a),bu(),l=a.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(a.flags|=8192):l&&(a.flags|=8192),l?(r&536870912)!==0&&(a.flags&128)===0&&(ze(a),a.subtreeFlags&6&&(a.flags|=8192)):ze(a),r=a.updateQueue,r!==null&&$o(a,r.retryQueue),r=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),l=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),l!==r&&(a.flags|=2048),n!==null&&$(Fa),null;case 24:return r=null,n!==null&&(r=n.memoizedState.cache),a.memoizedState.cache!==r&&(a.flags|=2048),zn(We),ze(a),null;case 25:return null;case 30:return null}throw Error(s(156,a.tag))}function P1(n,a){switch(iu(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return zn(We),Ke(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return Zr(a),null;case 31:if(a.memoizedState!==null){if(Vt(a),a.alternate===null)throw Error(s(340));$a()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(Vt(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(s(340));$a()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return $(Xe),null;case 4:return Ke(),null;case 10:return zn(a.type),null;case 22:case 23:return Vt(a),bu(),n!==null&&$(Fa),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return zn(We),null;case 25:return null;default:return null}}function Ng(n,a){switch(iu(a),a.tag){case 3:zn(We),Ke();break;case 26:case 27:case 5:Zr(a);break;case 4:Ke();break;case 31:a.memoizedState!==null&&Vt(a);break;case 13:Vt(a);break;case 19:$(Xe);break;case 10:zn(a.type);break;
vendor: 20,539 bytes, line 48
48case 22:case 23:Vt(a),bu(),n!==null&&$(Fa);break;case 24:zn(We)}}function Js(n,a){try{var r=a.updateQueue,l=r!==null?r.lastEffect:null;if(l!==null){var d=l.next;r=d;do{if((r.tag&n)===n){l=void 0;var f=r.create,b=r.inst;l=f(),b.destroy=l}r=r.next}while(r!==d)}}catch(w){Ce(a,a.return,w)}}function pa(n,a,r){try{var l=a.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var f=d.next;l=f;do{if((l.tag&n)===n){var b=l.inst,w=b.destroy;if(w!==void 0){b.destroy=void 0,d=a;var A=r,L=w;try{L()}catch(V){Ce(d,A,V)}}}l=l.next}while(l!==f)}}catch(V){Ce(a,a.return,V)}}function kg(n){var a=n.updateQueue;if(a!==null){var r=n.stateNode;try{vp(a,r)}catch(l){Ce(n,n.return,l)}}}function jg(n,a,r){r.props=Wa(n.type,n.memoizedProps),r.state=n.memoizedState;try{r.componentWillUnmount()}catch(l){Ce(n,a,l)}}function Zs(n,a){try{var r=n.ref;if(r!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof r=="function"?n.refCleanup=r(l):r.current=l}}catch(d){Ce(n,a,d)}}function Sn(n,a){var r=n.ref,l=n.refCleanup;if(r!==null)if(typeof l=="function")try{l()}catch(d){Ce(n,a,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){Ce(n,a,d)}else r.current=null}function Cg(n){var a=n.type,r=n.memoizedProps,l=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":r.autoFocus&&l.focus();break e;case"img":r.src?l.src=r.src:r.srcSet&&(l.srcset=r.srcSet)}}catch(d){Ce(n,n.return,d)}}function Wu(n,a,r){try{var l=n.stateNode;iS(l,n.type,r,a),l[At]=a}catch(d){Ce(n,n.return,d)}}function Rg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&wa(n.type)||n.tag===4}function Ju(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Rg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&wa(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Zu(n,a,r){var l=n.tag;if(l===5||l===6)n=n.stateNode,a?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(n,a):(a=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.appendChild(n),r=r._reactRootContainer,r!=null||a.onclick!==null||(a.onclick=Mn));else if(l!==4&&(l===27&&wa(n.type)&&(r=n.stateNode,a=null),n=n.child,n!==null))for(Zu(n,a,r),n=n.sibling;n!==null;)Zu(n,a,r),n=n.sibling}function Go(n,a,r){var l=n.tag;if(l===5||l===6)n=n.stateNode,a?r.insertBefore(n,a):r.appendChild(n);else if(l!==4&&(l===27&&wa(n.type)&&(r=n.stateNode),n=n.child,n!==null))for(Go(n,a,r),n=n.sibling;n!==null;)Go(n,a,r),n=n.sibling}function Og(n){var a=n.stateNode,r=n.memoizedProps;try{for(var l=n.type,d=a.attributes;d.length;)a.removeAttributeNode(d[0]);ft(a,l,r),a[ct]=n,a[At]=r}catch(f){Ce(n,n.return,f)}}var Gn=!1,et=!1,ed=!1,Dg=typeof WeakSet=="function"?WeakSet:Set,rt=null;function U1(n,a){if(n=n.containerInfo,_d=dl,n=Im(n),Kc(n)){if("selectionStart"in n)var r={start:n.selectionStart,end:n.selectionEnd};else e:{r=(r=n.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var d=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{r.nodeType,f.nodeType}catch{r=null;break e}var b=0,w=-1,A=-1,L=0,V=0,q=n,P=null;t:for(;;){for(var B;q!==r||d!==0&&q.nodeType!==3||(w=b+d),q!==f||l!==0&&q.nodeType!==3||(A=b+l),q.nodeType===3&&(b+=q.nodeValue.length),(B=q.firstChild)!==null;)P=q,q=B;for(;;){if(q===n)break t;if(P===r&&++L===d&&(w=b),P===f&&++V===l&&(A=b),(B=q.nextSibling)!==null)break;q=P,P=q.parentNode}q=B}r=w===-1||A===-1?null:{start:w,end:A}}else r=null}r=r||{start:0,end:0}}else r=null;for(wd={focusedElem:n,selectionRange:r},dl=!1,rt=a;rt!==null;)if(a=rt,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,rt=n;else for(;rt!==null;){switch(a=rt,f=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(r=0;r<n.length;r++)d=n[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&f!==null){n=void 0,r=a,d=f.memoizedProps,f=f.memoizedState,l=r.stateNode;try{var J=Wa(r.type,d);n=l.getSnapshotBeforeUpdate(J,f),l.__reactInternalSnapshotBeforeUpdate=n}catch(se){Ce(r,r.return,se)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,r=n.nodeType,r===9)Ad(n);else if(r===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Ad(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(s(163))}if(n=a.sibling,n!==null){n.return=a.return,rt=n;break}rt=a.return}}function Mg(n,a,r){var l=r.flags;switch(r.tag){case 0:case 11:case 15:Fn(n,r),l&4&&Js(5,r);break;case 1:if(Fn(n,r),l&4)if(n=r.stateNode,a===null)try{n.componentDidMount()}catch(b){Ce(r,r.return,b)}else{var d=Wa(r.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(d,a,n.__reactInternalSnapshotBeforeUpdate)}catch(b){Ce(r,r.return,b)}}l&64&&kg(r),l&512&&Zs(r,r.return);break;case 3:if(Fn(n,r),l&64&&(n=r.updateQueue,n!==null)){if(a=null,r.child!==null)switch(r.child.tag){case 27:case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}try{vp(n,a)}catch(b){Ce(r,r.return,b)}}break;case 27:a===null&&l&4&&Og(r);case 26:case 5:Fn(n,r),a===null&&l&4&&Cg(r),l&512&&Zs(r,r.return);break;case 12:Fn(n,r);break;case 31:Fn(n,r),l&4&&Ug(n,r);break;case 13:Fn(n,r),l&4&&Bg(n,r),l&64&&(n=r.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(r=F1.bind(null,r),hS(n,r))));break;case 22:if(l=r.memoizedState!==null||Gn,!l){a=a!==null&&a.memoizedState!==null||et,d=Gn;var f=et;Gn=l,(et=a)&&!f?Kn(n,r,(r.subtreeFlags&8772)!==0):Fn(n,r),Gn=d,et=f}break;case 30:break;default:Fn(n,r)}}function Lg(n){var a=n.alternate;a!==null&&(n.alternate=null,Lg(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&Cc(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var He=null,Nt=!1;function In(n,a,r){for(r=r.child;r!==null;)Pg(n,a,r),r=r.sibling}function Pg(n,a,r){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Ss,r)}catch{}switch(r.tag){case 26:et||Sn(r,a),In(n,a,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:et||Sn(r,a);var l=He,d=Nt;wa(r.type)&&(He=r.stateNode,Nt=!1),In(n,a,r),lr(r.stateNode),He=l,Nt=d;break;case 5:et||Sn(r,a);case 6:if(l=He,d=Nt,He=null,In(n,a,r),He=l,Nt=d,He!==null)if(Nt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(r.stateNode)}catch(f){Ce(r,a,f)}else try{He.removeChild(r.stateNode)}catch(f){Ce(r,a,f)}break;case 18:He!==null&&(Nt?(n=He,ky(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,r.stateNode),Ki(n)):ky(He,r.stateNode));break;case 4:l=He,d=Nt,He=r.stateNode.containerInfo,Nt=!0,In(n,a,r),He=l,Nt=d;break;case 0:case 11:case 14:case 15:pa(2,r,a),et||pa(4,r,a),In(n,a,r);break;case 1:et||(Sn(r,a),l=r.stateNode,typeof l.componentWillUnmount=="function"&&jg(r,a,l)),In(n,a,r);break;case 21:In(n,a,r);break;case 22:et=(l=et)||r.memoizedState!==null,In(n,a,r),et=l;break;default:In(n,a,r)}}function Ug(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ki(n)}catch(r){Ce(a,a.return,r)}}}function Bg(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ki(n)}catch(r){Ce(a,a.return,r)}}function B1(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new Dg),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new Dg),a;default:throw Error(s(435,n.tag))}}function Io(n,a){var r=B1(n);a.forEach(function(l){if(!r.has(l)){r.add(l);var d=K1.bind(null,n,l);l.then(d,d)}})}function kt(n,a){var r=a.deletions;if(r!==null)for(var l=0;l<r.length;l++){var d=r[l],f=n,b=a,w=b;e:for(;w!==null;){switch(w.tag){case 27:if(wa(w.type)){He=w.stateNode,Nt=!1;break e}break;case 5:He=w.stateNode,Nt=!1;break e;case 3:case 4:He=w.stateNode.containerInfo,Nt=!0;break e}w=w.return}if(He===null)throw Error(s(160));Pg(f,b,d),He=null,Nt=!1,f=d.alternate,f!==null&&(f.return=null),d.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)zg(a,n),a=a.sibling}var cn=null;function zg(n,a){var r=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:kt(a,n),jt(n),l&4&&(pa(3,n,n.return),Js(3,n),pa(5,n,n.return));break;case 1:kt(a,n),jt(n),l&512&&(et||r===null||Sn(r,r.return)),l&64&&Gn&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(r=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=r===null?l:r.concat(l))));break;case 26:var d=cn;if(kt(a,n),jt(n),l&512&&(et||r===null||Sn(r,r.return)),l&4){var f=r!==null?r.memoizedState:null;if(l=n.memoizedState,r===null)if(l===null)if(n.stateNode===null){e:{l=n.type,r=n.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":f=d.getElementsByTagName("title")[0],(!f||f[Es]||f[ct]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=d.createElement(l),d.head.insertBefore(f,d.querySelector("head > title"))),ft(f,l,r),f[ct]=n,st(f),l=f;break e;case"link":var b=zy("link","href",d).get(l+(r.href||""));if(b){for(var w=0;w<b.length;w++)if(f=b[w],f.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&f.getAttribute("rel")===(r.rel==null?null:r.rel)&&f.getAttribute("title")===(r.title==null?null:r.title)&&f.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){b.splice(w,1);break t}}f=d.createElement(l),ft(f,l,r),d.head.appendChild(f);break;case"meta":if(b=zy("meta","content",d).get(l+(r.content||""))){for(w=0;w<b.length;w++)if(f=b[w],f.getAttribute("content")===(r.content==null?null:""+r.content)&&f.getAttribute("name")===(r.name==null?null:r.name)&&f.getAttribute("property")===(r.property==null?null:r.property)&&f.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&f.getAttribute("charset")===(r.charSet==null?null:r.charSet)){b.splice(w,1);break t}}f=d.createElement(l),ft(f,l,r),d.head.appendChild(f);break;default:throw Error(s(468,l))}f[ct]=n,st(f),l=f}n.stateNode=l}else Vy(d,n.type,n.stateNode);else n.stateNode=By(d,l,n.memoizedProps);else f!==l?(f===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):f.count--,l===null?Vy(d,n.type,n.stateNode):By(d,l,n.memoizedProps)):l===null&&n.stateNode!==null&&Wu(n,n.memoizedProps,r.memoizedProps)}break;case 27:kt(a,n),jt(n),l&512&&(et||r===null||Sn(r,r.return)),r!==null&&l&4&&Wu(n,n.memoizedProps,r.memoizedProps);break;case 5:if(kt(a,n),jt(n),l&512&&(et||r===null||Sn(r,r.return)),n.flags&32){d=n.stateNode;try{gi(d,"")}catch(J){Ce(n,n.return,J)}}l&4&&n.stateNode!=null&&(d=n.memoizedProps,Wu(n,d,r!==null?r.memoizedProps:d)),l&1024&&(ed=!0);break;case 6:if(kt(a,n),jt(n),l&4){if(n.stateNode===null)throw Error(s(162));l=n.memoizedProps,r=n.stateNode;try{r.nodeValue=l}catch(J){Ce(n,n.return,J)}}break;case 3:if(ol=null,d=cn,cn=sl(a.containerInfo),kt(a,n),cn=d,jt(n),l&4&&r!==null&&r.memoizedState.isDehydrated)try{Ki(a.containerInfo)}catch(J){Ce(n,n.return,J)}ed&&(ed=!1,Vg(n));break;case 4:l=cn,cn=sl(n.stateNode.containerInfo),kt(a,n),jt(n),cn=l;break;case 12:kt(a,n),jt(n);break;case 31:kt(a,n),jt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Io(n,l)));break;case 13:kt(a,n),jt(n),n.child.flags&8192&&n.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Ko=Mt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Io(n,l)));break;case 22:d=n.memoizedState!==null;var A=r!==null&&r.memoizedState!==null,L=Gn,V=et;if(Gn=L||d,et=V||A,kt(a,n),et=V,Gn=L,jt(n),l&8192)e:for(a=n.stateNode,a._visibility=d?a._visibility&-2:a._visibility|1,d&&(r===null||A||Gn||et||Ja(n)),r=null,a=n;;){if(a.tag===5||a.tag===26){if(r===null){A=r=a;try{if(f=A.stateNode,d)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{w=A.stateNode;var q=A.memoizedProps.style,P=q!=null&&q.hasOwnProperty("display")?q.display:null;w.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(J){Ce(A,A.return,J)}}}else if(a.tag===6){if(r===null){A=a;try{A.stateNode.nodeValue=d?"":A.memoizedProps}catch(J){Ce(A,A.return,J)}}}else if(a.tag===18){if(r===null){A=a;try{var B=A.stateNode;d?jy(B,!0):jy(A.stateNode,!1)}catch(J){Ce(A,A.return,J)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;r===a&&(r=null),a=a.return}r===a&&(r=null),a.sibling.return=a.return,a=a.sibling}l&4&&(l=n.updateQueue,l!==null&&(r=l.retryQueue,r!==null&&(l.retryQueue=null,Io(n,r))));break;case 19:kt(a,n),jt(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,Io(n,l)));break;case 30:break;case 21:break;default:kt(a,n),jt(n)}}function jt(n){var a=n.flags;if(a&2){try{for(var r,l=n.return;l!==null;){if(Rg(l)){r=l;break}l=l.return}if(r==null)throw Error(s(160));switch(r.tag){case 27:var d=r.stateNode,f=Ju(n);Go(n,f,d);break;case 5:var b=r.stateNode;r.flags&32&&(gi(b,""),r.flags&=-33);var w=Ju(n);Go(n,w,b);break;case 3:case 4:var A=r.stateNode.containerInfo,L=Ju(n);Zu(n,L,A);break;default:throw Error(s(161))}}catch(V){Ce(n,n.return,V)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function Vg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;Vg(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function Fn(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Mg(n,a.alternate,a),a=a.sibling}function Ja(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:pa(4,a,a.return),Ja(a);break;case 1:Sn(a,a.return);var r=a.stateNode;typeof r.componentWillUnmount=="function"&&jg(a,a.return,r),Ja(a);break;case 27:lr(a.stateNode);case 26:case 5:Sn(a,a.return),Ja(a);break;case 22:a.memoizedState===null&&Ja(a);break;case 30:Ja(a);break;default:Ja(a)}n=n.sibling}}function Kn(n,a,r){for(r=r&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var l=a.alternate,d=n,f=a,b=f.flags;switch(f.tag){case 0:case 11:case 15:Kn(d,f,r),Js(4,f);break;case 1:if(Kn(d,f,r),l=f,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(L){Ce(l,l.return,L)}if(l=f,d=l.updateQueue,d!==null){var w=l.stateNode;try{var A=d.shared.hiddenCallbacks;if(A!==null)for(d.shared.hiddenCallbacks=null,d=0;d<A.length;d++)yp(A[d],w)}catch(L){Ce(l,l.return,L)}}r&&b&64&&kg(f),Zs(f,f.return);break;case 27:Og(f);case 26:case 5:Kn(d,f,r),r&&l===null&&b&4&&Cg(f),Zs(f,f.return);break;case 12:Kn(d,f,r);break;case 31:Kn(d,f,r),r&&b&4&&Ug(d,f);break;case 13:Kn(d,f,r),r&&b&4&&Bg(d,f);break;case 22:f.memoizedState===null&&Kn(d,f,r),Zs(f,f.return);break;case 30:break;default:Kn(d,f,r)}a=a.sibling}}function td(n,a){var r=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==r&&(n!=null&&n.refCount++,r!=null&&zs(r))}function nd(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&zs(n))}function un(n,a,r,l){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Hg(n,a,r,l),a=a.sibling}function Hg(n,a,r,l){var d=a.flags;switch(a.tag){case 0:case 11:case 15:un(n,a,r,l),d&2048&&Js(9,a);break;case 1:un(n,a,r,l);break;case 3:un(n,a,r,l),d&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&zs(n)));break;case 12:if(d&2048){un(n,a,r,l),n=a.stateNode;try{var f=a.memoizedProps,b=f.id,w=f.onPostCommit;typeof w=="function"&&w(b,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(A){Ce(a,a.return,A)}}else un(n,a,r,l);break;case 31:un(n,a,r,l);break;case 13:un(n,a,r,l);break;case 23:break;case 22:f=a.stateNode,b=a.alternate,a.memoizedState!==null?f._visibility&2?un(n,a,r,l):er(n,a):f._visibility&2?un(n,a,r,l):(f._visibility|=2,Pi(n,a,r,l,(a.subtreeFlags&10256)!==0||!1)),d&2048&&td(b,a);break;case 24:un(n,a,r,l),d&2048&&nd(a.alternate,a);break;default:un(n,a,r,l)}}function Pi(n,a,r,l,d){for(d=d&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var f=n,b=a,w=r,A=l,L=b.flags;switch(b.tag){case 0:case 11:case 15:Pi(f,b,w,A,d),Js(8,b);break;case 23:break;case 22:var V=b.stateNode;b.memoizedState!==null?V._visibility&2?Pi(f,b,w,A,d):er(f,b):(V._visibility|=2,Pi(f,b,w,A,d)),d&&L&2048&&td(b.alternate,b);break;case 24:Pi(f,b,w,A,d),d&&L&2048&&nd(b.alternate,b);break;default:Pi(f,b,w,A,d)}a=a.sibling}}function er(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var r=n,l=a,d=l.flags;switch(l.tag){case 22:er(r,l),d&2048&&td(l.alternate,l);break;case 24:er(r,l),d&2048&&nd(l.alternate,l);break;default:er(r,l)}a=a.sibling}}var tr=8192;function Ui(n,a,r){if(n.subtreeFlags&tr)for(n=n.child;n!==null;)qg(n,a,r),n=n.sibling}function qg(n,a,r){switch(n.tag){case 26:Ui(n,a,r),n.flags&tr&&n.memoizedState!==null&&TS(r,cn,n.memoizedState,n.memoizedProps);break;case 5:Ui(n,a,r);break;case 3:case 4:var l=cn;cn=sl(n.stateNode.containerInfo),Ui(n,a,r),cn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=tr,tr=16777216,Ui(n,a,r),tr=l):Ui(n,a,r));break;default:Ui(n,a,r)}}function $g(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function nr(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var l=a[r];rt=l,Ig(l,n)}$g(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Gg(n),n=n.sibling}function Gg(n){switch(n.tag){case 0:case 11:case 15:nr(n),n.flags&2048&&pa(9,n,n.return);break;case 3:nr(n);break;case 12:nr(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Fo(n)):nr(n);break;default:nr(n)}}function Fo(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var l=a[r];rt=l,Ig(l,n)}$g(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:pa(8,a,a.return),Fo(a);break;case 22:r=a.stateNode,r._visibility&2&&(r._visibility&=-3,Fo(a));break;default:Fo(a)}n=n.sibling}}function Ig(n,a){for(;rt!==null;){var r=rt;switch(r.tag){case 0:case 11:case 15:pa(8,r,a);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var l=r.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:zs(r.memoizedState.cache)}if(l=r.child,l!==null)l.return=r,rt=l;else e:for(r=n;rt!==null;){l=rt;var d=l.sibling,f=l.return;if(Lg(l),l===r){rt=null;break e}if(d!==null){d.return=f,rt=d;break e}rt=f}}}var z1={getCacheForType:function(n){var a=dt(We),r=a.data.get(n);return r===void 0&&(r=n(),a.data.set(n,r)),r},cacheSignal:function(){return dt(We).controller.signal}},V1=typeof WeakMap=="function"?WeakMap:Map,Ee=0,Le=null,ge=null,ve=0,je=0,Ht=null,ga=!1,Bi=!1,ad=!1,Xn=0,Ge=0,ya=0,Za=0,id=0,qt=0,zi=0,ar=null,Ct=null,sd=!1,Ko=0,Fg=0,Xo=1/0,Yo=null,va=null,at=0,ba=null,Vi=null,Yn=0,rd=0,od=null,Kg=null,ir=0,ld=null;function $t(){return(Ee&2)!==0&&ve!==0?ve&-ve:z.T!==null?md():cm()}function Xg(){if(qt===0)if((ve&536870912)===0||_e){var n=no;no<<=1,(no&3932160)===0&&(no=262144),qt=n}else qt=536870912;return n=zt.current,n!==null&&(n.flags|=32),qt}function Rt(n,a,r){(n===Le&&(je===2||je===9)||n.cancelPendingCommit!==null)&&(Hi(n,0),xa(n,ve,qt,!1)),As(n,r),((Ee&2)===0||n!==Le)&&(n===Le&&((Ee&2)===0&&(Za|=r),Ge===4&&xa(n,ve,qt,!1)),Tn(n))}function Yg(n,a,r){if((Ee&6)!==0)throw Error(s(327));var l=!r&&(a&127)===0&&(a&n.expiredLanes)===0||Ts(n,a),d=l?$1(n,a):ud(n,a,!0),f=l;do{if(d===0){Bi&&!l&&xa(n,a,0,!1);break}else{if(r=n.current.alternate,f&&!H1(r)){d=ud(n,a,!1),f=!1;continue}if(d===2){if(f=a,n.errorRecoveryDisabledLanes&f)var b=0;else b=n.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){a=b;e:{var w=n;d=ar;var A=w.current.memoizedState.isDehydrated;if(A&&(Hi(w,b).flags|=256),b=ud(w,b,!1),b!==2){if(ad&&!A){w.errorRecoveryDisabledLanes|=f,Za|=f,d=4;break e}f=Ct,Ct=d,f!==null&&(Ct===null?Ct=f:Ct.push.apply(Ct,f))}d=b}if(f=!1,d!==2)continue}}if(d===1){Hi(n,0),xa(n,a,0,!0);break}e:{switch(l=n,f=d,f){case 0:case 1:throw Error(s(345));case 4:if((a&4194048)!==a)break;case 6:xa(l,a,qt,!ga);break e;case 2:Ct=null;break;case 3:case 5:break;default:throw Error(s(329))}if((a&62914560)===a&&(d=Ko+300-Mt(),10<d)){if(xa(l,a,qt,!ga),io(l,0,!0)!==0)break e;
vendor: 15,414 bytes, line 48
48Yn=a,l.timeoutHandle=Ey(Qg.bind(null,l,r,Ct,Yo,sd,a,qt,Za,zi,ga,f,"Throttled",-0,0),d);break e}Qg(l,r,Ct,Yo,sd,a,qt,Za,zi,ga,f,null,-0,0)}}break}while(!0);Tn(n)}function Qg(n,a,r,l,d,f,b,w,A,L,V,q,P,B){if(n.timeoutHandle=-1,q=a.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Mn},qg(a,f,q);var J=(f&62914560)===f?Ko-Mt():(f&4194048)===f?Fg-Mt():0;if(J=AS(q,J),J!==null){Yn=f,n.cancelPendingCommit=J(iy.bind(null,n,a,f,r,l,d,b,w,A,V,q,null,P,B)),xa(n,f,b,!L);return}}iy(n,a,f,r,l,d,b,w,A)}function H1(n){for(var a=n;;){var r=a.tag;if((r===0||r===11||r===15)&&a.flags&16384&&(r=a.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var l=0;l<r.length;l++){var d=r[l],f=d.getSnapshot;d=d.value;try{if(!Ut(f(),d))return!1}catch{return!1}}if(r=a.child,a.subtreeFlags&16384&&r!==null)r.return=a,a=r;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function xa(n,a,r,l){a&=~id,a&=~Za,n.suspendedLanes|=a,n.pingedLanes&=~a,l&&(n.warmLanes|=a),l=n.expirationTimes;for(var d=a;0<d;){var f=31-Pt(d),b=1<<f;l[f]=-1,d&=~b}r!==0&&rm(n,r,a)}function Qo(){return(Ee&6)===0?(sr(0),!1):!0}function cd(){if(ge!==null){if(je===0)var n=ge.return;else n=ge,Bn=Ga=null,Au(n),Ri=null,Hs=0,n=ge;for(;n!==null;)Ng(n.alternate,n),n=n.return;ge=null}}function Hi(n,a){var r=n.timeoutHandle;r!==-1&&(n.timeoutHandle=-1,oS(r)),r=n.cancelPendingCommit,r!==null&&(n.cancelPendingCommit=null,r()),Yn=0,cd(),Le=n,ge=r=Pn(n.current,null),ve=a,je=0,Ht=null,ga=!1,Bi=Ts(n,a),ad=!1,zi=qt=id=Za=ya=Ge=0,Ct=ar=null,sd=!1,(a&8)!==0&&(a|=a&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=a;0<l;){var d=31-Pt(l),f=1<<d;a|=n[d],l&=~f}return Xn=a,yo(),r}function Wg(n,a){ue=null,z.H=Ys,a===Ci||a===Ao?(a=fp(),je=3):a===fu?(a=fp(),je=4):je=a===Hu?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Ht=a,ge===null&&(Ge=1,zo(n,Yt(a,n.current)))}function Jg(){var n=zt.current;return n===null?!0:(ve&4194048)===ve?Zt===null:(ve&62914560)===ve||(ve&536870912)!==0?n===Zt:!1}function Zg(){var n=z.H;return z.H=Ys,n===null?Ys:n}function ey(){var n=z.A;return z.A=z1,n}function Wo(){Ge=4,ga||(ve&4194048)!==ve&&zt.current!==null||(Bi=!0),(ya&134217727)===0&&(Za&134217727)===0||Le===null||xa(Le,ve,qt,!1)}function ud(n,a,r){var l=Ee;Ee|=2;var d=Zg(),f=ey();(Le!==n||ve!==a)&&(Yo=null,Hi(n,a)),a=!1;var b=Ge;e:do try{if(je!==0&&ge!==null){var w=ge,A=Ht;switch(je){case 8:cd(),b=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(a=!0);var L=je;if(je=0,Ht=null,qi(n,w,A,L),r&&Bi){b=0;break e}break;default:L=je,je=0,Ht=null,qi(n,w,A,L)}}q1(),b=Ge;break}catch(V){Wg(n,V)}while(!0);return a&&n.shellSuspendCounter++,Bn=Ga=null,Ee=l,z.H=d,z.A=f,ge===null&&(Le=null,ve=0,yo()),b}function q1(){for(;ge!==null;)ty(ge)}function $1(n,a){var r=Ee;Ee|=2;var l=Zg(),d=ey();Le!==n||ve!==a?(Yo=null,Xo=Mt()+500,Hi(n,a)):Bi=Ts(n,a);e:do try{if(je!==0&&ge!==null){a=ge;var f=Ht;t:switch(je){case 1:je=0,Ht=null,qi(n,a,f,1);break;case 2:case 9:if(dp(f)){je=0,Ht=null,ny(a);break}a=function(){je!==2&&je!==9||Le!==n||(je=7),Tn(n)},f.then(a,a);break e;case 3:je=7;break e;case 4:je=5;break e;case 7:dp(f)?(je=0,Ht=null,ny(a)):(je=0,Ht=null,qi(n,a,f,7));break;case 5:var b=null;switch(ge.tag){case 26:b=ge.memoizedState;case 5:case 27:var w=ge;if(b?Hy(b):w.stateNode.complete){je=0,Ht=null;var A=w.sibling;if(A!==null)ge=A;else{var L=w.return;L!==null?(ge=L,Jo(L)):ge=null}break t}}je=0,Ht=null,qi(n,a,f,5);break;case 6:je=0,Ht=null,qi(n,a,f,6);break;case 8:cd(),Ge=6;break e;default:throw Error(s(462))}}G1();break}catch(V){Wg(n,V)}while(!0);return Bn=Ga=null,z.H=l,z.A=d,Ee=r,ge!==null?0:(Le=null,ve=0,yo(),Ge)}function G1(){for(;ge!==null&&!fw();)ty(ge)}function ty(n){var a=Ag(n.alternate,n,Xn);n.memoizedProps=n.pendingProps,a===null?Jo(n):ge=a}function ny(n){var a=n,r=a.alternate;switch(a.tag){case 15:case 0:a=bg(r,a,a.pendingProps,a.type,void 0,ve);break;case 11:a=bg(r,a,a.pendingProps,a.type.render,a.ref,ve);break;case 5:Au(a);default:Ng(r,a),a=ge=ep(a,Xn),a=Ag(r,a,Xn)}n.memoizedProps=n.pendingProps,a===null?Jo(n):ge=a}function qi(n,a,r,l){Bn=Ga=null,Au(a),Ri=null,Hs=0;var d=a.return;try{if(O1(n,d,a,r,ve)){Ge=1,zo(n,Yt(r,n.current)),ge=null;return}}catch(f){if(d!==null)throw ge=d,f;Ge=1,zo(n,Yt(r,n.current)),ge=null;return}a.flags&32768?(_e||l===1?n=!0:Bi||(ve&536870912)!==0?n=!1:(ga=n=!0,(l===2||l===9||l===3||l===6)&&(l=zt.current,l!==null&&l.tag===13&&(l.flags|=16384))),ay(a,n)):Jo(a)}function Jo(n){var a=n;do{if((a.flags&32768)!==0){ay(a,ga);return}n=a.return;var r=L1(a.alternate,a,Xn);if(r!==null){ge=r;return}if(a=a.sibling,a!==null){ge=a;return}ge=a=n}while(a!==null);Ge===0&&(Ge=5)}function ay(n,a){do{var r=P1(n.alternate,n);if(r!==null){r.flags&=32767,ge=r;return}if(r=n.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!a&&(n=n.sibling,n!==null)){ge=n;return}ge=n=r}while(n!==null);Ge=6,ge=null}function iy(n,a,r,l,d,f,b,w,A){n.cancelPendingCommit=null;do Zo();while(at!==0);if((Ee&6)!==0)throw Error(s(327));if(a!==null){if(a===n.current)throw Error(s(177));if(f=a.lanes|a.childLanes,f|=Jc,Sw(n,r,f,b,w,A),n===Le&&(ge=Le=null,ve=0),Vi=a,ba=n,Yn=r,rd=f,od=d,Kg=l,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,X1(eo,function(){return cy(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||l){l=z.T,z.T=null,d=K.p,K.p=2,b=Ee,Ee|=4;try{U1(n,a,r)}finally{Ee=b,K.p=d,z.T=l}}at=1,sy(),ry(),oy()}}function sy(){if(at===1){at=0;var n=ba,a=Vi,r=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||r){r=z.T,z.T=null;var l=K.p;K.p=2;var d=Ee;Ee|=4;try{zg(a,n);var f=wd,b=Im(n.containerInfo),w=f.focusedElem,A=f.selectionRange;if(b!==w&&w&&w.ownerDocument&&Gm(w.ownerDocument.documentElement,w)){if(A!==null&&Kc(w)){var L=A.start,V=A.end;if(V===void 0&&(V=L),"selectionStart"in w)w.selectionStart=L,w.selectionEnd=Math.min(V,w.value.length);else{var q=w.ownerDocument||document,P=q&&q.defaultView||window;if(P.getSelection){var B=P.getSelection(),J=w.textContent.length,se=Math.min(A.start,J),De=A.end===void 0?se:Math.min(A.end,J);!B.extend&&se>De&&(b=De,De=se,se=b);var O=$m(w,se),C=$m(w,De);if(O&&C&&(B.rangeCount!==1||B.anchorNode!==O.node||B.anchorOffset!==O.offset||B.focusNode!==C.node||B.focusOffset!==C.offset)){var M=q.createRange();M.setStart(O.node,O.offset),B.removeAllRanges(),se>De?(B.addRange(M),B.extend(C.node,C.offset)):(M.setEnd(C.node,C.offset),B.addRange(M))}}}}for(q=[],B=w;B=B.parentNode;)B.nodeType===1&&q.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<q.length;w++){var H=q[w];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}dl=!!_d,wd=_d=null}finally{Ee=d,K.p=l,z.T=r}}n.current=a,at=2}}function ry(){if(at===2){at=0;var n=ba,a=Vi,r=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||r){r=z.T,z.T=null;var l=K.p;K.p=2;var d=Ee;Ee|=4;try{Mg(n,a.alternate,a)}finally{Ee=d,K.p=l,z.T=r}}at=3}}function oy(){if(at===4||at===3){at=0,mw();var n=ba,a=Vi,r=Yn,l=Kg;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?at=5:(at=0,Vi=ba=null,ly(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(va=null),kc(r),a=a.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Ss,a,void 0,(a.current.flags&128)===128)}catch{}if(l!==null){a=z.T,d=K.p,K.p=2,z.T=null;try{for(var f=n.onRecoverableError,b=0;b<l.length;b++){var w=l[b];f(w.value,{componentStack:w.stack})}}finally{z.T=a,K.p=d}}(Yn&3)!==0&&Zo(),Tn(n),d=n.pendingLanes,(r&261930)!==0&&(d&42)!==0?n===ld?ir++:(ir=0,ld=n):ir=0,sr(0)}}function ly(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,zs(a)))}function Zo(){return sy(),ry(),oy(),cy()}function cy(){if(at!==5)return!1;var n=ba,a=rd;rd=0;var r=kc(Yn),l=z.T,d=K.p;try{K.p=32>r?32:r,z.T=null,r=od,od=null;var f=ba,b=Yn;if(at=0,Vi=ba=null,Yn=0,(Ee&6)!==0)throw Error(s(331));var w=Ee;if(Ee|=4,Gg(f.current),Hg(f,f.current,b,r),Ee=w,sr(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Ss,f)}catch{}return!0}finally{K.p=d,z.T=l,ly(n,a)}}function uy(n,a,r){a=Yt(r,a),a=Vu(n.stateNode,a,2),n=ha(n,a,2),n!==null&&(As(n,2),Tn(n))}function Ce(n,a,r){if(n.tag===3)uy(n,n,r);else for(;a!==null;){if(a.tag===3){uy(a,n,r);break}else if(a.tag===1){var l=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(va===null||!va.has(l))){n=Yt(r,n),r=dg(2),l=ha(a,r,2),l!==null&&(hg(r,l,a,n),As(l,2),Tn(l));break}}a=a.return}}function dd(n,a,r){var l=n.pingCache;if(l===null){l=n.pingCache=new V1;var d=new Set;l.set(a,d)}else d=l.get(a),d===void 0&&(d=new Set,l.set(a,d));d.has(r)||(ad=!0,d.add(r),n=I1.bind(null,n,a,r),a.then(n,n))}function I1(n,a,r){var l=n.pingCache;l!==null&&l.delete(a),n.pingedLanes|=n.suspendedLanes&r,n.warmLanes&=~r,Le===n&&(ve&r)===r&&(Ge===4||Ge===3&&(ve&62914560)===ve&&300>Mt()-Ko?(Ee&2)===0&&Hi(n,0):id|=r,zi===ve&&(zi=0)),Tn(n)}function dy(n,a){a===0&&(a=sm()),n=Ha(n,a),n!==null&&(As(n,a),Tn(n))}function F1(n){var a=n.memoizedState,r=0;a!==null&&(r=a.retryLane),dy(n,r)}function K1(n,a){var r=0;switch(n.tag){case 31:case 13:var l=n.stateNode,d=n.memoizedState;d!==null&&(r=d.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(a),dy(n,r)}function X1(n,a){return Tc(n,a)}var el=null,$i=null,hd=!1,tl=!1,fd=!1,_a=0;function Tn(n){n!==$i&&n.next===null&&($i===null?el=$i=n:$i=$i.next=n),tl=!0,hd||(hd=!0,Q1())}function sr(n,a){if(!fd&&tl){fd=!0;do for(var r=!1,l=el;l!==null;){if(n!==0){var d=l.pendingLanes;if(d===0)var f=0;else{var b=l.suspendedLanes,w=l.pingedLanes;f=(1<<31-Pt(42|n)+1)-1,f&=d&~(b&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(r=!0,py(l,f))}else f=ve,f=io(l,l===Le?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Ts(l,f)||(r=!0,py(l,f));l=l.next}while(r);fd=!1}}function Y1(){hy()}function hy(){tl=hd=!1;var n=0;_a!==0&&rS()&&(n=_a);for(var a=Mt(),r=null,l=el;l!==null;){var d=l.next,f=fy(l,a);f===0?(l.next=null,r===null?el=d:r.next=d,d===null&&($i=r)):(r=l,(n!==0||(f&3)!==0)&&(tl=!0)),l=d}at!==0&&at!==5||sr(n),_a!==0&&(_a=0)}function fy(n,a){for(var r=n.suspendedLanes,l=n.pingedLanes,d=n.expirationTimes,f=n.pendingLanes&-62914561;0<f;){var b=31-Pt(f),w=1<<b,A=d[b];A===-1?((w&r)===0||(w&l)!==0)&&(d[b]=ww(w,a)):A<=a&&(n.expiredLanes|=w),f&=~w}if(a=Le,r=ve,r=io(n,n===a?r:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,r===0||n===a&&(je===2||je===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&Ac(l),n.callbackNode=null,n.callbackPriority=0;if((r&3)===0||Ts(n,r)){if(a=r&-r,a===n.callbackPriority)return a;switch(l!==null&&Ac(l),kc(r)){case 2:case 8:r=am;break;case 32:r=eo;break;case 268435456:r=im;break;default:r=eo}return l=my.bind(null,n),r=Tc(r,l),n.callbackPriority=a,n.callbackNode=r,a}return l!==null&&l!==null&&Ac(l),n.callbackPriority=2,n.callbackNode=null,2}function my(n,a){if(at!==0&&at!==5)return n.callbackNode=null,n.callbackPriority=0,null;var r=n.callbackNode;if(Zo()&&n.callbackNode!==r)return null;var l=ve;return l=io(n,n===Le?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(Yg(n,l,a),fy(n,Mt()),n.callbackNode!=null&&n.callbackNode===r?my.bind(null,n):null)}function py(n,a){if(Zo())return null;Yg(n,a,!0)}function Q1(){lS(function(){(Ee&6)!==0?Tc(nm,Y1):hy()})}function md(){if(_a===0){var n=ki;n===0&&(n=to,to<<=1,(to&261888)===0&&(to=256)),_a=n}return _a}function gy(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:lo(""+n)}function yy(n,a){var r=a.ownerDocument.createElement("input");return r.name=a.name,r.value=a.value,n.id&&r.setAttribute("form",n.id),a.parentNode.insertBefore(r,a),n=new FormData(n),r.parentNode.removeChild(r),n}function W1(n,a,r,l,d){if(a==="submit"&&r&&r.stateNode===d){var f=gy((d[At]||null).action),b=l.submitter;b&&(a=(a=b[At]||null)?gy(a.formAction):b.getAttribute("formAction"),a!==null&&(f=a,b=null));var w=new fo("action","action",null,l,d);n.push({event:w,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(_a!==0){var A=b?yy(d,b):new FormData(d);Mu(r,{pending:!0,data:A,method:d.method,action:f},null,A)}}else typeof f=="function"&&(w.preventDefault(),A=b?yy(d,b):new FormData(d),Mu(r,{pending:!0,data:A,method:d.method,action:f},f,A))},currentTarget:d}]})}}for(var pd=0;pd<Wc.length;pd++){var gd=Wc[pd],J1=gd.toLowerCase(),Z1=gd[0].toUpperCase()+gd.slice(1);ln(J1,"on"+Z1)}ln(Xm,"onAnimationEnd"),ln(Ym,"onAnimationIteration"),ln(Qm,"onAnimationStart"),ln("dblclick","onDoubleClick"),ln("focusin","onFocus"),ln("focusout","onBlur"),ln(p1,"onTransitionRun"),ln(g1,"onTransitionStart"),ln(y1,"onTransitionCancel"),ln(Wm,"onTransitionEnd"),mi("onMouseEnter",["mouseout","mouseover"]),mi("onMouseLeave",["mouseout","mouseover"]),mi("onPointerEnter",["pointerout","pointerover"]),mi("onPointerLeave",["pointerout","pointerover"]),Ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ua("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rr="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("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(rr));function vy(n,a){a=(a&4)!==0;for(var r=0;r<n.length;r++){var l=n[r],d=l.event;l=l.listeners;e:{var f=void 0;if(a)for(var b=l.length-1;0<=b;b--){var w=l[b],A=w.instance,L=w.currentTarget;if(w=w.listener,A!==f&&d.isPropagationStopped())break e;f=w,d.currentTarget=L;try{f(d)}catch(V){go(V)}d.currentTarget=null,f=A}else for(b=0;b<l.length;b++){if(w=l[b],A=w.instance,L=w.currentTarget,w=w.listener,A!==f&&d.isPropagationStopped())break e;f=w,d.currentTarget=L;try{f(d)}catch(V){go(V)}d.currentTarget=null,f=A}}}}function ye(n,a){var r=a[jc];r===void 0&&(r=a[jc]=new Set);var l=n+"__bubble";r.has(l)||(by(a,n,2,!1),r.add(l))}function yd(n,a,r){var l=0;a&&(l|=4),by(r,n,l,a)}var nl="_reactListening"+Math.random().toString(36).slice(2);function vd(n){if(!n[nl]){n[nl]=!0,hm.forEach(function(r){r!=="selectionchange"&&(eS.has(r)||yd(r,!1,n),yd(r,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[nl]||(a[nl]=!0,yd("selectionchange",!1,a))}}function by(n,a,r,l){switch(Xy(a)){case 2:var d=kS;break;case 8:d=jS;break;default:d=Dd}r=d.bind(null,a,r,n),d=void 0,!Bc||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(d=!0),l?d!==void 0?n.addEventListener(a,r,{capture:!0,passive:d}):n.addEventListener(a,r,!0):d!==void 0?n.addEventListener(a,r,{passive:d}):n.addEventListener(a,r,!1)}function bd(n,a,r,l,d){var f=l;if((a&1)===0&&(a&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var w=l.stateNode.containerInfo;
vendor: 2,624 bytes, line 48
48if(w===d)break;if(b===4)for(b=l.return;b!==null;){var A=b.tag;if((A===3||A===4)&&b.stateNode.containerInfo===d)return;b=b.return}for(;w!==null;){if(b=di(w),b===null)return;if(A=b.tag,A===5||A===6||A===26||A===27){l=f=b;continue e}w=w.parentNode}}l=l.return}Tm(function(){var L=f,V=Pc(r),q=[];e:{var P=Jm.get(n);if(P!==void 0){var B=fo,J=n;switch(n){case"keypress":if(uo(r)===0)break e;case"keydown":case"keyup":B=Kw;break;case"focusin":J="focus",B=qc;break;case"focusout":J="blur",B=qc;break;case"beforeblur":case"afterblur":B=qc;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":B=Nm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=Lw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=Qw;break;case Xm:case Ym:case Qm:B=Bw;break;case Wm:B=Jw;break;case"scroll":case"scrollend":B=Dw;break;case"wheel":B=e1;break;case"copy":case"cut":case"paste":B=Vw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=jm;break;case"toggle":case"beforetoggle":B=n1}var se=(a&4)!==0,De=!se&&(n==="scroll"||n==="scrollend"),O=se?P!==null?P+"Capture":null:P;se=[];for(var C=L,M;C!==null;){var H=C;if(M=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||M===null||O===null||(H=ks(C,O),H!=null&&se.push(or(C,H,M))),De)break;C=C.return}0<se.length&&(P=new B(P,J,null,r,V),q.push({event:P,listeners:se}))}}if((a&7)===0){e:{if(P=n==="mouseover"||n==="pointerover",B=n==="mouseout"||n==="pointerout",P&&r!==Lc&&(J=r.relatedTarget||r.fromElement)&&(di(J)||J[ui]))break e;if((B||P)&&(P=V.window===V?V:(P=V.ownerDocument)?P.defaultView||P.parentWindow:window,B?(J=r.relatedTarget||r.toElement,B=L,J=J?di(J):null,J!==null&&(De=c(J),se=J.tag,J!==De||se!==5&&se!==27&&se!==6)&&(J=null)):(B=null,J=L),B!==J)){if(se=Nm,H="onMouseLeave",O="onMouseEnter",C="mouse",(n==="pointerout"||n==="pointerover")&&(se=jm,H="onPointerLeave",O="onPointerEnter",C="pointer"),De=B==null?P:Ns(B),M=J==null?P:Ns(J),P=new se(H,C+"leave",B,r,V),P.target=De,P.relatedTarget=M,H=null,di(V)===L&&(se=new se(O,C+"enter",J,r,V),se.target=M,se.relatedTarget=De,H=se),De=H,B&&J)t:{for(se=tS,O=B,C=J,M=0,H=O;H;H=se(H))M++;H=0;for(var ie=C;ie;ie=se(ie))H++;for(;0<M-H;)O=se(O),M--;for(;0<H-M;)C=se(C),H--;for(;M--;){if(O===C||C!==null&&O===C.alternate){se=O;break t}O=se(O),C=se(C)}se=null}else se=null;B!==null&&xy(q,P,B,se,!1),J!==null&&De!==null&&xy(q,De,J,se,!0)}}
vendor: 5,189 bytes, lines 48-49
48e:{if(P=L?Ns(L):window,B=P.nodeName&&P.nodeName.toLowerCase(),B==="select"||B==="input"&&P.type==="file")var Te=Um;else if(Lm(P))if(Bm)Te=h1;else{Te=u1;var ne=c1}else B=P.nodeName,!B||B.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?L&&Mc(L.elementType)&&(Te=Um):Te=d1;if(Te&&(Te=Te(n,L))){Pm(q,Te,r,V);break e}ne&&ne(n,P,L),n==="focusout"&&L&&P.type==="number"&&L.memoizedProps.value!=null&&Dc(P,"number",P.value)}switch(ne=L?Ns(L):window,n){case"focusin":(Lm(ne)||ne.contentEditable==="true")&&(xi=ne,Xc=L,Ps=null);break;case"focusout":Ps=Xc=xi=null;break;case"mousedown":Yc=!0;break;case"contextmenu":case"mouseup":case"dragend":Yc=!1,Fm(q,r,V);break;case"selectionchange":if(m1)break;case"keydown":case"keyup":Fm(q,r,V)}var fe;if(Gc)e:{switch(n){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else bi?Dm(n,r)&&(be="onCompositionEnd"):n==="keydown"&&r.keyCode===229&&(be="onCompositionStart");be&&(Cm&&r.locale!=="ko"&&(bi||be!=="onCompositionStart"?be==="onCompositionEnd"&&bi&&(fe=Am()):(sa=V,zc="value"in sa?sa.value:sa.textContent,bi=!0)),ne=al(L,be),0<ne.length&&(be=new km(be,n,null,r,V),q.push({event:be,listeners:ne}),fe?be.data=fe:(fe=Mm(r),fe!==null&&(be.data=fe)))),(fe=i1?s1(n,r):r1(n,r))&&(be=al(L,"onBeforeInput"),0<be.length&&(ne=new km("onBeforeInput","beforeinput",null,r,V),q.push({event:ne,listeners:be}),ne.data=fe)),W1(q,n,L,r,V)}vy(q,a)})}function or(n,a,r){return{instance:n,listener:a,currentTarget:r}}function al(n,a){for(var r=a+"Capture",l=[];n!==null;){var d=n,f=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||f===null||(d=ks(n,r),d!=null&&l.unshift(or(n,d,f)),d=ks(n,a),d!=null&&l.push(or(n,d,f))),n.tag===3)return l;n=n.return}return[]}function tS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function xy(n,a,r,l,d){for(var f=a._reactName,b=[];r!==null&&r!==l;){var w=r,A=w.alternate,L=w.stateNode;if(w=w.tag,A!==null&&A===l)break;w!==5&&w!==26&&w!==27||L===null||(A=L,d?(L=ks(r,f),L!=null&&b.unshift(or(r,L,A))):d||(L=ks(r,f),L!=null&&b.push(or(r,L,A)))),r=r.return}b.length!==0&&n.push({event:a,listeners:b})}var nS=/\r\n?/g,aS=/\u0000|\uFFFD/g;function _y(n){return(typeof n=="string"?n:""+n).replace(nS,` 49`).replace(aS,"")}function wy(n,a){return a=_y(a),_y(n)===a}function Oe(n,a,r,l,d,f){switch(r){case"children":typeof l=="string"?a==="body"||a==="textarea"&&l===""||gi(n,l):(typeof l=="number"||typeof l=="bigint")&&a!=="body"&&gi(n,""+l);break;case"className":ro(n,"class",l);break;case"tabIndex":ro(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ro(n,r,l);break;case"style":wm(n,l,f);break;case"data":if(a!=="object"){ro(n,"data",l);break}case"src":case"href":if(l===""&&(a!=="a"||r!=="href")){n.removeAttribute(r);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(r);break}l=lo(""+l),n.setAttribute(r,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(r==="formAction"?(a!=="input"&&Oe(n,a,"name",d.name,d,null),Oe(n,a,"formEncType",d.formEncType,d,null),Oe(n,a,"formMethod",d.formMethod,d,null),Oe(n,a,"formTarget",d.formTarget,d,null)):(Oe(n,a,"encType",d.encType,d,null),Oe(n,a,"method",d.method,d,null),Oe(n,a,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(r);break}l=lo(""+l),n.setAttribute(r,l);break;case"onClick":l!=null&&(n.onclick=Mn);break;case"onScroll":l!=null&&ye("scroll",n);break;case"onScrollEnd":l!=null&&ye("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(r=l.__html,r!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=r}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}r=lo(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(r,""+l):n.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
49ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(r,""):n.removeAttribute(r);break;case"capture":case"download":l===!0?n.setAttribute(r,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(r,l):n.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(r,l):n.removeAttribute(r);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(r):n.setAttribute(r,l);break;case"popover":ye("beforetoggle",n),ye("toggle",n),so(n,"popover",l);break;case"xlinkActuate":Dn(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Dn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Dn(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Dn(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Dn(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Dn(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Dn(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Dn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Dn(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":so(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Rw.get(r)||r,so(n,r,l))}}function xd(n,a,r,l,d,f){switch(r){case"style":wm(n,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(r=l.__html,r!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=r}}break;case"children":typeof l=="string"?gi(n,l):(typeof l=="number"||typeof l=="bigint")&&gi(n,""+l);break;case"onScroll":l!=null&&ye("scroll",n);break;case"onScrollEnd":l!=null&&ye("scrollend",n);break;case"onClick":l!=null&&(n.onclick=Mn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fm.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),a=r.slice(2,d?r.length-7:void 0),f=n[At]||null,f=f!=null?f[r]:null,typeof f=="function"&&n.removeEventListener(a,f,d),typeof l=="function")){typeof f!="function"&&f!==null&&(r in n?n[r]=null:n.hasAttribute(r)&&n.removeAttribute(r)),n.addEventListener(a,l,d);break e}r in n?n[r]=l:l===!0?n.setAttribute(r,""):so(n,r,l)}}}function ft(n,a,r){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",n),ye("load",n);var l=!1,d=!1,f;for(f in r)if(r.hasOwnProperty(f)){var b=r[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Oe(n,a,f,b,r,null)}}d&&Oe(n,a,"srcSet",r.srcSet,r,null),l&&Oe(n,a,"src",r.src,r,null);return;case"input":ye("invalid",n);var w=f=b=d=null,A=null,L=null;for(l in r)if(r.hasOwnProperty(l)){var V=r[l];if(V!=null)switch(l){case"name":d=V;break;case"type":b=V;break;case"checked":A=V;break;case"defaultChecked":L=V;break;case"value":f=V;break;case"defaultValue":w=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,a));break;default:Oe(n,a,l,V,r,null)}}vm(n,f,w,A,L,b,d,!1);return;case"select":ye("invalid",n),l=b=f=null;for(d in r)if(r.hasOwnProperty(d)&&(w=r[d],w!=null))switch(d){case"value":f=w;break;case"defaultValue":b=w;break;case"multiple":l=w;default:Oe(n,a,d,w,r,null)}a=f,r=b,n.multiple=!!l,a!=null?pi(n,!!l,a,!1):r!=null&&pi(n,!!l,r,!0);return;case"textarea":ye("invalid",n),f=d=l=null;for(b in r)if(r.hasOwnProperty(b)&&(w=r[b],w!=null))switch(b){case"value":l=w;break;case"defaultValue":d=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(s(91));break;default:Oe(n,a,b,w,r,null)}xm(n,l,d,f);return;case"option":for(A in r)if(r.hasOwnProperty(A)&&(l=r[A],l!=null))switch(A){case"selected":n.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Oe(n,a,A,l,r,null)}return;
vendor: 4,312 bytes, line 49
49case"dialog":ye("beforetoggle",n),ye("toggle",n),ye("cancel",n),ye("close",n);break;case"iframe":case"object":ye("load",n);break;case"video":case"audio":for(l=0;l<rr.length;l++)ye(rr[l],n);break;case"image":ye("error",n),ye("load",n);break;case"details":ye("toggle",n);break;case"embed":case"source":case"link":ye("error",n),ye("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in r)if(r.hasOwnProperty(L)&&(l=r[L],l!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Oe(n,a,L,l,r,null)}return;default:if(Mc(a)){for(V in r)r.hasOwnProperty(V)&&(l=r[V],l!==void 0&&xd(n,a,V,l,r,void 0));return}}for(w in r)r.hasOwnProperty(w)&&(l=r[w],l!=null&&Oe(n,a,w,l,r,null))}function iS(n,a,r,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,f=null,b=null,w=null,A=null,L=null,V=null;for(B in r){var q=r[B];if(r.hasOwnProperty(B)&&q!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":A=q;default:l.hasOwnProperty(B)||Oe(n,a,B,null,l,q)}}for(var P in l){var B=l[P];if(q=r[P],l.hasOwnProperty(P)&&(B!=null||q!=null))switch(P){case"type":f=B;break;case"name":d=B;break;case"checked":L=B;break;case"defaultChecked":V=B;break;case"value":b=B;break;case"defaultValue":w=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,a));break;default:B!==q&&Oe(n,a,P,B,l,q)}}Oc(n,b,w,A,L,V,f,d);return;case"select":B=b=w=P=null;for(f in r)if(A=r[f],r.hasOwnProperty(f)&&A!=null)switch(f){case"value":break;case"multiple":B=A;default:l.hasOwnProperty(f)||Oe(n,a,f,null,l,A)}for(d in l)if(f=l[d],A=r[d],l.hasOwnProperty(d)&&(f!=null||A!=null))switch(d){case"value":P=f;break;case"defaultValue":w=f;break;case"multiple":b=f;default:f!==A&&Oe(n,a,d,f,l,A)}a=w,r=b,l=B,P!=null?pi(n,!!r,P,!1):!!l!=!!r&&(a!=null?pi(n,!!r,a,!0):pi(n,!!r,r?[]:"",!1));return;case"textarea":B=P=null;for(w in r)if(d=r[w],r.hasOwnProperty(w)&&d!=null&&!l.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Oe(n,a,w,null,l,d)}for(b in l)if(d=l[b],f=r[b],l.hasOwnProperty(b)&&(d!=null||f!=null))switch(b){case"value":P=d;break;case"defaultValue":B=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(s(91));break;default:d!==f&&Oe(n,a,b,d,l,f)}bm(n,P,B);return;case"option":for(var J in r)if(P=r[J],r.hasOwnProperty(J)&&P!=null&&!l.hasOwnProperty(J))switch(J){case"selected":n.selected=!1;break;default:Oe(n,a,J,null,l,P)}for(A in l)if(P=l[A],B=r[A],l.hasOwnProperty(A)&&P!==B&&(P!=null||B!=null))switch(A){case"selected":n.selected=P&&typeof P!="function"&&typeof P!="symbol";break;default:Oe(n,a,A,P,l,B)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var se in r)P=r[se],r.hasOwnProperty(se)&&P!=null&&!l.hasOwnProperty(se)&&Oe(n,a,se,null,l,P);for(L in l)if(P=l[L],B=r[L],l.hasOwnProperty(L)&&P!==B&&(P!=null||B!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(s(137,a));break;default:Oe(n,a,L,P,l,B)}return;default:if(Mc(a)){for(var De in r)P=r[De],r.hasOwnProperty(De)&&P!==void 0&&!l.hasOwnProperty(De)&&xd(n,a,De,void 0,l,P);for(V in l)P=l[V],B=r[V],!l.hasOwnProperty(V)||P===B||P===void 0&&B===void 0||xd(n,a,V,P,l,B);return}}for(var O in r)P=r[O],r.hasOwnProperty(O)&&P!=null&&!l.hasOwnProperty(O)&&Oe(n,a,O,null,l,P);for(q in l)P=l[q],B=r[q],!l.hasOwnProperty(q)||P===B||P==null&&B==null||Oe(n,a,q,P,l,B)}function Sy(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,r=performance.getEntriesByType("resource"),l=0;l<r.length;l++){var d=r[l],f=d.transferSize,b=d.initiatorType,w=d.duration;if(f&&w&&Sy(b)){for(b=0,w=d.responseEnd,l+=1;l<r.length;l++){var A=r[l],L=A.startTime;if(L>w)break;var V=A.transferSize,q=A.initiatorType;V&&Sy(q)&&(A=A.responseEnd,b+=V*(A<w?1:(w-L)/(A-L)))}if(--l,a+=8*(f+b)/(d.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?
vendor: 15,048 bytes, line 49
49n:5}var _d=null,wd=null;function il(n){return n.nodeType===9?n:n.ownerDocument}function Ty(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ay(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function Sd(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Td=null;function rS(){var n=window.event;return n&&n.type==="popstate"?n===Td?!1:(Td=n,!0):(Td=null,!1)}var Ey=typeof setTimeout=="function"?setTimeout:void 0,oS=typeof clearTimeout=="function"?clearTimeout:void 0,Ny=typeof Promise=="function"?Promise:void 0,lS=typeof queueMicrotask=="function"?queueMicrotask:typeof Ny<"u"?function(n){return Ny.resolve(null).then(n).catch(cS)}:Ey;function cS(n){setTimeout(function(){throw n})}function wa(n){return n==="head"}function ky(n,a){var r=a,l=0;do{var d=r.nextSibling;if(n.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(l===0){n.removeChild(d),Ki(a);return}l--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")l++;else if(r==="html")lr(n.ownerDocument.documentElement);else if(r==="head"){r=n.ownerDocument.head,lr(r);for(var f=r.firstChild;f;){var b=f.nextSibling,w=f.nodeName;f[Es]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||r.removeChild(f),f=b}}else r==="body"&&lr(n.ownerDocument.body);r=d}while(r);Ki(a)}function jy(n,a){var r=n;n=0;do{var l=r.nextSibling;if(r.nodeType===1?a?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(a?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(n===0)break;n--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||n++;r=l}while(r)}function Ad(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var r=a;switch(a=a.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Ad(r),Cc(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}n.removeChild(r)}}function uS(n,a,r,l){for(;n.nodeType===1;){var d=r;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[Es])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(f=n.getAttribute("rel"),f==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(f!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(f=n.getAttribute("src"),(f!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&f&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var f=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===f)return n}else return n;if(n=en(n.nextSibling),n===null)break}return null}function dS(n,a,r){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=en(n.nextSibling),n===null))return null;return n}function Cy(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=en(n.nextSibling),n===null))return null;return n}function Ed(n){return n.data==="$?"||n.data==="$~"}function Nd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function hS(n,a){var r=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||r.readyState!=="loading")a();else{var l=function(){a(),r.removeEventListener("DOMContentLoaded",l)};r.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function en(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var kd=null;function Ry(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var r=n.data;if(r==="/$"||r==="/&"){if(a===0)return en(n.nextSibling);a--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||a++}n=n.nextSibling}return null}function Oy(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var r=n.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(a===0)return n;a--}else r!=="/$"&&r!=="/&"||a++}n=n.previousSibling}return null}function Dy(n,a,r){switch(a=il(r),n){case"html":if(n=a.documentElement,!n)throw Error(s(452));return n;case"head":if(n=a.head,!n)throw Error(s(453));return n;case"body":if(n=a.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function lr(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);Cc(n)}var tn=new Map,My=new Set;function sl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Qn=K.d;K.d={f:fS,r:mS,D:pS,C:gS,L:yS,m:vS,X:xS,S:bS,M:_S};function fS(){var n=Qn.f(),a=Qo();return n||a}function mS(n){var a=hi(n);a!==null&&a.tag===5&&a.type==="form"?Wp(a):Qn.r(n)}var Gi=typeof document>"u"?null:document;function Ly(n,a,r){var l=Gi;if(l&&typeof a=="string"&&a){var d=Kt(a);d='link[rel="'+n+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),My.has(d)||(My.add(d),n={rel:n,crossOrigin:r,href:a},l.querySelector(d)===null&&(a=l.createElement("link"),ft(a,"link",n),st(a),l.head.appendChild(a)))}}function pS(n){Qn.D(n),Ly("dns-prefetch",n,null)}function gS(n,a){Qn.C(n,a),Ly("preconnect",n,a)}function yS(n,a,r){Qn.L(n,a,r);var l=Gi;if(l&&n&&a){var d='link[rel="preload"][as="'+Kt(a)+'"]';a==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+Kt(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+Kt(r.imageSizes)+'"]')):d+='[href="'+Kt(n)+'"]';var f=d;switch(a){case"style":f=Ii(n);break;case"script":f=Fi(n)}tn.has(f)||(n=v({rel:"preload",href:a==="image"&&r&&r.imageSrcSet?void 0:n,as:a},r),tn.set(f,n),l.querySelector(d)!==null||a==="style"&&l.querySelector(cr(f))||a==="script"&&l.querySelector(ur(f))||(a=l.createElement("link"),ft(a,"link",n),st(a),l.head.appendChild(a)))}}function vS(n,a){Qn.m(n,a);var r=Gi;if(r&&n){var l=a&&typeof a.as=="string"?a.as:"script",d='link[rel="modulepreload"][as="'+Kt(l)+'"][href="'+Kt(n)+'"]',f=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Fi(n)}if(!tn.has(f)&&(n=v({rel:"modulepreload",href:n},a),tn.set(f,n),r.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(ur(f)))return}l=r.createElement("link"),ft(l,"link",n),st(l),r.head.appendChild(l)}}}function bS(n,a,r){Qn.S(n,a,r);var l=Gi;if(l&&n){var d=fi(l).hoistableStyles,f=Ii(n);a=a||"default";var b=d.get(f);if(!b){var w={loading:0,preload:null};if(b=l.querySelector(cr(f)))w.loading=5;else{n=v({rel:"stylesheet",href:n,"data-precedence":a},r),(r=tn.get(f))&&jd(n,r);var A=b=l.createElement("link");st(A),ft(A,"link",n),A._p=new Promise(function(L,V){A.onload=L,A.onerror=V}),A.addEventListener("load",function(){w.loading|=1}),A.addEventListener("error",function(){w.loading|=2}),w.loading|=4,rl(b,a,l)}b={type:"stylesheet",instance:b,count:1,state:w},d.set(f,b)}}}function xS(n,a){Qn.X(n,a);var r=Gi;if(r&&n){var l=fi(r).hoistableScripts,d=Fi(n),f=l.get(d);f||(f=r.querySelector(ur(d)),f||(n=v({src:n,async:!0},a),(a=tn.get(d))&&Cd(n,a),f=r.createElement("script"),st(f),ft(f,"link",n),r.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(d,f))}}function _S(n,a){Qn.M(n,a);var r=Gi;if(r&&n){var l=fi(r).hoistableScripts,d=Fi(n),f=l.get(d);f||(f=r.querySelector(ur(d)),f||(n=v({src:n,async:!0,type:"module"},a),(a=tn.get(d))&&Cd(n,a),f=r.createElement("script"),st(f),ft(f,"link",n),r.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(d,f))}}function Py(n,a,r,l){var d=(d=pe.current)?sl(d):null;if(!d)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(a=Ii(r.href),r=fi(d).hoistableStyles,l=r.get(a),l||(l={type:"style",instance:null,count:0,state:null},r.set(a,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){n=Ii(r.href);var f=fi(d).hoistableStyles,b=f.get(n);if(b||(d=d.ownerDocument||d,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(n,b),(f=d.querySelector(cr(n)))&&!f._p&&(b.instance=f,b.state.loading=5),tn.has(n)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},tn.set(n,r),f||wS(d,n,r,b.state))),a&&l===null)throw Error(s(528,""));return b}if(a&&l!==null)throw Error(s(529,""));return null;case"script":return a=r.async,r=r.src,typeof r=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Fi(r),r=fi(d).hoistableScripts,l=r.get(a),l||(l={type:"script",instance:null,count:0,state:null},r.set(a,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function Ii(n){return'href="'+Kt(n)+'"'}function cr(n){return'link[rel="stylesheet"]['+n+"]"}function Uy(n){return v({},n,{"data-precedence":n.precedence,precedence:null})}function wS(n,a,r,l){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?l.loading=1:(a=n.createElement("link"),l.preload=a,a.addEventListener("load",function(){return l.loading|=1}),a.addEventListener("error",function(){return l.loading|=2}),ft(a,"link",r),st(a),n.head.appendChild(a))}function Fi(n){return'[src="'+Kt(n)+'"]'}function ur(n){return"script[async]"+n}function By(n,a,r){if(a.count++,a.instance===null)switch(a.type){case"style":var l=n.querySelector('style[data-href~="'+Kt(r.href)+'"]');if(l)return a.instance=l,st(l),l;var d=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),st(l),ft(l,"style",d),rl(l,r.precedence,n),a.instance=l;case"stylesheet":d=Ii(r.href);var f=n.querySelector(cr(d));if(f)return a.state.loading|=4,a.instance=f,st(f),f;l=Uy(r),(d=tn.get(d))&&jd(l,d),f=(n.ownerDocument||n).createElement("link"),st(f);var b=f;return b._p=new Promise(function(w,A){b.onload=w,b.onerror=A}),ft(f,"link",l),a.state.loading|=4,rl(f,r.precedence,n),a.instance=f;case"script":return f=Fi(r.src),(d=n.querySelector(ur(f)))?(a.instance=d,st(d),d):(l=r,(d=tn.get(f))&&(l=v({},r),Cd(l,d)),n=n.ownerDocument||n,d=n.createElement("script"),st(d),ft(d,"link",l),n.head.appendChild(d),a.instance=d);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(l=a.instance,a.state.loading|=4,rl(l,r.precedence,n));return a.instance}function rl(n,a,r){for(var l=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,f=d,b=0;b<l.length;b++){var w=l[b];if(w.dataset.precedence===a)f=w;else if(f!==d)break}f?f.parentNode.insertBefore(n,f.nextSibling):(a=r.nodeType===9?r.head:r,a.insertBefore(n,a.firstChild))}function jd(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Cd(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var ol=null;function zy(n,a,r){if(ol===null){var l=new Map,d=ol=new Map;d.set(r,l)}else d=ol,l=d.get(r),l||(l=new Map,d.set(r,l));if(l.has(n))return l;for(l.set(n,null),r=r.getElementsByTagName(n),d=0;d<r.length;d++){var f=r[d];if(!(f[Es]||f[ct]||n==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(a)||"";b=n+b;var w=l.get(b);w?w.push(f):l.set(b,[f])}}return l}function Vy(n,a,r){n=n.ownerDocument||n,n.head.insertBefore(r,a==="title"?n.querySelector("head > title"):null)}function SS(n,a,r){if(r===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return n=a.disabled,typeof a.precedence=="string"&&n==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Hy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function TS(n,a,r,l){if(r.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=Ii(l.href),f=a.querySelector(cr(d));if(f){a=f._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=ll.bind(n),a.then(n,n)),r.state.loading|=4,r.instance=f,st(f);return}f=a.ownerDocument||a,l=Uy(l),(d=tn.get(d))&&jd(l,d),f=f.createElement("link"),st(f);var b=f;b._p=new Promise(function(w,A){b.onload=w,b.onerror=A}),ft(f,"link",l),r.instance=f}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(r,a),(a=r.state.preload)&&(r.state.loading&3)===0&&(n.count++,r=ll.bind(n),a.addEventListener("load",r),a.addEventListener("error",r))}}var Rd=0;function AS(n,a){return n.stylesheets&&n.count===0&&ul(n,n.stylesheets),0<n.count||0<n.imgCount?function(r){var l=setTimeout(function(){if(n.stylesheets&&ul(n,n.stylesheets),n.unsuspend){var f=n.unsuspend;n.unsuspend=null,f()}},6e4+a);0<n.imgBytes&&Rd===0&&(Rd=62500*sS());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&ul(n,n.stylesheets),n.unsuspend)){var f=n.unsuspend;n.unsuspend=null,f()}},(n.imgBytes>Rd?50:800)+a);return n.unsuspend=r,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function ll(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ul(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var cl=null;function ul(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,cl=new Map,a.forEach(ES,n),cl=null,ll.call(n))}function ES(n,a){if(!(a.state.loading&4)){var r=cl.get(n);if(r)var l=r.get(null);else{r=new Map,cl.set(n,r);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<d.length;f++){var b=d[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(r.set(b.dataset.precedence,b),l=b)}
vendor: 5,562 bytes, line 49
49l&&r.set(null,l)}d=a.instance,b=d.getAttribute("data-precedence"),f=r.get(b)||l,f===l&&r.set(null,d),r.set(b,d),this.count++,l=ll.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),f?f.parentNode.insertBefore(d,f.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),a.state.loading|=4}}var dr={$$typeof:j,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function NS(n,a,r,l,d,f,b,w,A){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ec(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ec(0),this.hiddenUpdates=Ec(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function qy(n,a,r,l,d,f,b,w,A,L,V,q){return n=new NS(n,a,r,b,A,L,V,q,w),a=1,f===!0&&(a|=24),f=Bt(3,null,null,a),n.current=f,f.stateNode=n,a=uu(),a.refCount++,n.pooledCache=a,a.refCount++,f.memoizedState={element:l,isDehydrated:r,cache:a},mu(f),n}function $y(n){return n?(n=Si,n):Si}function Gy(n,a,r,l,d,f){d=$y(d),l.context===null?l.context=d:l.pendingContext=d,l=da(a),l.payload={element:r},f=f===void 0?null:f,f!==null&&(l.callback=f),r=ha(n,l,a),r!==null&&(Rt(r,n,a),$s(r,n,a))}function Iy(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var r=n.retryLane;n.retryLane=r!==0&&r<a?r:a}}function Od(n,a){Iy(n,a),(n=n.alternate)&&Iy(n,a)}function Fy(n){if(n.tag===13||n.tag===31){var a=Ha(n,67108864);a!==null&&Rt(a,n,67108864),Od(n,67108864)}}function Ky(n){if(n.tag===13||n.tag===31){var a=$t();a=Nc(a);var r=Ha(n,a);r!==null&&Rt(r,n,a),Od(n,a)}}var dl=!0;function kS(n,a,r,l){var d=z.T;z.T=null;var f=K.p;try{K.p=2,Dd(n,a,r,l)}finally{K.p=f,z.T=d}}function jS(n,a,r,l){var d=z.T;z.T=null;var f=K.p;try{K.p=8,Dd(n,a,r,l)}finally{K.p=f,z.T=d}}function Dd(n,a,r,l){if(dl){var d=Md(l);if(d===null)bd(n,a,l,hl,r),Yy(n,l);else if(RS(d,n,a,r,l))l.stopPropagation();else if(Yy(n,l),a&4&&-1<CS.indexOf(n)){for(;d!==null;){var f=hi(d);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=Pa(f.pendingLanes);if(b!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;b;){var A=1<<31-Pt(b);w.entanglements[1]|=A,b&=~A}Tn(f),(Ee&6)===0&&(Xo=Mt()+500,sr(0))}}break;case 31:case 13:w=Ha(f,2),w!==null&&Rt(w,f,2),Qo(),Od(f,2)}if(f=Md(l),f===null&&bd(n,a,l,hl,r),f===d)break;d=f}d!==null&&l.stopPropagation()}else bd(n,a,l,null,r)}}function Md(n){return n=Pc(n),Ld(n)}var hl=null;function Ld(n){if(hl=null,n=di(n),n!==null){var a=c(n);if(a===null)n=null;else{var r=a.tag;if(r===13){if(n=u(a),n!==null)return n;n=null}else if(r===31){if(n=h(a),n!==null)return n;n=null}else if(r===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return hl=n,null}function Xy(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(pw()){case nm:return 2;case am:return 8;case eo:case gw:return 32;case im:return 268435456;default:return 32}default:return 32}}var Pd=!1,Sa=null,Ta=null,Aa=null,hr=new Map,fr=new Map,Ea=[],CS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Yy(n,a){switch(n){case"focusin":case"focusout":Sa=null;break;case"dragenter":case"dragleave":Ta=null;break;case"mouseover":case"mouseout":Aa=null;break;case"pointerover":case"pointerout":hr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":fr.delete(a.pointerId)}}function mr(n,a,r,l,d,f){return n===null||n.nativeEvent!==f?(n={blockedOn:a,domEventName:r,eventSystemFlags:l,nativeEvent:f,targetContainers:[d]},a!==null&&(a=hi(a),a!==null&&Fy(a)),n):(n.eventSystemFlags|=l,a=n.targetContainers,d!==null&&a.indexOf(d)===-1&&a.push(d),n)}function RS(n,a,r,l,d){switch(a){case"focusin":return Sa=mr(Sa,n,a,r,l,d),!0;case"dragenter":return Ta=mr(Ta,n,a,r,l,d),!0;case"mouseover":return Aa=mr(Aa,n,a,r,l,d),!0;case"pointerover":var f=d.pointerId;
vendor: 6,094 bytes, lines 49-58
49return hr.set(f,mr(hr.get(f)||null,n,a,r,l,d)),!0;case"gotpointercapture":return f=d.pointerId,fr.set(f,mr(fr.get(f)||null,n,a,r,l,d)),!0}return!1}function Qy(n){var a=di(n.target);if(a!==null){var r=c(a);if(r!==null){if(a=r.tag,a===13){if(a=u(r),a!==null){n.blockedOn=a,um(n.priority,function(){Ky(r)});return}}else if(a===31){if(a=h(r),a!==null){n.blockedOn=a,um(n.priority,function(){Ky(r)});return}}else if(a===3&&r.stateNode.current.memoizedState.isDehydrated){n.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}n.blockedOn=null}function fl(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var r=Md(n.nativeEvent);if(r===null){r=n.nativeEvent;var l=new r.constructor(r.type,r);Lc=l,r.target.dispatchEvent(l),Lc=null}else return a=hi(r),a!==null&&Fy(a),n.blockedOn=r,!1;a.shift()}return!0}function Wy(n,a,r){fl(n)&&r.delete(a)}function OS(){Pd=!1,Sa!==null&&fl(Sa)&&(Sa=null),Ta!==null&&fl(Ta)&&(Ta=null),Aa!==null&&fl(Aa)&&(Aa=null),hr.forEach(Wy),fr.forEach(Wy)}function ml(n,a){n.blockedOn===a&&(n.blockedOn=null,Pd||(Pd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,OS)))}var pl=null;function Jy(n){pl!==n&&(pl=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){pl===n&&(pl=null);for(var a=0;a<n.length;a+=3){var r=n[a],l=n[a+1],d=n[a+2];if(typeof l!="function"){if(Ld(l||r)===null)continue;break}var f=hi(r);f!==null&&(n.splice(a,3),a-=3,Mu(f,{pending:!0,data:d,method:r.method,action:l},l,d))}}))}function Ki(n){function a(A){return ml(A,n)}Sa!==null&&ml(Sa,n),Ta!==null&&ml(Ta,n),Aa!==null&&ml(Aa,n),hr.forEach(a),fr.forEach(a);for(var r=0;r<Ea.length;r++){var l=Ea[r];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Ea.length&&(r=Ea[0],r.blockedOn===null);)Qy(r),r.blockedOn===null&&Ea.shift();if(r=(n.ownerDocument||n).$$reactFormReplay,r!=null)for(l=0;l<r.length;l+=3){var d=r[l],f=r[l+1],b=d[At]||null;if(typeof f=="function")b||Jy(r);else if(b){var w=null;if(f&&f.hasAttribute("formAction")){if(d=f,b=f[At]||null)w=b.formAction;else if(Ld(d)!==null)continue}else w=b.action;typeof w=="function"?r[l+1]=w:(r.splice(l,3),l-=3),Jy(r)}}}function Zy(){function n(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return d=b})},focusReset:"manual",scroll:"manual"})}function a(){d!==null&&(d(),d=null),l||setTimeout(r,20)}function r(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(r,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),d!==null&&(d(),d=null)}}}function Ud(n){this._internalRoot=n}gl.prototype.render=Ud.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(s(409));var r=a.current,l=$t();Gy(r,l,n,a,null,null)},gl.prototype.unmount=Ud.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;Gy(n.current,2,null,n,null,null),Qo(),a[ui]=null}};function gl(n){this._internalRoot=n}gl.prototype.unstable_scheduleHydration=function(n){if(n){var a=cm();n={blockedOn:null,target:n,priority:a};for(var r=0;r<Ea.length&&a!==0&&a<Ea[r].priority;r++);Ea.splice(r,0,n),r===0&&Qy(n)}};var e0=e.version;if(e0!=="19.2.6")throw Error(s(527,e0,"19.2.6"));K.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=p(a),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var DS={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yl.isDisabled&&yl.supportsFiber)try{Ss=yl.inject(DS),Lt=yl}catch{}}return gr.createRoot=function(n,a){if(!o(n))throw Error(s(299));var r=!1,l="",d=og,f=lg,b=cg;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError)),a=qy(n,1,!1,null,null,r,l,null,d,f,b,Zy),n[ui]=a.current,vd(n),new Ud(a)},gr.hydrateRoot=function(n,a,r){if(!o(n))throw Error(s(299));var l=!1,d="",f=og,b=lg,w=cg,A=null;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(w=r.onRecoverableError),r.formState!==void 0&&(A=r.formState)),a=qy(n,1,!0,a,r??null,l,d,A,f,b,w,Zy),a.context=$y(null),r=a.current,l=$t(),l=Nc(l),d=da(l),d.callback=null,ha(r,d,l),r=l,a.current.lanes=r,As(a,r),Tn(a),n[ui]=a.current,vd(n),new gl(a)},gr.version="19.2.6",gr}var u0;function $S(){if(u0)return Vd.exports;u0=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Vd.exports=qS(),Vd.exports}var GS=$S();/** 50 * react-router v7.15.1 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */var d0="popstate";function h0(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function IS(t={}){function e(s,o){var p;let c=(p=o.state)==null?void 0:p.masked,{pathname:u,search:h,hash:m}=c||s.location;return gh("",{pathname:u,search:h,hash:m},o.state&&o.state.usr||null,o.state&&o.state.key||"default",c?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}
58function i(s,o){return typeof o=="string"?o:Or(o)}return KS(e,i,null,t)}function qe(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Rn(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function FS(){return Math.random().toString(36).substring(2,10)}function f0(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function gh(t,e,i=null,s,o){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?gs(e):e,state:i,key:e&&e.key||s||FS(),mask:o}}function Or({pathname:t="/",search:e="",hash:i=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function gs(t){let e={};if(t){let i=t.indexOf("#");i>=0&&(e.hash=t.substring(i),t=t.substring(0,i));let s=t.indexOf("?");s>=0&&(e.search=t.substring(s),t=t.substring(0,s)),t&&(e.pathname=t)}return e}function KS(t,e,i,s={}){let{window:o=document.defaultView,v5Compat:c=!1}=s,u=o.history,h="POP",m=null,p=y();p==null&&(p=0,u.replaceState({...u.state,idx:p},""));function y(){return(u.state||{idx:null}).idx}function v(){h="POP";let k=y(),E=k==null?null:k-p;p=k,m&&m({action:h,location:T.location,delta:E})}function x(k,E){h="PUSH";let D=h0(k)?k:gh(T.location,k,E);p=y()+1;let j=f0(D,p),U=T.createHref(D.mask||D);try{u.pushState(j,"",U)}catch(G){if(G instanceof DOMException&&G.name==="DataCloneError")throw G;o.location.assign(U)}c&&m&&m({action:h,location:T.location,delta:1})}function _(k,E){h="REPLACE";let D=h0(k)?k:gh(T.location,k,E);p=y();let j=f0(D,p),U=T.createHref(D.mask||D);u.replaceState(j,"",U),c&&m&&m({action:h,location:T.location,delta:0})}function S(k){return XS(k)}let T={get action(){return h},get location(){return t(o,u)},listen(k){if(m)throw new Error("A history only accepts one active listener");return o.addEventListener(d0,v),m=k,()=>{o.removeEventListener(d0,v),m=null}},createHref(k){return e(o,k)},createURL:S,encodeLocation(k){let E=S(k);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:_,go(k){return u.go(k)}};return T}function XS(t,e=!1){let i="http://localhost";
58typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),qe(i,"No window.location.(origin|href) available to create URL");let s=typeof t=="string"?t:Or(t);return s=s.replace(/ $/,"%20"),!e&&s.startsWith("//")&&(s=i+s),new URL(s,i)}function Sb(t,e,i="/"){return YS(t,e,i,!1)}function YS(t,e,i,s,o){let c=typeof e=="string"?gs(e):e,u=ta(c.pathname||"/",i);if(u==null)return null;let h=QS(t),m=null,p=l2(u);for(let y=0;m==null&&y<h.length;++y)m=r2(h[y],p,s);return m}function QS(t){let e=Tb(t);return WS(e),e}function Tb(t,e=[],i=[],s="",o=!1){let c=(u,h,m=o,p)=>{let y={relativePath:p===void 0?u.path||"":p,caseSensitive:u.caseSensitive===!0,childrenIndex:h,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(s)&&m)return;qe(y.relativePath.startsWith(s),`Absolute route path "${y.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(s.length)}let v=yn([s,y.relativePath]),x=i.concat(y);u.children&&u.children.length>0&&(qe(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Tb(u.children,e,x,v,m)),!(u.path==null&&!u.index)&&e.push({path:v,score:i2(v,u.index),routesMeta:x})};return t.forEach((u,h)=>{var m;if(u.path===""||!((m=u.path)!=null&&m.includes("?")))c(u,h);else for(let p of Ab(u.path))c(u,h,!0,p)}),e}function Ab(t){let e=t.split("/");if(e.length===0)return[];let[i,...s]=e,o=i.endsWith("?"),c=i.replace(/\?$/,"");if(s.length===0)return o?[c,""]:[c];let u=Ab(s.join("/")),h=[];return h.push(...u.map(m=>m===""?c:[c,m].join("/"))),o&&h.push(...u),h.map(m=>t.startsWith("/")&&m===""?"/":m)}function WS(t){t.sort((e,i)=>e.score!==i.score?i.score-e.score:s2(e.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var JS=/^:[\w-]+$/,ZS=3,e2=2,t2=1,n2=10,a2=-2,m0=t=>t==="*";function i2(t,e){let i=t.split("/"),s=i.length;return i.some(m0)&&(s+=a2),e&&(s+=e2),i.filter(o=>!m0(o)).reduce((o,c)=>o+(JS.test(c)?ZS:c===""?t2:n2),s)}function s2(t,e){return t.length===e.length&&t.slice(0,-1).every((s,o)=>s===e[o])?t[t.length-1]-e[e.length-1]:0}function r2(t,e,i=!1){let{routesMeta:s}=t,o={},c="/",u=[];for(let h=0;h<s.length;++h){let m=s[h],p=h===s.length-1,y=c==="/"?e:e.slice(c.length)||"/",v=$l({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},y),x=m.route;if(!v&&p&&i&&!s[s.length-1].route.index&&(v=$l({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},y)),!v)return null;
58Object.assign(o,v.params),u.push({params:o,pathname:yn([c,v.pathname]),pathnameBase:h2(yn([c,v.pathnameBase])),route:x}),v.pathnameBase!=="/"&&(c=yn([c,v.pathnameBase]))}return u}function $l(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[i,s]=o2(t.path,t.caseSensitive,t.end),o=e.match(i);if(!o)return null;let c=o[0],u=c.replace(/(.)\/+$/,"$1"),h=o.slice(1);return{params:s.reduce((p,{paramName:y,isOptional:v},x)=>{if(y==="*"){let S=h[x]||"";u=c.slice(0,c.length-S.length).replace(/(.)\/+$/,"$1")}const _=h[x];return v&&!_?p[y]=void 0:p[y]=(_||"").replace(/%2F/g,"/"),p},{}),pathname:c,pathnameBase:u,pattern:t}}function o2(t,e=!1,i=!0){Rn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let s=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,h,m,p,y)=>{if(s.push({paramName:h,isOptional:m!=null}),m){let v=y.charAt(p+u.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(s.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),s]}function l2(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Rn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function ta(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let i=e.endsWith("/")?e.length-1:e.length,s=t.charAt(i);return s&&s!=="/"?null:t.slice(i)||"/"}var c2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function u2(t,e="/"){let{pathname:i,search:s="",hash:o=""}=typeof t=="string"?gs(t):t,c;return i?(i=Nb(i),i.startsWith("/")?c=p0(i.substring(1),"/"):c=p0(i,e)):c=e,{pathname:c,search:f2(s),hash:m2(o)}}function p0(t,e){let i=Gl(e).split("/");return t.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function Gd(t,e,i,s){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function d2(t){return t.filter((e,i)=>i===0||e.route.path&&e.route.path.length>0)}function Eb(t){let e=d2(t);return e.map((i,s)=>s===e.length-1?i.pathname:i.pathnameBase)}function lf(t,e,i,s=!1){let o;typeof t=="string"?o=gs(t):(o={...t},qe(!o.pathname||!o.pathname.includes("?"),Gd("?","pathname","search",o)),qe(!o.pathname||!o.pathname.includes("#"),Gd("#","pathname","hash",o)),qe(!o.search||!o.search.includes("#"),Gd("#","search","hash",o)));let c=t===""||o.pathname==="",u=c?"/":o.pathname,h;if(u==null)h=i;else{let v=e.length-1;if(!s&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),v-=1;o.pathname=x.join("/")}h=v>=0?e[v]:"/"}let m=u2(o,h),p=u&&u!=="/"&&u.endsWith("/"),y=(c||u===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(p||y)&&(m.pathname+="/"),m}var Nb=t=>t.replace(/\/\/+/g,"/"),yn=t=>Nb(t.join("/")),Gl=t=>t.replace(/\/+$/,""),h2=t=>Gl(t).replace(/^\/*/,"/"),f2=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,m2=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,p2=class{constructor(t,e,i,s=!1){this.status=t,this.statusText=e||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function g2(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function y2(t){let e=t.map(i=>i.route.path).filter(Boolean);return yn(e)||"/"}var kb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function jb(t,e){let i=t;if(typeof i!="string"||!c2.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,o=!1;if(kb)try{let c=new URL(window.location.href),u=i.startsWith("//")?new URL(c.protocol+i):new URL(i),h=ta(u.pathname,e);u.origin===c.origin&&h!=null?i=h+u.search+u.hash:o=!0}catch{Rn(!1,`<Link to="${i}">
58 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:o,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Cb=["POST","PUT","PATCH","DELETE"];new Set(Cb);var v2=["GET",...Cb];new Set(v2);var ys=N.createContext(null);ys.displayName="DataRouter";var lc=N.createContext(null);lc.displayName="DataRouterState";var Rb=N.createContext(!1);function b2(){return N.useContext(Rb)}var Ob=N.createContext({isTransitioning:!1});Ob.displayName="ViewTransition";var x2=N.createContext(new Map);x2.displayName="Fetchers";var _2=N.createContext(null);_2.displayName="Await";var on=N.createContext(null);on.displayName="Navigation";var Gr=N.createContext(null);Gr.displayName="Location";var On=N.createContext({outlet:null,matches:[],isDataRoute:!1});On.displayName="Route";var cf=N.createContext(null);cf.displayName="RouteError";var Db="REACT_ROUTER_ERROR",w2="REDIRECT",S2="ROUTE_ERROR_RESPONSE";function T2(t){if(t.startsWith(`${Db}:${w2}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function A2(t){if(t.startsWith(`${Db}:${S2}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new p2(e.status,e.statusText,e.data)}catch{}}function E2(t,{relative:e}={}){qe(Ir(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:s}=N.useContext(on),{hash:o,pathname:c,search:u}=Fr(t,{relative:e}),h=c;return i!=="/"&&(h=c==="/"?i:yn([i,c])),s.createHref({pathname:h,search:u,hash:o})}function Ir(){return N.useContext(Gr)!=null}function xn(){return qe(Ir(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(Gr).location}var Mb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Lb(t){N.useContext(on).static||N.useLayoutEffect(t)}function Pb(){let{isDataRoute:t}=N.useContext(On);return t?z2():N2()}function N2(){qe(Ir(),"useNavigate() may be used only in the context of a <Router> component.");let t=N.useContext(ys),{basename:e,navigator:i}=N.useContext(on),{matches:s}=N.useContext(On),{pathname:o}=xn(),c=JSON.stringify(Eb(s)),u=N.useRef(!1);return Lb(()=>{u.current=!0}),N.useCallback((m,p={})=>{if(Rn(u.current,Mb),!u.current)return;if(typeof m=="number"){i.go(m);return}let y=lf(m,JSON.parse(c),o,p.relative==="path");t==null&&e!=="/"&&(y.pathname=y.pathname==="/"?e:yn([e,y.pathname])),(p.replace?i.replace:i.push)(y,p.state,p)},[e,i,c,o,t])}N.createContext(null);function Ub(){let{matches:t}=N.useContext(On),e=t[t.length-1];return(e==null?void 0:e.params)??{}}function Fr(t,{relative:e}={}){let{matches:i}=N.useContext(On),{pathname:s}=xn(),o=JSON.stringify(Eb(i));return N.useMemo(()=>lf(t,JSON.parse(o),s,e==="path"),[t,o,s,e])}function k2(t,e){return Bb(t,e)}function Bb(t,e,i){var k;qe(Ir(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=N.useContext(on),{matches:o}=N.useContext(On),c=o[o.length-1],u=c?c.params:{},h=c?c.pathname:"/",m=c?c.pathnameBase:"/",p=c&&c.route;{let E=p&&p.path||"";Vb(h,!p||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 59 60Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let y=xn(),v;if(e){let E=typeof e=="string"?gs(e):e;qe(m==="/"||((k=E.pathname)==null?void 0:k.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${E.pathname}" was given in the \`location\` prop.`),v=E}else v=y;let x=v.pathname||"/",_=x;if(m!=="/"){let E=m.replace(/^\//,"").split("/");_="/"+x.replace(/^\//,"").split("/").slice(E.length).join("/")}let S=i&&i.state.matches.length?i.state.matches.map(E=>Object.assign(E,{route:i.manifest[E.route.id]||E.route})):Sb(t,{pathname:_});Rn(p||S!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Rn(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let T=D2(S&&S.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:yn([m,s.encodeLocation?s.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?m:yn([m,s.encodeLocation?s.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),o,i);return e&&T?N.createElement(Gr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},T):T}function j2(){let t=B2(),e=g2(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},u=null;return console.error("Error handled by React Router default ErrorBoundary:",t),u=N.createElement(N.Fragment,null,N.createElement("p",null,"ð¿ Hey developer ð"),N.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",N.createElement("code",{style:c},"ErrorBoundary")," or"," ",N.createElement("code",{style:c},"errorElement")," prop on your route.")),N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application
60Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},e),i?N.createElement("pre",{style:o},i):null,u)}var C2=N.createElement(j2,null),zb=class extends N.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,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const i=A2(t.digest);i&&(t=i)}let e=t!==void 0?N.createElement(On.Provider,{value:this.props.routeContext},N.createElement(cf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?N.createElement(R2,{error:t},e):e}};zb.contextType=Rb;var Id=new WeakMap;function R2({children:t,error:e}){let{basename:i}=N.useContext(on);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let s=T2(e.digest);if(s){let o=Id.get(e);if(o)throw o;let c=jb(s.location,i);if(kb&&!Id.get(e))if(c.isExternal||s.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:s.replace}));throw Id.set(e,u),u}return N.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return t}function O2({routeContext:t,match:e,children:i}){let s=N.useContext(ys);return s&&s.static&&s.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=e.route.id),N.createElement(On.Provider,{value:t},i)}function D2(t,e=[],i){let s=i==null?void 0:i.state;if(t==null){if(!s)return null;if(s.errors)t=s.matches;else if(e.length===0&&!s.initialized&&s.matches.length>0)t=s.matches;else return null}let o=t,c=s==null?void 0:s.errors;if(c!=null){let y=o.findIndex(v=>v.route.id&&(c==null?void 0:c[v.route.id])!==void 0);qe(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let u=!1,h=-1;if(i&&s){u=s.renderFallback;for(let y=0;y<o.length;y++){let v=o[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(h=y),v.route.id){let{loaderData:x,errors:_}=s,S=v.route.loader&&!x.hasOwnProperty(v.route.id)&&(!_||_[v.route.id]===void 0);if(v.route.lazy||S){i.isStatic&&(u=!0),h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}}let m=i==null?void 0:i.onError,p=s&&m?(y,v)=>{var x,_;m(y,{location:s.location,params:((_=(x=s.matches)==null?void 0:x[0])==null?void 0:_.params)??{},pattern:y2(s.matches),errorInfo:v})}:void 0;return o.reduceRight((y,v,x)=>{let _,S=!1,T=null,k=null;s&&(_=c&&v.route.id?c[v.route.id]:void 0,T=v.route.errorElement||C2,u&&(h<0&&x===0?(Vb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,k=null):h===x&&(S=!0,k=v.route.hydrateFallbackElement||null)));let E=e.concat(o.slice(0,x+1)),D=()=>{let j;return _?j=T:S?j=k:v.route.Component?j=N.createElement(v.route.Component,null):v.route.element?j=v.route.element:j=y,N.createElement(O2,{match:v,routeContext:{outlet:y,matches:E,isDataRoute:s!=null},children:j})};return s&&(v.route.ErrorBoundary||v.route.errorElement||x===0)?N.createElement(zb,{location:s.location,revalidation:s.revalidation,component:T,error:_,children:D(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:p}):D()},null)}function uf(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function M2(t){let e=N.useContext(ys);return qe(e,uf(t)),e}function L2(t){let e=N.useContext(lc);return qe(e,uf(t)),e}function P2(t){let e=N.useContext(On);return qe(e,uf(t)),e}function df(t){let e=P2(t),i=e.matches[e.matches.length-1];return qe(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function U2(){return df("useRouteId")}function B2(){var s;let t=N.useContext(cf),e=L2("useRouteError"),i=df("useRouteError");return t!==void 0?t:(s=e.errors)==null?void 0:s[i]}function z2(){let{router:t}=M2("useNavigate"),e=df("useNavigate"),i=N.useRef(!1);return Lb(()=>{i.current=!0}),N.useCallback(async(o,c={})=>{Rn(i.current,Mb),i.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:e,...c}))},[t,e])}var g0={};function Vb(t,e,i){!e&&!g0[t]&&(g0[t]=!0,Rn(!1,i))}N.memo(V2);function V2({routes:t,manifest:e,future:i,state:s,isStatic:o,onError:c}){return Bb(t,void 0,{manifest:e,state:s,isStatic:o,onError:c})}function _t(t){qe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function H2({basename:t="/",children:e=null,location:i,navigationType:s="POP",navigator:o,static:c=!1,useTransitions:u}){qe(!Ir(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),m=N.useMemo(()=>({basename:h,navigator:o,static:c,useTransitions:u,future:{}}),[h,o,c,u]);typeof i=="string"&&(i=gs(i));let{pathname:p="/",search:y="",hash:v="",state:x=null,key:_="default",mask:S}=i,T=N.useMemo(()=>{let k=ta(p,h);return k==null?null:{location:{pathname:k,search:y,hash:v,state:x,key:_,mask:S},navigationType:s}}
60,[h,p,y,v,x,_,s,S]);return Rn(T!=null,`<Router basename="${h}"> is not able to match the URL "${p}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:N.createElement(on.Provider,{value:m},N.createElement(Gr.Provider,{children:e,value:T}))}function q2({children:t,location:e}){return k2(yh(t),e)}function yh(t,e=[]){let i=[];return N.Children.forEach(t,(s,o)=>{if(!N.isValidElement(s))return;let c=[...e,o];if(s.type===N.Fragment){i.push.apply(i,yh(s.props.children,c));return}qe(s.type===_t,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),qe(!s.props.index||!s.props.children,"An index route cannot have child routes.");let u={id:s.props.id||c.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(u.children=yh(s.props.children,c)),i.push(u)}),i}var Dl="get",Ml="application/x-www-form-urlencoded";function cc(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function $2(t){return cc(t)&&t.tagName.toLowerCase()==="button"}function G2(t){return cc(t)&&t.tagName.toLowerCase()==="form"}function I2(t){return cc(t)&&t.tagName.toLowerCase()==="input"}function F2(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function K2(t,e){return t.button===0&&(!e||e==="_self")&&!F2(t)}var vl=null;function X2(){if(vl===null)try{new FormData(document.createElement("form"),0),vl=!1}catch{vl=!0}return vl}var Y2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fd(t){return t!=null&&!Y2.has(t)?(Rn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ml}"`),null):t}function Q2(t,e){let i,s,o,c,u;if(G2(t)){let h=t.getAttribute("action");s=h?ta(h,e):null,i=t.getAttribute("method")||Dl,o=Fd(t.getAttribute("enctype"))||Ml,c=new FormData(t)}else if($2(t)||I2(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=t.getAttribute("formaction")||h.getAttribute("action");if(s=m?ta(m,e):null,i=t.getAttribute("formmethod")||h.getAttribute("method")||Dl,o=Fd(t.getAttribute("formenctype"))||Fd(h.getAttribute("enctype"))||Ml,c=new FormData(h,t),!X2()){let{name:p,type:y,value:v}=t;if(y==="image"){let x=p?`${p}.`:"";c.append(`${x}x`,"0"),c.append(`${x}y`,"0")}else p&&c.append(p,v)}}else{if(cc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Dl,s=null,o=Ml,u=t}return c&&o==="text/plain"&&(u=c,c=void 0),{action:s,method:i.toLowerCase(),encType:o,formData:c,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function hf(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Hb(t,e,i,s){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return i?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${s}`:o.pathname=`${o.pathname}.${s}`:o.pathname==="/"?o.pathname=`_root.${s}`:e&&ta(o.pathname,e)==="/"?o.pathname=`${Gl(e)}/_root.${s}`:o.pathname=`${Gl(o.pathname)}.${s}`,o}async function W2(t,e){if(t.id in e)return e[t.id];try{let i=await import(t.module);return e[t.id]=i,i}catch(i){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function J2(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Z2(t,e,i){let s=await Promise.all(t.map(async o=>{let c=e.routes[o.route.id];if(c){let u=await W2(c,i);return u.links?u.links():[]}return[]}));return aT(s.flat(1).filter(J2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function y0(t,e,i,s,o,c){let u=(m,p)=>i[p]?m.route.id!==i[p].route.id:!0,h=(m,p)=>{var y;return i[p].pathname!==m.pathname||((y=i[p].route.path)==null?void 0:y.endsWith("*"))&&i[p].params["*"]!==m.params["*"]};return c==="assets"?e.filter((m,p)=>u(m,p)||h(m,p)):c==="data"?e.filter((m,p)=>{var v;let y=s.routes[m.route.id];if(!y||!y.hasLoader)return!1;if(u(m,p)||h(m,p))return!0;
60if(m.route.shouldRevalidate){let x=m.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(t,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function eT(t,e,{includeHydrateFallback:i}={}){return tT(t.map(s=>{let o=e.routes[s.route.id];if(!o)return[];let c=[o.module];return o.clientActionModule&&(c=c.concat(o.clientActionModule)),o.clientLoaderModule&&(c=c.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(c=c.concat(o.hydrateFallbackModule)),o.imports&&(c=c.concat(o.imports)),c}).flat(1))}function tT(t){return[...new Set(t)]}function nT(t){let e={},i=Object.keys(t).sort();for(let s of i)e[s]=t[s];return e}function aT(t,e){let i=new Set;return new Set(e),t.reduce((s,o)=>{let c=JSON.stringify(nT(o));return i.has(c)||(i.add(c),s.push({key:c,link:o})),s},[])}function ff(){let t=N.useContext(ys);return hf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function iT(){let t=N.useContext(lc);return hf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var mf=N.createContext(void 0);mf.displayName="FrameworkContext";function pf(){let t=N.useContext(mf);return hf(t,"You must render this element inside a <HydratedRouter> element"),t}function sT(t,e){let i=N.useContext(mf),[s,o]=N.useState(!1),[c,u]=N.useState(!1),{onFocus:h,onBlur:m,onMouseEnter:p,onMouseLeave:y,onTouchStart:v}=e,x=N.useRef(null);N.useEffect(()=>{if(t==="render"&&u(!0),t==="viewport"){let T=E=>{E.forEach(D=>{u(D.isIntersecting)})},k=new IntersectionObserver(T,{threshold:.5});return x.current&&k.observe(x.current),()=>{k.disconnect()}}},[t]),N.useEffect(()=>{if(s){let T=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(T)}}},[s]);let _=()=>{o(!0)},S=()=>{o(!1),u(!1)};return i?t!=="intent"?[c,x,{}]:[c,x,{onFocus:yr(h,_),onBlur:yr(m,S),onMouseEnter:yr(p,_),onMouseLeave:yr(y,S),onTouchStart:yr(v,_)}]:[!1,x,{}]}function yr(t,e){return i=>{t&&t(i),i.defaultPrevented||e(i)}}function rT({page:t,...e}){let i=b2(),{router:s}=ff(),o=N.useMemo(()=>Sb(s.routes,t,s.basename),[s.routes,t,s.basename]);return o?i?N.createElement(lT,{page:t,matches:o,...e}):N.createElement(cT,{page:t,matches:o,...e}):null}function oT(t){let{manifest:e,routeModules:i}=pf(),[s,o]=N.useState([]);return N.useEffect(()=>{let c=!1;return Z2(t,e,i).then(u=>{c||o(u)}),()=>{c=!0}},[t,e,i]),s}function lT({page:t,matches:e,...i}){let s=xn(),{future:o}=pf(),{basename:c}=ff(),u=N.useMemo(()=>{if(t===s.pathname+s.search+s.hash)return[];let h=Hb(t,c,o.unstable_trailingSlashAwareDataRequests,"rsc"),m=!1,p=[];for(let y of e)typeof y.route.shouldRevalidate=="function"?m=!0:p.push(y.route.id);return m&&p.length>0&&h.searchParams.set("_routes",p.join(",")),[h.pathname+h.search]},[c,o.unstable_trailingSlashAwareDataRequests,t,s,e]);return N.createElement(N.Fragment,null,u.map(h=>N.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...i})))}function cT({page:t,matches:e,...i}){let s=xn(),{future:o,manifest:c,routeModules:u}=pf(),{basename:h}=ff(),{loaderData:m,matches:p}=iT(),y=N.useMemo(()=>y0(t,e,p,c,s,"data"),[t,e,p,c,s]),v=N.useMemo(()=>y0(t,e,p,c,s,"assets"),[t,e,p,c,s]),x=N.useMemo(()=>{if(t===s.pathname+s.search+s.hash)return[];let T=new Set,k=!1;if(e.forEach(D=>{var U;let j=c.routes[D.route.id];!j||!j.hasLoader||(!y.some(G=>G.route.id===D.route.id)&&D.route.id in m&&((U=u[D.route.id])!=null&&U.shouldRevalidate)||j.hasClientLoader?k=!0:T.add(D.route.id))}),T.size===0)return[];let E=Hb(t,h,o.unstable_trailingSlashAwareDataRequests,"data");return k&&T.size>0&&E.searchParams.set("_routes",e.filter(D=>T.has(D.route.id)).map(D=>D.route.id).join(",")),[E.pathname+E.search]},[h,o.unstable_trailingSlashAwareDataRequests,m,s,c,y,e,t,u]),_=N.useMemo(()=>eT(v,c),[v,c]),S=oT(v);return N.createElement(N.Fragment,null,x.map(T=>N.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...i})),_.map(T=>N.createElement("link",{key:T,rel:"modulepreload",href:T,...i})),S.map(({key:T,link:k})=>N.createElement("link",{key:T,nonce:i.nonce,...k,crossOrigin:k.crossOrigin??i.crossOrigin})))}function uT(...t){return e=>{t.forEach(i=>
60{typeof i=="function"?i(e):i!=null&&(i.current=e)})}}var dT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dT&&(window.__reactRouterVersion="7.15.1")}catch{}function hT({basename:t,children:e,useTransitions:i,window:s}){let o=N.useRef();o.current==null&&(o.current=IS({window:s,v5Compat:!0}));let c=o.current,[u,h]=N.useState({action:c.action,location:c.location}),m=N.useCallback(p=>{i===!1?h(p):N.startTransition(()=>h(p))},[i]);return N.useLayoutEffect(()=>c.listen(m),[c,m]),N.createElement(H2,{basename:t,children:e,location:u.location,navigationType:u.action,navigator:c,useTransitions:i})}var qb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=N.forwardRef(function({onClick:e,discover:i="render",prefetch:s="none",relative:o,reloadDocument:c,replace:u,mask:h,state:m,target:p,to:y,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:_,...S},T){let{basename:k,navigator:E,useTransitions:D}=N.useContext(on),j=typeof y=="string"&&qb.test(y),U=jb(y,k);y=U.to;let G=E2(y,{relative:o}),F=xn(),I=null;if(h){let Se=lf(h,[],F.mask?F.mask.pathname:"/",!0);k!=="/"&&(Se.pathname=Se.pathname==="/"?k:yn([k,Se.pathname])),I=E.createHref(Se)}let[Q,oe,ae]=sT(s,S),de=gT(y,{replace:u,mask:h,state:m,target:p,preventScrollReset:v,relative:o,viewTransition:x,defaultShouldRevalidate:_,useTransitions:D});function me(Se){e&&e(Se),Se.defaultPrevented||de(Se)}let Ue=!(U.isExternal||c),Me=N.createElement("a",{...S,...ae,href:(Ue?I:void 0)||U.absoluteURL||G,onClick:Ue?me:e,ref:uT(T,oe),target:p,"data-discover":!j&&i==="render"?"true":void 0});return Q&&!j?N.createElement(N.Fragment,null,Me,N.createElement(rT,{page:G})):Me});Ne.displayName="Link";var fT=N.forwardRef(function({"aria-current":e="page",caseSensitive:i=!1,className:s="",end:o=!1,style:c,to:u,viewTransition:h,children:m,...p},y){let v=Fr(u,{relative:p.relative}),x=xn(),_=N.useContext(lc),{navigator:S,basename:T}=N.useContext(on),k=_!=null&&_T(v)&&h===!0,E=S.encodeLocation?S.encodeLocation(v).pathname:v.pathname,D=x.pathname,j=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;i||(D=D.toLowerCase(),j=j?j.toLowerCase():null,E=E.toLowerCase()),j&&T&&(j=ta(j,T)||j);const U=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let G=D===E||!o&&D.startsWith(E)&&D.charAt(U)==="/",F=j!=null&&(j===E||!o&&j.startsWith(E)&&j.charAt(E.length)==="/"),I={isActive:G,isPending:F,isTransitioning:k},Q=G?e:void 0,oe;typeof s=="function"?oe=s(I):oe=[s,G?"active":null,F?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let ae=typeof c=="function"?c(I):c;return N.createElement(Ne,{...p,"aria-current":Q,className:oe,ref:y,style:ae,to:u,viewTransition:h},typeof m=="function"?m(I):m)});fT.displayName="NavLink";var mT=N.forwardRef(({discover:t="render",fetcherKey:e,navigate:i,reloadDocument:s,replace:o,state:c,method:u=Dl,action:h,onSubmit:m,relative:p,preventScrollReset:y,viewTransition:v,defaultShouldRevalidate:x,..._},S)=>{let{useTransitions:T}=N.useContext(on),k=bT(),E=xT(h,{relative:p}),D=u.toLowerCase()==="get"?"get":"post",j=typeof h=="string"&&qb.test(h),U=G=>{if(m&&m(G),G.defaultPrevented)return;G.preventDefault();let F=G.nativeEvent.submitter,I=(F==null?void 0:F.getAttribute("formmethod"))||u,Q=()=>k(F||G.currentTarget,{fetcherKey:e,method:I,navigate:i,replace:o,state:c,relative:p,preventScrollReset:y,viewTransition:v,defaultShouldRevalidate:x});T&&i!==!1?N.startTransition(()=>Q()):Q()};return N.createElement("form",{ref:S,method:D,action:E,onSubmit:s?m:U,..._,"data-discover":!j&&t==="render"?"true":void 0})});mT.displayName="Form";function pT(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $b(t){let e=N.useContext(ys);return qe(e,pT(t)),e}function gT(t,{target:e,replace:i,mask:s,state:o,preventScrollReset:c,relative:u,viewTransition:h,defaultShouldRevalidate:m,useTransitions:p}={}){let y=Pb(),v=xn(),x=Fr(t,{relative:u});return N.useCallback(_=>{if(K2(_,e)){_.preventDefault();let S=i!==void 0?i:Or(v)===Or(x),T=()=>y(t,{replace:S,mask:s,state:o,preventScrollReset:c,relative:u,viewTransition:h,defaultShouldRevalidate:m});p?N.startTransition(()=>T()):T()}},[v,y,x,i,s,o,e,t,c,u,h,m,p])}var yT=0,vT=()=>`__${String(++yT)}__`;function bT(){let{router:t}=$b("useSubmit"),{basename:e}=N.useContext(on),i=U2(),s=t.fetch,o=t.navigate;return N.useCallback(async(c,u={})=>{let{action:h,method:m,encType:p,formData:y,body:v}=Q2(c,e);
60if(u.navigate===!1){let x=u.fetcherKey||vT();await s(x,i,u.action||h,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:v,formMethod:u.method||m,formEncType:u.encType||p,flushSync:u.flushSync})}else await o(u.action||h,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:v,formMethod:u.method||m,formEncType:u.encType||p,replace:u.replace,state:u.state,fromRouteId:i,flushSync:u.flushSync,viewTransition:u.viewTransition})},[s,o,e,i])}function xT(t,{relative:e}={}){let{basename:i}=N.useContext(on),s=N.useContext(On);qe(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),c={...Fr(t||".",{relative:e})},u=xn();if(t==null){c.search=u.search;let h=new URLSearchParams(c.search),m=h.getAll("index");if(m.some(y=>y==="")){h.delete("index"),m.filter(v=>v).forEach(v=>h.append("index",v));let y=h.toString();c.search=y?`?${y}`:""}}return(!t||t===".")&&o.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(c.pathname=c.pathname==="/"?i:yn([i,c.pathname])),Or(c)}function _T(t,{relative:e}={}){let i=N.useContext(Ob);qe(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=$b("useViewTransitionState"),o=Fr(t,{relative:e});if(!i.isTransitioning)return!1;let c=ta(i.currentLocation.pathname,s)||i.currentLocation.pathname,u=ta(i.nextLocation.pathname,s)||i.nextLocation.pathname;return $l(o.pathname,u)!=null||$l(o.pathname,c)!=null}const Gb=N.createContext({});function ds(t){const e=N.useRef(null);return e.current===null&&(e.current=t()),e.current}const wT=typeof window<"u",gf=wT?N.useLayoutEffect:N.useEffect,yf=N.createContext(null);function vf(t,e){t.indexOf(e)===-1&&t.push(e)}function Il(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}const bn=(t,e,i)=>i>e?e:i<t?t:i;let bf=()=>{};const Da={},Ib=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Fb=t=>typeof t=="object"&&t!==null,Kb=t=>/^0[^.\s]+$/u.test(t);function Xb(t){let e;return()=>(e===void 0&&(e=t()),e)}const Dt=t=>t,Kr=(...t)=>t.reduce((e,i)=>s=>i(e(s))),hs=(t,e,i)=>{const s=e-t;return s?(i-t)/s:1};class xf{constructor(){this.subscriptions=[]}add(e){return vf(this.subscriptions,e),()=>Il(this.subscriptions,e)}notify(e,i,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,i,s);else for(let c=0;c<o;c++){const u=this.subscriptions[c];u&&u(e,i,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const It=t=>t*1e3,an=t=>t/1e3,_f=(t,e)=>e?t*(1e3/e):0,Yb=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t,ST=1e-7,TT=12;function AT(t,e,i,s,o){let c,u,h=0;do u=e+(i-e)/2,c=Yb(u,s,o)-t,c>0?i=u:e=u;while(Math.abs(c)>ST&&++h<TT);return u}function Xr(t,e,i,s){if(t===e&&i===s)return Dt;const o=c=>AT(c,0,1,t,i);return c=>c===0||c===1?c:Yb(o(c),e,s)}const Qb=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Wb=t=>e=>1-t(1-e),Jb=Xr(.33,1.53,.69,.99),wf=Wb(Jb),Zb=Qb(wf),ex=t=>t>=1?1:(t*=2)<1?.5*wf(t):.5*(2-Math.pow(2,-10*(t-1))),Sf=t=>1-Math.sin(Math.acos(t)),tx=Wb(Sf),nx=Qb(Sf),ET=Xr(.42,0,1,1),NT=Xr(0,0,.58,1),ax=Xr(.42,0,.58,1),kT=t=>Array.isArray(t)&&typeof t[0]!="number",ix=t=>Array.isArray(t)&&typeof t[0]=="number",jT={linear:Dt,easeIn:ET,easeInOut:ax,easeOut:NT,circIn:Sf,circInOut:nx,circOut:tx,backIn:wf,backInOut:Zb,backOut:Jb,anticipate:ex},CT=t=>typeof t=="string",v0=t=>{if(ix(t)){bf(t.length===4);const[e,i,s,o]=t;return Xr(e,i,s,o)}else if(CT(t))return jT[t];return t},bl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function RT(t,e){let i=new Set,s=new Set,o=!1,c=!1;const u=new WeakSet;let h={delta:0,timestamp:0,isProcessing:!1};function m(y){u.has(y)&&(p.schedule(y),t()),y(h)}const p={schedule:(y,v=!1,x=!1)=>{const S=x&&o?i:s;return v&&u.add(y),S.add(y),y},cancel:y=>{s.delete(y),u.delete(y)},process:y=>{if(h=y,o){c=!0;return}o=!0;const v=i;i=s,s=v,i.forEach(m),i.clear(),o=!1,c&&(c=!1,p.process(y))}};return p}const OT=40;function sx(t,e){let i=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},c=()=>i=!0,u=bl.reduce((j,U)=>(j[U]=RT(c),j),{}),{setup:h,read:m,resolveKeyframes:p,preUpdate:y,update:v,preRender:x,render:_,postRender:S}=u,T=()=>{const j=Da.useManualTiming,U=j?o.timestamp:performance.now();i=!1,j||(o.delta=s?1e3/60:Math.max(Math.min(U-o.timestamp,OT),1)),o.timestamp=U,o.isProcessing=!0,h.process(o),m.process(o),p.process(o),y.process(o),v.process(o),x.process(o),_.process(o),S.process(o),o.isProcessing=!1,i&&e&&(s=!1,t(T))},k=()=>{i=!0,s=!0,o.isProcessing||t(T)};return{schedule:bl.reduce((j,U)=>{const G=u[U];return j[U]=(F,I=!1,Q=!1)=>(i||k(),G.schedule(F,I,Q)),j},{}),cancel:j=>{for(let U=0;U<bl.length;U++)u[bl[U]].cancel(j)},state:o,steps:u}}const{schedule:we,cancel:rn,state:lt,steps:Kd}=sx(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dt,!0);let Ll;function DT(){Ll=void 0}const wt={now:()=>(Ll===void 0&&wt.set(lt.isProcessing||Da.useManualTiming?lt.timestamp:performance.now()),Ll),set:t=>{Ll=t,queueMicrotask(DT)}},rx=t=>e=>typeof e=="string"&&e.startsWith(t),ox=rx("--"),MT=rx("var(--"),Tf=t=>MT(t)?LT.test(t.split("/*")[0].trim()):!1,LT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function b0(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const vs={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Dr={...vs,transform:t=>bn(0,1,t)},xl={...vs,default:1},Tr=t=>Math.round(t*1e5)/1e5,Af=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function PT(t){return t==null}const UT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ef=(t,e)=>i=>!!(typeof i=="string"&&UT.test(i)&&i.startsWith(t)||e&&!PT(i)&&Object.prototype.hasOwnProperty.call(i,e)),lx=(t,e,i)=>s=>
vendor: 25,227 bytes, line 60
60{if(typeof s!="string")return s;const[o,c,u,h]=s.match(Af);return{[t]:parseFloat(o),[e]:parseFloat(c),[i]:parseFloat(u),alpha:h!==void 0?parseFloat(h):1}},BT=t=>bn(0,255,t),Xd={...vs,transform:t=>Math.round(BT(t))},si={test:Ef("rgb","red"),parse:lx("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:s=1})=>"rgba("+Xd.transform(t)+", "+Xd.transform(e)+", "+Xd.transform(i)+", "+Tr(Dr.transform(s))+")"};function zT(t){let e="",i="",s="",o="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),s=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),s=t.substring(3,4),o=t.substring(4,5),e+=e,i+=i,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const vh={test:Ef("#"),parse:zT,transform:si.transform},Yr=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ka=Yr("deg"),Cn=Yr("%"),Z=Yr("px"),VT=Yr("vh"),HT=Yr("vw"),x0={...Cn,parse:t=>Cn.parse(t)/100,transform:t=>Cn.transform(t*100)},ss={test:Ef("hsl","hue"),parse:lx("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:s=1})=>"hsla("+Math.round(t)+", "+Cn.transform(Tr(e))+", "+Cn.transform(Tr(i))+", "+Tr(Dr.transform(s))+")"},nt={test:t=>si.test(t)||vh.test(t)||ss.test(t),parse:t=>si.test(t)?si.parse(t):ss.test(t)?ss.parse(t):vh.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?si.transform(t):ss.transform(t),getAnimatableNone:t=>{const e=nt.parse(t);return e.alpha=0,nt.transform(e)}},qT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function $T(t){var e,i;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Af))==null?void 0:e.length)||0)+(((i=t.match(qT))==null?void 0:i.length)||0)>0}const cx="number",ux="color",GT="var",IT="var(",_0="${}",FT=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fs(t){const e=t.toString(),i=[],s={color:[],number:[],var:[]},o=[];let c=0;const h=e.replace(FT,m=>(nt.test(m)?(s.color.push(c),o.push(ux),i.push(nt.parse(m))):m.startsWith(IT)?(s.var.push(c),o.push(GT),i.push(m)):(s.number.push(c),o.push(cx),i.push(parseFloat(m))),++c,_0)).split(_0);return{values:i,split:h,indexes:s,types:o}}function KT(t){return fs(t).values}function dx({split:t,types:e}){const i=t.length;return s=>{let o="";for(let c=0;c<i;c++)if(o+=t[c],s[c]!==void 0){const u=e[c];u===cx?o+=Tr(s[c]):u===ux?o+=nt.transform(s[c]):o+=s[c]}return o}}function XT(t){return dx(fs(t))}const YT=t=>typeof t=="number"?0:nt.test(t)?nt.getAnimatableNone(t):t,QT=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:YT(t);function WT(t){const e=fs(t);return dx(e)(e.values.map((s,o)=>QT(s,e.split[o])))}const vn={test:$T,parse:KT,createTransformer:XT,getAnimatableNone:WT};function Yd(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+(e-t)*6*i:i<1/2?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function JT({hue:t,saturation:e,lightness:i,alpha:s}){t/=360,e/=100,i/=100;let o=0,c=0,u=0;if(!e)o=c=u=i;else{const h=i<.5?i*(1+e):i+e-i*e,m=2*i-h;o=Yd(m,h,t+1/3),c=Yd(m,h,t),u=Yd(m,h,t-1/3)}return{red:Math.round(o*255),green:Math.round(c*255),blue:Math.round(u*255),alpha:s}}function Fl(t,e){return i=>i>0?e:t}const Ve=(t,e,i)=>t+(e-t)*i,Qd=(t,e,i)=>{const s=t*t,o=i*(e*e-s)+s;return o<0?0:Math.sqrt(o)},ZT=[vh,si,ss],eA=t=>ZT.find(e=>e.test(t));function w0(t){const e=eA(t);if(!e)return!1;let i=e.parse(t);return e===ss&&(i=JT(i)),i}const S0=(t,e)=>{const i=w0(t),s=w0(e);if(!i||!s)return Fl(t,e);const o={...i};return c=>(o.red=Qd(i.red,s.red,c),o.green=Qd(i.green,s.green,c),o.blue=Qd(i.blue,s.blue,c),o.alpha=Ve(i.alpha,s.alpha,c),si.transform(o))},bh=new Set(["none","hidden"]);function tA(t,e){return bh.has(t)?i=>i<=0?t:e:i=>i>=1?e:t}function nA(t,e){return i=>Ve(t,e,i)}function Nf(t){return typeof t=="number"?nA:typeof t=="string"?Tf(t)?Fl:nt.test(t)?S0:sA:Array.isArray(t)?hx:typeof t=="object"?nt.test(t)?S0:aA:Fl}function hx(t,e){const i=[...t],s=i.length,o=t.map((c,u)=>Nf(c)(c,e[u]));return c=>{for(let u=0;u<s;u++)i[u]=o[u](c);return i}}function aA(t,e){const i={...t,...e},s={};for(const o in i)t[o]!==void 0&&e[o]!==void 0&&(s[o]=Nf(t[o])(t[o],e[o]));return o=>{for(const c in s)i[c]=s[c](o);return i}}function iA(t,e){const i=[],s={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const c=e.types[o],u=t.indexes[c][s[c]],h=t.values[u]??0;i[o]=h,s[c]++}return i}const sA=(t,e)=>{const i=vn.createTransformer(e),s=fs(t),o=fs(e);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?bh.has(t)&&!o.values.length||bh.has(e)&&!s.values.length?tA(t,e):Kr(hx(iA(s,o),o.values),i):Fl(t,e)};function fx(t,e,i){return typeof t=="number"&&typeof e=="number"&&typeof i=="number"?Ve(t,e,i):Nf(t)(t,e)}const rA=t=>{const e=({timestamp:i})=>t(i);return{start:(i=!0)=>we.update(e,i),stop:()=>rn(e),now:()=>lt.isProcessing?lt.timestamp:wt.now()}},mx=(t,e,i=10)=>{let s="";const o=Math.max(Math.round(e/i),2);for(let c=0;c<o;c++)s+=Math.round(t(c/(o-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Kl=2e4;function kf(t){let e=0;const i=50;let s=t.next(e);for(;!s.done&&e<Kl;)e+=i,s=t.next(e);return e>=Kl?1/0:e}function oA(t,e=100,i){const s=i({...t,keyframes:[0,e]}),o=Math.min(kf(s),Kl);return{type:"keyframes",ease:c=>s.next(o*c).value/e,duration:an(o)}}const Fe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function xh(t,e){return t*Math.sqrt(1-e*e)}const lA=12;function cA(t,e,i){let s=i;for(let o=1;o<lA;o++)s=s-t(s)/e(s);return s}const Wd=.001;function uA({duration:t=Fe.duration,bounce:e=Fe.bounce,velocity:i=Fe.velocity,mass:s=Fe.mass}){let o,c,u=1-e;u=bn(Fe.minDamping,Fe.maxDamping,u),t=bn(Fe.minDuration,Fe.maxDuration,an(t)),u<1?(o=p=>{const y=p*u,v=y*t,x=y-i,_=xh(p,u),S=Math.exp(-v);return Wd-x/_*S},c=p=>{const v=p*u*t,x=v*i+i,_=Math.pow(u,2)*Math.pow(p,2)*t,S=Math.exp(-v),T=xh(Math.pow(p,2),u);return(-o(p)+Wd>0?-1:1)*((x-_)*S)/T}):(o=p=>{const y=Math.exp(-p*t),v=(p-i)*t+1;return-Wd+y*v},c=p=>{const y=Math.exp(-p*t),v=(i-p)*(t*t);return y*v});const h=5/t,m=cA(o,c,h);if(t=It(t),isNaN(m))return{stiffness:Fe.stiffness,damping:Fe.damping,duration:t};{const p=Math.pow(m,2)*s;return{stiffness:p,damping:u*2*Math.sqrt(s*p),duration:t}}}const dA=["duration","bounce"],hA=["stiffness","damping","mass"];function T0(t,e){return e.some(i=>t[i]!==void 0)}function fA(t){let e={velocity:Fe.velocity,stiffness:Fe.stiffness,damping:Fe.damping,mass:Fe.mass,isResolvedFromDuration:!1,...t};if(!T0(t,hA)&&T0(t,dA))if(e.velocity=0,t.visualDuration){const i=t.visualDuration,s=2*Math.PI/(i*1.2),o=s*s,c=2*bn(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:Fe.mass,stiffness:o,damping:c}}else{const i=uA({...t,velocity:0});e={...e,...i,mass:Fe.mass},e.isResolvedFromDuration=!0}return e}function Xl(t=Fe.visualDuration,e=Fe.bounce){const i=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=i;const c=i.keyframes[0],u=i.keyframes[i.keyframes.length-1],h={done:!1,value:c},{stiffness:m,damping:p,mass:y,duration:v,velocity:x,isResolvedFromDuration:_}=fA({...i,velocity:-an(i.velocity||0)}),S=x||0,T=p/(2*Math.sqrt(m*y)),k=u-c,E=an(Math.sqrt(m/y)),D=Math.abs(k)<5;s||(s=D?Fe.restSpeed.granular:Fe.restSpeed.default),o||(o=D?Fe.restDelta.granular:Fe.restDelta.default);let j,U,G,F,I,Q;if(T<1)G=xh(E,T),F=(S+T*E*k)/G,j=ae=>{const de=Math.exp(-T*E*ae);return u-de*(F*Math.sin(G*ae)+k*Math.cos(G*ae))},I=T*E*F+k*G,Q=T*E*k-F*G,U=ae=>Math.exp(-T*E*ae)*(I*Math.sin(G*ae)+Q*Math.cos(G*ae));else if(T===1){j=de=>u-Math.exp(-E*de)*(k+(S+E*k)*de);const ae=S+E*k;U=de=>Math.exp(-E*de)*(E*ae*de-S)}else{const ae=E*Math.sqrt(T*T-1);j=Me=>{const Se=Math.exp(-T*E*Me),z=Math.min(ae*Me,300);return u-Se*((S+T*E*k)*Math.sinh(z)+ae*k*Math.cosh(z))/ae};const de=(S+T*E*k)/ae,me=T*E*de-k*ae,Ue=T*E*k-de*ae;U=Me=>{const Se=Math.exp(-T*E*Me),z=Math.min(ae*Me,300);return Se*(me*Math.sinh(z)+Ue*Math.cosh(z))}}const oe={calculatedDuration:_&&v||null,velocity:ae=>It(U(ae)),next:ae=>{if(!_&&T<1){const me=Math.exp(-T*E*ae),Ue=Math.sin(G*ae),Me=Math.cos(G*ae),Se=u-me*(F*Ue+k*Me),z=It(me*(I*Ue+Q*Me));return h.done=Math.abs(z)<=s&&Math.abs(u-Se)<=o,h.value=h.done?u:Se,h}const de=j(ae);if(_)h.done=ae>=v;else{const me=It(U(ae));h.done=Math.abs(me)<=s&&Math.abs(u-de)<=o}return h.value=h.done?u:de,h},toString:()=>{const ae=Math.min(kf(oe),Kl),de=mx(me=>oe.next(ae*me).value,ae,30);return ae+"ms "+de},toTransition:()=>{}};return oe}Xl.applyToOptions=t=>{const e=oA(t,100,Xl);return t.ease=e.ease,t.duration=It(e.duration),t.type="keyframes",t};const mA=5;function px(t,e,i){const s=Math.max(e-mA,0);return _f(i-t(s),e-s)}function _h({keyframes:t,velocity:e=0,power:i=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:c=500,modifyTarget:u,min:h,max:m,restDelta:p=.5,restSpeed:y}){const v=t[0],x={done:!1,value:v},_=Q=>h!==void 0&&Q<h||m!==void 0&&Q>m,S=Q=>h===void 0?m:m===void 0||Math.abs(h-Q)<Math.abs(m-Q)?h:m;let T=i*e;const k=v+T,E=u===void 0?k:u(k);E!==k&&(T=E-v);const D=Q=>-T*Math.exp(-Q/s),j=Q=>E+D(Q),U=Q=>{const oe=D(Q),ae=j(Q);x.done=Math.abs(oe)<=p,x.value=x.done?E:ae};let G,F;const I=Q=>{_(x.value)&&(G=Q,F=Xl({keyframes:[x.value,S(x.value)],velocity:px(j,Q,x.value),damping:o,stiffness:c,restDelta:p,restSpeed:y}))};return I(0),{calculatedDuration:null,next:Q=>{let oe=!1;return!F&&G===void 0&&(oe=!0,U(Q),I(Q)),G!==void 0&&Q>=G?F.next(Q-G):(!oe&&U(Q),x)}}}function pA(t,e,i){const s=[],o=i||Da.mix||fx,c=t.length-1;for(let u=0;u<c;u++){let h=o(t[u],t[u+1]);if(e){const m=Array.isArray(e)?e[u]||Dt:e;h=Kr(m,h)}s.push(h)}return s}function jf(t,e,{clamp:i=!0,ease:s,mixer:o}={}){const c=t.length;if(bf(c===e.length),c===1)return()=>e[0];if(c===2&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[c-1]&&(t=[...t].reverse(),e=[...e].reverse());const h=pA(e,s,o),m=h.length,p=y=>{if(u&&y<t[0])return e[0];let v=0;if(m>1)for(;v<t.length-2&&!(y<t[v+1]);v++);const x=hs(t[v],t[v+1],y);return h[v](x)};return i?y=>p(bn(t[0],t[c-1],y)):p}function gA(t,e){const i=t[t.length-1];for(let s=1;s<=e;s++){const o=hs(0,e,s);t.push(Ve(i,1,o))}}function gx(t){const e=[0];return gA(e,t.length-1),e}function yA(t,e){return t.map(i=>i*e)}function vA(t,e){return t.map(()=>e||ax).splice(0,t.length-1)}function Ar({duration:t=300,keyframes:e,times:i,ease:s="easeInOut"}){const o=kT(s)?s.map(v0):v0(s),c={done:!1,value:e[0]},u=yA(i&&i.length===e.length?i:gx(e),t),h=jf(u,e,{ease:Array.isArray(o)?o:vA(e,o)});return{calculatedDuration:t,next:m=>(c.value=h(m),c.done=m>=t,c)}}const bA=t=>t!==null;function uc(t,{repeat:e,repeatType:i="loop"},s,o=1){const c=t.filter(bA),h=o<0||e&&i!=="loop"&&e%2===1?0:c.length-1;return!h||s===void 0?c[h]:s}const xA={decay:_h,inertia:_h,tween:Ar,keyframes:Ar,spring:Xl};function yx(t){typeof t.type=="string"&&(t.type=xA[t.type])}class Cf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,i){return this.finished.then(e,i)}}const _A=t=>t/100;class Yl extends Cf{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var s,o;const{motionValue:i}=this.options;i&&i.updatedAt!==wt.now()&&this.tick(wt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(s=this.options).onStop)==null||o.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;yx(e);const{type:i=Ar,repeat:s=0,repeatDelay:o=0,repeatType:c,velocity:u=0}=e;let{keyframes:h}=e;const m=i||Ar;m!==Ar&&typeof h[0]!="number"&&(this.mixKeyframes=Kr(_A,fx(h[0],h[1])),h=[0,100]);const p=m({...e,keyframes:h});c==="mirror"&&(this.mirroredGenerator=m({...e,keyframes:[...h].reverse(),velocity:-u})),p.calculatedDuration===null&&(p.calculatedDuration=kf(p));const{calculatedDuration:y}=p;this.calculatedDuration=y,this.resolvedDuration=y+o,this.totalDuration=this.resolvedDuration*(s+1)-o,this.generator=p}updateTime(e){const i=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=i}tick(e,i=!1){const{generator:s,totalDuration:o,mixKeyframes:c,mirroredGenerator:u,resolvedDuration:h,calculatedDuration:m}=this;if(this.startTime===null)return s.next(0);const{delay:p=0,keyframes:y,repeat:v,repeatType:x,repeatDelay:_,type:S,onUpdate:T,finalKeyframe:k}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-o/this.speed,this.startTime)),i?this.currentTime=e:this.updateTime(e);const E=this.currentTime-p*(this.playbackSpeed>=0?1:-1),D=this.playbackSpeed>=0?E<0:E>o;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let j=this.currentTime,U=s;if(v){const Q=Math.min(this.currentTime,o)/h;let oe=Math.floor(Q),ae=Q%1;!ae&&Q>=1&&(ae=1),ae===1&&oe--,oe=Math.min(oe,v+1),!!(oe%2)&&(x==="reverse"?(ae=1-ae,_&&(ae-=_/h)):x==="mirror"&&(U=u)),j=bn(0,1,ae)*h}let G;D?(this.delayState.value=y[0],G=this.delayState):G=U.next(j),c&&!D&&(G.value=c(G.value));let{done:F}=G;!D&&m!==null&&(F=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return I&&S!==_h&&(G.value=uc(y,this.options,k,this.speed)),T&&T(G.value),I&&this.finish(),G}then(e,i){return this.finished.then(e,i)}get duration(){return an(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+an(e)}get time(){return an(this.currentTime)}set time(e){e=It(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const i=this.generator.next(e).value;return px(s=>this.generator.next(s).value,e,i)}get speed(){return this.playbackSpeed}set speed(e){const i=this.playbackSpeed!==e;i&&this.driver&&this.updateTime(wt.now()),this.playbackSpeed=e,i&&this.driver&&(this.time=an(this.currentTime))}play(){var o,c;if(this.isStopped)return;const{driver:e=rA,startTime:i}=this.options;this.driver||(this.driver=e(u=>this.tick(u))),(c=(o=this.options).onPlay)==null||c.call(o);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=i??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(wt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,i;this.notifyFinished(),this.teardown(),this.state="finished",(i=(e=this.options).onComplete)==null||i.call(e)}cancel(){var e,i;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(i=(e=this.options).onCancel)==null||i.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var i;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(i=this.driver)==null||i.stop(),e.observe(this)}}function wA(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ri=t=>t*180/Math.PI,wh=t=>{const e=ri(Math.atan2(t[1],t[0]));return Sh(e)},SA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:wh,rotateZ:wh,skewX:t=>ri(Math.atan(t[1])),skewY:t=>ri(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Sh=t=>(t=t%360,t<0&&(t+=360),t),A0=wh,E0=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),N0=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),TA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:E0,scaleY:N0,scale:t=>(E0(t)+N0(t))/2,rotateX:t=>Sh(ri(Math.atan2(t[6],t[5]))),rotateY:t=>Sh(ri(Math.atan2(-t[2],t[0]))),rotateZ:A0,rotate:A0,skewX:t=>ri(Math.atan(t[4])),skewY:t=>ri(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Th(t){return t.includes("scale")?1:0}function Ah(t,e){if(!t||t==="none")return Th(e);const i=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,o;if(i)s=TA,o=i;else{const h=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=SA,o=h}if(!o)return Th(e);const c=s[e],u=o[1].split(",").map(EA);return typeof c=="function"?c(u):u[c]}const AA=(t,e)=>{const{transform:i="none"}=getComputedStyle(t);return Ah(i,e)};function EA(t){return parseFloat(t.trim())}const bs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xs=new Set(bs),k0=t=>t===vs||t===Z,NA=new Set(["x","y","z"]),kA=bs.filter(t=>!NA.has(t));function jA(t){const e=[];return kA.forEach(i=>{const s=t.getValue(i);s!==void 0&&(e.push([i,s.get()]),s.set(i.startsWith("scale")?1:0))}),e}const Oa={width:({x:t},{paddingLeft:e="0",paddingRight:i="0",boxSizing:s})=>{const o=t.max-t.min;return s==="border-box"?o:o-parseFloat(e)-parseFloat(i)},height:({y:t},{paddingTop:e="0",paddingBottom:i="0",boxSizing:s})=>{const o=t.max-t.min;return s==="border-box"?o:o-parseFloat(e)-parseFloat(i)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ah(e,"x"),y:(t,{transform:e})=>Ah(e,"y")};Oa.translateX=Oa.x;Oa.translateY=Oa.y;const li=new Set;let Eh=!1,Nh=!1,kh=!1;function vx(){if(Nh){const t=Array.from(li).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),i=new Map;e.forEach(s=>{const o=jA(s);o.length&&(i.set(s,o),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const o=i.get(s);o&&o.forEach(([c,u])=>{var h;(h=s.getValue(c))==null||h.set(u)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Nh=!1,Eh=!1,li.forEach(t=>t.complete(kh)),li.clear()}function bx(){li.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Nh=!0)})}function CA(){kh=!0,bx(),vx(),kh=!1}class Rf{constructor(e,i,s,o,c,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=i,this.name=s,this.motionValue=o,this.element=c,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(li.add(this),Eh||(Eh=!0,we.read(bx),we.resolveKeyframes(vx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:i,element:s,motionValue:o}=this;if(e[0]===null){const c=o==null?void 0:o.get(),u=e[e.length-1];if(c!==void 0)e[0]=c;else if(s&&i){const h=s.readValue(i,u);h!=null&&(e[0]=h)}e[0]===void 0&&(e[0]=u),o&&c===void 0&&o.set(e[0])}wA(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),li.delete(this)}cancel(){this.state==="scheduled"&&(li.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const RA=t=>t.startsWith("--");function xx(t,e,i){RA(e)?t.style.setProperty(e,i):t.style[e]=i}const OA={};function Of(t,e){const i=Xb(t);return()=>OA[e]??i()}const Df=Of(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),_x=Of(()=>window.ViewTimeline!==void 0,"viewTimeline"),wx=Of(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),xr=([t,e,i,s])=>`cubic-bezier(${t}, ${e}, ${i}, ${s})`,j0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xr([0,.65,.55,1]),circOut:xr([.55,0,1,.45]),backIn:xr([.31,.01,.66,-.59]),backOut:xr([.33,1.53,.69,.99])};function Sx(t,e){if(t)return typeof t=="function"?wx()?mx(t,e):"ease-out":ix(t)?xr(t):Array.isArray(t)?t.map(i=>Sx(i,e)||j0.easeOut):j0[t]}function DA(t,e,i,{delay:s=0,duration:o=300,repeat:c=0,repeatType:u="loop",ease:h="easeOut",times:m}={},p=void 0){const y={[e]:i};m&&(y.offset=m);const v=Sx(h,o);Array.isArray(v)&&(y.easing=v);const x={delay:s,duration:o,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:c+1,direction:u==="reverse"?"alternate":"normal"};return p&&(x.pseudoElement=p),t.animate(y,x)}function Tx(t){return typeof t=="function"&&"applyToOptions"in t}function MA({type:t,...e}){return Tx(t)&&wx()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ax extends Cf{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:i,name:s,keyframes:o,pseudoElement:c,allowFlatten:u=!1,finalKeyframe:h,onComplete:m}=e;this.isPseudoElement=!!c,this.allowFlatten=u,this.options=e,bf(typeof e.type!="string");const p=MA(e);this.animation=DA(i,s,o,p,c),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const y=uc(o,this.options,h,this.speed);this.updateMotionValue&&this.updateMotionValue(y),xx(i,s,y),this.animation.cancel()}m==null||m(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,i;(i=(e=this.animation).finish)==null||i.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var i,s,o;const e=(i=this.options)==null?void 0:i.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((o=(s=this.animation).commitStyles)==null||o.call(s))}get duration(){var i,s;const e=((s=(i=this.animation.effect)==null?void 0:i.getComputedTiming)==null?void 0:s.call(i).duration)||0;return an(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+an(e)}get time(){return an(Number(this.animation.currentTime)||0)}set time(e){const i=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=It(e),i&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:i,rangeEnd:s,observe:o}){var c;return this.allowFlatten&&((c=this.animation.effect)==null||c.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Df()?(this.animation.timeline=e,i&&(this.animation.rangeStart=i),s&&(this.animation.rangeEnd=s),Dt):o(this)}}const Ex={anticipate:ex,backInOut:Zb,circInOut:nx};function LA(t){return t in Ex}function PA(t){typeof t.ease=="string"&&LA(t.ease)&&(t.ease=Ex[t.ease])}const Jd=10;class UA extends Ax{constructor(e){PA(e),yx(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:i,onUpdate:s,onComplete:o,element:c,...u}=this.options;if(!i)return;if(e!==void 0){i.set(e);return}const h=new Yl({...u,autoplay:!1}),m=Math.max(Jd,wt.now()-this.startTime),p=bn(0,Jd,m-Jd),y=h.sample(m).value,{name:v}=this.options;c&&v&&xx(c,v,y),i.setWithVelocity(h.sample(Math.max(0,m-p)).value,y,p),h.stop()}}const C0=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(vn.test(t)||t==="0")&&!t.startsWith("url("));function BA(t){const e=t[0];if(t.length===1)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}function zA(t,e,i,s){const o=t[0];if(o===null)return!1;if(e==="display"||e==="visibility")return!0;const c=t[t.length-1],u=C0(o,e),h=C0(c,e);return!u||!h?!1:BA(t)||(i==="spring"||Tx(i))&&s}function jh(t){t.duration=0,t.type="keyframes"}const Nx=new Set(["opacity","clipPath","filter","transform"]),VA=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function HA(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&VA.test(t[e]))return!0;return!1}const qA=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),$A=Xb(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function GA(t){var v;
60const{motionValue:e,name:i,repeatDelay:s,repeatType:o,damping:c,type:u,keyframes:h}=t;if(!(((v=e==null?void 0:e.owner)==null?void 0:v.current)instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:y}=e.owner.getProps();return $A()&&i&&(Nx.has(i)||qA.has(i)&&HA(h))&&(i!=="transform"||!y)&&!p&&!s&&o!=="mirror"&&c!==0&&u!=="inertia"}const IA=40;class FA extends Cf{constructor({autoplay:e=!0,delay:i=0,type:s="keyframes",repeat:o=0,repeatDelay:c=0,repeatType:u="loop",keyframes:h,name:m,motionValue:p,element:y,...v}){var S;super(),this.stop=()=>{var T,k;this._animation&&(this._animation.stop(),(T=this.stopTimeline)==null||T.call(this)),(k=this.keyframeResolver)==null||k.cancel()},this.createdAt=wt.now();const x={autoplay:e,delay:i,type:s,repeat:o,repeatDelay:c,repeatType:u,name:m,motionValue:p,element:y,...v},_=(y==null?void 0:y.KeyframeResolver)||Rf;this.keyframeResolver=new _(h,(T,k,E)=>this.onKeyframesResolved(T,k,x,!E),m,p,y),(S=this.keyframeResolver)==null||S.scheduleResolve()}onKeyframesResolved(e,i,s,o){var E,D;this.keyframeResolver=void 0;const{name:c,type:u,velocity:h,delay:m,isHandoff:p,onUpdate:y}=s;this.resolvedAt=wt.now();let v=!0;zA(e,c,u,h)||(v=!1,(Da.instantAnimations||!m)&&(y==null||y(uc(e,s,i))),e[0]=e[e.length-1],jh(s),s.repeat=0);const _={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>IA?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:i,...s,keyframes:e},S=v&&!p&&GA(_),T=(D=(E=_.motionValue)==null?void 0:E.owner)==null?void 0:D.current;let k;if(S)try{k=new UA({..._,element:T})}catch{k=new Yl(_)}else k=new Yl(_);k.finished.then(()=>{this.notifyFinished()}).catch(Dt),this.pendingTimeline&&(this.stopTimeline=k.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=k}get finished(){return this._animation?this.animation.finished:this._finished}then(e,i){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),CA()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function kx(t,e,i,s=0,o=1){const c=Array.from(t).sort((p,y)=>
vendor: 40,239 bytes, line 60
60p.sortNodePosition(y)).indexOf(e),u=t.size,h=(u-1)*s;return typeof i=="function"?i(c,u):o===1?c*s:h-c*s}const KA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function XA(t){const e=KA.exec(t);if(!e)return[,];const[,i,s,o]=e;return[`--${i??s}`,o]}function jx(t,e,i=1){const[s,o]=XA(t);if(!s)return;const c=window.getComputedStyle(e).getPropertyValue(s);if(c){const u=c.trim();return Ib(u)?parseFloat(u):u}return Tf(o)?jx(o,e,i+1):o}const YA={type:"spring",stiffness:500,damping:25,restSpeed:10},QA=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),WA={type:"keyframes",duration:.8},JA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ZA=(t,{keyframes:e})=>e.length>2?WA:xs.has(t)?t.startsWith("scale")?QA(e[1]):YA:JA;function Cx(t,e){if(t!=null&&t.inherit&&e){const{inherit:i,...s}=t;return{...e,...s}}return t}function Mf(t,e){const i=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return i!==t?Cx(i,t):i}const eE=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function tE(t){for(const e in t)if(!eE.has(e))return!0;return!1}const Lf=(t,e,i,s={},o,c)=>u=>{const h=Mf(s,t)||{},m=h.delay||s.delay||0;let{elapsed:p=0}=s;p=p-It(m);const y={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...h,delay:-p,onUpdate:x=>{e.set(x),h.onUpdate&&h.onUpdate(x)},onComplete:()=>{u(),h.onComplete&&h.onComplete()},name:t,motionValue:e,element:c?void 0:o};tE(h)||Object.assign(y,ZA(t,y)),y.duration&&(y.duration=It(y.duration)),y.repeatDelay&&(y.repeatDelay=It(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(jh(y),y.delay===0&&(v=!0)),(Da.instantAnimations||Da.skipAnimations||o!=null&&o.shouldSkipAnimations||h.skipAnimations)&&(v=!0,jh(y),y.delay=0),y.allowFlatten=!h.type&&!h.ease,v&&!c&&e.get()!==void 0){const x=uc(y.keyframes,h);if(x!==void 0){we.update(()=>{y.onUpdate(x),y.onComplete()});return}}return h.isSync?new Yl(y):new FA(y)};function R0(t){const e=[{},{}];return t==null||t.values.forEach((i,s)=>{e[0][s]=i.get(),e[1][s]=i.getVelocity()}),e}function Pf(t,e,i,s){if(typeof e=="function"){const[o,c]=R0(s);e=e(i!==void 0?i:t.custom,o,c)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,c]=R0(s);e=e(i!==void 0?i:t.custom,o,c)}return e}function ci(t,e,i){const s=t.getProps();return Pf(s,e,i!==void 0?i:s.custom,t)}const Rx=new Set(["width","height","top","left","right","bottom",...bs]),O0=30,nE=t=>!isNaN(parseFloat(t)),Er={current:void 0};class aE{constructor(e,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var c;const o=wt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((c=this.events.change)==null||c.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=i.owner}setCurrent(e){this.current=e,this.updatedAt=wt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=nE(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,i){this.events[e]||(this.events[e]=new xf);const s=this.events[e].add(i);return e==="change"?()=>{s(),we.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,i){this.passiveEffect=e,this.stopPassiveEffect=i}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,i,s){this.set(i),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,i=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Er.current&&Er.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=wt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>O0)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,O0);return _f(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(e){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=e(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,i;(e=this.dependents)==null||e.clear(),(i=this.events.destroy)==null||i.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gn(t,e){return new aE(t,e)}const Ch=t=>Array.isArray(t);function iE(t,e,i){t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,gn(i))}function sE(t){return Ch(t)?t[t.length-1]||0:t}function rE(t,e){const i=ci(t,e);let{transitionEnd:s={},transition:o={},...c}=i||{};c={...c,...s};for(const u in c){const h=sE(c[u]);iE(t,u,h)}}const gt=t=>!!(t&&t.getVelocity);function oE(t){return!!(gt(t)&&t.add)}function Rh(t,e){const i=t.getValue("willChange");if(oE(i))return i.add(e);if(!i&&Da.WillChange){const s=new Da.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Uf(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const lE="framerAppearId",Ox="data-"+Uf(lE);function Dx(t){return t.props[Ox]}function cE({protectedKeys:t,needsAnimating:e},i){const s=t.hasOwnProperty(i)&&e[i]!==!0;return e[i]=!1,s}function Mx(t,e,{delay:i=0,transitionOverride:s,type:o}={}){let{transition:c,transitionEnd:u,...h}=e;const m=t.getDefaultTransition();c=c?Cx(c,m):m;const p=c==null?void 0:c.reduceMotion,y=c==null?void 0:c.skipAnimations;s&&(c=s);const v=[],x=o&&t.animationState&&t.animationState.getState()[o];for(const _ in h){const S=t.getValue(_,t.latestValues[_]??null),T=h[_];if(T===void 0||x&&cE(x,_))continue;const k={delay:i,...Mf(c||{},_)};y&&(k.skipAnimations=!0);const E=S.get();if(E!==void 0&&!S.isAnimating()&&!Array.isArray(T)&&T===E&&!k.velocity){we.update(()=>S.set(T));continue}let D=!1;if(window.MotionHandoffAnimation){const G=Dx(t);if(G){const F=window.MotionHandoffAnimation(G,_,we);F!==null&&(k.startTime=F,D=!0)}}Rh(t,_);const j=p??t.shouldReduceMotion;S.start(Lf(_,S,T,j&&Rx.has(_)?{type:!1}:k,t,D));const U=S.animation;U&&v.push(U)}if(u){const _=()=>we.update(()=>{u&&rE(t,u)});v.length?Promise.all(v).then(_):_()}return v}function Oh(t,e,i={}){var m;const s=ci(t,e,i.type==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(o=i.transitionOverride);const c=s?()=>Promise.all(Mx(t,s,i)):()=>Promise.resolve(),u=t.variantChildren&&t.variantChildren.size?(p=0)=>{const{delayChildren:y=0,staggerChildren:v,staggerDirection:x}=o;return uE(t,e,p,y,v,x,i)}:()=>Promise.resolve(),{when:h}=o;if(h){const[p,y]=h==="beforeChildren"?[c,u]:[u,c];return p().then(()=>y())}else return Promise.all([c(),u(i.delay)])}function uE(t,e,i=0,s=0,o=0,c=1,u){const h=[];for(const m of t.variantChildren)m.notify("AnimationStart",e),h.push(Oh(m,e,{...u,delay:i+(typeof s=="function"?0:s)+kx(t.variantChildren,m,s,o,c)}).then(()=>m.notify("AnimationComplete",e)));return Promise.all(h)}function dE(t,e,i={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const o=e.map(c=>Oh(t,c,i));s=Promise.all(o)}else if(typeof e=="string")s=Oh(t,e,i);else{const o=typeof e=="function"?ci(t,e,i.custom):e;s=Promise.all(Mx(t,o,i))}return s.then(()=>{t.notify("AnimationComplete",e)})}const hE={test:t=>t==="auto",parse:t=>t},Lx=t=>e=>e.test(t),Px=[vs,Z,Cn,ka,HT,VT,hE],D0=t=>Px.find(Lx(t));function fE(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Kb(t):!0}const mE=new Set(["brightness","contrast","saturate","opacity"]);function pE(t){const[e,i]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=i.match(Af)||[];if(!s)return t;const o=i.replace(s,"");let c=mE.has(e)?1:0;return s!==i&&(c*=100),e+"("+c+o+")"}const gE=/\b([a-z-]*)\(.*?\)/gu,Dh={...vn,getAnimatableNone:t=>{const e=t.match(gE);return e?e.map(pE).join(" "):t}},Mh={...vn,getAnimatableNone:t=>{const e=vn.parse(t);return vn.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},M0={...vs,transform:Math.round},yE={rotate:ka,rotateX:ka,rotateY:ka,rotateZ:ka,scale:xl,scaleX:xl,scaleY:xl,scaleZ:xl,skew:ka,skewX:ka,skewY:ka,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:Dr,originX:x0,originY:x0,originZ:Z},Bf={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,inset:Z,insetBlock:Z,insetBlockStart:Z,insetBlockEnd:Z,insetInline:Z,insetInlineStart:Z,insetInlineEnd:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,paddingBlock:Z,paddingBlockStart:Z,paddingBlockEnd:Z,paddingInline:Z,paddingInlineStart:Z,paddingInlineEnd:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,marginBlock:Z,marginBlockStart:Z,marginBlockEnd:Z,marginInline:Z,marginInlineStart:Z,marginInlineEnd:Z,fontSize:Z,backgroundPositionX:Z,backgroundPositionY:Z,...yE,zIndex:M0,fillOpacity:Dr,strokeOpacity:Dr,numOctaves:M0},vE={...Bf,color:nt,backgroundColor:nt,outlineColor:nt,fill:nt,stroke:nt,borderColor:nt,borderTopColor:nt,borderRightColor:nt,borderBottomColor:nt,borderLeftColor:nt,filter:Dh,WebkitFilter:Dh,mask:Mh,WebkitMask:Mh},Ux=t=>vE[t],bE=new Set([Dh,Mh]);function Bx(t,e){let i=Ux(t);return bE.has(i)||(i=vn),i.getAnimatableNone?i.getAnimatableNone(e):void 0}const xE=new Set(["auto","none","0"]);function _E(t,e,i){let s=0,o;for(;s<t.length&&!o;){const c=t[s];typeof c=="string"&&!xE.has(c)&&fs(c).values.length&&(o=t[s]),s++}if(o&&i)for(const c of e)t[c]=Bx(i,o)}class wE extends Rf{constructor(e,i,s,o,c){super(e,i,s,o,c,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:i,name:s}=this;if(!i||!i.current)return;super.readKeyframes();for(let y=0;y<e.length;y++){let v=e[y];if(typeof v=="string"&&(v=v.trim(),Tf(v))){const x=jx(v,i.current);x!==void 0&&(e[y]=x),y===e.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!Rx.has(s)||e.length!==2)return;const[o,c]=e,u=D0(o),h=D0(c),m=b0(o),p=b0(c);if(m!==p&&Oa[s]){this.needsMeasurement=!0;return}if(u!==h)if(k0(u)&&k0(h))for(let y=0;y<e.length;y++){const v=e[y];typeof v=="string"&&(e[y]=parseFloat(v))}else Oa[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:i}=this,s=[];for(let o=0;o<e.length;o++)(e[o]===null||fE(e[o]))&&s.push(o);s.length&&_E(e,s,i)}measureInitialState(){const{element:e,unresolvedKeyframes:i,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oa[s](e.measureViewportBox(),window.getComputedStyle(e.current)),i[0]=this.measuredOrigin;const o=i[i.length-1];o!==void 0&&e.getValue(s,o).jump(o,!1)}measureEndState(){var h;const{element:e,name:i,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const o=e.getValue(i);o&&o.jump(this.measuredOrigin,!1);const c=s.length-1,u=s[c];s[c]=Oa[i](e.measureViewportBox(),window.getComputedStyle(e.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),(h=this.removedTransforms)!=null&&h.length&&this.removedTransforms.forEach(([m,p])=>{e.getValue(m).set(p)}),this.resolveNoneKeyframes()}}function zx(t,e,i){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const o=document.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t).filter(s=>s!=null)}const Vx=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Hx(t){return Fb(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:ms,cancel:qx}=sx(queueMicrotask,!1),hn={x:!1,y:!1};function $x(){return hn.x||hn.y}function SE(t){return t==="x"||t==="y"?hn[t]?null:(hn[t]=!0,()=>{hn[t]=!1}):hn.x||hn.y?null:(hn.x=hn.y=!0,()=>{hn.x=hn.y=!1})}function Gx(t,e){const i=zx(t),s=new AbortController,o={passive:!0,...e,signal:s.signal};return[i,o,()=>s.abort()]}function TE(t){return!(t.pointerType==="touch"||$x())}function AE(t,e,i={}){const[s,o,c]=Gx(t,i);return s.forEach(u=>{let h=!1,m=!1,p;const y=()=>{u.removeEventListener("pointerleave",S)},v=k=>{p&&(p(k),p=void 0),y()},x=k=>{h=!1,window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),m&&(m=!1,v(k))},_=()=>{h=!0,window.addEventListener("pointerup",x,o),window.addEventListener("pointercancel",x,o)},S=k=>{if(k.pointerType!=="touch"){if(h){m=!0;return}v(k)}},T=k=>{if(!TE(k))return;m=!1;const E=e(u,k);typeof E=="function"&&(p=E,u.addEventListener("pointerleave",S,o))};u.addEventListener("pointerenter",T,o),u.addEventListener("pointerdown",_,o)}),c}const Ix=(t,e)=>e?t===e?!0:Ix(t,e.parentElement):!1,zf=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,EE=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function NE(t){return EE.has(t.tagName)||t.isContentEditable===!0}const kE=new Set(["INPUT","SELECT","TEXTAREA"]);function jE(t){return kE.has(t.tagName)||t.isContentEditable===!0}const Pl=new WeakSet;function L0(t){return e=>{e.key==="Enter"&&t(e)}}function Zd(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const CE=(t,e)=>{const i=t.currentTarget;if(!i)return;const s=L0(()=>{if(Pl.has(i))return;Zd(i,"down");const o=L0(()=>{Zd(i,"up")}),c=()=>Zd(i,"cancel");i.addEventListener("keyup",o,e),i.addEventListener("blur",c,e)});i.addEventListener("keydown",s,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),e)};function P0(t){return zf(t)&&!$x()}const U0=new WeakSet;function RE(t,e,i={}){const[s,o,c]=Gx(t,i),u=h=>{const m=h.currentTarget;if(!P0(h)||U0.has(h))return;Pl.add(m),i.stopPropagation&&U0.add(h);const p=e(m,h),y=(_,S)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",x),Pl.has(m)&&Pl.delete(m),P0(_)&&typeof p=="function"&&p(_,{success:S})},v=_=>{y(_,m===window||m===document||i.useGlobalTarget||Ix(m,_.target))},x=_=>{y(_,!1)};window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",x,o)};return s.forEach(h=>{(i.useGlobalTarget?window:h).addEventListener("pointerdown",u,o),Hx(h)&&(h.addEventListener("focus",p=>CE(p,o)),!NE(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),c}function Vf(t){return Fb(t)&&"ownerSVGElement"in t}const Ul=new WeakMap;let ja;const Fx=(t,e,i)=>(s,o)=>o&&o[0]?o[0][t+"Size"]:Vf(s)&&"getBBox"in s?s.getBBox()[e]:s[i],OE=Fx("inline","width","offsetWidth"),DE=Fx("block","height","offsetHeight");function ME({target:t,borderBoxSize:e}){var i;(i=Ul.get(t))==null||i.forEach(s=>{s(t,{get width(){return OE(t,e)},get height(){return DE(t,e)}})})}function LE(t){t.forEach(ME)}function PE(){typeof ResizeObserver>"u"||(ja=new ResizeObserver(LE))}function UE(t,e){ja||PE();const i=zx(t);return i.forEach(s=>{let o=Ul.get(s);o||(o=new Set,Ul.set(s,o)),o.add(e),ja==null||ja.observe(s)}),()=>{i.forEach(s=>{const o=Ul.get(s);o==null||o.delete(e),o!=null&&o.size||ja==null||ja.unobserve(s)})}}const Bl=new Set;let rs;function BE(){rs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Bl.forEach(e=>e(t))},window.addEventListener("resize",rs)}function zE(t){return Bl.add(t),rs||BE(),()=>{Bl.delete(t),!Bl.size&&typeof rs=="function"&&(window.removeEventListener("resize",rs),rs=void 0)}}function Lh(t,e){return typeof t=="function"?zE(t):UE(t,e)}function Kx(t,e){let i;const s=()=>{const{currentTime:o}=e,u=(o===null?0:o.value)/100;i!==u&&t(u),i=u};return we.preUpdate(s,!0),()=>rn(s)}function VE(t){return Vf(t)&&t.tagName==="svg"}function HE(...t){const e=!Array.isArray(t[0]),i=e?0:-1,s=t[0+i],o=t[1+i],c=t[2+i],u=t[3+i],h=jf(o,c,u);return e?h(s):h}const qE=[...Px,nt,vn],$E=t=>qE.find(Lx(t)),B0=()=>({translate:0,scale:1,origin:0,originPoint:0}),os=()=>({x:B0(),y:B0()}),z0=()=>({min:0,max:0}),it=()=>({x:z0(),y:z0()}),GE=new WeakMap;function dc(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Mr(t){return typeof t=="string"||Array.isArray(t)}const Hf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qf=["initial",...Hf];function hc(t){return dc(t.animate)||qf.some(e=>Mr(t[e]))}function Xx(t){return!!(hc(t)||t.variants)}function IE(t,e,i){for(const s in e){const o=e[s],c=i[s];if(gt(o))t.addValue(s,o);else if(gt(c))t.addValue(s,gn(o,{owner:t}));else if(c!==o)if(t.hasValue(s)){const u=t.getValue(s);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=t.getStaticValue(s);t.addValue(s,gn(u!==void 0?u:o,{owner:t}))}}for(const s in i)e[s]===void 0&&t.removeValue(s);return e}const Ph={current:null},Yx={current:!1},FE=typeof window<"u";function KE(){if(Yx.current=!0,!!FE)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ph.current=t.matches;t.addEventListener("change",e),e()}else Ph.current=!1}const V0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ql={};function Qx(t){Ql=t}function XE(){return Ql}class YE{scrapeMotionValuesFromProps(e,i,s){return{}}constructor({parent:e,props:i,presenceContext:s,reducedMotionConfig:o,skipAnimations:c,blockInitialAnimation:u,visualState:h},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Rf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const _=wt.now();this.renderScheduledAt<_&&(this.renderScheduledAt=_,we.render(this.render,!1,!0))};const{latestValues:p,renderState:y}=h;this.latestValues=p,this.baseTarget={...p},this.initialValues=i.initial?{...p}:{},this.renderState=y,this.parent=e,this.props=i,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=c,this.options=m,this.blockInitialAnimation=!!u,this.isControllingVariants=hc(i),this.isVariantNode=Xx(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:v,...x}=this.scrapeMotionValuesFromProps(i,{},this);for(const _ in x){const S=x[_];p[_]!==void 0&>(S)&&S.set(p[_])}}mount(e){var i,s;if(this.hasBeenMounted)for(const o in this.initialValues)(i=this.values.get(o))==null||i.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];this.current=e,GE.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,c)=>this.bindToMotionValue(c,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Yx.current||KE(),this.shouldReduceMotion=Ph.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),rn(this.notifyUpdate),rn(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const s=this.features[i];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,i){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),i.accelerate&&Nx.has(e)&&this.current instanceof HTMLElement){const{factory:u,keyframes:h,times:m,ease:p,duration:y}=i.accelerate,v=new Ax({element:this.current,name:e,keyframes:h,times:m,ease:p,duration:It(y)}),x=u(v);this.valueSubscriptions.set(e,()=>{x(),v.cancel()});return}const s=xs.has(e);s&&this.onBindTransform&&this.onBindTransform();const o=i.on("change",u=>{this.latestValues[e]=u,this.props.onUpdate&&we.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;typeof window<"u"&&window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,e,i)),this.valueSubscriptions.set(e,()=>{o(),c&&c()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ql){const i=Ql[e];if(!i)continue;const{isEnabled:s,Feature:o}=i;if(!this.features[e]&&o&&s(this.props)&&(this.features[e]=new o(this)),this.features[e]){const c=this.features[e];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):it()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,i){this.latestValues[e]=i}update(e,i){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let s=0;s<V0.length;s++){const o=V0[s];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const c="on"+o,u=e[c];u&&(this.propEventSubscriptions[o]=this.on(o,u))}this.prevMotionValues=IE(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(e),()=>i.variantChildren.delete(e)}addValue(e,i){const s=this.values.get(e);i!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,i),this.values.set(e,i),this.latestValues[e]=i.get())}removeValue(e){this.values.delete(e);const i=this.valueSubscriptions.get(e);i&&(i(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,i){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&i!==void 0&&(s=gn(i===null?void 0:i,{owner:this}),this.addValue(e,s)),s}readValue(e,i){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ib(s)||Kb(s))?s=parseFloat(s):!$E(s)&&vn.test(i)&&(s=Bx(e,i)),this.setBaseTarget(e,gt(s)?s.get():s)),gt(s)?s.get():s}setBaseTarget(e,i){this.baseTarget[e]=i}getBaseTarget(e){var c;const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const u=Pf(this.props,i,(c=this.presenceContext)==null?void 0:c.custom);u&&(s=u[e])}if(i&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!gt(o)?o:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,i){return this.events[e]||(this.events[e]=new xf),this.events[e].add(i)}notify(e,...i){this.events[e]&&this.events[e].notify(...i)}scheduleRenderMicrotask(){ms.render(this.render)}}class Wx extends YE{constructor(){super(...arguments),this.KeyframeResolver=wE}sortInstanceNodePosition(e,i){return e.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(e,i){const s=e.style;return s?s[i]:void 0}removeValueFromRenderState(e,{vars:i,style:s}){delete i[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;gt(e)&&(this.childSubscription=e.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}class Ma{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Jx({top:t,left:e,right:i,bottom:s}){return{x:{min:e,max:i},y:{min:t,max:s}}}function QE({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function WE(t,e){if(!e)return t;const i=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}function eh(t){return t===void 0||t===1}function Uh({scale:t,scaleX:e,scaleY:i}){return!eh(t)||!eh(e)||!eh(i)}function ai(t){return Uh(t)||Zx(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Zx(t){return H0(t.x)||H0(t.y)}function H0(t){return t&&t!=="0%"}function Wl(t,e,i){const s=t-i,o=e*s;return i+o}function q0(t,e,i,s,o){return o!==void 0&&(t=Wl(t,o,s)),Wl(t,i,s)+e}function Bh(t,e=0,i=1,s,o){t.min=q0(t.min,e,i,s,o),t.max=q0(t.max,e,i,s,o)}function e_(t,{x:e,y:i}){Bh(t.x,e.translate,e.scale,e.originPoint),Bh(t.y,i.translate,i.scale,i.originPoint)}const $0=.999999999999,G0=1.0000000000001;function JE(t,e,i,s=!1){var h;const o=i.length;if(!o)return;e.x=e.y=1;let c,u;for(let m=0;m<o;m++){c=i[m],u=c.projectionDelta;const{visualElement:p}=c.options;p&&p.props.style&&p.props.style.display==="contents"||(s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&(kn(t.x,-c.scroll.offset.x),kn(t.y,-c.scroll.offset.y)),u&&(e.x*=u.x.scale,e.y*=u.y.scale,e_(t,u)),s&&ai(c.latestValues)&&zl(t,c.latestValues,(h=c.layout)==null?void 0:h.layoutBox))}e.x<G0&&e.x>$0&&(e.x=1),e.y<G0&&e.y>$0&&(e.y=1)}function kn(t,e){t.min+=e,t.max+=e}function I0(t,e,i,s,o=.5){const c=Ve(t.min,t.max,o);Bh(t,e,i,c,s)}function F0(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function zl(t,e,i){const s=i??t;I0(t.x,F0(e.x,s.x),e.scaleX,e.scale,e.originX),I0(t.y,F0(e.y,s.y),e.scaleY,e.scale,e.originY)}function t_(t,e){return Jx(WE(t.getBoundingClientRect(),e))}function ZE(t,e,i){const s=t_(t,i),{scroll:o}=e;return o&&(kn(s.x,o.offset.x),kn(s.y,o.offset.y)),s}const eN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tN=bs.length;function nN(t,e,i){let s="",o=!0;for(let c=0;c<tN;c++){const u=bs[c],h=t[u];if(h===void 0)continue;let m=!0;if(typeof h=="number")m=h===(u.startsWith("scale")?1:0);else{const p=parseFloat(h);m=u.startsWith("scale")?p===1:p===0}if(!m||i){const p=Vx(h,Bf[u]);if(!m){o=!1;const y=eN[u]||u;s+=`${y}(${p}) `}i&&(e[u]=p)}}return s=s.trim(),i?s=i(e,o?"":s):o&&(s="none"),s}function $f(t,e,i){const{style:s,vars:o,transformOrigin:c}=t;let u=!1,h=!1;for(const m in e){const p=e[m];if(xs.has(m)){u=!0;continue}else if(ox(m)){o[m]=p;continue}else{const y=Vx(p,Bf[m]);m.startsWith("origin")?(h=!0,c[m]=y):s[m]=y}}if(e.transform||(u||i?s.transform=nN(e,t.transform,i):s.transform&&(s.transform="none")),h){const{originX:m="50%",originY:p="50%",originZ:y=0}=c;s.transformOrigin=`${m} ${p} ${y}`}}function n_(t,{style:e,vars:i},s,o){const c=t.style;let u;for(u in e)c[u]=e[u];o==null||o.applyProjectionStyles(c,s);for(u in i)c.setProperty(u,i[u])}function K0(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const vr={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Z.test(t))t=parseFloat(t);else return t;const i=K0(t,e.target.x),s=K0(t,e.target.y);return`${i}% ${s}%`}},aN={correct:(t,{treeScale:e,projectionDelta:i})=>{const s=t,o=vn.parse(t);if(o.length>5)return s;const c=vn.createTransformer(t),u=typeof o[0]!="number"?1:0,h=i.x.scale*e.x,m=i.y.scale*e.y;o[0+u]/=h,o[1+u]/=m;const p=Ve(h,m,.5);return typeof o[2+u]=="number"&&(o[2+u]/=p),typeof o[3+u]=="number"&&(o[3+u]/=p),c(o)}},zh={borderRadius:{...vr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vr,borderTopRightRadius:vr,borderBottomLeftRadius:vr,borderBottomRightRadius:vr,boxShadow:aN};function a_(t,{layout:e,layoutId:i}){return xs.has(t)||t.startsWith("origin")||(e||i!==void 0)&&(!!zh[t]||t==="opacity")}function Gf(t,e,i){var u;const s=t.style,o=e==null?void 0:e.style,c={};if(!s)return c;for(const h in s)(gt(s[h])||o&>(o[h])||a_(h,t)||((u=i==null?void 0:i.getValue(h))==null?void 0:u.liveStyle)!==void 0)&&(c[h]=s[h]);return c}function iN(t){return window.getComputedStyle(t)}class sN extends Wx{constructor(){super(...arguments),this.type="html",this.renderInstance=n_}readValueFromInstance(e,i){var s;if(xs.has(i))return(s=this.projection)!=null&&s.isProjecting?Th(i):AA(e,i);{const o=iN(e),c=(ox(i)?o.getPropertyValue(i):o[i])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(e,{transformPagePoint:i}){return t_(e,i)}build(e,i,s){$f(e,i,s.transformTemplate)}scrapeMotionValuesFromProps(e,i,s){return Gf(e,i,s)}}const rN={offset:"stroke-dashoffset",array:"stroke-dasharray"},oN={offset:"strokeDashoffset",array:"strokeDasharray"};function lN(t,e,i=1,s=0,o=!0){t.pathLength=1;const c=o?rN:oN;t[c.offset]=`${-s}`,t[c.array]=`${e} ${i}`}const cN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function i_(t,{attrX:e,attrY:i,attrScale:s,pathLength:o,pathSpacing:c=1,pathOffset:u=0,...h},m,p,y){if($f(t,h,p),m){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:v,style:x}=t;v.transform&&(x.transform=v.transform,delete v.transform),(x.transform||v.transformOrigin)&&(x.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),x.transform&&(x.transformBox=(y==null?void 0:y.transformBox)??"fill-box",delete v.transformBox);for(const _ of cN)v[_]!==void 0&&(x[_]=v[_],delete v[_]);e!==void 0&&(v.x=e),i!==void 0&&(v.y=i),s!==void 0&&(v.scale=s),o!==void 0&&lN(v,o,c,u,!1)}const s_=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),r_=t=>typeof t=="string"&&t.toLowerCase()==="svg";function uN(t,e,i,s){n_(t,e,void 0,s);for(const o in e.attrs)t.setAttribute(s_.has(o)?o:Uf(o),e.attrs[o])}function o_(t,e,i){const s=Gf(t,e,i);for(const o in t)if(gt(t[o])||gt(e[o])){const c=bs.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[c]=t[o]}return s}class dN extends Wx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=it}getBaseTargetFromProps(e,i){return e[i]}readValueFromInstance(e,i){if(xs.has(i)){const s=Ux(i);return s&&s.default||0}return i=s_.has(i)?i:Uf(i),e.getAttribute(i)}scrapeMotionValuesFromProps(e,i,s){return o_(e,i,s)}build(e,i,s){i_(e,i,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,i,s,o){uN(e,i,s,o)}mount(e){this.isSVGTag=r_(e.tagName),super.mount(e)}}const hN=qf.length;function l_(t){if(!t)return;if(!t.isControllingVariants){const i=t.parent?l_(t.parent)||{}:{};return t.props.initial!==void 0&&(i.initial=t.props.initial),i}const e={};for(let i=0;i<hN;i++){const s=qf[i],o=t.props[s];(Mr(o)||o===!1)&&(e[s]=o)}return e}function c_(t,e){if(!Array.isArray(e))return!1;const i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s])return!1;return!0}const fN=[...Hf].reverse(),mN=Hf.length;function pN(t){return e=>Promise.all(e.map(({animation:i,options:s})=>dE(t,i,s)))}function gN(t){let e=pN(t),i=X0(),s=!0,o=!1;const c=p=>(y,v)=>{var _;const x=ci(t,v,p==="exit"?(_=t.presenceContext)==null?void 0:_.custom:void 0);if(x){const{transition:S,transitionEnd:T,...k}=x;y={...y,...k,...T}}return y};function u(p){e=p(t)}function h(p){const{props:y}=t,v=l_(t.parent)||{},x=[],_=new Set;let S={},T=1/0;for(let E=0;E<mN;E++){const D=fN[E],j=i[D],U=y[D]!==void 0?y[D]:v[D],G=Mr(U),F=D===p?j.isActive:null;F===!1&&(T=E);let I=U===v[D]&&U!==y[D]&&G;if(I&&(s||o)&&t.manuallyAnimateOnMount&&(I=!1),j.protectedKeys={...S},!j.isActive&&F===null||!U&&!j.prevProp||dc(U)||typeof U=="boolean")continue;if(D==="exit"&&j.isActive&&F!==!0){j.prevResolvedValues&&(S={...S,...j.prevResolvedValues});continue}const Q=yN(j.prevProp,U);let oe=Q||D===p&&j.isActive&&!I&&G||E>T&&G,ae=!1;const de=Array.isArray(U)?U:[U];let me=de.reduce(c(D),{});F===!1&&(me={});const{prevResolvedValues:Ue={}}=j,Me={...Ue,...me},Se=W=>{oe=!0,_.has(W)&&(ae=!0,_.delete(W)),j.needsAnimating[W]=!0;const he=t.getValue(W);he&&(he.liveStyle=!1)};for(const W in Me){const he=me[W],xe=Ue[W];if(S.hasOwnProperty(W))continue;let R=!1;Ch(he)&&Ch(xe)?R=!c_(he,xe)||Q:R=he!==xe,R?he!=null?Se(W):_.add(W):he!==void 0&&_.has(W)?Se(W):j.protectedKeys[W]=!0}j.prevProp=U,j.prevResolvedValues=me,j.isActive&&(S={...S,...me}),(s||o)&&t.blockInitialAnimation&&(oe=!1);const z=I&&Q;oe&&(!z||ae)&&x.push(...de.map(W=>{const he={type:D};if(typeof W=="string"&&(s||o)&&!z&&t.manuallyAnimateOnMount&&t.parent){const{parent:xe}=t,R=ci(xe,W);if(xe.enteringChildren&&R){const{delayChildren:$}=R.transition||{};he.delay=kx(xe.enteringChildren,t,$)}}return{animation:W,options:he}}))}if(_.size){const E={};if(typeof y.initial!="boolean"){const D=ci(t,Array.isArray(y.initial)?y.initial[0]:y.initial);D&&D.transition&&(E.transition=D.transition)}_.forEach(D=>{const j=t.getBaseTarget(D),U=t.getValue(D);U&&(U.liveStyle=!0),E[D]=j??null}),x.push({animation:E})}let k=!!x.length;return s&&(y.initial===!1||y.initial===y.animate)&&!t.manuallyAnimateOnMount&&(k=!1),s=!1,o=!1,k?e(x):Promise.resolve()}function m(p,y){var x;if(i[p].isActive===y)return Promise.resolve();(x=t.variantChildren)==null||x.forEach(_=>{var S;return(S=_.animationState)==null?void 0:S.setActive(p,y)}),i[p].isActive=y;const v=h(p);for(const _ in i)i[_].protectedKeys={};return v}return{animateChanges:h,setActive:m,setAnimateFunction:u,getState:()=>i,reset:()=>{i=X0(),o=!0}}}function yN(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!c_(e,t):!1}function ei(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function X0(){return{animate:ei(!0),whileInView:ei(),whileHover:ei(),whileTap:ei(),whileDrag:ei(),whileFocus:ei(),exit:ei()}}function Vh(t,e){t.min=e.min,t.max=e.max}function dn(t,e){Vh(t.x,e.x),Vh(t.y,e.y)}function Y0(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const u_=1e-4,vN=1-u_,bN=1+u_,d_=.01,xN=0-d_,_N=0+d_;function St(t){return t.max-t.min}function wN(t,e,i){return Math.abs(t-e)<=i}function Q0(t,e,i,s=.5){t.origin=s,t.originPoint=Ve(e.min,e.max,t.origin),t.scale=St(i)/St(e),t.translate=Ve(i.min,i.max,t.origin)-t.originPoint,(t.scale>=vN&&t.scale<=bN||isNaN(t.scale))&&(t.scale=1),(t.translate>=xN&&t.translate<=_N||isNaN(t.translate))&&(t.translate=0)}function Nr(t,e,i,s){Q0(t.x,e.x,i.x,s?s.originX:void 0),Q0(t.y,e.y,i.y,s?s.originY:void 0)}function W0(t,e,i,s=0){const o=s?Ve(i.min,i.max,s):i.min;t.min=o+e.min,t.max=t.min+St(e)}function SN(t,e,i,s){W0(t.x,e.x,i.x,s==null?void 0:s.x),W0(t.y,e.y,i.y,s==null?void 0:s.y)}function J0(t,e,i,s=0){const o=s?Ve(i.min,i.max,s):i.min;t.min=e.min-o,t.max=t.min+St(e)}function Jl(t,e,i,s){J0(t.x,e.x,i.x,s==null?void 0:s.x),J0(t.y,e.y,i.y,s==null?void 0:s.y)}function Z0(t,e,i,s,o){return t-=e,t=Wl(t,1/i,s),o!==void 0&&(t=Wl(t,1/o,s)),t}function TN(t,e=0,i=1,s=.5,o,c=t,u=t){if(Cn.test(e)&&(e=parseFloat(e),e=Ve(u.min,u.max,e/100)-u.min),typeof e!="number")return;let h=Ve(c.min,c.max,s);t===c&&(h-=e),t.min=Z0(t.min,e,i,h,o),t.max=Z0(t.max,e,i,h,o)}function ev(t,e,[i,s,o],c,u){TN(t,e[i],e[s],e[o],e.scale,c,u)}const AN=["x","scaleX","originX"],EN=["y","scaleY","originY"];function tv(t,e,i,s){ev(t.x,e,AN,i?i.x:void 0,s?s.x:void 0),ev(t.y,e,EN,i?i.y:void 0,s?s.y:void 0)}function nv(t){return t.translate===0&&t.scale===1}function h_(t){return nv(t.x)&&nv(t.y)}function av(t,e){return t.min===e.min&&t.max===e.max}function NN(t,e){return av(t.x,e.x)&&av(t.y,e.y)}function iv(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function f_(t,e){return iv(t.x,e.x)&&iv(t.y,e.y)}function sv(t){return St(t.x)/St(t.y)}function rv(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function En(t){return[t("x"),t("y")]}function kN(t,e,i){let s="";const o=t.x.translate/e.x,c=t.y.translate/e.y,u=(i==null?void 0:i.z)||0;if((o||c||u)&&(s=`translate3d(${o}px, ${c}px, ${u}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),i){const{transformPerspective:p,rotate:y,rotateX:v,rotateY:x,skewX:_,skewY:S}=i;p&&(s=`perspective(${p}px) ${s}`),y&&(s+=`rotate(${y}deg) `),v&&(s+=`rotateX(${v}deg) `),x&&(s+=`rotateY(${x}deg) `),_&&(s+=`skewX(${_}deg) `),S&&(s+=`skewY(${S}deg) `)}const h=t.x.scale*e.x,m=t.y.scale*e.y;return(h!==1||m!==1)&&(s+=`scale(${h}, ${m})`),s||"none"}const m_=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],jN=m_.length,ov=t=>typeof t=="string"?parseFloat(t):t,lv=t=>typeof t=="number"||Z.test(t);function CN(t,e,i,s,o,c){o?(t.opacity=Ve(0,i.opacity??1,RN(s)),t.opacityExit=Ve(e.opacity??1,0,ON(s))):c&&(t.opacity=Ve(e.opacity??1,i.opacity??1,s));for(let u=0;u<jN;u++){const h=m_[u];let m=cv(e,h),p=cv(i,h);if(m===void 0&&p===void 0)continue;m||(m=0),p||(p=0),m===0||p===0||lv(m)===lv(p)?(t[h]=Math.max(Ve(ov(m),ov(p),s),0),(Cn.test(p)||Cn.test(m))&&(t[h]+="%")):t[h]=p}(e.rotate||i.rotate)&&(t.rotate=Ve(e.rotate||0,i.rotate||0,s))}function cv(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const RN=p_(0,.5,tx),ON=p_(.5,.95,Dt);function p_(t,e,i){return s=>s<t?0:s>e?1:i(hs(t,e,s))}function DN(t,e,i){const s=gt(t)?t:gn(t);return s.start(Lf("",s,e,i)),s.animation}function Lr(t,e,i,s={passive:!0}){return t.addEventListener(e,i,s),()=>t.removeEventListener(e,i)}const MN=(t,e)=>t.depth-e.depth;class LN{constructor(){this.children=[],this.isDirty=!1}add(e){vf(this.children,e),this.isDirty=!0}remove(e){Il(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(MN),this.isDirty=!1,this.children.forEach(e)}}function PN(t,e){const i=wt.now(),s=({timestamp:o})=>{const c=o-i;c>=e&&(rn(s),t(c-e))};return we.setup(s,!0),()=>rn(s)}function Vl(t){return gt(t)?t.get():t}class UN{constructor(){this.members=[]}add(e){vf(this.members,e);for(let i=this.members.length-1;i>=0;i--){const s=this.members[i];if(s===e||s===this.lead||s===this.prevLead)continue;const o=s.instance;(!o||o.isConnected===!1)&&!s.snapshot&&(Il(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(Il(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(e){var i;for(let s=this.members.indexOf(e)-1;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1&&((i=o.instance)==null?void 0:i.isConnected)!==!1)return this.promote(o),!0}return!1}promote(e,i){var o;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:c}=s.options,{layoutDependency:u}=e.options;(c===void 0||c!==u)&&(e.resumeFrom=s,i&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(o=e.root)!=null&&o.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}
60exitAnimationComplete(){this.members.forEach(e=>{var i,s,o,c,u;(s=(i=e.options).onExitComplete)==null||s.call(i),(u=(o=e.resumingFrom)==null?void 0:(c=o.options).onExitComplete)==null||u.call(c)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Hl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},th=["","X","Y","Z"],BN=1e3;let zN=0;function nh(t,e,i,s){const{latestValues:o}=e;o[t]&&(i[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}function g_(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const i=Dx(e);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:o,layoutId:c}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",we,!(o||c))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&g_(s)}function y_({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(u={},h=e==null?void 0:e()){this.id=zN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(qN),this.nodes.forEach(XN),this.nodes.forEach(YN),this.nodes.forEach($N)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new LN)}
vendor: 10,529 bytes, line 60
60addEventListener(u,h){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new xf),this.eventHandlers.get(u).add(h)}notifyListeners(u,...h){const m=this.eventHandlers.get(u);m&&m.notify(...h)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=Vf(u)&&!VE(u),this.instance=u;const{layoutId:h,layout:m,visualElement:p}=this.options;if(p&&!p.current&&p.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||h)&&(this.isLayoutDirty=!0),t){let y,v=0;const x=()=>this.root.updateBlockedByResize=!1;we.read(()=>{v=window.innerWidth}),t(u,()=>{const _=window.innerWidth;_!==v&&(v=_,this.root.updateBlockedByResize=!0,y&&y(),y=PN(x,250),Hl.hasAnimatedSinceResize&&(Hl.hasAnimatedSinceResize=!1,this.nodes.forEach(hv)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&p&&(h||m)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:v,hasRelativeLayoutChanged:x,layout:_})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||p.getDefaultTransition()||ek,{onLayoutAnimationStart:T,onLayoutAnimationComplete:k}=p.getProps(),E=!this.targetLayout||!f_(this.targetLayout,_),D=!v&&x;if(this.options.layoutRoot||this.resumeFrom||D||v&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const j={...Mf(S,"layout"),onPlay:T,onComplete:k};(p.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j),this.setAnimationOrigin(y,D)}else v||hv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=_})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),rn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(QN),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&g_(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const v=this.path[y];v.shouldResetTransform=!0,(typeof v.latestValues.x=="string"||typeof v.latestValues.y=="string")&&(v.isLayoutDirty=!0),v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:h,layout:m}=this.options;if(h===void 0&&!m)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const m=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),m&&this.nodes.forEach(IN),this.nodes.forEach(uv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(dv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(FN),this.nodes.forEach(KN),this.nodes.forEach(VN),this.nodes.forEach(HN)):this.nodes.forEach(dv),this.clearAllSnapshots();const h=wt.now();lt.delta=bn(0,1e3/60,h-lt.timestamp),lt.timestamp=h,lt.isProcessing=!0,Kd.update.process(lt),Kd.preRender.process(lt),Kd.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ms.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(GN),this.sharedNodes.forEach(WN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!St(this.snapshot.measuredBox.x)&&!St(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=it()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(h=!1),h&&this.instance){const m=s(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!o)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!h_(this.projectionDelta),m=this.getTransformTemplate(),p=m?m(this.latestValues,""):void 0,y=p!==this.prevTransformTemplateValue;u&&this.instance&&(h||ai(this.latestValues)||y)&&(o(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const h=this.measurePageBox();let m=this.removeElementScroll(h);return u&&(m=this.removeTransform(m)),tk(m),{animationId:this.root.animationId,measuredBox:h,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var p;const{visualElement:u}=this.options;if(!u)return it();const h=u.measureViewportBox();if(!(((p=this.scroll)==null?void 0:p.wasRoot)||this.path.some(nk))){const{scroll:y}=this.root;y&&(kn(h.x,y.offset.x),kn(h.y,y.offset.y))}return h}removeElementScroll(u){var m;const h=it();if(dn(h,u),(m=this.scroll)!=null&&m.wasRoot)return h;for(let p=0;p<this.path.length;p++){const y=this.path[p],{scroll:v,options:x}=y;y!==this.root&&v&&x.layoutScroll&&(v.wasRoot&&dn(h,u),kn(h.x,v.offset.x),kn(h.y,v.offset.y))}return h}applyTransform(u,h=!1,m){var y,v;const p=m||it();dn(p,u);for(let x=0;x<this.path.length;x++){const _=this.path[x];!h&&_.options.layoutScroll&&_.scroll&&_!==_.root&&(kn(p.x,-_.scroll.offset.x),kn(p.y,-_.scroll.offset.y)),ai(_.latestValues)&&zl(p,_.latestValues,(y=_.layout)==null?void 0:y.layoutBox)}return ai(this.latestValues)&&zl(p,this.latestValues,(v=this.layout)==null?void 0:v.layoutBox),p}removeTransform(u){var m;const h=it();dn(h,u);for(let p=0;p<this.path.length;p++){const y=this.path[p];if(!ai(y.latestValues))continue;let v;y.instance&&(Uh(y.latestValues)&&y.updateSnapshot(),v=it(),dn(v,y.measurePageBox())),tv(h,y.latestValues,(m=y.snapshot)==null?void 0:m.layoutBox,v)}return ai(this.latestValues)&&tv(h,this.latestValues),h}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){var _;const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==h;if(!(u||m&&this.isSharedProjectionDirty||this.isProjectionDirty||(_=this.parent)!=null&&_.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:v}=this.options;if(!this.layout||!(y||v))return;this.resolvedRelativeTargetAt=lt.timestamp;const x=this.getClosestProjectingParent();x&&this.linkedParentVersion!==x.layoutVersion&&!x.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=it(),this.targetWithTransforms=it()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),SN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):dn(this.target,this.layout.layoutBox),e_(this.target,this.targetDelta)):dn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Uh(this.parent.latestValues)||Zx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,h,m){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=it(),this.relativeTargetOrigin=it(),Jl(this.relativeTargetOrigin,h,m,this.options.layoutAnchor||void 0),dn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var S;const u=this.getLead(),h=!!this.resumingFrom||this!==u;let m=!0;if((this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty)&&
vendor: 5,333 bytes, line 60
60(m=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===lt.timestamp&&(m=!1),m)return;const{layout:p,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||y))return;dn(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,x=this.treeScale.y;JE(this.layoutCorrected,this.treeScale,this.path,h),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=it());const{target:_}=u;if(!_){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Y0(this.prevProjectionDelta.x,this.projectionDelta.x),Y0(this.prevProjectionDelta.y,this.projectionDelta.y)),Nr(this.projectionDelta,this.layoutCorrected,_,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==x||!rv(this.projectionDelta.x,this.prevProjectionDelta.x)||!rv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",_))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){var h;if((h=this.options.visualElement)==null||h.scheduleRender(),u){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=os(),this.projectionDelta=os(),this.projectionDeltaWithTransform=os()}setAnimationOrigin(u,h=!1){const m=this.snapshot,p=m?m.latestValues:{},y={...this.latestValues},v=os();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const x=it(),_=m?m.source:void 0,S=this.layout?this.layout.source:void 0,T=_!==S,k=this.getStack(),E=!k||k.members.length<=1,D=!!(T&&!E&&this.options.crossfade===!0&&!this.path.some(ZN));this.animationProgress=0;let j;this.mixTargetDelta=U=>{const G=U/1e3;fv(v.x,u.x,G),fv(v.y,u.y,G),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jl(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),JN(this.relativeTarget,this.relativeTargetOrigin,x,G),j&&NN(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=it()),dn(j,this.relativeTarget)),T&&(this.animationValues=y,CN(y,p,this.latestValues,G,D,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=G},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){var h,m,p;this.notifyListeners("animationStart"),(h=this.currentAnimation)==null||h.stop(),(p=(m=this.resumingFrom)==null?void 0:m.currentAnimation)==null||p.stop(),this.pendingAnimation&&(rn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Hl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gn(0)),this.motionValue.jump(0,!1),this.currentAnimation=DN(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:y=>{this.mixTargetDelta(y),u.onUpdate&&u.onUpdate(y)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(BN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:h,target:m,layout:p,latestValues:y}=u;if(!(!h||!m||!p)){if(this!==u&&this.layout&&p&&v_(this.options.animationType,this.layout.layoutBox,p.layoutBox)){m=this.target||it();const v=St(this.layout.layoutBox.x);m.x.min=u.target.x.min,m.x.max=m.x.min+v;const x=St(this.layout.layoutBox.y);m.y.min=u.target.y.min,m.y.max=m.y.min+x}dn(h,m),zl(h,y),Nr(this.projectionDeltaWithTransform,this.layoutCorrected,h,y)}}registerSharedNode(u,h){this.sharedNodes.has(u)||this.sharedNodes.set(u,new UN),this.sharedNodes.get(u).add(h);const p=h.options.initialPromotionConfig;h.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(h):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var h;const{layoutId:u}=this.options;return u?((h=this.getStack())==null?void 0:h.lead)||this:this}getPrevLead(){var h;const{layoutId:u}=this.options;return u?(h=this.getStack())==null?void 0:h.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:h,preserveFollowOpacity:m}={}){const p=this.getStack();p&&p.promote(this,m),u&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}
vendor: 32,356 bytes, line 60
60resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let h=!1;const{latestValues:m}=u;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(h=!0),!h)return;const p={};m.z&&nh("z",u,p,this.animationValues);for(let y=0;y<th.length;y++)nh(`rotate${th[y]}`,u,p,this.animationValues),nh(`skew${th[y]}`,u,p,this.animationValues);u.render();for(const y in p)u.setStaticValue(y,p[y]),this.animationValues&&(this.animationValues[y]=p[y]);u.scheduleRender()}applyProjectionStyles(u,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=Vl(h==null?void 0:h.pointerEvents)||"",u.transform=m?m(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=Vl(h==null?void 0:h.pointerEvents)||""),this.hasProjected&&!ai(this.latestValues)&&(u.transform=m?m({},""):"none",this.hasProjected=!1);return}u.visibility="";const y=p.animationValues||p.latestValues;this.applyTransformsToTarget();let v=kN(this.projectionDeltaWithTransform,this.treeScale,y);m&&(v=m(y,v)),u.transform=v;const{x,y:_}=this.projectionDelta;u.transformOrigin=`${x.origin*100}% ${_.origin*100}% 0`,p.animationValues?u.opacity=p===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:u.opacity=p===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const S in zh){if(y[S]===void 0)continue;const{correct:T,applyTo:k,isCSSVariable:E}=zh[S],D=v==="none"?y[S]:T(y[S],p);if(k){const j=k.length;for(let U=0;U<j;U++)u[k[U]]=D}else E?this.options.visualElement.renderState.vars[S]=D:u[S]=D}this.options.layoutId&&(u.pointerEvents=p===this?Vl(h==null?void 0:h.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var h;return(h=u.currentAnimation)==null?void 0:h.stop()}),this.root.nodes.forEach(uv),this.root.sharedNodes.clear()}}}function VN(t){t.updateLayout()}function HN(t){var i;const e=((i=t.resumeFrom)==null?void 0:i.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:c}=t.options,u=e.source!==t.layout.source;if(c==="size")En(v=>{const x=u?e.measuredBox[v]:e.layoutBox[v],_=St(x);x.min=s[v].min,x.max=x.min+_});else if(c==="x"||c==="y"){const v=c==="x"?"y":"x";Vh(u?e.measuredBox[v]:e.layoutBox[v],s[v])}else v_(c,e.layoutBox,s)&&En(v=>{const x=u?e.measuredBox[v]:e.layoutBox[v],_=St(s[v]);x.max=x.min+_,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[v].max=t.relativeTarget[v].min+_)});const h=os();Nr(h,s,e.layoutBox);const m=os();u?Nr(m,t.applyTransform(o,!0),e.measuredBox):Nr(m,s,e.layoutBox);const p=!h_(h);let y=!1;if(!t.resumeFrom){const v=t.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:x,layout:_}=v;if(x&&_){const S=t.options.layoutAnchor||void 0,T=it();Jl(T,e.layoutBox,x.layoutBox,S);const k=it();Jl(k,s,_.layoutBox,S),f_(T,k)||(y=!0),v.options.layoutRoot&&(t.relativeTarget=k,t.relativeTargetOrigin=T,t.relativeParent=v)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:m,layoutDelta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:y})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function qN(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function $N(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function GN(t){t.clearSnapshot()}function uv(t){t.clearMeasurements()}function IN(t){t.isLayoutDirty=!0,t.updateLayout()}function dv(t){t.isLayoutDirty=!1}function FN(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function KN(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function hv(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function XN(t){t.resolveTargetDelta()}function YN(t){t.calcProjection()}function QN(t){t.resetSkewAndRotation()}function WN(t){t.removeLeadSnapshot()}function fv(t,e,i){t.translate=Ve(e.translate,0,i),t.scale=Ve(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function mv(t,e,i,s){t.min=Ve(e.min,i.min,s),t.max=Ve(e.max,i.max,s)}function JN(t,e,i,s){mv(t.x,e.x,i.x,s),mv(t.y,e.y,i.y,s)}function ZN(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ek={duration:.45,ease:[.4,0,.1,1]},pv=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),gv=pv("applewebkit/")&&!pv("chrome/")?Math.round:Dt;function yv(t){t.min=gv(t.min),t.max=gv(t.max)}function tk(t){yv(t.x),yv(t.y)}function v_(t,e,i){return t==="position"||t==="preserve-aspect"&&!wN(sv(e),sv(i),.2)}function nk(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const ak=y_({attachResizeListener:(t,e)=>Lr(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),ah={current:void 0},b_=y_({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ah.current){const t=new ak({});t.mount(window),t.setOptions({layoutScroll:!0}),ah.current=t}return ah.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),If=N.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ik(t=!0){const e=N.useContext(yf);if(e===null)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=e,c=N.useId();N.useEffect(()=>{if(t)return o(c)},[t]);const u=N.useCallback(()=>t&&s&&s(c),[c,s,t]);return!i&&s?[!1,u]:[!0]}const x_=N.createContext({strict:!1}),vv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let bv=!1;function sk(){if(bv)return;const t={};for(const e in vv)t[e]={isEnabled:i=>vv[e].some(s=>!!i[s])};Qx(t),bv=!0}function __(){return sk(),XE()}function rk(t){const e=__();for(const i in t)e[i]={...e[i],...t[i]};Qx(e)}const ok=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Zl(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ok.has(t)}let w_=t=>!Zl(t);function lk(t){typeof t=="function"&&(w_=e=>e.startsWith("on")?!Zl(e):t(e))}try{lk(require("@emotion/is-prop-valid").default)}catch{}function ck(t,e,i){const s={};for(const o in t)o==="values"&&typeof t.values=="object"||gt(t[o])||(w_(o)||i===!0&&Zl(o)||!e&&!Zl(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);return s}const fc=N.createContext({});function uk(t,e){if(hc(t)){const{initial:i,animate:s}=t;return{initial:i===!1||Mr(i)?i:void 0,animate:Mr(s)?s:void 0}}return t.inherit!==!1?e:{}}function dk(t){const{initial:e,animate:i}=uk(t,N.useContext(fc));return N.useMemo(()=>({initial:e,animate:i}),[xv(e),xv(i)])}function xv(t){return Array.isArray(t)?t.join(" "):t}const Ff=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function S_(t,e,i){for(const s in e)!gt(e[s])&&!a_(s,i)&&(t[s]=e[s])}function hk({transformTemplate:t},e){return N.useMemo(()=>{const i=Ff();return $f(i,e,t),Object.assign({},i.vars,i.style)},[e])}function fk(t,e){const i=t.style||{},s={};return S_(s,i,t),Object.assign(s,hk(t,e)),s}function mk(t,e){const i={},s=fk(t,e);return t.drag&&t.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const T_=()=>({...Ff(),attrs:{}});function pk(t,e,i,s){const o=N.useMemo(()=>{const c=T_();return i_(c,e,r_(s),t.transformTemplate,t.style),{...c.attrs,style:{...c.style}}},[e]);if(t.style){const c={};S_(c,t.style,t),o.style={...c,...o.style}}return o}const gk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Kf(t){return typeof t!="string"||t.includes("-")?!1:!!(gk.indexOf(t)>-1||/[A-Z]/u.test(t))}function yk(t,e,i,{latestValues:s},o,c=!1,u){const m=(u??Kf(t)?pk:mk)(e,s,o,t),p=ck(e,typeof t=="string",c),y=t!==N.Fragment?{...p,...m,ref:i}:{},{children:v}=e,x=N.useMemo(()=>gt(v)?v.get():v,[v]);return N.createElement(t,{...y,children:x})}function vk({scrapeMotionValuesFromProps:t,createRenderState:e},i,s,o){return{latestValues:bk(i,s,o,t),renderState:e()}}function bk(t,e,i,s){const o={},c=s(t,{});for(const x in c)o[x]=Vl(c[x]);let{initial:u,animate:h}=t;const m=hc(t),p=Xx(t);e&&p&&!m&&t.inherit!==!1&&(u===void 0&&(u=e.initial),h===void 0&&(h=e.animate));let y=i?i.initial===!1:!1;y=y||u===!1;const v=y?h:u;if(v&&typeof v!="boolean"&&!dc(v)){const x=Array.isArray(v)?v:[v];for(let _=0;_<x.length;_++){const S=Pf(t,x[_]);if(S){const{transitionEnd:T,transition:k,...E}=S;for(const D in E){let j=E[D];if(Array.isArray(j)){const U=y?j.length-1:0;j=j[U]}j!==null&&(o[D]=j)}for(const D in T)o[D]=T[D]}}}return o}const A_=t=>(e,i)=>{const s=N.useContext(fc),o=N.useContext(yf),c=()=>vk(t,e,s,o);return i?c():ds(c)},xk=A_({scrapeMotionValuesFromProps:Gf,createRenderState:Ff}),_k=A_({scrapeMotionValuesFromProps:o_,createRenderState:T_}),wk=Symbol.for("motionComponentSymbol");function Sk(t,e,i){const s=N.useRef(i);N.useInsertionEffect(()=>{s.current=i});const o=N.useRef(null);return N.useCallback(c=>{var h;c&&((h=t.onMount)==null||h.call(t,c)),e&&(c?e.mount(c):e.unmount());const u=s.current;if(typeof u=="function")if(c){const m=u(c);typeof m=="function"&&(o.current=m)}else o.current?(o.current(),o.current=null):u(c);else u&&(u.current=c)},[e])}const E_=N.createContext({});function es(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Tk(t,e,i,s,o,c){var j,U;const{visualElement:u}=N.useContext(fc),h=N.useContext(x_),m=N.useContext(yf),p=N.useContext(If),y=p.reducedMotion,v=p.skipAnimations,x=N.useRef(null),_=N.useRef(!1);s=s||h.renderer,!x.current&&s&&(x.current=s(t,{visualState:e,parent:u,props:i,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:y,skipAnimations:v,isSVG:c}),_.current&&x.current&&(x.current.manuallyAnimateOnMount=!0));const S=x.current,T=N.useContext(E_);S&&!S.projection&&o&&(S.type==="html"||S.type==="svg")&&Ak(x.current,i,o,T);const k=N.useRef(!1);N.useInsertionEffect(()=>{S&&k.current&&S.update(i,m)});const E=i[Ox],D=N.useRef(!!E&&typeof window<"u"&&!((j=window.MotionHandoffIsComplete)!=null&&j.call(window,E))&&((U=window.MotionHasOptimisedAnimation)==null?void 0:U.call(window,E)));return gf(()=>{_.current=!0,S&&(k.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),D.current&&S.animationState&&S.animationState.animateChanges())}),N.useEffect(()=>{S&&(!D.current&&S.animationState&&S.animationState.animateChanges(),D.current&&(queueMicrotask(()=>{var G;(G=window.MotionHandoffMarkAsComplete)==null||G.call(window,E)}),D.current=!1),S.enteringChildren=void 0)}),S}function Ak(t,e,i,s){const{layoutId:o,layout:c,drag:u,dragConstraints:h,layoutScroll:m,layoutRoot:p,layoutAnchor:y,layoutCrossfade:v}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:N_(t.parent)),t.projection.setOptions({layoutId:o,layout:c,alwaysMeasureLayout:!!u||h&&es(h),visualElement:t,animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,crossfade:v,layoutScroll:m,layoutRoot:p,layoutAnchor:y})}function N_(t){if(t)return t.options.allowProjection!==!1?t.projection:N_(t.parent)}function ih(t,{forwardMotionProps:e=!1,type:i}={},s,o){s&&rk(s);const c=i?i==="svg":Kf(t),u=c?_k:xk;function h(p,y){let v;const x={...N.useContext(If),...p,layoutId:Ek(p)},{isStatic:_}=x,S=dk(p),T=u(p,_);if(!_&&typeof window<"u"){Nk();const k=kk(x);v=k.MeasureLayout,S.visualElement=Tk(t,T,x,o,k.ProjectionNode,c)}return g.jsxs(fc.Provider,{value:S,children:[v&&S.visualElement?g.jsx(v,{visualElement:S.visualElement,...x}):null,yk(t,p,Sk(T,S.visualElement,y),T,_,e,c)]})}h.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const m=N.forwardRef(h);return m[wk]=t,m}function Ek({layoutId:t}){const e=N.useContext(Gb).id;return e&&t!==void 0?e+"-"+t:t}function Nk(t,e){N.useContext(x_).strict}function kk(t){const e=__(),{drag:i,layout:s}=e;if(!i&&!s)return{};const o={...i,...s};return{MeasureLayout:i!=null&&i.isEnabled(t)||s!=null&&s.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function jk(t,e){if(typeof Proxy>"u")return ih;const i=new Map,s=(c,u)=>ih(c,u,t,e),o=(c,u)=>s(c,u);return new Proxy(o,{get:(c,u)=>u==="create"?s:(i.has(u)||i.set(u,ih(u,void 0,t,e)),i.get(u))})}const Ck=(t,e)=>e.isSVG??Kf(t)?new dN(e):new sN(e,{allowProjection:t!==N.Fragment});class Rk extends Ma{constructor(e){super(e),e.animationState||(e.animationState=gN(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();dc(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:i}=this.node.prevProps||{};e!==i&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Ok=0;class Dk extends Ma{constructor(){super(...arguments),this.id=Ok++,this.isExitComplete=!1}update(){var c;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:u,custom:h}=this.node.getProps();if(typeof u=="string"||typeof u=="object"&&u!==null&&!Array.isArray(u)){const m=ci(this.node,u,h);if(m){const{transition:p,transitionEnd:y,...v}=m;for(const x in v)(c=this.node.getValue(x))==null||c.jump(v[x])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!e);i&&!e&&o.then(()=>{this.isExitComplete=!0,i(this.id)})}mount(){const{register:e,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Mk={animation:{Feature:Rk},exit:{Feature:Dk}};function Qr(t){return{point:{x:t.pageX,y:t.pageY}}}const Lk=t=>e=>zf(e)&&t(e,Qr(e));function kr(t,e,i,s){return Lr(t,e,Lk(i),s)}const k_=({current:t})=>t?t.ownerDocument.defaultView:null,_v=(t,e)=>Math.abs(t-e);function Pk(t,e){const i=_v(t.x,e.x),s=_v(t.y,e.y);return Math.sqrt(i**2+s**2)}const wv=new Set(["auto","scroll"]);class j_{constructor(e,i,{transformPagePoint:s,contextWindow:o=window,dragSnapToOrigin:c=!1,distanceThreshold:u=3,element:h}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=_=>{this.handleScroll(_.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=_l(this.lastRawMoveEventInfo,this.transformPagePoint));const _=sh(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,T=Pk(_.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!T)return;const{point:k}=_,{timestamp:E}=lt;this.history.push({...k,timestamp:E});const{onStart:D,onMove:j}=this.handlers;S||(D&&D(this.lastMoveEvent,_),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,_)},this.handlePointerMove=(_,S)=>{this.lastMoveEvent=_,this.lastRawMoveEventInfo=S,this.lastMoveEventInfo=_l(S,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(_,S)=>{this.end();const{onEnd:T,onSessionEnd:k,resumeAnimation:E}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=sh(_.type==="pointercancel"?this.lastMoveEventInfo:_l(S,this.transformPagePoint),this.history);this.startEvent&&T&&T(_,D),k&&k(_,D)},!zf(e))return;this.dragSnapToOrigin=c,this.handlers=i,this.transformPagePoint=s,this.distanceThreshold=u,this.contextWindow=o||window;const m=Qr(e),p=_l(m,this.transformPagePoint),{point:y}=p,{timestamp:v}=lt;this.history=[{...y,timestamp:v}];const{onSessionStart:x}=i;x&&x(e,sh(p,this.history)),this.removeListeners=Kr(kr(this.contextWindow,"pointermove",this.handlePointerMove),kr(this.contextWindow,"pointerup",this.handlePointerUp),kr(this.contextWindow,"pointercancel",this.handlePointerUp)),h&&this.startScrollTracking(h)}startScrollTracking(e){let i=e.parentElement;for(;i;){const s=getComputedStyle(i);(wv.has(s.overflowX)||wv.has(s.overflowY))&&this.scrollPositions.set(i,{x:i.scrollLeft,y:i.scrollTop}),i=i.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const i=this.scrollPositions.get(e);if(!i)return;const s=e===window,o=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},c={x:o.x-i.x,y:o.y-i.y};c.x===0&&c.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=c.x,this.lastMoveEventInfo.point.y+=c.y):this.history.length>0&&(this.history[0].x-=c.x,this.history[0].y-=c.y),this.scrollPositions.set(e,o),we.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),rn(this.updatePoint)}}function _l(t,e){return e?{point:e(t.point)}:t}function Sv(t,e){return{x:t.x-e.x,y:t.y-e.y}}function sh({point:t},e){return{point:t,delta:Sv(t,C_(e)),offset:Sv(t,Uk(e)),velocity:Bk(e,.1)}}function Uk(t){return t[0]}function C_(t){return t[t.length-1]}function Bk(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null;const o=C_(t);for(;i>=0&&(s=t[i],!(o.timestamp-s.timestamp>It(e)));)i--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&o.timestamp-s.timestamp>It(e)*2&&(s=t[1]);const c=an(o.timestamp-s.timestamp);if(c===0)return{x:0,y:0};const u={x:(o.x-s.x)/c,y:(o.y-s.y)/c};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function zk(t,{min:e,max:i},s){return e!==void 0&&t<e?t=s?Ve(e,t,s.min):Math.max(t,e):i!==void 0&&t>i&&(t=s?Ve(i,t,s.max):Math.min(t,i)),t}function Tv(t,e,i){return{min:e!==void 0?t.min+e:void 0,max:i!==void 0?t.max+i-(t.max-t.min):void 0}}function Vk(t,{top:e,left:i,bottom:s,right:o}){return{x:Tv(t.x,i,o),y:Tv(t.y,e,s)}}function Av(t,e){let i=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,s]=[s,i]),{min:i,max:s}}function Hk(t,e){return{x:Av(t.x,e.x),y:Av(t.y,e.y)}}function qk(t,e){let i=.5;const s=St(t),o=St(e);return o>s?i=hs(e.min,e.max-s,t.min):s>o&&(i=hs(t.min,t.max-o,e.min)),bn(0,1,i)}function $k(t,e){const i={};return e.min!==void 0&&(i.min=e.min-t.min),e.max!==void 0&&(i.max=e.max-t.min),i}const Hh=.35;function Gk(t=Hh){return t===!1?t=0:t===!0&&(t=Hh),{x:Ev(t,"left","right"),y:Ev(t,"top","bottom")}}function Ev(t,e,i){return{min:Nv(t,e),max:Nv(t,i)}}function Nv(t,e){return typeof t=="number"?t:t[e]||0}const Ik=new WeakMap;class Fk{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=it(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:i=!1,distanceThreshold:s}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const c=v=>{i&&this.snapToCursor(Qr(v).point),this.stopAnimation()},u=(v,x)=>{const{drag:_,dragPropagation:S,onDragStart:T}=this.getProps();if(_&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=SE(_),!this.openDragLock))return;this.latestPointerEvent=v,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),En(E=>{let D=this.getAxisMotionValue(E).get()||0;if(Cn.test(D)){const{projection:j}=this.visualElement;if(j&&j.layout){const U=j.layout.layoutBox[E];U&&(D=St(U)*(parseFloat(D)/100))}}this.originPoint[E]=D}),T&&we.update(()=>T(v,x),!1,!0),Rh(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},h=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x;const{dragPropagation:_,dragDirectionLock:S,onDirectionLock:T,onDrag:k}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:E}=x;if(S&&this.currentDirection===null){this.currentDirection=Xk(E),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",x.point,E),this.updateAxis("y",x.point,E),this.visualElement.render(),k&&we.update(()=>k(v,x),!1,!0)},m=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x,this.stop(v,x),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:v}=this.getProps();(v||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:y}=this.getProps();this.panSession=new j_(e,{onSessionStart:c,onStart:u,onMove:h,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:s,contextWindow:k_(this.visualElement),element:this.visualElement.current})}stop(e,i){const s=e||this.latestPointerEvent,o=i||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!o||!s)return;const{velocity:u}=o;this.startAnimation(u);const{onDragEnd:h}=this.getProps();h&&we.postRender(()=>h(s,o))}cancel(){this.isDragging=!1;const{projection:e,animationState:i}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,i,s){const{drag:o}=this.getProps();if(!s||!wl(e,o,this.currentDirection))return;const c=this.getAxisMotionValue(e);let u=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(u=zk(u,this.constraints[e],this.elastic[e])),c.set(u)}resolveConstraints(){var c;const{dragConstraints:e,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(c=this.visualElement.projection)==null?void 0:c.layout,o=this.constraints;e&&es(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Vk(s.layoutBox,e):this.constraints=!1,this.elastic=Gk(i),o!==this.constraints&&!es(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&En(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=$k(s.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!es(e))return!1;const s=e.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;o.root&&(o.root.scroll=void 0,o.root.updateScroll());const c=ZE(s,o.root,this.visualElement.getTransformPagePoint());let u=Hk(o.layout.layoutBox,c);if(i){const h=i(QE(u));this.hasMutatedConstraints=!!h,h&&(u=Jx(h))}return u}startAnimation(e){const{drag:i,dragMomentum:s,dragElastic:o,dragTransition:c,dragSnapToOrigin:u,onDragTransitionEnd:h}=this.getProps(),m=this.constraints||{},p=En(y=>{if(!wl(y,i,this.currentDirection))return;let v=m&&m[y]||{};(u===!0||u===y)&&(v={min:0,max:0});const x=o?200:1e6,_=o?40:1e7,S={type:"inertia",velocity:s?e[y]:0,bounceStiffness:x,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...c,...v};return this.startAxisValueAnimation(y,S)});return Promise.all(p).then(h)}startAxisValueAnimation(e,i){const s=this.getAxisMotionValue(e);return Rh(this.visualElement,e),s.start(Lf(e,s,0,i,this.visualElement,!1))}stopAnimation(){En(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const i=`_drag${e.toUpperCase()}`,o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){En(i=>{const{drag:s}=this.getProps();if(!wl(i,s,this.currentDirection))return;const{projection:o}=this.visualElement,c=this.getAxisMotionValue(i);if(o&&o.layout){const{min:u,max:h}=o.layout.layoutBox[i],m=c.get()||0;c.set(e[i]-Ve(u,h,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:i}=this.getProps(),{projection:s}=this.visualElement;if(!es(i)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};En(u=>{const h=this.getAxisMotionValue(u);if(h&&this.constraints!==!1){const m=h.get();o[u]=qk({min:m,max:m},this.constraints[u])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),En(u=>{if(!wl(u,e,null))return;const h=this.getAxisMotionValue(u),{min:m,max:p}=this.constraints[u];h.set(Ve(m,p,o[u]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ik.set(this.visualElement,this);const e=this.visualElement.current,i=kr(e,"pointerdown",p=>{const{drag:y,dragListener:v=!0}=this.getProps(),x=p.target,_=x!==e&&jE(x);y&&v&&!_&&this.start(p)});let s;const o=()=>{const{dragConstraints:p}=this.getProps();es(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Kk(e,p.current,()=>this.scalePositionWithinConstraints())))},{projection:c}=this.visualElement,u=c.addEventListener("measure",o);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),we.read(o);const h=Lr(window,"resize",()=>this.scalePositionWithinConstraints()),m=c.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:y})=>{this.isDragging&&y&&(En(v=>{const x=this.getAxisMotionValue(v);x&&(this.originPoint[v]+=p[v].translate,x.set(x.get()+p[v].translate))}),this.visualElement.render())}));return()=>{h(),i(),u(),m&&m(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:c=!1,dragElastic:u=Hh,dragMomentum:h=!0}=e;return{...e,drag:i,dragDirectionLock:s,dragPropagation:o,dragConstraints:c,dragElastic:u,dragMomentum:h}}}function kv(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Kk(t,e,i){const s=Lh(t,kv(i)),o=Lh(e,kv(i));return()=>{s(),o()}}function wl(t,e,i){return(e===!0||e===t)&&(i===null||i===t)}function Xk(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}class Yk extends Ma{constructor(e){super(e),this.removeGroupControls=Dt,this.removeListeners=Dt,this.controls=new Fk(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dt}update(){const{dragControls:e}=this.node.getProps(),{dragControls:i}=this.node.prevProps||{};e!==i&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const rh=t=>(e,i)=>{t&&we.update(()=>t(e,i),!1,!0)};class Qk extends Ma{constructor(){super(...arguments),this.removePointerDownListener=Dt}onPointerDown(e){this.session=new j_(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:k_(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:i,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:rh(e),onStart:rh(i),onMove:rh(s),onEnd:(c,u)=>{delete this.session,o&&we.postRender(()=>o(c,u))}}}mount(){this.removePointerDownListener=kr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let oh=!1;class Wk extends N.Component{componentDidMount(){const{visualElement:e,layoutGroup:i,switchLayoutGroup:s,layoutId:o}=this.props,{projection:c}=e;c&&(i.group&&i.group.add(c),s&&s.register&&o&&s.register(c),oh&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Hl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:i,visualElement:s,drag:o,isPresent:c}=this.props,{projection:u}=s;return u&&(u.isPresent=c,e.layoutDependency!==i&&u.setOptions({...u.options,layoutDependency:i}),oh=!0,o||e.layoutDependency!==i||i===void 0||e.isPresent!==c?u.willUpdate():this.safeToRemove(),e.isPresent!==c&&(c?u.promote():u.relegate()||we.postRender(()=>{const h=u.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:i}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=i,s.root.didUpdate(),ms.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:i,switchLayoutGroup:s}=this.props,{projection:o}=e;oh=!0,o&&(o.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function R_(t){const[e,i]=ik(),s=N.useContext(Gb);return g.jsx(Wk,{...t,layoutGroup:s,switchLayoutGroup:N.useContext(E_),isPresent:e,safeToRemove:i})}const Jk={pan:{Feature:Qk},drag:{Feature:Yk,ProjectionNode:b_,MeasureLayout:R_}};function jv(t,e,i){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",i==="Start");const o="onHover"+i,c=s[o];c&&we.postRender(()=>c(e,Qr(e)))}class Zk extends Ma{mount(){const{current:e}=this.node;e&&(this.unmount=AE(e,(i,s)=>(jv(this.node,s,"Start"),o=>jv(this.node,o,"End"))))}unmount(){}}class ej extends Ma{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Kr(Lr(this.node.current,"focus",()=>this.onFocus()),Lr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Cv(t,e,i){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",i==="Start");const o="onTap"+(i==="End"?"":i),c=s[o];c&&we.postRender(()=>c(e,Qr(e)))}class tj extends Ma{mount(){const{current:e}=this.node;if(!e)return;
60const{globalTapTarget:i,propagate:s}=this.node.props;this.unmount=RE(e,(o,c)=>(Cv(this.node,c,"Start"),(u,{success:h})=>Cv(this.node,u,h?"End":"Cancel")),{useGlobalTarget:i,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const qh=new WeakMap,lh=new WeakMap,nj=t=>{const e=qh.get(t.target);e&&e(t)},aj=t=>{t.forEach(nj)};function ij({root:t,...e}){const i=t||document;lh.has(i)||lh.set(i,{});const s=lh.get(i),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(aj,{root:t,...e})),s[o]}function sj(t,e,i){const s=ij(e);return qh.set(t,i),s.observe(t),()=>{qh.delete(t),s.unobserve(t)}}const rj={some:0,all:1};class oj extends Ma{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var m;(m=this.stopObserver)==null||m.call(this);const{viewport:e={}}=this.node.getProps(),{root:i,margin:s,amount:o="some",once:c}=e,u={root:i?i.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:rj[o]},h=p=>{const{isIntersecting:y}=p;if(this.isInView===y||(this.isInView=y,c&&!y&&this.hasEnteredView))return;y&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",y);const{onViewportEnter:v,onViewportLeave:x}=this.node.getProps(),_=y?v:x;_&&_(p)};this.stopObserver=sj(this.node.current,u,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:i}=this.node;["amount","margin","root"].some(lj(e,i))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function lj({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}const cj={inView:{Feature:oj},tap:{Feature:tj},focus:{Feature:ej},hover:{Feature:Zk}},uj={layout:{ProjectionNode:b_,MeasureLayout:R_}},dj={...Mk,...cj,...Jk,...uj},mc=jk(dj,Ck);function ec(t){return typeof window>"u"?!1:t?_x():Df()}const hj=50,Rv=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),fj=()=>({time:0,x:Rv(),y:Rv()}),mj={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ov(t,e,i,s){const o=i[e],{length:c,position:u}=mj[e],h=o.current,m=i.time;o.current=Math.abs(t[`scroll${u}`]),o.scrollLength=t[`scroll${c}`]-t[`client${c}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=hs(0,o.scrollLength,o.current);const p=s-m;o.velocity=p>hj?0:_f(o.current-h,p)}function pj(t,e,i){Ov(t,"x",e,i),Ov(t,"y",e,i),e.time=i}function gj(t,e){const i={x:0,y:0};let s=t;for(;s&&s!==e;)if(Hx(s))i.x+=s.offsetLeft,i.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const o=s.getBoundingClientRect();s=s.parentElement;const c=s.getBoundingClientRect();i.x+=o.left-c.left,i.y+=o.top-c.top}else if(s instanceof SVGGraphicsElement){const{x:o,y:c}=s.getBBox();i.x+=o,i.y+=c;let u=null,h=s.parentNode;for(;!u;)h.tagName==="svg"&&(u=h),h=s.parentNode;s=u}else break;return i}const $h={start:0,center:.5,end:1};function Dv(t,e,i=0){let s=0;if(t in $h&&(t=$h[t]),typeof t=="string"){const o=parseFloat(t);t.endsWith("px")?s=o:t.endsWith("%")?t=o/100:t.endsWith("vw")?s=o/100*document.documentElement.clientWidth:t.endsWith("vh")?s=o/100*document.documentElement.clientHeight:t=o}return typeof t=="number"&&(s=e*t),i+s}const yj=[0,0];function vj(t,e,i,s){let o=Array.isArray(t)?t:yj,c=0,u=0;return typeof t=="number"?o=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?o=t.split(" "):o=[t,$h[t]?t:"0"]),c=Dv(o[0],i,s),u=Dv(o[1],e),c-u}const _r={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},bj={x:0,y:0};function xj(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function _j(t,e,i){const{offset:s=_r.All}=i,{target:o=t,axis:c="y"}=i,u=c==="y"?"height":"width",h=o!==t?gj(o,t):bj,m=o===t?{width:t.scrollWidth,height:t.scrollHeight}:xj(o),p={width:t.clientWidth,height:t.clientHeight};e[c].offset.length=0;let y=!e[c].interpolate;const v=s.length;for(let x=0;x<v;x++){const _=vj(s[x],p[u],m[u],h[c]);!y&&_!==e[c].interpolatorOffsets[x]&&(y=!0),e[c].offset[x]=_}y&&(e[c].interpolate=jf(e[c].offset,gx(s),{clamp:!1}
60),e[c].interpolatorOffsets=[...e[c].offset]),e[c].progress=bn(0,1,e[c].interpolate(e[c].current))}function wj(t,e=t,i){if(i.x.targetOffset=0,i.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)i.x.targetOffset+=s.offsetLeft,i.y.targetOffset+=s.offsetTop,s=s.offsetParent}i.x.targetLength=e===t?e.scrollWidth:e.clientWidth,i.y.targetLength=e===t?e.scrollHeight:e.clientHeight,i.x.containerLength=t.clientWidth,i.y.containerLength=t.clientHeight}function Sj(t,e,i,s={}){return{measure:o=>{wj(t,s.target,i),pj(t,i,o),(s.offset||s.target)&&_j(t,i,s)},notify:()=>e(i)}}const Xi=new WeakMap,Mv=new WeakMap,ch=new WeakMap,Lv=new WeakMap,Sl=new WeakMap,Pv=t=>t===document.scrollingElement?window:t;function O_(t,{container:e=document.scrollingElement,trackContentSize:i=!1,...s}={}){if(!e)return Dt;let o=ch.get(e);o||(o=new Set,ch.set(e,o));const c=fj(),u=Sj(e,t,c,s);if(o.add(u),!Xi.has(e)){const m=()=>{for(const x of o)x.measure(lt.timestamp);we.preUpdate(p)},p=()=>{for(const x of o)x.notify()},y=()=>we.read(m);Xi.set(e,y);const v=Pv(e);window.addEventListener("resize",y),e!==document.documentElement&&Mv.set(e,Lh(e,y)),v.addEventListener("scroll",y),y()}if(i&&!Sl.has(e)){const m=Xi.get(e),p={width:e.scrollWidth,height:e.scrollHeight};Lv.set(e,p);const y=()=>{const x=e.scrollWidth,_=e.scrollHeight;(p.width!==x||p.height!==_)&&(m(),p.width=x,p.height=_)},v=we.read(y,!0);Sl.set(e,v)}const h=Xi.get(e);return we.read(h,!1,!0),()=>{var v;rn(h);const m=ch.get(e);if(!m||(m.delete(u),m.size))return;const p=Xi.get(e);Xi.delete(e),p&&(Pv(e).removeEventListener("scroll",p),(v=Mv.get(e))==null||v(),window.removeEventListener("resize",p));const y=Sl.get(e);y&&(rn(y),Sl.delete(e)),Lv.delete(e)}}const Tj=[[_r.Enter,"entry"],[_r.Exit,"exit"],[_r.Any,"cover"],[_r.All,"contain"]],Uv={start:0,end:1};function Aj(t){const e=t.trim().split(/\s+/);if(e.length!==2)return;const i=Uv[e[0]],s=Uv[e[1]];if(!(i===void 0||s===void 0))return[i,s]}function Ej(t){if(t.length!==2)return;const e=[];for(const i of t)if(Array.isArray(i))e.push(i);else if(typeof i=="string"){const s=Aj(i);if(!s)return;e.push(s)}else return;return e}function Nj(t,e){const i=Ej(t);if(!i)return!1;for(let s=0;s<2;s++){const o=i[s],c=e[s];if(o[0]!==c[0]||o[1]!==c[1])return!1}return!0}function Xf(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,i]of Tj)if(Nj(t,e))return{rangeStart:`${i} 0%`,rangeEnd:`${i} 100%`}}const Bv=new Map;function zv(t){const e={value:0},i=O_(s=>{e.value=s[t.axis].progress*100},t);return{currentTime:e,cancel:i}}function D_({source:t,container:e,...i}){const{axis:s}=i;t&&(e=t);let o=Bv.get(e);o||(o=new Map,Bv.set(e,o));const c=i.target??"self";let u=o.get(c);u||(u={},o.set(c,u));const h=s+(i.offset??[]).join(",");return u[h]||(i.target&&ec(i.target)?Xf(i.offset)?u[h]=new ViewTimeline({subject:i.target,axis:s}):u[h]=zv({container:e,...i}):ec()?u[h]=new ScrollTimeline({source:e,axis:s}):u[h]=zv({container:e,...i})),u[h]}function kj(t,e){const i=D_(e),s=e.target?Xf(e.offset):void 0,o=e.target?ec(e.target)&&!!s:ec();return t.attachTimeline({timeline:o?i:void 0,...s&&o&&{rangeStart:s.rangeStart,rangeEnd:s.rangeEnd},observe:c=>(c.pause(),Kx(u=>{c.time=c.iterationDuration*u},i))})}function jj(t){return t&&(t.target||t.offset)}function Cj(t){return t.length===2}function Rj(t,e){return Cj(t)||jj(e)?O_(i=>{t(i[e.axis].progress,i)},e):Kx(t,D_(e))}function M_(t,{axis:e="y",container:i=document.scrollingElement,...s}={}){if(!i)return Dt;const o={axis:e,container:i,...s};return typeof t=="function"?Rj(t,o):kj(t,o)}const Oj=()=>({scrollX:gn(0),scrollY:gn(0),scrollXProgress:gn(0),scrollYProgress:gn(0)}),ls=t=>t?!t.current:!1;function Vv(t,e,i,s){return{factory:o=>{let c;const u=()=>{if(ls(i)||ls(s)){ms.read(u);return}c=M_(o,{...e,axis:t,container:(i==null?void 0:i.current)||void 0,target:(s==null?void 0:s.current)||void 0})};return ms.read(u),()=>{qx(u),c==null||c()}},times:[0,1],keyframes:[0,1],ease:o=>o,duration:1}}function Dj(t,e){return typeof window>"u"?!1:t?_x()&&!!Xf(e):Df()}function Mj({container:t,target:e,...i}={}){const s=ds(Oj);Dj(e,i.offset)&&(s.scrollXProgress.accelerate=Vv("x",i,t,e),s.scrollYProgress.accelerate=Vv("y",i,t,e));const o=N.useRef(null),c=N.useRef(!1),u=N.useCallback(()=>(o.current=M_((h,{x:m,y:p})=>{s.scrollX.set(m.current),s.scrollXProgress.set(m.progress),s.scrollY.set(p.current),s.scrollYProgress.set(p.progress)},{...i,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0}),()=>{var h;(h=o.current)==null||h.call(o)}),[t,e,JSON.stringify(i.offset)]);return gf(()=>{if(c.current=!1,ls(t)||ls(e)){c.current=!0;return}else return u()},[u]),N.useEffect(()=>{if(!c.current)return;let h;const m=()=>{const p=ls(t),y=ls(e);!p&&!y&&(h=u())};return ms.read(m),()=>{qx(m),h==null||h()}},[u]),s}function Lj(t){const e=ds(()=>gn(t)),{isStatic:i}=N.useContext(If);if(i){const[,s]=N.useState(t);N.useEffect(()=>e.on("change",s),[])}return e}function L_(t,e){const i=Lj(e()),s=()=>i.set(e());return s(),gf(()=>{const o=()=>we.preRender(s,!1,!0),c=t.map(u=>u.on("change",o));return()=>
60{c.forEach(u=>u()),rn(s)}}),i}function Pj(t){Er.current=[],t();const e=L_(Er.current,t);return Er.current=void 0,e}function P_(t,e,i,s){if(typeof t=="function")return Pj(t);if(i!==void 0&&!Array.isArray(i)&&typeof e!="function")return Uj(t,e,i,s);const u=typeof e=="function"?e:HE(e,i,s),h=Array.isArray(t)?Hv(t,u):Hv([t],([p])=>u(p)),m=Array.isArray(t)?void 0:t.accelerate;return m&&!m.isTransformed&&typeof e!="function"&&Array.isArray(i)&&(s==null?void 0:s.clamp)!==!1&&(h.accelerate={...m,times:e,keyframes:i,isTransformed:!0}),h}function Hv(t,e){const i=ds(()=>[]);return L_(t,()=>{i.length=0;const s=t.length;for(let o=0;o<s;o++)i[o]=t[o].get();return e(i)})}function Uj(t,e,i,s){const o=ds(()=>Object.keys(i)),c=ds(()=>({}));for(const u of o)c[u]=P_(t,e,i[u],s);return c}/** 61 * @license lucide-react v0.546.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const Bj=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zj=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,i,s)=>s?s.toUpperCase():i.toLowerCase()),qv=t=>{const e=zj(t);return e.charAt(0).toUpperCase()+e.slice(1)},U_=(...t)=>t.filter((e,i,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===i).join(" ").trim(),Vj=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/** 66 * @license lucide-react v0.546.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */var Hj={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"};/** 71 * @license lucide-react v0.546.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const qj=N.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:o="",children:c,iconNode:u,...h},m)=>N.createElement("svg",{ref:m,...Hj,width:e,height:e,stroke:t,strokeWidth:s?Number(i)*24/Number(e):i,className:U_("lucide",o),...!c&&!Vj(h)&&{"aria-hidden":"true"},...h},[...u.map(([p,y])=>N.createElement(p,y)),...Array.isArray(c)?c:[c]]));/** 76 * @license lucide-react v0.546.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const Qe=(t,e)=>{const i=N.forwardRef(({className:s,...o},c)=>N.createElement(qj,{ref:c,iconNode:e,className:U_(`lucide-${Bj(qv(t))}`,`lucide-${t}`,s),...o}));return i.displayName=qv(t),i};/** 81 * @license lucide-react v0.546.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const $j=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Yf=Qe("arrow-left",$j);/** 86 * @license lucide-react v0.546.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const Gj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pr=Qe("check",Gj);/** 91 * @license lucide-react v0.546.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const Ij=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Gh=Qe("chevron-right",Ij);/** 96 * @license lucide-react v0.546.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const Fj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],B_=Qe("circle-alert",Fj);/** 101 * @license lucide-react v0.546.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const Kj=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],tc=Qe("external-link",Kj);/** 106 * @license lucide-react v0.546.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const Xj=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],Yj=Qe("instagram",Xj);/** 111 * @license lucide-react v0.546.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const Qj=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Wj=Qe("link",Qj);/** 116 * @license lucide-react v0.546.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const Jj=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],$v=Qe("pen",Jj);/** 121 * @license lucide-react v0.546.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const Zj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Qf=Qe("plus",Zj);/** 126 * @license lucide-react v0.546.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const eC=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],tC=Qe("refresh-cw",eC);/** 131 * @license lucide-react v0.546.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const nC=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],aC=Qe("save",nC);/** 136 * @license lucide-react v0.546.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const iC=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}
140],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],Ih=Qe("scale",iC);/** 141 * @license lucide-react v0.546.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const sC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],z_=Qe("search",sC);/** 146 * @license lucide-react v0.546.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const rC=[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],V_=Qe("shield-check",rC);/** 151 * @license lucide-react v0.546.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const oC=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Wf=Qe("star",oC);/** 156 * @license lucide-react v0.546.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const lC=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],cC=Qe("trash-2",lC);/** 161 * @license lucide-react v0.546.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const uC=[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]],dC=Qe("truck",uC);/** 166 * @license lucide-react v0.546.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const hC=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],fC=Qe("twitter",hC);/** 171 * @license lucide-react v0.546.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const mC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ps=Qe("x",mC);/** 176 * @license lucide-react v0.546.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const pC=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],gC=Qe("youtube",pC);/** 181 * @license lucide-react v0.546.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const yC=[["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"}]],vC=Qe("zap",yC),Tl=[{id:"prod-1",title:"DUX HUMAN HEALTH Fresh Whey Chocolate e Avelã 450g",price:184.9,description:"O Fresh Whey DUX HUMAN HEALTH é uma proteÃna natural...",category:"Whey Protein",tags:["DUX NUTRITION","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_672591-MLA99959802379_112025-F.webp",affiliate_link:"https://meli.la/2XpRDg1",
185is_featured:!0,rating:5,brand:"DUX NUTRITION"},{id:"prod-2",title:"Creatina Dux Nutrition 300g Monohidratada 100% Pura Sem Sabor",price:44.01,description:"CREATINA MONOHIDRATADA DUX HUMAN HEALTH 100% PURA...",category:"Creatinas",tags:["DUX NUTRITION","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_744442-MLA103752047260_012026-F.webp",affiliate_link:"https://meli.la/2QQqyAL",is_featured:!0,rating:5,brand:"DUX NUTRITION"},{id:"prod-3",title:"Hipercalórico 1kg Growth Supplements - Sabor Morango",price:74.9,description:"Hipercalórico 1kg (sabor Morango) Growth Supplements...",category:"Hipercalóricos",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_900413-MLA99471180504_112025-F.webp",affiliate_link:"https://meli.la/2JsLWUT",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-4",title:"Albumina 1kg Growth Supplements Baunilha",price:107.9,description:"Albumina 1kg Growth Supplements Baunilha...",category:"Albumina",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_Q_NP_911150-MLA111880502284_062026-F.webp",affiliate_link:"https://meli.la/221BUuX",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-5",title:"MultivitamÃnico 90 Cápsulas Dux Nutrition Sem Sabor",price:65.49,description:"O MultivitamÃnico DUX Nutrition foi desenvolvido para oferecer praticidade...",category:"Vitaminas",tags:["DUX NUTRITION","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_922334-MLA107819990133_022026-F.webp",affiliate_link:"https://meli.la/1s5gmbh",is_featured:!0,rating:5,brand:"DUX NUTRITION"},{id:"prod-6",title:"Barra De ProteÃna Mais Mu ProteÃnas Nutricional Chocowheyfer 12 Unidades 300g Doce De Leite",price:57.6,description:"Descubra o Chocowheyfer Doce de Leite...",category:"Barras de ProteÃna",tags:["+Mu","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_861922-MLA96186719151_102025-F.webp",affiliate_link:"https://meli.la/1E4X7Mu",is_featured:!0,rating:5,brand:"+Mu"},{id:"prod-7",title:"Straps 8 Infinity MAX FORCE",price:41.31,description:"FITA STRAP 8 INFINITY MAX FORCE...",category:"Acessórios",tags:["MAX FORCE","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_947641-MLB96251584331_102025-F.webp",affiliate_link:"https://meli.la/2F2WU5j",is_featured:!0,rating:5,brand:"MAX FORCE"},{id:"prod-8",title:"Cinturão De Academia De Couro Powerlifting Agachamento Fit",price:139.9,description:"CINTURÃO DE AGACHAMENTO LEGACY â COURO DE BÃFALO PREMIUM...",category:"Acessórios",tags:["Legacy","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_842970-MLB95567272639_102025-F-cinturo-de-academia-de-couro-powerlifting-agachamento-fit.webp",affiliate_link:"https://meli.la/1GXZEyY",is_featured:!0,rating:5,brand:"Legacy"},{id:"prod-9",title:"Joelheira de Neoprene 7mm (Par)",price:116.39,description:"OELHEIRA NEOPRENE 7MM - VENDA DO PAR...",category:"Acessórios",tags:["Kinetic Track","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_771179-MLB109938867755_042026-F-joelheira-neoprene-7mm-par.webp",affiliate_link:"https://meli.la/2Lrfk51",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-10",title:"Par Munhequeira Elástica Pro Compressão Ajustável Musculação",price:53.04,description:"Munhequeira Profissional Bulldozer...",category:"Acessórios",tags:["Kinetic Track","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_786211-MLB104983109342_012026-F-par-munhequeira-elastica-pro-compresso-ajustavel-musculaco.webp",affiliate_link:"https://meli.la/1qwk4fZ",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-11",title:"Kit 5 Faixas Elásticas Super Mini Band de 5 NÃveis para Treino e Fisioterapia",price:34.99,description:"Kit 5 Faixas Elásticas Super Mini Band...",category:"Acessórios",tags:["PLUSSMAR","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_613447-MLA112071951220_062026-F.webp",affiliate_link:"https://meli.la/2846Xf8",is_featured:!0,rating:5,brand:"PLUSSMAR"},{id:"prod-12",title:"Tornozeleira / Caneleira De Peso 5 Kg Reforçada (par)",price:67.57,description:"TORNOZELEIRA REFORÃADA 5 KG - PAR...",category:"Acessórios",tags:["EXERCISE SPORTS","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_810341-MLB111343703888_052026-F-tornozeleira-caneleira-de-peso-5-kg-reforcada-par.webp",affiliate_link:"https://meli.la/2uWm1DP",is_featured:!0,rating:5,brand:"EXERCISE SPORTS"},{id:"prod-13",title:"Coqueteleira Inox Kinetic Shaker 700ml",price:69.9,description:"Coqueteleira térmica em aço inoxidável com misturador esférico.",category:"Acessórios",tags:["Kinetic Track","Acessórios","Novo"],image_url:"https://images.unsplash.com/photo-1593095948071-474c5cc2989d?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Track"},{id:"prod-14",title:"Par de Halteres Hexagonal RMG8 Fit 2kg PVC Preto Emborrachado",price:64.9,description:"Apresentamos o Par de Halteres Rmg8 Fit 2kg...",category:"Equipamentos",tags:["RMG8","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_762887-MLA89299656162_082025-F.webp",affiliate_link:"https://meli.la/17Tjn8C",is_featured:!0,rating:5,brand:"RMG8"},{id:"prod-15",title:"Barra OlÃmpica Reta 2,20 Metros Cromada Cross + Presilhas Cor Prateado",price:278,description:"Barra OlÃmpica 2,20 Metros Cromada Semi Profissional...",category:"Equipamentos",tags:["Kinetic Home Gym","Equipamentos","Novo"],image_url:"https://images.unsplash.com/photo-1541534741688-6078c6bfb5c5?w=500&q=80",affiliate_link:"https://meli.la/1KAJBig",is_featured:!0,rating:5,brand:"Kinetic Home Gym"},{id:"prod-16",title:"Banco de Supino Regulável Premium Fit",price:649.9,description:"Banco multi-angular articulado com 6 posições...",category:"Equipamentos",tags:["Kinetic Home Gym","Equipamentos","Novo"],image_url:"https://images.unsplash.com/photo-1521804906057-1df8fdb718b7?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Home Gym"},{id:"prod-17",title:"Bicicleta Ergométrica Spinning Speed",price:1202,description:"Bicicleta Ergométrica Spinning Speed...",category:"Equipamentos",tags:["RB Fitness","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_620721-MLA99569816352_122025-F.webp",affiliate_link:"https://meli.la/2vRmJBe",is_featured:!0,rating:5,brand:"RB Fitness"},{id:"prod-18",title:"Esteira Ergométrica Elétrica Gallant Elite Pro 3.0hp 16km/h",price:3199,description:"Esteira Ergométrica Elétrica Gallant Elite Pro...",category:"Equipamentos",tags:["Gallant Elite Pro","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_650381-MLA92332377460_092025-F.webp",affiliate_link:"https://meli.la/2c485QN",is_featured:!0,rating:5,brand:"Gallant Elite Pro"},{id:"prod-19",title:"Camiseta Dry Fit Ultra Training",price:38.31,description:"Camiseta Dry Fit Premium...",category:"Roupas",tags:["Kinetic Apparel","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_681261-MLB97289513052_112025-F-camiseta-dryfit-masculina-academia-treino-proteco-uv.webp",affiliate_link:"https://meli.la/2yNBdA3",is_featured:!0,rating:5,brand:"Kinetic Apparel"},{id:"prod-20",title:"Regata Cavada Strong Preta Metamorfose Brasil",price:44.95,description:"Camiseta Regata Cavada Masculina Anatomic Strong Preta...",category:"Roupas",tags:["Metamorfose Brasil","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_879451-MLB105602086353_012026-F-regata-cavada-strong-preta-metamorfose-brasil.webp",affiliate_link:"https://meli.la/1f6fBGT",is_featured:!0,rating:5,brand:"Metamorfose Brasil"},{id:"prod-21",title:"Camiseta Oversized Para Treino E Casual 100% Algodão Premium",price:41.99,description:"Camiseta Oversized Masculina 100% Algodão Fio 30.1...",category:"Roupas",tags:["RESPLEND","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_683134-MLB111522250552_062026-F.webp",affiliate_link:"https://meli.la/33mL45k",is_featured:!0,rating:5,brand:"RESPLEND"},{id:"prod-22",title:"Shorts Tactel Feminino Academia",price:16.9,description:"Short Tactel Feminino Academia...",category:"Roupas",tags:["Kinetic Apparel","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_709379-MLB110919841799_042026-F-shorts-tactel-feminino-academia-praia-piscina-corrida.webp",affiliate_link:"https://meli.la/1GSzgJ3",is_featured:!0,rating:5,brand:"Kinetic Apparel"},{id:"prod-23",title:"Bermuda de Compressão Interna 2-em-1",price:69.9,description:"Bermuda com calção interno de compressão elástica...",category:"Roupas",tags:["Kinetic Apparel","Vestuário","Novo"],image_url:"https://images.unsplash.com/photo-1581009146145-b5ef050c2e1e?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Apparel"},{id:"prod-24",title:"Calça Jogger Esportiva Slim Fit",price:99.9,description:"Calça jogger em poliéster com elastano...",category:"Roupas",tags:["Kinetic Apparel","Vestuário","Novo"],image_url:"https://images.unsplash.com/photo-1581009146145-b5ef050c2e1e?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Apparel"},{id:"prod-25",title:"Moletom Oversized Gym Hoodie",price:159.9,description:"Moletom canguru peluciado com capuz ajustável...",category:"Roupas",tags:["Kinetic Apparel","Vestuário","Novo"],image_url:"https://images.unsplash.com/photo-1548883354-7622d03aca27?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Apparel"}
185,{id:"prod-26",title:"Jaqueta Corta Vento Impermeável Trail",price:179.9,description:"Jaqueta corta vento super leve...",category:"Roupas",tags:["Kinetic Apparel","Vestuário","Novo"],image_url:"https://images.unsplash.com/photo-1548883354-7622d03aca27?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Apparel"},{id:"prod-27",title:"Camiseta Segunda Pele Térmica Compressão",price:69.9,description:"Blusa térmica de manga longa...",category:"Roupas",tags:["Kinetic Apparel","Vestuário","Novo"],image_url:"https://images.unsplash.com/photo-1581009146145-b5ef050c2e1e?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Apparel"},{id:"prod-28",title:"Calça Térmica de Compressão Gym",price:79.9,description:"Calça de compressão para treinos intensos...",category:"Roupas",tags:["Kinetic Apparel","Vestuário","Novo"],image_url:"https://images.unsplash.com/photo-1581009146145-b5ef050c2e1e?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Apparel"},{id:"prod-29",title:"Smartwatch Samsung Galaxy Fit3 Display 1.6 Grafite",price:243.59,description:"O Smartwatch Samsung Galaxy Fit3...",category:"Acessórios",tags:["Samsung","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_993011-MLA110848990729_042026-F.webp",affiliate_link:"https://meli.la/1NhA9fp",is_featured:!0,rating:5,brand:"Samsung"},{id:"prod-30",title:"Balança Bioimpedancia Digital 180kg Smart Imc Profissional",price:33.2,description:"Balança Bioimpedancia Digital 180kg Smart IMC Profissional...",category:"Acessórios",tags:["Rishon","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_957981-MLA110124413534_042026-F.webp",affiliate_link:"https://meli.la/22VM582",is_featured:!0,rating:5,brand:"Rishon"},{id:"prod-31",title:"Garrafa Térmica Hydra Pro 1.2L",price:71.99,description:"Garrafa térmica Hiddra SUPER GRANDE...",category:"Acessórios",tags:["Hydra","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_854808-MLB92195399274_092025-F.webp",affiliate_link:"https://meli.la/21VJ3sY",is_featured:!0,rating:5,brand:"Hydra"},{id:"prod-32",title:"Bolsa Academia Fitness Esporte Viagem Impermeável Mochila",price:47.47,description:"A Mochila Saco Esportiva...",category:"Acessórios",tags:["Kinetic Gear","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_756433-MLB106767455271_022026-F.webp",affiliate_link:"https://meli.la/17YQex1",is_featured:!0,rating:5,brand:"Kinetic Gear"},{id:"prod-33",title:"Livro: Guia Definitivo da Hipertrofia Humana",price:49.9,description:"Obra cientÃfica e prática...",category:"Roupas",tags:["Kinetic Books","Lifestyle","Novo"],image_url:"https://images.unsplash.com/photo-1541534741688-6078c6bfb5c5?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Books"},{id:"prod-34",title:"Mini Mixer Elétrico USB Shake",price:59.9,description:"Misturador portátil para whey protein e creatina...",category:"Acessórios",tags:["Kinetic Gear","Lifestyle","Novo"],image_url:"https://images.unsplash.com/photo-1593095948071-474c5cc2989d?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Gear"},{id:"prod-35",title:"Fone de Ouvido Bluetooth Sport Run",price:189.9,description:"Fones sem fio com ganchos de orelha ergonômicos...",category:"Acessórios",tags:["Kinetic Audio","Lifestyle","Novo"],image_url:"https://images.unsplash.com/photo-1579586337278-3befd40fd17a?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Audio"}
185,{id:"prod-36",title:"Boné de Corrida Aero Light",price:39.9,description:"Boné ultra leve com aba curvada...",category:"Roupas",tags:["Kinetic Apparel","Vestuário","Novo"],image_url:"https://images.unsplash.com/photo-1503342217505-b0a15ec3261c?w=500&q=80",affiliate_link:"https://www.mercadolivre.com.br",is_featured:!1,rating:5,brand:"Kinetic Apparel"},{id:"prod-37",title:"Ãculos de Sol Esportivo polarized Run",price:69.99,description:"Os Ãculos Esportivo Run Ciclismo...",category:"Acessórios",tags:["Fortuna Sunglasses","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_641154-MLB104879510653_012026-F-oculos-esportivo-run-ciclismo-corrida-baixa-pace-polarizado.webp",affiliate_link:"https://meli.la/2TEjY9H",is_featured:!0,rating:5,brand:"Fortuna Sunglasses"},{id:"prod-38",title:"Jaqueta Corta Vento Masculina Impermeável Capuz ZÃper Bolso",price:42.38,description:"Jaqueta Corta Vento Masculina Impermeável...",category:"Roupas",tags:["Kinetic Track","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_739982-MLB111031556679_042026-F.webp",affiliate_link:"https://meli.la/2fPvWFz",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-39",title:"Mochila Impermeável Para Trilha Estanque 30l Naturehike",price:319.99,description:"Mochila estilo Estanque ideal para usar na Praia e Rios...",category:"Acessórios",tags:["Naturehike","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_829451-MLB87444489593_072025-F-mochila-impermeavel-para-trilha-estanque-30l-naturehike.webp",affiliate_link:"https://meli.la/14BM9Ac",is_featured:!0,rating:5,brand:"Naturehike"},{id:"prod-40",title:"Tênis Esportivo Pro Caminhada Treino Unissex Conforto",price:112.57,description:"Tênis Esportivo Pro Caminhada...",category:"Roupas",tags:["33Y","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_824926-MLB82680478984_032025-F-tnis-esportivo-pro-caminhada-treino-unissex-conforto.webp",affiliate_link:"https://meli.la/2nYbd2c",is_featured:!0,rating:5,brand:"33Y"},{id:"prod-41",title:"Dux Whey Concentrado 100% Puro 900g - Cookies",price:193.9,description:"Whey Protein Concentrado Dux Nutrition sabor Cookies...",category:"Whey Protein",tags:["Dux Nutrition","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_953936-MLA100053618555_122025-F.webp",affiliate_link:"https://meli.la/2GK8495",is_featured:!0,rating:5,brand:"Dux Nutrition"},{id:"prod-42",title:"100% Whey Refil Max Titanium 900g - Cookies & Cream",price:142.9,description:"Refil de Whey Protein Max Titanium...",category:"Whey Protein",tags:["Max Titanium","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_915097-MLA111155287306_052026-F.webp",affiliate_link:"https://meli.la/2jM5fdv",is_featured:!0,rating:5,brand:"Max Titanium"},{id:"prod-43",title:"100% Whey Max Titanium 900g - Chocolate Maltado",price:149.89,description:"O clássico Whey Protein concentrado...",category:"Whey Protein",tags:["Max Titanium","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_715765-MLA99992606257_112025-F.webp",affiliate_link:"https://meli.la/1nfKAY7",is_featured:!0,rating:5,brand:"Max Titanium"},{id:"prod-44",title:"Whey Protein Max Titanium + Dr. Peanut 900g - Bombom Italiano",price:159.89,description:"Parceria exclusiva da Max Titanium com a Dr. Peanut...",category:"Whey Protein",tags:["Max Titanium","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_632138-MLA99958280929_112025-F.webp",affiliate_link:"https://meli.la/2sPUcRn",is_featured:!0,rating:5,brand:"Max Titanium"},{id:"prod-45",title:"Whey Protein Max Titanium + Dr. Peanut 900g - Paçoca",price:159,description:"Whey Protein concentrado da Max Titanium em colaboração com a Dr. Peanut...",category:"Whey Protein",tags:["Max Titanium","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_802416-MLA96179065147_102025-F.webp",affiliate_link:"https://meli.la/1kJDDHu",is_featured:!0,rating:5,brand:"Max Titanium"},{id:"prod-46",title:"Creatina Monohidratada Growth 500g",price:69.9,description:"Creatina Monohidratada pura em pó (500g)...",category:"Creatinas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_602304-MLA109372354737_032026-F.webp",affiliate_link:"https://meli.la/1G8QpDa",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-47",title:"Creatina Growth Creapure 100g",price:89.9,description:"Creatina com o renomado selo Creapure...",category:"Creatinas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_614030-MLA91955568117_092025-F.webp",affiliate_link:"https://meli.la/1wKRSAg",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-48",title:"Hipercalórico Growth 1kg - Chocolate",price:89.9,description:"Hipercalórico Growth Supplements formulado para ganho de peso saudável...",category:"Hipercalóricos",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_939515-MLA106522540686_022026-F.webp",affiliate_link:"https://meli.la/2hG8HJ7",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-49",title:"Hipercalórico Big Mass Growth 3kg - Chocolate",price:179.9,description:"Embalagem econômica de 3kg do Hipercalórico Big Mass...",category:"Hipercalóricos",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_880524-MLA107096671431_022026-F.webp",affiliate_link:"https://meli.la/2YXLdQv",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-50",title:"Kit Growth: Whey Basic Natural 1kg + Creatina 250g",price:94.9,de
185scription:"Combo excelente para iniciantes. Contém 1kg de Whey Protein Basic...",category:"Creatinas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_903487-MLB102163767830_122025-F.webp",affiliate_link:"https://meli.la/127o4FT",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-51",title:"Kit Growth: Whey Baunilha 1kg + Creatina 250g",price:209.9,description:"Kit Campeão de performance da Growth Supplements...",category:"Creatinas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_844212-MLB99845030089_112025-F.webp",affiliate_link:"https://meli.la/12F49S8",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-52",title:"Kit Growth: Whey Morango 1kg + Creatina 250g",price:209.9,description:"Dupla anabólica contendo 1kg de Whey Concentrado sabor Morango...",category:"Creatinas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_755607-MLB99361946974_112025-F.webp",affiliate_link:"https://meli.la/2LCSW8v",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-53",title:"Kit Growth: Whey Milkshake Chocolate 1kg + Creatina 250g",price:209.9,description:"Combinação perfeita com o delicioso sabor Milkshake de Chocolate...",category:"Creatinas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_694106-MLB99843864481_112025-F.webp",affiliate_link:"https://meli.la/2ZViSJx",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-54",title:"100% Whey Concentrado Growth 900g",price:144.9,description:"O consagrado 100% Whey Concentrado da Growth Supplements...",category:"Whey Protein",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_609844-MLB110130435837_042026-F.webp",affiliate_link:"https://meli.la/2UmHSCo",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-55",title:"Daily Whey Protein Growth 800g",price:104.9,description:"Whey Protein desenvolvido para o consumo diário...",category:"Whey Protein",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_716397-MLB109281326580_042026-F.webp",affiliate_link:"https://meli.la/2Q5Ky8R",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-56",title:"Whey Protein Gourmet Growth 800g - Tiramisu",price:139.9,description:"O incrÃvel Whey Gourmet sabor Tiramisu da Growth...",category:"Whey Protein",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_947491-MLB110653458785_042026-F.webp",affiliate_link:"https://meli.la/1hgQUKU",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-57",title:"Whey Concentrado 100% Dark Lab 900g - Gelatto Di Latte",price:159.9,description:"Refil de Whey Protein Concentrado da Dark Lab...",category:"Whey Protein",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_797633-MLB111195956642_052026-F.webp",affiliate_link:"https://meli.la/2aw15v7",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-58",title:"Hipercalórico Dark Mass Dark Lab 3kg - Morango",price:129.9,description:"Hipercalórico Dark Mass no sabor Morango...",category:"Hipercalóricos",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_716959-MLA99993917157_112025-F.webp",affiliate_link:"https://meli.la/2gq6E1o",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-59",title:"Creatina Pura Dark Lab 500g",price:44.45,description:"Creatina Monohidratada 100% pura da Dark Lab (500g)...",category:"Creatinas",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_611731-MLB107660862985_022026-F.webp",affiliate_link:"https://meli.la/1SL49DS",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-60",title:"Creatina Pura Monohidratada Refil Dark Lab 1kg",price:69.9,description:"Embalagem econômica em refil de 1kg da Creatina Monohidratada...",category:"Creatinas",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_606041-MLB108877245937_032026-F.webp",affiliate_link:"https://meli.la/2WuisFC",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-61",title:"Whey Isolate Protein Fuse Dark Lab 900g - Morango",price:78.9,description:"Fórmula inovadora de proteÃna isolada e de rápida absorção sabor Morango...",category:"Whey Protein",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_779193-MLA99886212521_112025-F.webp",affiliate_link:"https://meli.la/2FCj2ka",
185is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-62",title:"Whey Protein Concentrado Dark Lab 1kg - Morango",price:169.9,description:"Whey Protein Concentrado de alto padrão da Dark Lab sabor Morango...",category:"Whey Protein",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_726794-MLA84853867221_052025-F.webp",affiliate_link:"https://meli.la/1vGdCd1",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-63",title:"Creatina 100% Pura Dark Lab 300g",price:39.9,description:"Pote de 300g de Creatina Monohidratada 100% pura da Dark Lab...",category:"Creatinas",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_847826-MLB109598876190_042026-F.webp",affiliate_link:"https://meli.la/2ebX32d",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-64",title:"Glutamina L-Glutamine Dark Lab 300g",price:49.9,description:"L-Glutamina pura em pó da Dark Lab (300g)...",category:"Vitaminas",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_733514-MLA99625549234_122025-F.webp",affiliate_link:"https://meli.la/2hbQerW",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-65",title:"MultivitamÃnico Growth 120 Cápsulas",price:49.9,description:"Nova fórmula ultra concentrada do multivitamÃnico da Growth...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_723031-MLA98380453196_112025-F.webp",affiliate_link:"https://meli.la/31EFh3A",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-66",title:"Vitamina B12 Growth 120 Cápsulas",price:36.9,description:"Vitamina B12 de alta biodisponibilidade da Growth Supplements...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_843068-MLA106388657212_022026-F.webp",affiliate_link:"https://meli.la/1KgSj6L",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-67",title:"ZMA Growth 120 Cápsulas",price:47.9,description:"ZMA da Growth Supplements...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_944244-MLA106386022300_022026-F.webp",affiliate_link:"https://meli.la/1sUvcHa",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-68",title:"Glutamina em Pó Integralmédica 300g",price:44.63,description:"Glutamina pura em pó da Integralmédica (300g)...",category:"Vitaminas",tags:["Integralmédica","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_672077-MLA101182123490_122025-F.webp",affiliate_link:"https://meli.la/1DEXnxd",is_featured:!0,rating:5,brand:"Integralmédica"},{id:"prod-69",title:"Whey 100% Pure Integralmédica 900g - Baunilha",price:116.51,description:"Whey 100% Pure da Integralmédica sabor Baunilha...",category:"Whey Protein",tags:["Integralmédica","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_629728-MLA99158348738_112025-F.webp",affiliate_link:"https://meli.la/2TmFjwu",is_featured:!0,rating:5,brand:"Integralmédica"},{id:"prod-70",title:"Pré Treino Insane Clown Demons Lab 350g",price:104,description:"Fórmula explosiva importada da Demons Lab...",category:"Pré-treinos",tags:["Demons Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_783716-MLA107686368050_032026-F.webp",affiliate_link:"https://meli.la/2jrsSc9",is_featured:!0,rating:5,brand:"Demons Lab"},{id:"prod-71",title:"Pré Treino Psicho Killer Demons Lab 294g",price:119.99,description:"Psicho Killer da Demons Lab é um pré-treino hardcore...",category:"Pré-treinos",tags:["Demons Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_730376-MLA107189574927_022026-F.webp",affiliate_link:"https://meli.la/2nENyRb",is_featured:!0,rating:5,brand:"Demons Lab"},{id:"prod-72",title:"Pré Treino Psichotic Dragon Demons Lab 500g",price:150,description:"O gigante Psichotic Dragon da Demons Lab (500g)...",category:"Pré-treinos",tags:["Demons Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_601678-MLA96107576841_102025-F.webp",affiliate_link:"https://meli.la/1L3orgq",is_featured:!0,rating:5,brand:"Demons Lab"},{id:"prod-73",title:"Pré Treino Insane Mad Demons Lab Tutti Frutti",price:115.9,description:"Insane Mad da Demons Lab sabor Tutti Frutti...",category:"Pré-treinos",tags:["Demons Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_835397-MLA90632609112_082025-F.webp",affiliate_link:"https://meli.la/22mLik7",is_featured:!0,rating:5,brand:"Demons Lab"},{id:"prod-74",title:"Pré-Treino Haze Hardcore Growth 300g - Uva",price:86.9,description:"Pré-Treino Haze Hardcore sabor Uva da Growth...",category:"Pré-treinos",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_947028-MLA98776405883_112025-F.webp",affiliate_link:"https://meli.la/1Hzpa8g",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-75",title:"Ãmega 3 Ãleo de Peixe Ultra Growth 75 Caps",price:57.9,description:"Ãmega 3 Ultra da Growth Supplements...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_668160-MLA103883306237_012026-F.webp",affiliate_link:"https://meli.la/1GiBS7p",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-76",title:"Ãmega 3 Ãleo de Peixe Growth 75 Caps",price:42.9,description:"Ãleo de peixe selecionado de alta qualidade...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_962239-MLA103882656131_012026-F.webp",affiliate_link:"https://meli.la/2YYo5Bn",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-77",title:"Melatonina Growth 100 Comprimidos",price:42.9,description:"Melatonina pura de rápida absorção da Growth (100 tabletes)...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_927557-MLA106450299832_022026-F.webp",affiliate_link:"https://meli.la/2YUjZyC",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-78",title:"Coenzima Q10 Growth 60 Cápsulas",price:68.9,description:"Coenzima Q10 (100mg) da Growth Supplements...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_603983-MLA111195441771_052026-F.webp",affiliate_link:"https://meli.la/1pN7yQs",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-79",title:"Colágeno Tipo 2 Growth 60 Cápsulas",price:72.9,description:"Colágeno Tipo II não desnaturalizado de alta eficácia da Growth...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_798689-MLA107085242745_022026-F.webp",affiliate_link:"https://meli.la/1JKzPHV",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-80",title:"Picolinato de Cromo Growth 120 Cápsulas",price:39.9,description:"Picolinato de Cromo (120 cápsulas) da Growth...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_915643-MLA109599872906_042026-F.webp",affiliate_link:"https://meli.la/1h43gvi",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-81",title:"Vitamina D Ultra Growth 120 Cápsulas",price:41.9,description:"Vitamina D3 em dosagem ultra concentrada (2000 UI) da Growth...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_700082-MLA111894430024_062026-F.webp",affiliate_link:"https://meli.la/2NEzs8N",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-82",title:"Vitamina C Growth 120 Comprimidos",price:78.9,description:"Vitamina C pura de 1000mg da Growth Supplements...",category:"Vitaminas",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_993723-MLA1129964629
18509_062026-F.webp",affiliate_link:"https://meli.la/18cwRwe",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-83",title:"Strap Fita Com Munhequeira Lifiting Strap Exercicios Puxada",price:25.9,description:"Strap fita com munhequeira para treino pesado de puxadas...",category:"Acessórios",tags:["Kinetic Track","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_625129-MLB110009270230_042026-F.webp",affiliate_link:"https://lista.mercadolivre.com.br/lifting-straps",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-84",title:"Cinturão De Academia De Couro Powerlifting Agachamento Fit",price:139.9,description:"Cinturão lombar profissional em couro legÃtimo...",category:"Acessórios",tags:["Kinetic Track","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_663752-MLB95507207311_102025-F-cinturo-de-academia-de-couro-powerlifting-agachamento-fit.webp",affiliate_link:"https://meli.la/1GXZEyY",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-85",title:"Whey Protein Concentrado 1kg Growth Supplements - Leite em Pó",price:184.9,description:"Whey Protein Concentrado 80% Growth Supplements sabor Leite em Pó...",category:"Whey Protein",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_696746-MLA98296977552_112025-F.webp",affiliate_link:"https://meli.la/1DSg4dh",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-86",title:"100% whey - Max Titanium ProteÃnas ProteÃnas sabor baunilha x 900g - pote",price:139.9,description:"100% Whey Protein concentrado da Max Titanium sabor Baunilha...",category:"Whey Protein",tags:["Max Titanium","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_864857-MLA99937074331_112025-F.webp",affiliate_link:"https://meli.la/2UjywR3",is_featured:!0,rating:5,brand:"Max Titanium"},{id:"prod-87",title:"Whey Protein Concentrado 100% 900g Refil Dark Lab Sabor Morango",price:159.9,description:"Whey Protein Concentrado 100% Dark Lab em embalagem refil...",category:"Whey Protein",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_760779-MLA99484493666_112025-F.webp",affiliate_link:"https://meli.la/138BNWE",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-88",title:"Creatina Monohidratada Pura 1kg Dark Lab Unidade Sem sabor",price:69.9,description:"Creatina Monohidratada 100% Pura Dark Lab em pote de 1kg...",category:"Creatinas",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_848860-MLA99964507641_112025-F.webp",affiliate_link:"https://meli.la/2R2ojzL",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-89",title:"Hipercalorico Dark Mass - 3kg - Dark Lab Sabor Chocolate",price:78.9,description:"Hipercalórico Dark Mass da Dark Lab (3kg) sabor Chocolate...",category:"Hipercalóricos",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_923496-MLA99932624719_112025-F.webp",affiliate_link:"https://meli.la/1rrLNh7",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-90",title:"Whey Protein Isolado 1kg Growth Supplements - Natural",price:304.9,description:"Whey Protein Isolado 90% da Growth Supplements (1kg)...",category:"Whey Protein",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_686909-MLA98949896105_112025-F.webp",affiliate_link:"https://meli.la/1s86bBT",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-91",title:"Whey Protein Isolado 1kg Growth Supplements - Chocolate",price:319.9,description:"Whey Protein Isolado 90% da Growth Supplements (1kg) sabor Chocolate...",category:"Whey Protein",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_800306-MLA99153783380_112025-F.webp",affiliate_link:"https://meli.la/2FaDMAU",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-92",title:"Pré-treino Haze Hardcore 300g Growth Supplements - Limão",price:77.9,description:"Pré-Treino Haze Hardcore da Growth Supplements...",category:"Pré-treinos",tags:["Growth Supplements","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_665069-MLA98871137821_112025-F.webp",affiliate_link:"https://meli.la/1pjeEty",is_featured:!0,rating:5,brand:"Growth Supplements"},{id:"prod-93",title:"Creatina Monohidratada Pura 500g Dark Lab",price:44.9,description:"Creatina Monohidratada 100% Pura da Dark Lab (500g)...",category:"Creatinas",tags:["Dark Lab","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_942122-MLA99923169249_112025-F.webp",affiliate_link:"https://meli.la/16rFzqy",is_featured:!0,rating:5,brand:"Dark Lab"},{id:"prod-94",title:"Creatina 1kg Suplemento Monohidratada em pó 100% Pura - Soldiers Nutrition",price:65.9,description:"Creatina Monohidratada 100% Pura da Soldiers Nutrition...",category:"Creatinas",tags:["Soldiers Nutrition","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_894230-MLA111390627295_052026-F.webp",affiliate_link:"https://meli.la/1KamVig",is_featured:!0,rating:5,brand:"Soldiers Nutrition"},{id:"prod-95",title:"Mixer Portátil Recarregável Usb Batedor Fuê Aço Inox 2 Em 1",price:28.47,description:"Mixer elétrico portátil 2 em 1 recarregável via USB...",category:"Acessórios",tags:["Kinetic Track","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_Q_NP_620991-MLB106091093935_012026-F-mixer-portatil-recarregavel-usb-batedor-fu-aco-inox-2-em-1.webp",affiliate_link:"https://meli.la/1xtkWfe",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-96",title:"Albumina uêvo - ProteÃna Clara de Ovo Banoffee 1kg Sem Lactose Premium",price:69.9,description:"Albumina Uêvo sabor Banoffee (1kg)...",category:"Albumina",tags:["Uêvo","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_775127-MLA96502883349_102025-F.webp",affiliate_link:"https://meli.la/1PH9c4a",is_featured:!0,rating:5,brand:"Uêvo"},{id:"prod-97",title:"Balança digital para cozinha",price:18.05,description:"Balança digital de precisão para cozinha...",category:"Acessórios",tags:["Kinetic Track","Acessórios","Novo"],image_url:"https://bkqbngvwfesvqutudpya.supabase.co/storage/v1/object/public/shop-products/products/0.40535969231844815.jpg",affiliate_link:"https://meli.la/2UfqMAb",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-99",title:"Proto Bar Amendo Whey 70g Display com 9 Unidades Sabor Paçoca Nutrata",price:76.63,description:"ENERGIA, PROTEÃNA E O SABOR CLÃSSICO BRASILEIRO...",category:"Barras de ProteÃna",tags:["Nutrata","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_913825-MLA99937963067_112025-F.webp",affiliate_link:"https://meli.la/2Mz1Jsj",is_featured:!0,rating:5,brand:"Nutrata"},{id:"prod-100",title:"Barra Whey Grego 40g Display com 12 unidades Brownie com Dulce de Leche Havanna Nutrata",price:69,description:"A melhor barra de proteÃna, eleita pelos consumidores...",category:"Barras de ProteÃna",tags:["Nutrata","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_946384-MLA99848892041_112025-F.webp",affiliate_link:"https://meli.la/1C3yBxi",is_featured:!0,rating:5,brand:"Nutrata"},{id:"prod-101",title:"Barra Dark Caramel Protein 45g Display com 12 Unidades Nutrata",price:64.99,description:"A Barra Caramel Protein da Nutrata combina textura macia com recheio de caramelo e amendoim...",category:"Barras de ProteÃna",tags:["Nutrata","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_782144-MLA99465927952_112025-F.webp",affiliate_link:"https://meli.la/2XZCD9x",is_featured:!0,rating:5,brand:"Nutrata"},{id:"prod-102",title:"Roupa Térmica Frio Intenso Flanelada Neve Extreme Calça e Blusa",price:159.9,description:"Esse anúncio refere-se a 01 conjunto/kit contendo: 01 calça + 01 blusa...",category:"Roupas",tags:["Extreme Thermo","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_699723-MLB112403834024_062026-F-roupa-termica-frio-intenso-flanelada-neve-extreme-calca-blus.webp",affiliate_link:"https://meli.la/1KRGfEP",is_featured:!0,rating:5,brand:"Extreme Thermo"},{id:"prod-103",title:"Roupa Peluciada Conjunto Térmico Blusa+calça Frio Neve",price:141.85,description:"Conjunto Térmico Blusa+calça ROUPA NEVE TÃRMICA...",category:"Roupas",tags:["Kinetic Track","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_729428-MLB98133946621_112025-F-roupa-peluciada-conjunto-termico-blusacalca-frio-neve.webp",affiliate_link:"https://meli.la/19aL5i9",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-104",title:"Fone de Ouvido Bluetooth 5.4 soundcore P30i da Anker",price:205,description:"Soundcore P30i â muito mais que um fone de ouvido intra-auricular...",category:"Acessórios",tags:["Soundcore","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_793296-MLA109764610819_032026-F.webp",affiliate_link:"https://meli.la/2hzjZAX",is_featured:!0,rating:5,brand:"Soundcore"},{id:"prod-105",title:"Fone de Ouvido Bluetooth 5.3 soundcore P40i da Anker",price:355.49,description:"O Soundcore P40i traz som de alto desempenho com cancelamento de ruÃdo...",category:"Acessórios",tags:["Soundcore","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_699157-MLA85986627286_062025-F.webp",affiliate_link:"https://meli.la/2Tns1z7",is_featured:!0,rating:5,brand:"Soundcore"},{id:"prod-106",title:"Fone De Ouvido Headphone Bluetooth JBL Tune 520bt AzuL",price:390,description:"Descubra uma nova experiência sonora com o JBL TUNE 520BT...",category:"Acessórios",tags:["JBL","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_869417-MLA100046557307_122025-F.webp",affiliate_link:"https://meli.la/2NN8JsN",is_featured:!0,rating:5,brand:"JBL"},{id:"prod-107",title:"Fones de ouvido sem fio brancos Jbl Tune 520bt",price:269,description:"Fones de ouvido sem fio com som JBL Pure Bass...",category:"Acessórios",tags:["JBL","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_753230-MLA97526382338_112025-F.webp",affiliate_link:"https://meli.la/1mzYYt8",is_featured:!0,rating:5,brand:"JBL"},{id:"prod-108",title:"Fones de ouvido sem fio Bluetooth Jbl Tune 520bt On Ear, cor preta",price:269,description:"Fones de ouvido sem fio Bluetooth Jbl Tune 520bt...",category:"Acessórios",tags:["JBL","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_707827-MLA94042842173_102025-F.webp",affiliate_link:"https://meli.la/1N96vXw",is_featured:!0,rating:5,brand:"JBL"}
185,{id:"prod-109",title:"Tênis De Corrida De Fibra De Carbono Chonta Branco",price:265.88,description:"Os Tênis de Corrida Autênticos de Fibra de Carbono Chunta são a escolha ideal...",category:"Roupas",tags:["Chonta","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_644776-MLB111763939736_062026-F.webp",affiliate_link:"https://meli.la/2hHL3DD",is_featured:!0,rating:5,brand:"Chonta"},{id:"prod-110",title:"Tênis De Corrida De Fibra De Carbono Chonta Azul",price:280.33,description:"Os Tênis de Corrida Autênticos de Fibra de Carbono Chunta são a escolha ideal...",category:"Roupas",tags:["Chonta","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_784161-MLB113039739325_062026-F.webp",affiliate_link:"https://meli.la/2dnrSBe",is_featured:!0,rating:5,brand:"Chonta"},{id:"prod-111",title:"Garrafa Inox 750ml Squeeze Ãgua Gelada Caminhada Academia",price:32,description:"Garrafa em Inox 750ml Squeeze...",category:"Acessórios",tags:["Kinetic Track","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_986785-MLA110539425364_052026-F.webp",affiliate_link:"https://meli.la/1sa1ZfK",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-112",title:"Copo Térmico Aço Inox 1200ml Com Canudo Tampa Alça Grande",price:48.47,description:"Copo Térmico Aço Inox 1200ml...",category:"Acessórios",tags:["Kinetic Track","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_890386-MLB112026417410_062026-F-copo-termico-aco-inox-1200ml-com-canudo-tampa-alca-grande.webp",affiliate_link:"https://meli.la/2iMyRRQ",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-113",title:"Copo Térmico Dapon 1200ml Inox Com Canudo",price:45.9,description:"Copo Térmico Dapon 1200ml Inox com Tampa e Canudo...",category:"Acessórios",tags:["Dapon","Acessórios","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_643798-MLA112639342015_062026-F.webp",affiliate_link:"https://meli.la/2BaYW4N",is_featured:!0,rating:5,brand:"Dapon"},{id:"prod-114",title:"Jaqueta Alta Performance Leve Proteção Uv Treino Academia",price:33.99,description:"Casaco Fino / Blusa proteção solar / Tipo corta vento / Jaqueta UV...",category:"Roupas",tags:["DON MODAS","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_662754-MLB96993949064_112025-F.webp",affiliate_link:"https://meli.la/125noan",is_featured:!0,rating:5,brand:"DON MODAS"},{id:"prod-115",title:"Jaqueta Corta Vento Feminino Capuz E Bolso Izing Leve",price:47.23,description:"Perfeita para caminhada, corrida, academia, lazer ou uso diário...",category:"Roupas",tags:["Izing","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_727528-MLB112620931659_062026-F.webp",affiliate_link:"https://meli.la/1uqExpw",is_featured:!0,rating:5,brand:"Izing"},{id:"prod-116",title:"Protetor De Punho Profissional Crossfit Munhequeira Pulso",price:24.56,description:"Apresentamos o par de munhequeiras definitivo para impulsionar o seu desempenho no Crossfit...",category:"Acessórios",tags:["Kinetic Track","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_829480-MLB72643536421_112023-F.webp",affiliate_link:"https://meli.la/1VZgsib",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-117",title:"Balança Corporal Digital Bioimpedancia Aplicativo Bluetooth Preto",price:78.99,description:"Balança Digital de Bioimpedância Panda Plus AMG-BL02...",category:"Acessórios",tags:["PANDA PLUS","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_873558-MLA96865983691_102025-F.webp",affiliate_link:"https://meli.la/2m52V2y",is_featured:!0,rating:5,brand:"PANDA PLUS"},{id:"prod-118",title:"Strap 8 Musculação Academia Preto Fita Treino Costas",price:19.9,description:"Potencialize seus treinos com os Straps de Academia Vilain Straps...",category:"Acessórios",tags:["Kinetic Track","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_678950-MLB89673783426_082025-F.webp",affiliate_link:"https://meli.la/2eVNomC",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-119",title:"Kit 5 Faixas Elásticas Mini Band",price:17.18,description:"O Kit com 5 Mini Bands foi desenvolvido para quem busca um treino versátil...",category:"Equipamentos",tags:["TOPSAND Activewear","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_Q_NP_926429-MLA110275137078_052026-F.webp",affiliate_link:"https://meli.la/1bWQiSs",is_featured:!0,rating:5,brand:"TOPSAND Activewear"},{id:"prod-120",title:"Kit Halteres De Anilhas E Kettlebell Musculação 15kg",price:275.48,description:"Alcance os seus objetivos de fitness com o Kit Halteres de Anilhas e Kettlebell...",category:"Equipamentos",tags:["ZStorm","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_Q_NP_711699-MLB97570331361_112025-F.webp",affiliate_link:"https://meli.la/2QAwPHL",is_featured:!0,rating:5,brand:"ZStorm"},{id:"prod-121",title:"Par Barra Maciça 40cm Halteres Rosca Dumbell Treino Academia",price:138.85,description:"Par de Barras para Halter 40cm â Aço Maciço 28mm...",category:"Equipamentos",tags:["Kinetic Track","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_Q_NP_798193-MLB110268836748_052026-F.webp",affiliate_link:"https://meli.la/1xfNsLR",is_featured:!0,rating:5,brand:"Kinetic Track"},{id:"prod-122",title:"Kit Conjunto Roupa Academia Treino Premium Calça Leg E Top",price:119.9,de
185scription:"CONJUNTO FITNESS: TOP LIZ BICOLOR + LEGGING BICOLOR CÃS ALTO E ANATÃMICO...",category:"Roupas",tags:["Idealle Store","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_Q_NP_721742-MLB94903689864_102025-F-kit-conjunto-roupa-academia-treino-premium-calca-leg-e-top.webp",affiliate_link:"https://meli.la/1f1e1YB",is_featured:!0,rating:5,brand:"Idealle Store"},{id:"prod-123",title:"Kit Tênis Under Feminino Quicker 2 Macio - Meia Original",price:369.99,description:"Todos os produtos vendidos são ORIGINAIS...",category:"Roupas",tags:["Under Armour","Vestuário","Novo"],image_url:"https://http2.mlstatic.com/D_Q_NP_789671-MLB83019665892_032025-F-kit-tnis-under-feminino-quicker-2-macio-meia-original.webp",affiliate_link:"https://meli.la/2tQuCh3",is_featured:!0,rating:5,brand:"Under Armour"},{id:"prod-124",title:"Kit 5 Elásticos Extensores 5 Intensidades Super Band Força",price:235,description:"KIT SUPER BAND - 5 INTENSIDADES ELÃSTICOS AZUL, VERDE, ROXO, PRETO E VERMELHO...",category:"Equipamentos",tags:["Fokus","Equipamentos","Novo"],image_url:"https://http2.mlstatic.com/D_Q_NP_966391-MLB109341313647_032026-F.webp",affiliate_link:"https://meli.la/1RLndF8",is_featured:!0,rating:5,brand:"Fokus"},{id:"prod-125",title:"MultivitamÃnico 90 Cápsulas Dux Nutrition",price:69.9,description:"MultivitamÃnico 90 cps - Dux Human Health...",category:"Vitaminas",tags:["DUX NUTRITION","Albumina","Novo"],image_url:"https://http2.mlstatic.com/D_NQ_NP_2X_761843-MLA95534414688_102025-F.webp",affiliate_link:"https://meli.la/1qcB1PQ",is_featured:!0,rating:5,brand:"DUX NUTRITION"}],sn={async getProducts(){return Tl},async getProduct(t){return Tl.find(e=>e.id===t)||null},async createProduct(t){throw new Error("Cadastros não são suportados na versão sem banco de dados.")},async updateProduct(t,e){throw new Error("Edições não são suportadas na versão sem banco de dados.")},async deleteProduct(t){throw new Error("Exclusões não são suportadas na versão sem banco de dados.")},async getFeaturedProducts(){return Tl.filter(t=>t.is_featured)},async getBestSellers(){return[...Tl].sort((t,e)=>e.rating-t.rating).slice(0,5)}};function bC({isOpen:t,onClose:e}){const[i,s]=N.useState(""),[o,c]=N.useState([]),[u,h]=N.useState(!1);return N.useEffect(()=>{t?(s(""),c([]),document.body.style.overflow="hidden"):document.body.style.overflow="unset"},[t]),N.useEffect(()=>{const p=setTimeout(async()=>{if(!i.trim()){c([]);return}h(!0);try{const v=(await sn.getProducts()).filter(x=>x.title.toLowerCase().includes(i.toLowerCase())||x.description.toLowerCase().includes(i.toLowerCase())||x.category.toLowerCase().includes(i.toLowerCase()));c(v)}catch(y){console.error(y)}finally{h(!1)}},300);return()=>clearTimeout(p)},[i]),t?g.jsxs("div",{className:"fixed inset-0 z-[100] bg-background/95 backdrop-blur-sm flex flex-col items-center pt-24 px-4 sm:px-6",children:[g.jsx("button",{onClick:e,className:"absolute top-6 right-6 p-2 text-gray-400 hover:text-white transition-colors",children:g.jsx(ps,{size:32})}),g.jsxs("div",{className:"w-full max-w-3xl flex flex-col items-center",children:[g.jsxs("div",{className:"w-full relative",children:[g.jsx(z_,{size:28,className:"absolute left-6 top-1/2 -translate-y-1/2 text-gray-400"}),g.jsx("input",{type:"text",autoFocus:!0,value:i,onChange:m=>s(m.target.value),placeholder:"Buscar suplementos, equipamentos...",className:"w-full bg-[#1a1a1a] border border-surface rounded-full py-5 pl-16 pr-6 text-xl text-white focus:outline-none focus:border-kinetic transition-colors shadow-xl"})]}),g.jsx("div",{className:"w-full mt-8 flex flex-col space-y-4 max-h-[60vh] overflow-y-auto custom-scrollbar pb-8",children:u?g.jsx("div",{className:"flex justify-center py-12",children:g.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-kinetic border-t-transparent animate-spin"})}):o.length>0?o.map(m=>g.jsxs(Ne,{to:`/produto/${m.id}`,onClick:e,className:"flex items-center gap-6 p-4 rounded-xl bg-surface/50 border border-surface hover:border-kinetic/50 transition-all group",children:[g.jsx("div",{className:"w-20 h-20 shrink-0 bg-white rounded-lg p-2 flex items-center justify-center",children:g.jsx("img",{src:m.image_url,alt:m.title,className:"max-w-full max-h-full object-contain"})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("h3",{className:"text-lg font-bold font-heading truncate group-hover:text-kinetic transition-colors",children:m.title}),g.jsx("p",{className:"text-sm text-gray-400 line-clamp-1",children:m.description}),g.jsxs("div",{className:"mt-2 text-kinetic font-bold",children:["R$ ",m.price.toFixed(2)]})]}),g.jsx("div",{className:"hidden sm:flex shrink-0 w-10 h-10 rounded-full bg-[#1a1a1a] items-center justify-center group-hover:bg-kinetic group-hover:text-black transition-colors",children:g.jsx(tc,{size:18})})]},m.id)):i.trim()!==""?g.jsxs("div",{className:"text-center py-12 text-gray-400 text-lg",children:['Nenhum produto encontrado para "',i,'"']}):g.jsx("div",{className:"text-center py-12 text-gray-500",children:"Digite algo para começar a buscar."})})]})]}):null}function vt(){const[t,e]=N.useState(!1);return g.jsxs(g.Fragment,{children:[g.jsx("nav",{className:"fixed top-0 w-full z-50 bg-background/80 backdrop-blur-md border-b border-surface/50",children:g.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:g.jsxs("div",{className:"flex justify-between items-center h-20",children:[g.jsxs(Ne,{to:"/",className:"flex items-center gap-1.5 sm:gap-2 group",children:[g.jsx("div",{className:"w-6 h-6 sm:w-8 sm:h-8 bg-kinetic rounded-sm transform -skew-x-12 group-hover:shadow-[0_0_15px_#CCFF00] transition-shadow flex items-center justify-center",children:g.jsx("span",{className:"text-black font-heading font-black text-sm sm:text-xl transform skew-x-12",children:"K"})}),g.jsxs("span",{className:"font-heading font-black text-lg sm:text-2xl tracking-tighter uppercase mr-2 sm:mr-0",children:["KINETIC",g.jsx("span",{className:"text-kinetic",children:"SHOP"})]})]}),g.jsx("div",{className:"flex items-center gap-3 sm:gap-4",children:g.jsx("button",{onClick:()=>e(!0),className:"text-white hover:text-kinetic transition-colors p-2",children:g.jsx(z_,{size:18,className:"sm:w-[22px] sm:h-[22px]"})})})]})})}),g.jsx(bC,{isOpen:t,onClose:()=>e(!1)})]})}function Tt(){return g.jsx("footer",{className:"bg-[#0a0a0a] pt-16 pb-8 border-t border-surface",children:g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-12 mb-12",children:[g.jsxs("div",{className:"md:col-span-1 border-b border-surface pb-8 md:border-0 md:pb-0",children:[g.jsxs(Ne,{to:"/",className:"flex items-center gap-2 group mb-6",children:[g.jsx("div",{className:"w-6 h-6 bg-kinetic rounded-sm transform -skew-x-12 flex items-center justify-center",children:g.jsx("span",{className:"text-black font-heading font-black text-sm transform skew-x-12",children:"K"})}),g.jsxs("span",{className:"font-heading font-black text-xl tracking-tighter uppercase",children:["KINETIC",g.jsx("span",{className:"text-kinetic",children:"SHOP"})]})]}),g.jsx("p",{className:"text-gray-400 text-sm leading-relaxed mb-6",children:"Os melhores produtos para construir seu melhor fÃsico. Seleção premium de suplementos e equipamentos."}),g.jsxs("div",{className:"flex gap-4",children:[g.jsx("a",{href:"#",className:"w-10 h-10 rounded-full bg-surface flex items-center justify-center text-white hover:bg-kinetic hover:text-black transition-all",children:g.jsx(Yj,{size:18})}),g.jsx("a",{href:"#",className:"w-10 h-10 rounded-full bg-surface flex items-center justify-center text-white hover:bg-kinetic hover:text-black transition-all",children:g.jsx(gC,{size:18})}),g.jsx("a",{href:"#",className:"w-10 h-10 rounded-full bg-surface flex items-center justify-center text-white hover:bg-kinetic hover:text-black transition-all",children:g.jsx(fC,{size:18})})]})]}),g.jsxs("div",{children:[g.jsx("h4",{className:"font-heading font-bold text-lg mb-6 uppercase tracking-wider",children:"Categorias"}),g.jsxs("ul",{className:"space-y-4 text-sm text-gray-400",children:[g.jsx("li",{children:g.jsx(Ne,{to:"/categorias?categoria=Whey%20Protein",className:"hover:text-kinetic transition-colors",children:"Whey Protein"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/categorias?categoria=Albumina",className:"hover:text-kinetic transition-colors",children:"Albumina"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/categorias?categoria=Barras%20de%20Prote%C3%ADna",className:"hover:text-kinetic transition-colors",children:"Barras de ProteÃna"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/categorias?categoria=Pr%C3%A9-Treinos",className:"hover:text-kinetic transition-colors",children:"Pré-treinos"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/categorias?categoria=Creatinas",className:"hover:text-kinetic transition-colors",children:"Creatinas"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/categorias?categoria=Roupas",className:"hover:text-kinetic transition-colors",children:"Roupas Fitness"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/categorias?categoria=Acess%C3%B3rios",className:"hover:text-kinetic transition-colors",children:"Acessórios"})})]})]}),g.jsxs("div",{children:[g.jsx("h4",{className:"font-heading font-bold text-lg mb-6 uppercase tracking-wider",children:"Suporte"}),g.jsxs("ul",{className:"space-y-4 text-sm text-gray-400",children:[g.jsx("li",{children:g.jsx(Ne,{to:"/suporte/fale-conosco",className:"hover:text-kinetic transition-colors",children:"Fale Conosco"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/suporte/faq",className:"hover:text-kinetic transition-colors",children:"Perguntas Frequentes"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/suporte/rastrear-pedido",className:"hover:text-kinetic transition-colors",children:"Rastrear Pedido"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/suporte/trocas-e-devolucoes",className:"hover:text-kinetic transition-colors",children:"Trocas e Devoluções"})})]})]}),g.jsxs("div",{children:[g.jsx("h4",{className:"font-heading font-bold text-lg mb-6 uppercase tracking-wider",children:"Legal"}),g.jsxs("ul",{className:"space-y-4 text-sm text-gray-400",children:[g.jsx("li",{children:g.jsx(Ne,{to:"/legal/termos-de-uso",className:"hover:text-kinetic transition-colors",children:"Termos de Uso"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/legal/politica-de-privacidade",className:"hover:text-kinetic transition-colors",children:"PolÃtica de Privacidade"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/legal/politica-de-afiliados",className:"hover:text-kinetic transition-colors",children:"PolÃtica de Afiliados"})}),g.jsx("li",{children:g.jsx(Ne,{to:"/legal/cookies",className:"hover:text-kinetic transition-colors",children:"Cookies"})})]})]})]}),g.jsxs("div",{className:"bg-surface/50 rounded-lg p-6 mb-8 text-center border border-surface",children:[g.jsx("p",{className:"text-xs text-gray-400 uppercase tracking-widest font-heading",children:"Disclaimer Importante"}),g.jsx("p",{className:"text-sm text-gray-300 mt-2",children:"O Kinetic Shop atua como afiliado de produtos vendidos por lojas parceiras. Não realizamos entregas ou processamento de pagamentos diretamente. O checkout será realizado nas plataformas oficiais."})]}),g.jsxs("div",{className:"border-t border-surface pt-8 flex flex-col md:flex-row justify-between items-center gap-4 text-xs text-gray-500",children:[g.jsxs("p",{children:["© ",new Date().getFullYear()," Kinetic Shop. Todos os direitos reservados."]}),g.jsxs("div",{className:"flex gap-4",children:[g.jsx("span",{children:"Alta Performance"}),g.jsx("span",{children:"Estética Premium"}),g.jsx("span",{children:"Evolução"})]})]})]})})}const pc=[{label:"Whey Protein",image:"https://images.unsplash.com/photo-1579722820308-d74e571900a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"},{label:"Albumina",image:"https://images.unsplash.com/photo-1593095948071-474c5cc2989d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"},{label:"Pré-treinos",image:"https://images.unsplash.com/photo-1593095948071-474c5cc2989d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"},{label:"Creatinas",image:"https://images.unsplash.com/photo-1594882645126-14020914d58d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"},{label:"Hipercalóricos",image:"https://images.unsplash.com/photo-1579722820308-d74e571900a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"},{label:"Vitaminas",image:"https://images.unsplash.com/photo-1550583724-b2692b85b150?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"},{label:"Barras de ProteÃna",image:"https://images.unsplash.com/photo-1593095948071-474c5cc2989d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"},{label:"Roupas",image:"https://images.unsplash.com/photo-1581009146145-b5ef050c2e1e?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"},{label:"Acessórios",image:"https://images.unsplash.com/photo-1534438327276-14e5300c3a48?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"},{label:"Equipamentos",image:"https://images.unsplash.com/photo-1584735935682-2f2b69dff9d2?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"}];function xC(){const t=N.useRef(null),{scrollYProgress:e}=Mj({target:t,offset:["start end","end start"]});return P_(e,[0,1],[100,-100]),g.jsxs("section",{className:"py-12 md:py-24 overflow-hidden relative border-y border-surface",id:"categorias",ref:t,children:[g.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-[200px] bg-kinetic/5 blur-[120px] rounded-full pointer-events-none"}),g.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-8 md:mb-12",children:g.jsxs("div",{className:"flex justify-between items-end",children:[g.jsxs("div",{children:[g.jsx("span",{className:"text-kinetic text-xs md:text-sm font-bold uppercase tracking-widest mb-1 md:mb-2 block",children:"Seu Arsenal"}),g.jsx("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-heading font-black uppercase",children:"Categorias"})]}),g.jsxs(Ne,{to:"/categorias",className:"flex items-center gap-1 md:gap-2 text-xs md:text-sm font-bold hover:text-kinetic transition-colors uppercase tracking-wider",children:["Ver todas ",g.jsx(Gh,{size:16})]})]})}),g.jsx("div",{className:"relative max-w-[100vw] overflow-x-auto pb-8 snap-x snap-mandatory hide-scrollbar pl-4 sm:pl-6 lg:pl-16",children:g.jsx("div",{className:"flex gap-4 md:gap-6 px-4 pr-16 md:pr-32 w-max",children:pc.map((i,s)=>g.jsx(Ne,{to:`/categorias?categoria=${encodeURIComponent(i.label)}`,children:g.jsxs(mc.div,{initial:{opacity:0,x:50},whileInView:{opacity:1,x:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.5,delay:s*.1},className:"snap-start relative w-[180px] sm:w-[240px] md:w-[300px] aspect-[4/5] rounded-2xl overflow-hidden group cursor-pointer border border-surface shadow-[0_10px_30px_rgba(0,0,0,0.5)]",children:[g.jsx("div",{className:"absolute inset-0 bg-black/40 group-hover:bg-black/10 transition-colors z-10 duration-500"}),g.jsx("div",{className:"absolute inset-x-0 bottom-0 h-2/3 bg-gradient-to-t from-black via-black/80 to-transparent z-10 pointer-events-none"}),g.jsx("img",{src:i.image,alt:i.label,className:`w-full h-full transform group-hover:scale-105 transition-transform duration-700 ease-[
185cubic-bezier(0.25,0.46,0.45,0.94)] ${i.image.includes(".png")?"object-contain p-4":"object-cover"}`,loading:"lazy"}),g.jsx("div",{className:"absolute inset-0 z-20 p-6 flex flex-col justify-end",children:g.jsxs("div",{className:"translate-y-4 group-hover:translate-y-0 transition-transform duration-500 ease-out",children:[g.jsx("h3",{className:"text-2xl font-heading font-black mb-2 leading-none uppercase",children:i.label}),g.jsxs("div",{className:"flex items-center gap-2 text-kinetic opacity-0 group-hover:opacity-100 transition-opacity duration-300 delay-100",children:[g.jsx("span",{className:"text-sm font-bold uppercase tracking-wider",children:"Explorar"}),g.jsx(Gh,{size:16})]})]})})]})},i.label))})}),g.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-4 md:mt-8",children:g.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[g.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-500 uppercase tracking-widest block",children:"Parceiros Oficiais"}),g.jsx("div",{className:"flex items-center gap-2 md:gap-3 overflow-x-auto hide-scrollbar pb-2 snap-x",children:["Todas","Growth Supplements","Max Titanium","Integralmédica","Dux Nutrition","Dark Lab","Demons Lab"].map((i,s)=>g.jsx(Ne,{to:`/categorias?brand=${encodeURIComponent(i)}`,className:"snap-start shrink-0 px-4 py-2 rounded-full border text-xs md:text-sm font-bold transition-all duration-300 bg-[#1a1a1a] text-gray-400 border-surface hover:border-kinetic hover:text-white",children:i},i))})]})})]})}const H_=N.createContext({}),Wr=()=>N.useContext(H_),_C=({children:t})=>{const[e,i]=N.useState([]),[s,o]=N.useState(!1),c=m=>{i(p=>p.find(y=>y.id===m.id)?p.filter(y=>y.id!==m.id):p.length>0&&p[0].category!==m.category?[m]:p.length>=4?p:[...p,m])},u=m=>{i(p=>p.filter(y=>y.id!==m))},h=()=>{i([])};return g.jsx(H_.Provider,{value:{compareList:e,toggleCompare:c,removeCompare:u,clearCompare:h,isCompareModalOpen:s,setCompareModalOpen:o},children:t})};function Fh({product:t,index:e=0}){const{compareList:i,toggleCompare:s}=Wr(),o=i.some(c=>c.id===t.id);return g.jsxs(mc.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.5,delay:e*.1},className:`group relative bg-[#1a1a1a] rounded-2xl overflow-hidden border transition-colors duration-300 flex flex-col h-full ${o?"border-kinetic":"border-surface hover:border-kinetic/50"}`,children:[t.is_featured&&g.jsx("div",{className:"absolute top-4 left-4 z-20 bg-kinetic text-black text-xs font-bold px-3 py-1.5 rounded-full uppercase tracking-wider shadow-[0_0_10px_rgba(204,255,0,0.4)]",children:"Destaque"}),g.jsx("button",{onClick:c=>{c.preventDefault(),s(t)},className:`absolute top-4 right-4 z-20 w-8 h-8 rounded-full flex items-center justify-center transition-all shadow-md backdrop-blur-md ${o?"bg-kinetic text-black":"bg-surface/80 text-white hover:bg-kinetic hover:text-black"}`,title:"Comparar Produto",children:o?g.jsx(Pr,{size:16}):g.jsx(Ih,{size:16})}),g.jsxs(Ne,{to:`/produto/${t.id}`,className:"relative aspect-square overflow-hidden bg-background block",children:[g.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#1a1a1a] via-transparent to-transparent z-[1] opacity-60"}),g.jsx("img",{src:t.image_url,alt:t.title,className:`w-full h-full transform group-hover:scale-110 transition-transform duration-700 ease-[cubic-bezier(0.25,0.46,0.45,0.94)] ${t.image_url.includes(".png")?"object-contain p-4":"object-cover"}`,loading:"lazy"}),g.jsx("div",{className:"absolute inset-0 bg-black/40 z-10 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center pointer-events-none",children:g.jsx("div",{className:"w-12 h-12 rounded-full bg-kinetic/90 flex items-center justify-center text-black shadow-lg translate-y-4 group-hover:translate-y-0 transition-transform duration-300",children:g.jsx(tc,{size:20})})})]}),g.jsxs("div",{className:"p-3 sm:p-5 flex flex-col flex-grow",children:[g.jsxs(Ne,{to:`/produto/${t.id}`,className:"flex flex-col flex-grow cursor-pointer block",children:[g.jsxs("div",{className:"flex justify-between items-start mb-2",children:[g.jsx("span",{className:"text-[10px] sm:text-xs font-medium text-gray-400 uppercase tracking-wider line-clamp-1",children:t.category}),g.jsxs("div",{className:"flex items-center gap-1 text-kinetic shrink-0 ml-2",children:[g.jsx(Wf,{size:10,
185className:"fill-current sm:w-3 sm:h-3"}),g.jsx("span",{className:"text-[10px] sm:text-xs font-bold text-white",children:t.rating.toFixed(1)})]})]}),g.jsx("h3",{className:"font-heading font-bold text-sm sm:text-lg mb-1 sm:mb-2 line-clamp-2 leading-tight group-hover:text-kinetic transition-colors",children:t.title}),g.jsx("p",{className:"text-xs sm:text-sm text-gray-400 mb-3 sm:mb-4 line-clamp-2 flex-grow",children:t.description}),g.jsx("div",{className:"flex flex-wrap gap-1 sm:gap-2 mb-3 sm:mb-4",children:t.tags.map(c=>g.jsx("span",{className:"text-[8px] sm:text-[10px] font-mono px-1.5 py-0.5 sm:px-2 sm:py-1 rounded bg-surface text-gray-300 border border-surface group-hover:border-gray-700",children:c},c))})]}),g.jsxs("div",{className:"pt-3 sm:pt-4 border-t border-surface mt-auto",children:[g.jsxs("div",{className:"flex items-baseline gap-1 sm:gap-2 mb-3 sm:mb-4",children:[g.jsx("span",{className:"text-xs sm:text-sm text-gray-500 font-medium",children:"R$"}),g.jsx("span",{className:"text-lg sm:text-2xl font-black font-heading text-white",children:t.price.toFixed(2)})]}),g.jsxs("a",{href:t.affiliate_link,target:"_blank",rel:"noopener noreferrer",className:"w-full relative overflow-hidden bg-white text-black py-2 sm:py-3 rounded-lg font-bold font-heading uppercase tracking-widest text-[10px] sm:text-sm flex items-center justify-center gap-1 sm:gap-2 group/btn hover:bg-kinetic transition-colors duration-300",children:[g.jsx("span",{children:"Comprar"}),g.jsx(tc,{size:14,className:"sm:w-4 sm:h-4 transform group-hover/btn:translate-x-1 group-hover/btn:-translate-y-1 transition-transform"})]})]})]})]})}function wC(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-")}const q_=({title:t,products:e,initialBrand:i})=>{const[s,o]=N.useState(i||"Todas");N.useEffect(()=>{i&&o(i)},[i]);const u=["Todas",...Array.from(new Set(e.map(p=>p.brand).filter(Boolean)))].sort((p,y)=>p==="Todas"?-1:y==="Todas"?1:p.localeCompare(y)),h=s==="Todas"?e:e.filter(p=>p.brand===s||p.tags.includes(s)),m=wC(t);return g.jsxs("div",{id:m,className:"mb-6 md:mb-16 pt-6 md:pt-12 border-t border-surface overflow-hidden relative scroll-mt-24",children:[g.jsx("div",{className:"absolute top-0 left-0 w-[300px] h-[300px] bg-kinetic/5 blur-[120px] rounded-full pointer-events-none -z-10"}),g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-4 md:mb-8 relative z-10",children:[g.jsx("h2",{className:"text-2xl sm:text-3xl md:text-5xl font-heading font-black uppercase mb-3 md:mb-6",children:t}),u.length>1&&g.jsxs("div",{className:"flex flex-col gap-2 md:gap-3",children:[g.jsx("span",{className:"text-[10px] md:text-xs font-bold text-gray-500 uppercase tracking-widest block",children:"Filtrar por Marca"}),g.jsx("div",{className:"flex items-center gap-2 md:gap-3 overflow-x-auto hide-scrollbar pb-2 snap-x",children:u.map(p=>g.jsx("button",{onClick:()=>o(p),className:`snap-start shrink-0 px-3 py-1.5 md:px-4 md:py-2 rounded-full border text-[10px] md:text-sm font-bold transition-all duration-300 ${s===p?"bg-kinetic text-black border-kinetic shadow-[0_0_15px_rgba(204,255,0,0.3)]":"bg-[#1a1a1a] text-gray-400 border-surface hover:border-kinetic hover:text-white"}`,children:p},p))})]})]}),g.jsx("div",{className:"relative w-full overflow-x-auto pb-4 md:pb-8 snap-x snap-mandatory hide-scrollbar pl-4 sm:pl-6 lg:pl-16 z-10",children:g.jsx("div",{className:"flex gap-3 md:gap-6 px-2 md:px-4 pr-16 md:pr-32 w-max min-h-[200px] md:min-h-[300px]",children:h.length>0?h.map((p,y)=>g.jsx("div",{className:"snap-start w-[150px] sm:w-[200px] md:w-[320px] shrink-0 flex",children:g.jsx(Fh,{product:p,index:y})},p.id)):g.jsxs("div",{className:"w-[80vw] max-w-2xl py-16 flex flex-col items-center justify-center text-gray-500 bg-[#151515] rounded-2xl border border-surface border-dashed mx-auto",children:[g.jsx("span",{className:"text-sm font-bold uppercase tracking-wider mb-2",children:"Sem produtos nessa marca"}),g.jsx("p",{className:"text-xs text-gray-600",children:"Tente buscar por outra marca nesta categoria."})]})})})]})};function SC(){const[t,e]=N.useState([]),[i,s]=N.useState([]),[o,c]=N.useState([]);return N.useEffect(()=>{async function u(){const h=await sn.getFeaturedProducts(),m=await sn.getBestSellers(),p=await sn.getProducts();e(h.slice(0,4)),s(m),c(p)}u()},[]),g.jsxs("div",{className:"min-h-screen flex flex-col",children:[g.jsx(vt,{}
185),g.jsxs("section",{className:"relative min-h-[80vh] md:min-h-[90vh] flex items-center pt-20 overflow-hidden",children:[g.jsxs("div",{className:"absolute inset-0 z-0",children:[g.jsx("img",{src:"https://images.unsplash.com/photo-1517838277536-f5f99be501cd?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80",alt:"Atleta em foco",className:"w-full h-full object-cover object-top opacity-30"}),g.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-background via-background/80 to-transparent"}),g.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background via-transparent to-background/30"})]}),g.jsx("div",{className:"absolute top-1/4 right-1/4 w-[300px] h-[300px] bg-kinetic/10 blur-[100px] rounded-full"}),g.jsx("div",{className:"absolute bottom-1/4 left-1/4 w-[200px] h-[200px] bg-neon-blue/10 blur-[80px] rounded-full"}),g.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 w-full",children:g.jsxs(mc.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,ease:"easeOut"},className:"max-w-3xl",children:[g.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-surface border border-surface text-kinetic text-xs font-bold uppercase tracking-widest mb-6",children:[g.jsxs("span",{className:"relative flex h-2 w-2",children:[g.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-kinetic opacity-75"}),g.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-kinetic"})]}),"Nova Coleção DisponÃvel"]}),g.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-7xl lg:text-8xl font-black font-heading leading-none uppercase tracking-tighter mb-6 text-white text-balance drop-shadow-2xl",children:["Os melhores produtos para construir seu ",g.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-kinetic to-neon-blue",children:"melhor fÃsico."})]}),g.jsx("p",{className:"text-base sm:text-lg md:text-xl text-gray-400 max-w-2xl font-light mb-10 text-balance leading-relaxed",children:"Suplementos, roupas e acessórios selecionados para atletas de verdade. Alta performance com estética premium em cada detalhe."}),g.jsx("div",{className:"flex flex-col sm:flex-row gap-4",children:g.jsxs("button",{onClick:()=>{var u;return(u=document.getElementById("categorias"))==null?void 0:u.scrollIntoView({behavior:"smooth"})},className:"bg-kinetic text-black font-heading font-black uppercase tracking-widest px-8 py-5 rounded-lg hover:bg-white transition-colors duration-300 shadow-[0_0_20px_rgba(204,255,0,0.3)] flex items-center justify-center gap-2 group",children:["Explorar Produtos",g.jsx(Gh,{size:20,className:"group-hover:translate-x-1 transition-transform"})]})})]})})]}),g.jsx("section",{className:"bg-surface/30 border-y border-surface py-8 md:py-12",children:g.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-8",children:[g.jsxs("div",{className:"flex items-start gap-3 md:gap-4",children:[g.jsx("div",{className:"w-10 h-10 md:w-12 md:h-12 rounded-full bg-surface flex items-center justify-center text-kinetic shrink-0",children:g.jsx(Wf,{size:20,className:"md:w-6 md:h-6"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"font-heading font-bold text-sm md:text-lg uppercase",children:"Curadoria Premium"}),g.jsx("p",{className:"text-xs md:text-sm text-gray-500 mt-0.5 md:mt-1 max-w-[280px] md:max-w-none leading-relaxed",children:"Apenas as melhores marcas e suplementos de alta qualidade selecionados mundialmente."})]})]}),g.jsxs("div",{className:"flex items-start gap-3 md:gap-4",children:[g.jsx("div",{className:"w-10 h-10 md:w-12 md:h-12 rounded-full bg-surface flex items-center justify-center text-neon-blue shrink-0",children:g.jsx(V_,{size:20,className:"md:w-6 md:h-6"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"font-heading font-bold text-sm md:text-lg uppercase",children:"Compra Segura"}),g.jsx("p",{className:"text-xs md:text-sm text-gray-500 mt-0.5 md:mt-1 max-w-[280px] md:max-w-none leading-relaxed",children:"Garantia oficial e transações diretas com as marcas parceiras originais."})]})]}),g.jsxs("div",{className:"flex items-start gap-3 md:gap-4",children:[g.jsx("div",{className:"w-10 h-10 md:w-12 md:h-12 rounded-full bg-surface flex items-center justify-center text-kinetic shrink-0",children:g.jsx(vC,{size:20,className:"md:w-6 md:h-6"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"font-heading font-bold text-sm md:text-lg uppercase",children:"Alta Performance"}),g.jsx("p",{className:"text-xs md:text-sm text-gray-500 mt-0.5 md:mt-1 max-w-[280px] md:max-w-none leading-relaxed",children:"Foco extremo em resultados fÃsicos. Não vendemos promessas, vendemos evolução."})]})]})]})})}),g.jsx(xC,{}),g.jsx("div",{className:"w-full",children:o.length>0&&pc.map(u=>{const h=o.filter(m=>m.category===u.label);return h.length===0?null:g.jsx(q_,{title:u.label,products:h},u.label)})}),g.jsx("section",{className:"py-12 md:py-24 border-t border-surface",children:g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[g.jsx("div",{className:"flex justify-between items-end mb-8 md:mb-12",children:g.jsxs("div",{children:[g.jsx("span",{className:"text-kinetic text-xs md:text-sm font-bold uppercase tracking-widest mb-1 md:mb-2 block",children:"Destaques"}),g.jsx("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-heading font-black uppercase",children:"Mais Desejados"})]})}),g.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-6",children:t.map((u,h)=>g.jsx(Fh,{product:u,index:h},u.id))})]})}),g.jsxs("section",{className:"py-12 md:py-24 relative overflow-hidden bg-surface",children:[g.jsxs("div",{className:"absolute inset-0 z-0",children:[g.jsx("img",{src:"https://images.unsplash.com/photo-1526506114620-6d43e3ee7e12?auto=format&fit=crop&w=2000&q=80",alt:"Workout background",className:"w-full h-full object-cover opacity-10"}),g.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-background via-surface/90 to-kinetic/10"})]}),g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 flex flex-col md:flex-row items-center justify-between gap-12",children:[g.jsxs("div",{className:"w-full md:w-1/2",children:[g.jsx("span",{className:"inline-block px-3 py-1 bg-red-500 text-white text-xs font-bold uppercase tracking-widest rounded-sm mb-4",children:"Oferta Limitada"}),g.jsx("h2",{className:"text-4xl md:text-6xl font-heading font-black uppercase mb-6 drop-shadow-lg",children:"Combo Explosão Muscular"}),g.jsx("p",{className:"text-gray-300 mb-8 max-w-md text-lg",children:"Compre Whey Isolado + Creatina Creapure e ganhe 15% de desconto nas lojas parceiras com nosso link."}),g.jsxs("div",{className:"flex gap-4 mb-8",children:[g.jsxs("div",{className:"bg-background border border-surface px-6 py-4 rounded-lg flex flex-col items-center min-w-[80px]",children:[g.jsx("span",{className:"text-3xl font-heading font-black text-kinetic",children:"14"}),g.jsx("span",{className:"text-xs text-gray-500 uppercase font-bold",children:"Horas"})]}),g.jsxs("div",{className:"bg-background border border-surface px-6 py-4 rounded-lg flex flex-col items-center min-w-[80px]",children:[g.jsx("span",{className:"text-3xl font-heading font-black text-kinetic",children:"22"}),g.jsx("span",{className:"text-xs text-gray-500 uppercase font-bold",children:"Minutos"})]}),g.jsxs("div",{className:"bg-background border border-surface px-6 py-4 rounded-lg flex flex-col items-center min-w-[80px]",children:[g.jsx("span",{className:"text-3xl font-heading font-black text-white",children:"59"}),g.jsx("span",{className:"text-xs text-gray-500 uppercase font-bold",children:"Segundos"})]})]}),g.jsx("button",{className:"bg-white text-black font-heading font-black uppercase tracking-widest px-8 py-4 rounded-lg hover:bg-kinetic transition-colors duration-300 w-full sm:w-auto",children:"Aproveitar Oferta"})]}),g.jsxs("div",{className:"w-full md:w-1/2 relative",children:[g.jsx("div",{className:"absolute inset-0 bg-kinetic/20 blur-[100px] rounded-full"}),g.jsx("img",{src:"https://images.unsplash.com/photo-1593095948071-474c5cc2989d?auto=format&fit=crop&w=800&q=80",alt:"Combo",className:"relative z-10 rounded-2xl shadow-2xl border border-surface border-b-kinetic/30 rotate-3 hover:rotate-0 transition-transform duration-700"})]})]})]}),g.jsx("section",{className:"py-12 md:py-24 bg-background",children:g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[g.jsxs("div",{className:"text-center mb-10 md:mb-16",children:[g.jsx("span",{className:"text-kinetic text-xs md:text-sm font-bold uppercase tracking-widest mb-1 md:mb-2 block",children:"Os Mais Vendidos"}),g.jsx("h2",{className:"text-3xl sm:text-4xl md:text-5xl font-heading font-black uppercase",children:"Elite Performance"})]}),g.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-6",children:i.map((u,h)=>g.jsx(Fh,{product:u,index:h},u.id))})]})}),g.jsx(Tt,{})]})}function gc(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]]);return i}function TC(t,e,i,s){function o(c){return c instanceof i?c:new i(function(u){u(c)})}
185return new(i||(i=Promise))(function(c,u){function h(y){try{p(s.next(y))}catch(v){u(v)}}function m(y){try{p(s.throw(y))}catch(v){u(v)}}function p(y){y.done?c(y.value):o(y.value).then(h,m)}p((s=s.apply(t,e||[])).next())})}const AC=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Jf extends Error{constructor(e,i="FunctionsError",s){super(e),this.name=i,this.context=s}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class EC extends Jf{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Gv extends Jf{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Iv extends Jf{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Kh;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Kh||(Kh={}));class NC{constructor(e,{headers:i={},customFetch:s,region:o=Kh.Any}={}){this.url=e,this.headers=i,this.region=o,this.fetch=AC(s)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return TC(this,arguments,void 0,function*(i,s={}){var o;let c,u;try{const{headers:h,method:m,body:p,signal:y,timeout:v}=s;let x={},{region:_}=s;_||(_=this.region);const S=new URL(`${this.url}/${i}`);_&&_!=="any"&&(x["x-region"]=_,S.searchParams.set("forceFunctionRegion",_));let T;p&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)?typeof Blob<"u"&&p instanceof Blob||p instanceof ArrayBuffer?(x["Content-Type"]="application/octet-stream",T=p):typeof p=="string"?(x["Content-Type"]="text/plain",T=p):typeof FormData<"u"&&p instanceof FormData?T=p:(x["Content-Type"]="application/json",T=JSON.stringify(p)):p&&typeof p!="string"&&!(typeof Blob<"u"&&p instanceof Blob)&&!(p instanceof ArrayBuffer)&&!(typeof FormData<"u"&&p instanceof FormData)?T=JSON.stringify(p):T=p;let k=y;v&&(u=new AbortController,c=setTimeout(()=>u.abort(),v),y?(k=u.signal,y.addEventListener("abort",()=>u.abort())):k=u.signal);const E=yield this.fetch(S.toString(),{method:m||"POST",headers:Object.assign(Object.assign(Object.assign({},x),this.headers),h),body:T,signal:k}).catch(G=>{throw new EC(G)}),D=E.headers.get("x-relay-error");if(D&&D==="true")throw new Gv(E);if(!E.ok)throw new Iv(E);let j=((o=E.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),U;return j==="application/json"?U=yield E.json():j==="application/octet-stream"||j==="application/pdf"?U=yield E.blob():j==="text/event-stream"?U=E:j==="multipart/form-data"?U=yield E.formData():U=yield E.text(),{data:U,error:null,response:E}}catch(h){return{data:null,error:h,response:h instanceof Iv||h instanceof Gv?h.context:void 0}}finally{c&&clearTimeout(c)}})}}const $_=3,Fv=t=>Math.min(1e3*2**t,3e4),kC=[520,503],G_=["GET","HEAD","OPTIONS"];var jC=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
185de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Kv(t,e){return new Promise(i=>{if(e!=null&&e.aborted){i();return}const s=setTimeout(()=>{e==null||e.removeEventListener("abort",o),i()},t);function o(){clearTimeout(s),i()}e==null||e.addEventListener("abort",o)})}function CC(t,e,i,s){return!(!s||i>=$_||!G_.includes(t)||!kC.includes(e))}var RC=class{constructor(t){var e,i,s,o,c;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(i=t.isMaybeSingle)!==null&&i!==void 0?i:!1,this.shouldStripNulls=(s=t.shouldStripNulls)!==null&&s!==void 0?s:!1,this.urlLengthLimit=(o=t.urlLengthLimit)!==null&&o!==void 0?o:8e3,this.retryEnabled=(c=t.retry)!==null&&c!==void 0?c:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var i=this;if(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"),this.shouldStripNulls){const u=this.headers.get("Accept");u==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!u||u==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const s=this.fetch;let c=(async()=>{let u=0;for(;;){const p=new Headers(i.headers);u>0&&p.set("X-Retry-Count",String(u));let y;try{y=await s(i.url.toString(),{method:i.method,headers:p,body:JSON.stringify(i.body,(v,x)=>typeof x=="bigint"?x.toString():x),signal:i.signal})}catch(v){if((v==null?void 0:v.name)==="AbortError"||(v==null?void 0:v.code)==="ABORT_ERR"||!G_.includes(i.method))throw v;if(i.retryEnabled&&u<$_){const x=Fv(u);u++,await Kv(x,i.signal);continue}throw v}if(CC(i.method,y.status,u,i.retryEnabled)){var h,m;const v=(h=(m=y.headers)===null||m===void 0?void 0:m.get("Retry-After"))!==null&&h!==void 0?h:null,x=v!==null?Math.max(0,parseInt(v,10)||0)*1e3:Fv(u);await y.text(),u++,await Kv(x,i.signal);continue}return await i.processResponse(y)}})();return this.shouldThrowOnError||(c=c.catch(u=>{var h;let m="",p="",y="";const v=u==null?void 0:u.cause;if(v){var x,_,S,T;const D=(x=v==null?void 0:v.message)!==null&&x!==void 0?x:"",j=(_=v==null?void 0:v.code)!==null&&_!==void 0?_:"";m=`${(S=u==null?void 0:u.name)!==null&&S!==void 0?S:"FetchError"}: ${u==null?void 0:u.message}`,m+=` 186 187Caused by: ${(T=v==null?void 0:v.name)!==null&&T!==void 0?T:"Error"}: ${D}`,j&&(m+=` (${j})`),v!=null&&v.stack&&(m+=` 188${v.stack}`)}else{var k;m=(k=u==null?void 0:u.stack)!==null&&k!==void 0?k:""}const E=this.url.toString().length;return(u==null?void 0:u.name)==="AbortError"||(u==null?void 0:u.code)==="ABORT_ERR"?(y="",p="Request was aborted (timeout or manual cancellation)",E>this.urlLengthLimit&&(p+=`. Note: Your request URL is ${E} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((v==null?void 0:v.name)==="HeadersOverflowError"||(v==null?void 0:v.code)==="UND_ERR_HEADERS_OVERFLOW")&&(y="",p="HTTP headers exceeded server limits (typically 16KB)",E>this.urlLengthLimit&&(p+=`. Your request URL is ${E} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(h=u==null?void 0:u.name)!==null&&h!==void 0?h:"FetchError"}: ${u==null?void 0:u.message}`,details:m,hint:p,code:y},data:null,count:null,status:0,statusText:""}}
188)),c.then(t,e)}async processResponse(t){var e=this;let i=null,s=null,o=null,c=t.status,u=t.statusText;if(t.ok){var h,m;if(e.method!=="HEAD"){var p;const x=await t.text();x===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((p=e.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?s=x:s=JSON.parse(x))}const y=(h=e.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),v=(m=t.headers.get("content-range"))===null||m===void 0?void 0:m.split("/");y&&v&&v.length>1&&(o=parseInt(v[1])),e.isMaybeSingle&&Array.isArray(s)&&(s.length>1?(i={code:"PGRST116",details:`Results contain ${s.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,o=null,c=406,u="Not Acceptable"):s.length===1?s=s[0]:s=null)}else{const y=await t.text();try{i=JSON.parse(y),Array.isArray(i)&&t.status===404&&(s=[],i=null,c=200,u="OK")}catch{t.status===404&&y===""?(c=204,u="No Content"):i={message:y}}if(i&&e.shouldThrowOnError)throw new jC(i)}return{success:i===null,error:i,data:s,count:o,status:c,statusText:u}}returns(){return this}overrideTypes(){return this}},OC=class extends RC{select(t){let e=!1;const i=(t??"*").split("").map(s=>/\s/.test(s)&&!e?"":(s==='"'&&(e=!e),s)).join("");return this.url.searchParams.set("select",i),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:i,foreignTable:s,referencedTable:o=s}={}){const c=o?`${o}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${t}.${e?"asc":"desc"}${i===void 0?"":i?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:i=e}={}){const s=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(s,`${t}`),this}range(t,e,{foreignTable:i,referencedTable:s=i}={}){const o=typeof s>"u"?"offset":`${s}.offset`,c=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(o,`${t}`),this.url.searchParams.set(c,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return 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:t=!1,verbose:e=!1,settings:i=!1,buffers:s=!1,wal:o=!1,format:c="text"}={}){var u;const h=[t?"analyze":null,e?"verbose":null,i?"settings":null,s?"buffers":null,o?"wal":null].filter(Boolean).join("|"),m=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${m}"; options=${h};`),c==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const Xv=new RegExp("[,()]");var ts=class extends OC{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const i=Array.from(new Set(e)).map(s=>typeof s=="string"&&Xv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`in.(${i})`),this}notIn(t,e){const i=Array.from(new Set(e)).map(s=>typeof s=="string"&&Xv.test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`not.in.(${i})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:i,type:s}={}){let o="";s==="plain"?o="pl":s==="phrase"?o="ph":s==="websearch"&&(o="w");const c=i===void 0?"":`(${i})`;return this.url.searchParams.append(t,`${o}fts${c}.${e}`),this}match(t){return Object.entries(t).filter(([e,i])=>
188i!==void 0).forEach(([e,i])=>{this.url.searchParams.append(e,`eq.${i}`)}),this}not(t,e,i){return this.url.searchParams.append(t,`not.${e}.${i}`),this}or(t,{foreignTable:e,referencedTable:i=e}={}){const s=i?`${i}.or`:"or";return this.url.searchParams.append(s,`(${t})`),this}filter(t,e,i){return this.url.searchParams.append(t,`${e}.${i}`),this}},DC=class{constructor(t,{headers:e={},schema:i,fetch:s,urlLengthLimit:o=8e3,retry:c}){this.url=t,this.headers=new Headers(e),this.schema=i,this.fetch=s,this.urlLengthLimit=o,this.retry=c}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:i=!1,count:s}=e??{},o=i?"HEAD":"GET";let c=!1;const u=(t??"*").split("").map(p=>/\s/.test(p)&&!c?"":(p==='"'&&(c=!c),p)).join(""),{url:h,headers:m}=this.cloneRequestState();return h.searchParams.set("select",u),s&&m.append("Prefer",`count=${s}`),new ts({method:o,url:h,headers:m,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:i=!0}={}){var s;const o="POST",{url:c,headers:u}=this.cloneRequestState();if(e&&u.append("Prefer",`count=${e}`),i||u.append("Prefer","missing=default"),Array.isArray(t)){const h=t.reduce((m,p)=>m.concat(Object.keys(p)),[]);if(h.length>0){const m=[...new Set(h)].map(p=>`"${p}"`);c.searchParams.set("columns",m.join(","))}}return new ts({method:o,url:c,headers:u,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:i=!1,count:s,defaultToNull:o=!0}={}){var c;const u="POST",{url:h,headers:m}=this.cloneRequestState();if(m.append("Prefer",`resolution=${i?"ignore":"merge"}-duplicates`),e!==void 0&&h.searchParams.set("on_conflict",e),s&&m.append("Prefer",`count=${s}`),o||m.append("Prefer","missing=default"),Array.isArray(t)){const p=t.reduce((y,v)=>y.concat(Object.keys(v)),[]);if(p.length>0){const y=[...new Set(p)].map(v=>`"${v}"`);h.searchParams.set("columns",y.join(","))}}return new ts({method:u,url:h,headers:m,schema:this.schema,body:t,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var i;const s="PATCH",{url:o,headers:c}=this.cloneRequestState();return e&&c.append("Prefer",`count=${e}`),new ts({method:s,url:o,headers:c,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const i="DELETE",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new ts({method:i,url:s,headers:o,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Ur(t){"@babel/helpers - typeof";return Ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ur(t)}function MC(t,e){if(Ur(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var s=i.call(t,e);if(Ur(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function LC(t){var e=MC(t,"string");return Ur(e)=="symbol"?e:e+""}function PC(t,e,i){return(e=LC(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Yv(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),i.push.apply(i,s)}return i}function Al(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?Yv(Object(i),!0).forEach(function(s){PC(t,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Yv(Object(i)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(i,s))})}return t}var UC=class I_{constructor(e,{headers:i={},schema:s,fetch:o,timeout:c,urlLengthLimit:u=8e3,retry:h}={}){this.url=e,this.headers=new Headers(i),this.schemaName=s,this.urlLengthLimit=u;const m=o??globalThis.fetch;c!==void 0&&c>0?this.fetch=(p,y)=>{const v=new AbortController,x=setTimeout(()=>v.abort(),c),_=y==null?void 0:y.signal;if(_){if(_.aborted)return clearTimeout(x),m(p,y);const S=()=>{clearTimeout(x),v.abort()};return _.addEventListener("abort",S,{once:!0}),m(p,Al(Al({},y),{},{signal:v.signal})).finally(()=>{clearTimeout(x),_.removeEventListener("abort",S)})}return m(p,Al(Al({},y),{},{signal:v.signal})).finally(()=>clearTimeout(x))}:this.fetch=m,this.retry=h}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new DC(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new I_(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,i={}
188,{head:s=!1,get:o=!1,count:c}={}){var u;let h;const m=new URL(`${this.url}/rpc/${e}`);let p;const y=_=>_!==null&&typeof _=="object"&&(!Array.isArray(_)||_.some(y)),v=s&&Object.values(i).some(y);v?(h="POST",p=i):s||o?(h=s?"HEAD":"GET",Object.entries(i).filter(([_,S])=>S!==void 0).map(([_,S])=>[_,Array.isArray(S)?`{${S.join(",")}}`:`${S}`]).forEach(([_,S])=>{m.searchParams.append(_,S)})):(h="POST",p=i);const x=new Headers(this.headers);return v?x.set("Prefer",c?`count=${c},return=minimal`:"return=minimal"):c&&x.set("Prefer",`count=${c}`),new ts({method:h,url:m,headers:x,schema:this.schemaName,body:p,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class BC{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const i=globalThis;if(typeof globalThis<"u"&&typeof i.WebSocket<"u")return{type:"native",wsConstructor:i.WebSocket};const s=typeof global<"u"?global:void 0;if(s&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};if(typeof globalThis<"u"&&typeof i.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"&&i.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.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 o=globalThis.process;if(o){const c=o.versions;if(c&&c.node){const u=c.node,h=parseInt(u.replace(/^v/,"").split(".")[0]);return h>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${h} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${h} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 189import ws from "ws" 190new 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 e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let i=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(i+=` 191 192Suggested solution: ${e.workaround}`),new Error(i)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const zC="2.106.0",VC=`realtime-js/${zC}`,HC="1.0.0",F_="2.0.0",qC=F_,$C=1e4,GC=100,Ca={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},K_={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Xh={connecting:"connecting",closing:"closing",closed:"closed"};class IC{constructor(e){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=e??[]}encode(e,i){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return i(this._binaryEncodeUserBroadcastPush(e));let s=[e.join_ref,e.ref,e.topic,e.event,e.payload];return i(JSON.stringify(s))}_binaryEncodeUserBroadcastPush(e){var i;return this._isArrayBuffer((i=e.payload)===null||i===void 0?void 0:i.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var i,s;const o=(s=(i=e.payload)===null||i===void 0?void 0:i.payload)!==null&&s!==void 0?s:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(e){var i,s;const o=(s=(i=e.payload)===null||i===void 0?void 0:i.payload)!==null&&s!==void 0?s:{},u=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(e,i,s){var o,c;
192const u=e.topic,h=(o=e.ref)!==null&&o!==void 0?o:"",m=(c=e.join_ref)!==null&&c!==void 0?c:"",p=e.payload.event,y=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},v=Object.keys(y).length===0?"":JSON.stringify(y);if(m.length>255)throw new Error(`joinRef length ${m.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`ref length ${h.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`userEvent length ${p.length} exceeds maximum of 255`);if(v.length>255)throw new Error(`metadata length ${v.length} exceeds maximum of 255`);const x=this.USER_BROADCAST_PUSH_META_LENGTH+m.length+h.length+u.length+p.length+v.length,_=new ArrayBuffer(this.HEADER_LENGTH+x);let S=new DataView(_),T=0;S.setUint8(T++,this.KINDS.userBroadcastPush),S.setUint8(T++,m.length),S.setUint8(T++,h.length),S.setUint8(T++,u.length),S.setUint8(T++,p.length),S.setUint8(T++,v.length),S.setUint8(T++,i),Array.from(m,E=>S.setUint8(T++,E.charCodeAt(0))),Array.from(h,E=>S.setUint8(T++,E.charCodeAt(0))),Array.from(u,E=>S.setUint8(T++,E.charCodeAt(0))),Array.from(p,E=>S.setUint8(T++,E.charCodeAt(0))),Array.from(v,E=>S.setUint8(T++,E.charCodeAt(0)));var k=new Uint8Array(_.byteLength+s.byteLength);return k.set(new Uint8Array(_),0),k.set(new Uint8Array(s),_.byteLength),k.buffer}decode(e,i){if(this._isArrayBuffer(e)){let s=this._binaryDecode(e);return i(s)}if(typeof e=="string"){const s=JSON.parse(e),[o,c,u,h,m]=s;return i({join_ref:o,ref:c,topic:u,event:h,payload:m})}return i({})}_binaryDecode(e){const i=new DataView(e),s=i.getUint8(0),o=new TextDecoder;switch(s){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,i,o)}}_decodeUserBroadcast(e,i,s){const o=i.getUint8(1),c=i.getUint8(2),u=i.getUint8(3),h=i.getUint8(4);let m=this.HEADER_LENGTH+4;const p=s.decode(e.slice(m,m+o));m=m+o;const y=s.decode(e.slice(m,m+c));m=m+c;const v=s.decode(e.slice(m,m+u));m=m+u;const x=e.slice(m,e.byteLength),_=h===this.JSON_ENCODING?JSON.parse(s.decode(x)):x,S={type:this.BROADCAST_EVENT,event:y,payload:_};return u>0&&(S.meta=JSON.parse(v)),{join_ref:null,ref:null,topic:p,event:this.BROADCAST_EVENT,payload:S}}_isArrayBuffer(e){var i;return e instanceof ArrayBuffer||((i=e==null?void 0:e.constructor)===null||i===void 0?void 0:i.name)==="ArrayBuffer"}_pick(e,i){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([s])=>i.includes(s)))}}var Pe;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Pe||(Pe={}));const Qv=(t,e,i={})=>{var s;const o=(s=i.skipTypes)!==null&&s!==void 0?s:[];return e?Object.keys(e).reduce((c,u)=>(c[u]=FC(u,t,e,o),c),{}):{}},FC=(t,e,i,s)=>{const o=e.find(h=>h.name===t),c=o==null?void 0:o.type,u=i[t];return c&&!s.includes(c)?X_(c,u):Yh(u)},X_=(t,e)=>{if(t.charAt(0)==="_"){const i=t.slice(1,t.length);return QC(e,i)}switch(t){case Pe.bool:return KC(e);case Pe.float4:case Pe.float8:case Pe.int2:case Pe.int4:case Pe.int8:case Pe.numeric:case Pe.oid:return XC(e);case Pe.json:case Pe.jsonb:return YC(e);case Pe.timestamp:return WC(e);case Pe.abstime:case Pe.date:case Pe.daterange:case Pe.int4range:case Pe.int8range:case Pe.money:case Pe.reltime:case Pe.text:case Pe.time:case Pe.timestamptz:case Pe.timetz:case Pe.tsrange:case Pe.tstzrange:return Yh(e);default:return Yh(e)}},Yh=t=>t,KC=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},XC=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},YC=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},QC=(t,e)=>{if(typeof t!="string")return t;const i=t.length-1,s=t[i];if(t[0]==="{"&&s==="}"){let c;const u=t.slice(1,i);try{c=JSON.parse("["+u+"]")}catch{c=u?u.split(","):[]}return c.map(h=>X_(e,h))}return t},WC=t=>typeof t=="string"?t.replace(" ","T"):t,Y_=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var jr=t=>typeof t=="function"?t:function(){return t},JC=typeof self<"u"?self:null,ns=typeof window<"u"?window:null,Nn=JC||ns||globalThis,ZC="2.0.0",eR=1e4,tR=1e3,jn={connecting:0,open:1,closing:2,closed:3},Ot={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Jn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Qh={longpoll:"longpoll",websocket:"websocket"},nR={complete:4},Wh="base64url.bearer.phx.",El=class{constructor(t,e,i,s){this.channel=t,this.event=e,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHo
vendor: 21,724 bytes, lines 192-193
192oks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),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()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:i}){this.recHooks.filter(s=>s.status===t).forEach(s=>s.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Q_=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},aR=class{constructor(t,e,i){this.state=Ot.closed,this.topic=t,this.params=jr(e||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new El(this,Jn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Q_(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Ot.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",s=>{this.state=Ot.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Ot.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=Ot.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new El(this,Jn.leave,jr({}),this.timeout).send(),this.state=Ot.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Jn.reply,(s,o)=>{this.trigger(this.replyEventName(o),s)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ot.closed,this.bindings=[]}onClose(t){this.on(Jn.close,t)}onError(t){return this.on(Jn.error,e=>t(e))}on(t,e){let i=this.bindingRef++;return this.bindings.push({event:t,ref:i,callback:e}),i}off(t,e){this.bindings=this.bindings.filter(i=>!(i.event===t&&(typeof e>"u"||e===i.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,i=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let s=new El(this,t,function(){return e},i);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ot.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Jn.close,"leave")},i=new El(this,Jn.leave,jr({}),t);return i.receive("ok",()=>e()).receive("timeout",()=>e()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(t,e,i){return e}filterBindings(t,e,i){return!0}isMember(t,e,i,s){return this.topic!==t?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:i,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ot.joining,this.joinPush.resend(t))}trigger(t,e,i,s){let o=this.onMessage(t,e,i,s);if(e&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let c=this.bindings.filter(u=>u.event===t&&this.filterBindings(u,e,i));for(let u=0;u<c.length;u++)c[u].callback(o,i,s||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===Ot.closed}isErrored(){return this.state===Ot.errored}isJoined(){return this.state===Ot.joined}isJoining(){return this.state===Ot.joining}isLeaving(){return this.state===Ot.leaving}},nc=class{static request(t,e,i,s,o,c,u){if(Nn.XDomainRequest){let h=new Nn.XDomainRequest;return this.xdomainRequest(h,t,e,s,o,c,u)}else if(Nn.XMLHttpRequest){let h=new Nn.XMLHttpRequest;return this.xhrRequest(h,t,e,i,s,o,c,u)}else{if(Nn.fetch&&Nn.AbortController)return this.fetchRequest(t,e,i,s,o,c,u);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,i,s,o,c,u){let h={method:t,headers:i,body:s},m=null;return o&&(m=new AbortController,setTimeout(()=>m.abort(),o),h.signal=m.signal),Nn.fetch(e,h).then(p=>p.text()).then(p=>this.parseJSON(p)).then(p=>u&&u(p)).catch(p=>{p.name==="AbortError"&&c?c():u&&u(null)}),m}static xdomainRequest(t,e,i,s,o,c,u){return t.timeout=o,t.open(e,i),t.onload=()=>{let h=this.parseJSON(t.responseText);u&&u(h)},c&&(t.ontimeout=c),t.onprogress=()=>{},t.send(s),t}static xhrRequest(t,e,i,s,o,c,u,h){t.open(e,i,!0),t.timeout=c;for(let[m,p]of Object.entries(s))t.setRequestHeader(m,p);return t.onerror=()=>h&&h(null),t.onreadystatechange=()=>{if(t.readyState===nR.complete&&h){let m=this.parseJSON(t.responseText);h(m)}},u&&(t.ontimeout=u),t.send(o),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let i=[];for(var s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let o=e?`${e}[${s}]`:s,c=t[s];typeof c=="object"?i.push(this.serialize(c,o)):i.push(encodeURIComponent(o)+"="+encodeURIComponent(c))}return i.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let i=t.match(/\?/)?"&":"?";return`${t}${i}${this.serialize(e)}`}},iR=t=>{let e="",i=new Uint8Array(t),s=i.byteLength;for(let o=0;o<s;o++)e+=String.fromCharCode(i[o]);return btoa(e)},Yi=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Wh)&&(this.authToken=atob(e[1].slice(Wh.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=jn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Qh.websocket),"$1/"+Qh.longpoll)}endpointURL(){return nc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,i){this.close(t,e,i),this.readyState=jn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===jn.open||this.readyState===jn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:i,token:s,messages:o}=e;if(i===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=s}else i=0;switch(i){case 200:o.forEach(c=>{setTimeout(()=>this.onmessage({data:c}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=jn.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${i}`)}})}send(t){typeof t!="string"&&(t=iR(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 193`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,i){for(let o of this.reqs)o.abort();this.readyState=jn.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:i});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(t,e,i,s,o){let c,u=()=>{this.reqs.delete(c),s()};c=nc.request(t,this.endpointURL(),e,i,this.timeout,u,h=>{this.reqs.delete(c),this.isActive()&&o(h)}),this.reqs.add(c)}},sR=class wr{constructor(e,i={}){let s=i.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(s.state,o=>{let{onJoin:c,onLeave:u,onSync:h}=this.caller;this.joinRef=this.channel.joinRef(),this.state=wr.syncState(this.state,o,c,u),this.pendingDiffs.forEach(m=>{this.state=wr.syncDiff(this.state,m,c,u)}),this.pendingDiffs=[],h()}),this.channel.on(s.diff,o=>{let{onJoin:c,onLeave:u,onSync:h}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=wr.syncDiff(this.state,o,c,u),h())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return wr.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,i,s,o){let c=this.clone(e),u={},h={};return this.map(c,(m,p)=>{i[m]||(h[m]=p)}),this.map(i,(m,p)=>{let y=c[m];if(y){let v=p.metas.map(T=>T.phx_ref),x=y.metas.map(T=>T.phx_ref),_=p.metas.filter(T=>x.indexOf(T.phx_ref)<0),S=y.metas.filter(T=>v.indexOf(T.phx_ref)<0);_.length>0&&(u[m]=p,u[m].metas=_),S.length>0&&(h[m]=this.clone(y),h[m].metas=S)}else u[m]=p}),this.syncDiff(c,{joins:u,leaves:h},s,o)}static syncDiff(e,i,s,o){let{joins:c,leaves:u}=this.clone(i);return s||(s=function(){}),o||(o=function(){}),this.map(c,(h,m)=>{let p=e[h];if(e[h]=this.clone(m),p){let y=e[h].metas.map(x=>x.phx_ref),v=p.metas.filter(x=>y.indexOf(x.phx_ref)<0);e[h].metas.unshift(...v)}s(h,p,m)}),this.map(u,(h,m)=>{let p=e[h];if(!p)return;let y=m.metas.map(v=>v.phx_ref);p.metas=p.metas.filter(v=>y.indexOf(v.phx_ref)<0),o(h,p,m),p.metas.length===0&&delete e[h]}),e}static list(e,i){return i||(i=function(s,o){return o}),this.map(e,(s,o)=>i(s,o))}static map(e,i){return Object.getOwnPropertyNames(e).map(s=>i(s,e[s]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Nl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(i))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[i,s,o,c,u]=JSON.parse(t);return e({join_ref:i,ref:s,topic:o,event:c,payload:u})}},binaryEncode(t){let{join_ref:e,ref:i,event:s,topic:o,payload:c}=t,u=this.META_LENGTH+e.length+i.length+o.length+s.length,h=new ArrayBuffer(this.HEADER_LENGTH+u),m=new DataView(h),p=0;m.setUint8(p++,this.KINDS.push),m.setUint8(p++,e.length),m.setUint8(p++,i.length),m.setUint8(p++,o.length),m.setUint8(p++,s.length),Array.from(e,v=>m.setUint8(p++,v.charCodeAt(0))),Array.from(i,v=>m.setUint8(p++,v.charCodeAt(0))),Array.from(o,v=>m.setUint8(p++,v.charCodeAt(0))),Array.from(s,v=>m.setUint8(p++,v.charCodeAt(0)));var y=new Uint8Array(h.byteLength+c.byteLength);return y.set(new Uint8Array(h),0),y.set(new Uint8Array(c),h.byteLength),y.buffer},binaryDecode(t){let e=new DataView(t),i=e.getUint8(0),s=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(t,e,s);case this.KINDS.reply:return this.decodeReply(t,e,s);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,s)}},decodePush(t,e,i){let s=e.getUint8(1),o=e.getUint8(2),c=e.getUint8(3),u=this.HEADER_LENGTH+this.META_LENGTH-1,h=i.decode(t.slice(u,u+s));u=u+s;let m=i.decode(t.slice(u,u+o));u=u+o;let p=i.decode(t.slice(u,u+c));u=u+c;let y=t.slice(u,t.byteLength);return{join_ref:h,ref:null,topic:m,event:p,payload:y}},decodeReply(t,e,i){let s=e.getUint8(1),o=e.getUint8(2),c=e.getUint8(3),u=e.getUint8(4),h=this.HEADER_LENGTH+this.META_LENGTH,m=i.decode(t.slice(h,h+s));h=h+s;let p=i.decode(t.slice(h,h+o));h=h+o;let y=i.decode(t.slice(h,h+c));h=h+c;let v=i.decode(t.slice(h,h+u));h=h+u;let x=t.slice(h,t.byteLength),_={status:v,response:x};return{join_ref:m,ref:p,topic:y,event:Jn.reply,payload:_}},decodeBroadcast(t,e,i){let s=e.getUint8(1),o=e.getUint8(2),c=this.HEADER_LENGTH+2,u=i.decode(t.slice(c,c+s));c=c+s;let h=i.decode(t.slice(c,c+o));c=c+o;let m=t.slice(c,t.byteLength);return{join_ref:null,ref:null,topic:u,event:h,payload:m}}},rR=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||eR,this.transport=e.transport||Nn.WebSocket||Yi,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let i=null;try{i=Nn&&Nn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||i,this.establishedConnections=0,this.defaultEncoder=Nl.encode.bind(Nl),this.defaultDecoder=Nl.decode.bind(Nl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Yi?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let s=null;ns&&ns.addEventListener&&(ns.addEventListener("pagehide",o=>{this.conn&&(this.disconnect(),s=this.connectClock)}),ns.addEventListener("pageshow",o=>{s===this.connectClock&&(s=null,this.connect())}),ns.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=o=>e.rejoinAfterMs?e.rejoinAfterMs(o):[1e3,2e3,5e3][o-1]||1e4,this.reconnectAfterMs=o=>e.reconnectAfterMs?e.reconnectAfterMs(o):[10,50,100,150,200,250,500,1e3,2e3][o-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(o,c,u)=>{console.log(`${o}: ${c}`,u)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=jr(e.params||{}),this.endPoint=`${t}/${Qh.websocket}`,this.vsn=e.vsn||ZC,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Q_(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Yi}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=nc.appendParams(nc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,i){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,i)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=jr(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Yi?this.connectWithFallback(Yi,this.longPollFallbackMs):this.transportConnect())}log(t,e,i){this.logger&&this.logger(t,e,i)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let s=this.onMessage(o=>{o.ref===e&&(this.off([s]),t(Date.now()-i))});return!0}transportName(t){switch(t){case Yi:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Wh}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let i=!1,s=!0,o,c,u=this.transportName(t),h=m=>{this.log("transport",`falling back to ${u}...`,m),this.off([o,c]),s=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${u}`))return h("memorized");this.fallbackTimer=setTimeout(h,e),c=this.onError(m=>{this.log("transport","error",m),s&&!i&&(clearTimeout(this.fallbackTimer),h(m))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(i=!0,!s){let m=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${m}`,"true"),this.log("transport",`established ${m} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(h,e),this.ping(m=>{this.log("transport","connected to primary after",m),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),tR,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,i){if(!this.conn)return t&&t();const s=this.conn;this.waitForBufferDone(s,()=>{e?s.close(e,i||""):s.close(),this.waitForSocketClosed(s,()=>{this.conn===s&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,i=1){if(i===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,i+1)},150*i)}waitForSocketClosed(t,e,i=1){if(i===5||t.readyState===jn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,i+1)},150*i)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,i=this.establishedConnections;this.triggerStateCallbacks("error",t,e,i),(e===this.transport||i>0)&&this.triggerChanError(t)}
193triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Jn.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case jn.connecting:return"connecting";case jn.open:return"open";case jn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([i])=>t.indexOf(i)===-1)}channel(t,e={}){let i=new aR(t,e,this);return this.channels.push(i),i}push(t){if(this.hasLogger()){let{topic:e,event:i,payload:s,ref:o,join_ref:c}=t;this.log("push",`${e} ${i} (${c}, ${o})`,s)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:i,event:s,payload:o,ref:c,join_ref:u}=e;if(c&&c===this.pendingHeartbeatRef){const h=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(o.status==="ok"?"ok":"error",h)}catch(m){this.log("error","error in heartbeat callback",m)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${o.status||""} ${i} ${s} ${c&&"("+c+")"||""}`.trim(),o);for(let h=0;h<this.channels.length;h++){const m=this.channels[h];m.isMember(i,s,o,u)&&m.trigger(s,o,c,u)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([i,s])=>{try{s(...e)}catch(o){this.log("error",`error in ${t} callback`,o)}})}catch(i){this.log("error",`error triggering ${t} callbacks`,i)}}leaveOpenTopic(t){let e=this.channels.find(i=>i.topic===t&&(i.isJoined()||i.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class Cr{constructor(e,i){const s=lR(i);this.presence=new sR(e.getChannel(),s),this.presence.onJoin((o,c,u)=>{const h=Cr.onJoinPayload(o,c,u);e.getChannel().trigger("presence",h)}),this.presence.onLeave((o,c,u)=>{const h=Cr.onLeavePayload(o,c,u);e.getChannel().trigger("presence",h)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Cr.transformState(this.presence.state)}static transformState(e){return e=oR(e),Object.getOwnPropertyNames(e).reduce((i,s)=>{const o=e[s];return i[s]=ql(o),i},{})}static onJoinPayload(e,i,s){const o=Wv(i),c=ql(s);return{event:"join",key:e,currentPresences:o,newPresences:c}}static onLeavePayload(e,i,s){const o=Wv(i),c=ql(s);return{event:"leave",key:e,currentPresences:o,leftPresences:c}}}function ql(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function oR(t){return JSON.parse(JSON.stringify(t))}function lR(t){return(t==null?void 0:t.events)&&{events:t.events}}function Wv(t){return t!=null&&t.metas?ql(t):[]}var Jv;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Jv||(Jv={}));class cR{get state(){return this.presenceAdapter.state}constructor(e,i){this.channel=e,this.presenceAdapter=new Cr(this.channel.channelAdapter,i)}}function uR(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
193if(typeof e.code=="number"){const i=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${i}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class dR{constructor(e,i,s){const o=hR(s);this.channel=e.getSocket().channel(i,o),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,i){return this.channel.on(e,i)}off(e,i){this.channel.off(e,i)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,i,s){let o;try{o=this.channel.push(e,i,s)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>GC){const c=this.channel.pushBuffer.shift();c.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${c.event}`,c.payload())}return o}updateJoinPayload(e){const i=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},i),e)}canPush(){return this.socket.isConnected()&&this.state===Ca.joined}isJoined(){return this.state===Ca.joined}isJoining(){return this.state===Ca.joining}isClosed(){return this.state===Ca.closed}isLeaving(){return this.state===Ca.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function hR(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var Zv;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Zv||(Zv={}));var cs;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(cs||(cs={}));var Zn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Zn||(Zn={}));class Rr{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,i={config:{}},s){var o,c;if(this.topic=e,this.params=i,this.socket=s,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},i.config),this.channelAdapter=new dR(this.socket.socketAdapter,e,this.params),this.presence=new cR(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Y_(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((c=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,i=this.timeout){var s,o,c;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:u,presence:h,private:m}}=this.params,p=(o=(s=this.bindings.postgres_changes)===null||s===void 0?void 0:s.map(_=>_.filter))!==null&&o!==void 0?o:[],y=!!this.bindings[cs.PRESENCE]&&this.bindings[cs.PRESENCE].length>0||((c=this.params.config.presence)===null||c===void 0?void 0:c.enabled)===!0,v={},x={broadcast:u,presence:Object.assign(Object.assign({},h),{enabled:y}),postgres_changes:p,private:m};this.socket.accessTokenValue&&(v.access_token=this.socket.accessTokenValue),this._onError(_=>{e==null||e(Zn.CHANNEL_ERROR,uR(_))}),this._onClose(()=>e==null?void 0:e(Zn.CLOSED)),this.updateJoinPayload(Object.assign({config:x},v)),this._updateFilterMessage(),this.channelAdapter.subscribe(i).receive("ok",async({postgres_changes:_})=>
193{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e==null||e(Zn.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=Ca.errored;const S=Object.values(_).join(", ")||"error";e==null||e(Zn.CHANNEL_ERROR,new Error(S,{cause:_}))}).receive("timeout",()=>{e==null||e(Zn.TIMED_OUT)})}return this}_updatePostgresBindings(e,i){var s;const o=this.bindings.postgres_changes,c=(s=o==null?void 0:o.length)!==null&&s!==void 0?s:0,u=[];for(let h=0;h<c;h++){const m=o[h],{filter:{event:p,schema:y,table:v,filter:x}}=m,_=e&&e[h];if(_&&_.event===p&&Rr.isFilterValueEqual(_.schema,y)&&Rr.isFilterValueEqual(_.table,v)&&Rr.isFilterValueEqual(_.filter,x))u.push(Object.assign(Object.assign({},m),{id:_.id}));else{this.unsubscribe(),this.state=Ca.errored,i==null||i(Zn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=u,this.state!=Ca.errored&&i&&i(Zn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,i={}){return await this.send({type:"presence",event:"track",payload:e},i.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,i,s){const o=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),c=e===cs.PRESENCE||e===cs.POSTGRES_CHANGES;if(o&&c)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,i,s)}async httpSend(e,i,s={}){var o;if(i==null)return Promise.reject(new Error("Payload is required for httpSend()"));const c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(c.Authorization=`Bearer ${this.socket.accessTokenValue}`);const u={method:"POST",headers:c,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:i,private:this.private}]})},h=await this._fetchWithTimeout(this.broadcastEndpointURL,u,(o=s.timeout)!==null&&o!==void 0?o:this.timeout);if(h.status===202)return{success:!0};let m=h.statusText;try{const p=await h.json();m=p.error||p.message||m}catch{}return Promise.reject(new Error(m))}async send(e,i={}){var s,o;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
193in the future. Please use httpSend() explicitly for REST delivery.");const{event:c,payload:u}=e,h={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(h.Authorization=`Bearer ${this.socket.accessTokenValue}`);const m={method:"POST",headers:h,body:JSON.stringify({messages:[{topic:this.subTopic,event:c,payload:u,private:this.private}]})};try{const p=await this._fetchWithTimeout(this.broadcastEndpointURL,m,(s=i.timeout)!==null&&s!==void 0?s:this.timeout);return await((o=p.body)===null||o===void 0?void 0:o.cancel()),p.ok?"ok":"error"}catch(p){return p instanceof Error&&p.name==="AbortError"?"timed out":"error"}}else return new Promise(c=>{var u,h,m;const p=this.channelAdapter.push(e.type,e,i.timeout||this.timeout);e.type==="broadcast"&&!(!((m=(h=(u=this.params)===null||u===void 0?void 0:u.config)===null||h===void 0?void 0:h.broadcast)===null||m===void 0)&&m.ack)&&c("ok"),p.receive("ok",()=>c("ok")),p.receive("error",()=>c("error")),p.receive("timeout",()=>c("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(i=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>i("ok")).receive("timeout",()=>i("timed out")).receive("error",()=>i("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,i,s){const o=new AbortController,c=setTimeout(()=>o.abort(),s),u=await this.socket.fetch(e,Object.assign(Object.assign({},i),{signal:o.signal}));return clearTimeout(c),u}_on(e,i,s){const o=e.toLocaleLowerCase(),c=this.channelAdapter.on(e,s),u={type:o,filter:i,callback:s,ref:c};return this.bindings[o]?this.bindings[o].push(u):this.bindings[o]=[u],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,i,s)=>{var o,c,u,h,m,p,y;const v=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(v,s))return!1;const x=(o=this.bindings[v])===null||o===void 0?void 0:o.find(_=>_.ref===e.ref);if(!x)return!0;if(["broadcast","presence","postgres_changes"].includes(v))if("id"in x){const _=x.id,S=(c=x.filter)===null||c===void 0?void 0:c.event;return _&&((u=i.ids)===null||u===void 0?void 0:u.includes(_))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((h=i.data)===null||h===void 0?void 0:h.type.toLocaleLowerCase()))}else{const _=(p=(m=x==null?void 0:x.filter)===null||m===void 0?void 0:m.event)===null||p===void 0?void 0:p.toLocaleLowerCase();return _==="*"||_===((y=i==null?void 0:i.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return x.type.toLocaleLowerCase()===v})}_notThisChannelEvent(e,i){const{close:s,error:o,leave:c,join:u}=K_;return i&&[s,o,c,u].includes(e)&&i!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,i,s)=>{if(typeof i=="object"&&"ids"in i){const o=i.data,{schema:c,table:u,commit_timestamp:h,type:m,errors:p}=o;return Object.assign(Object.assign({},{schema:c,table:u,commit_timestamp:h,eventType:m,new:{},old:{},errors:p}),this._getPayloadRecords(o))}return i})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const i in e.bindings)for(const s of e.bindings[i])this._on(s.type,s.filter,s.callback)}static isFilterValueEqual(e,i){return(e??void 0)===(i??void 0)}_getPayloadRecords(e){const i={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(i.new=Qv(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(i.old=Qv(e.columns,e.old_record)),i}}class fR{constructor(e,i){this.socket=new rR(e,i)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,i,s,o=1e4){return new Promise(c=>{setTimeout(()=>c("timeout"),o),this.socket.disconnect(()=>{e(),c("ok")},i,s)})}push(e){this.socket.push(e)}log(e,i,s){this.socket.log(e,i,s)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Xh.connecting}isDisconnecting(){return this.socket.connectionState()==Xh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const eb={HEARTBEAT_INTERVAL:25e3},mR=[1e3,2e3,5e3,1e4],pR=1e4;function gR(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var i;return(i=Array.from(t.keys())[e])!==null&&i!==void 0?i:null},removeItem(e){t.delete(e)},setItem(e,i){t.set(e,String(i))}}}function yR(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return gR()}const vR=` 194 addEventListener("message", (e) => { 195 if (e.data.event === "start") { 196 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 197 } 198 });`;class bR{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,i){var s;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
198,this.ref=0,this.serializer=new IC,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=c=>c?(...u)=>c(...u):(...u)=>fetch(...u),!(!((s=i==null?void 0:i.params)===null||s===void 0)&&s.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=i.params.apikey;const o=this._initializeOptions(i);this.socketAdapter=new fR(e,o),this.httpEndpoint=Y_(e),this.fetch=this._resolveFetch(i==null?void 0:i.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const i=e.message;throw i.includes("Node.js")?new Error(`${i} 199 200To use Realtime in Node.js, you need to provide a WebSocket implementation: 201 202Option 1: Use Node.js 22+ which has native WebSocket support 203Option 2: Install and provide the "ws" package: 204 205 npm install ws 206 207 import ws from "ws" 208 const client = new RealtimeClient(url, { 209 ...options, 210 transport: ws 211 })`):new Error(`WebSocket not available: ${i}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,i){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,i)}getChannels(){return this.channels}async removeChannel(e){const i=await e.unsubscribe();return i==="ok"&&e.teardown(),i}async removeAllChannels(){const e=this.channels.map(async s=>{const o=await s.unsubscribe();return s.teardown(),o}),i=await Promise.all(e);return await this.disconnect(),i}log(e,i,s){this.socketAdapter.log(e,i,s)}connectionState(){return this.socketAdapter.connectionState()||Xh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,i={config:{}}){const s=`realtime:${e}`,o=this.getChannels().find(c=>c.topic===s);if(o)return o;{const c=new Rr(`realtime:${e}`,i,this);return this._cancelPendingDisconnect(),this.channels.push(c),c}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(i=>i.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
211this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let i,s=!1;if(e)i=e,s=!0;else if(this.accessToken)try{i=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),i=this.accessTokenValue}else i=this.accessTokenValue;s?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=i&&(this.accessTokenValue=i,this.channels.forEach(o=>{const c={access_token:i,version:VC};i&&o.updateJoinPayload(c),o.joinedOnce&&o.channelAdapter.isJoined()&&o.channelAdapter.push(K_.access_token,{access_token:i})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(i=>{this.log("error",`Error setting auth in ${e}`,i)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(i=>{this.log("error","error waiting for auth on connect",i)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(i,s)=>{i=="sent"&&this._setAuthSafely(),e&&e(i,s)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=i=>{this.log("worker","worker error",i.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=i=>{i.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)}_workerObjectUrl(e){let i;if(e)i=e;else{const s=new Blob([vR],{type:"application/javascript"});i=URL.createObjectURL(s)}return i}_initializeOptions(e){var i,s,o,c,u,h,m,p,y,v,x,_;this.worker=(i=e==null?void 0:e.worker)!==null&&i!==void 0?i:!1,this.accessToken=(s=e==null?void 0:e.accessToken)!==null&&s!==void 0?s:null;const S={};S.timeout=(o=e==null?void 0:e.timeout)!==null&&o!==void 0?o:$C,S.heartbeatIntervalMs=(c=e==null?void 0:e.heartbeatIntervalMs)!==null&&c!==void 0?c:eb.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(u=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&u!==void 0?u:2*((h=e==null?void 0:e.heartbeatIntervalMs)!==null&&h!==void 0?h:eb.HEARTBEAT_INTERVAL),S.transport=(m=e==null?void 0:e.transport)!==null&&m!==void 0?m:BC.getWebSocketConstructor(),S.params=e==null?void 0:e.params,S.logger=e==null?void 0:e.logger,S.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),S.sessionStorage=(p=e==null?void 0:e.sessionStorage)!==null&&p!==void 0?p:yR(),S.reconnectAfterMs=(y=e==null?void 0:e.reconnectAfterMs)!==null&&y!==void 0?y:(D=>mR[D-1]||pR);let T,k;const E=(v=e==null?void 0:e.vsn)!==null&&v!==void 0?v:qC;switch(E){case HC:T=(D,j)=>j(JSON.stringify(D)),k=(D,j)=>j(JSON.parse(D));break;case F_:T=this.serializer.encode.bind(this.serializer),k=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${S.vsn}`)}if(S.vsn=E,S.encode=(x=e==null?void 0:e.encode)!==null&&x!==void 0?x:T,S.decode=(_=e==null?void 0:e.decode)!==null&&_!==void 0?_:k,S.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,S.params=Object.assign(Object.assign({},S.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,S.autoSendHeartbeat=!this.worker}return S}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
211var Br=class extends Error{constructor(t,e){var i;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((i=e.icebergType)==null?void 0:i.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function xR(t,e,i){const s=new URL(e,t);if(i)for(const[o,c]of Object.entries(i))c!==void 0&&s.searchParams.set(o,c);return s.toString()}async function _R(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function wR(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:i,path:s,query:o,body:c,headers:u}){const h=xR(t.baseUrl,s,o),m=await _R(t.auth),p=await e(h,{method:i,headers:{...c?{"Content-Type":"application/json"}:{},...m,...u},body:c?JSON.stringify(c):void 0}),y=await p.text(),v=(p.headers.get("content-type")||"").includes("application/json"),x=v&&y?JSON.parse(y):y;if(!p.ok){const _=v?x:void 0,S=_==null?void 0:_.error;throw new Br((S==null?void 0:S.message)??`Request failed with status ${p.status}`,{status:p.status,icebergType:S==null?void 0:S.type,icebergCode:S==null?void 0:S.code,details:_})}return{status:p.status,headers:p.headers,data:x}}}}function kl(t){return t.join("�")}var SR=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:kl(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(s=>({namespace:s}))}async createNamespace(t,e){const i={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:i})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${kl(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${kl(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${kl(t.namespace)}`}),!0}catch(e){if(e instanceof Br&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(i){if(i instanceof Br&&i.status===409)return;throw i}}};function Qi(t){return t.join("�")}var TR=class{constructor(t,e="",i){this.client=t,this.prefix=e,this.accessDelegation=i}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qi(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const i={};return this.accessDelegation&&(i["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qi(t.namespace)}/tables`,body:e,headers:i})).data.metadata}async updateTable(t,e){const i=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qi(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":i.data["metadata-location"],metadata:i.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Qi(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qi(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Qi(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(i){if(i instanceof Br&&i.status===404)return!1;throw i}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(i){if(i instanceof Br&&i.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw i}}},AR=class{constructor(t){var s;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const i=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=wR({baseUrl:i,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(s=t.accessDelegation)==null?void 0:s.join(","),this.namespaceOps=new SR(this.client,e),this.tableOps=new TR(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
211async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function zr(t){"@babel/helpers - typeof";return zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zr(t)}function ER(t,e){if(zr(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var s=i.call(t,e);if(zr(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function NR(t){var e=ER(t,"string");return zr(e)=="symbol"?e:e+""}function kR(t,e,i){return(e=NR(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function tb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),i.push.apply(i,s)}return i}function re(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?tb(Object(i),!0).forEach(function(s){kR(t,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):tb(Object(i)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(i,s))})}return t}var yc=class extends Error{constructor(t,e="storage",i,s){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=i,this.statusCode=s}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function vc(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Jh=class extends yc{constructor(t,e,i,s="storage"){super(t,s,e,i),this.name=s==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=i}toJSON(){return re({},super.toJSON())}},W_=class extends yc{constructor(t,e,i="storage"){super(t,i),this.name=i==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function ac(t,e,i){const s=re({},t),o=e.toLowerCase();for(const c of Object.keys(s))c.toLowerCase()===o&&delete s[c];return s[o]=i,s}function jR(t){const e={};for(const[i,s]of Object.entries(t))e[i.toLowerCase()]=s;return e}const CR=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),RR=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Zh=t=>{if(Array.isArray(t))return t.map(i=>Zh(i));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([i,s])=>{const o=i.replace(/([-_][a-z])/gi,c=>c.toUpperCase().replace(/[-_]/g,""));e[o]=Zh(s)}),e},OR=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),nb=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const i=e.error;if(typeof i.message=="string")return i.message}}return JSON.stringify(t)},DR=async(t,e,i,s)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const o=t;let c=parseInt(String(o.status),10);Number.isFinite(c)||(c=500),o.json().then(u=>{const h=(u==null?void 0:u.statusCode)||(u==null?void 0:u.code)||c+"";e(new Jh(nb(u),c,h,s))}).catch(()=>{const u=c+"";e(new Jh(o.statusText||`HTTP ${c} error`,c,u,s))})}else e(new W_(nb(t),t,s))},MR=(t,e,i,s)=>{const o={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!s)return re(re({},o),i);if(RR(s)){var c;const u=(e==null?void 0:e.headers)||{};let h;for(const[m,p]of Object.entries(u))m.toLowerCase()==="content-type"&&(h=p);o.headers=ac(u,"Content-Type",(c=h)!==null&&c!==void 0?c:"application/json"),o.body=JSON.stringify(s)}else o.body=s;return e!=null&&e.duplex&&(o.duplex=e.duplex),re(re({},o),i)};async function br(t,e,i,s,o,c,u){return new Promise((h,m)=>{t(i,MR(e,s,o,c)).then(p=>{if(!p.ok)throw p;if(s!=null&&s.noResolveJson)return p;if(u==="vectors"){const y=p.headers.get("content-type");if(p.headers.get("content-length")==="0"||p.status===204)return{};if(!y||!y.includes("application/json"))return{}}return p.json()}).then(p=>h(p)).catch(p=>DR(p,m,s,u))})}function J_(t="storage"){return{get:async(e,i,s,o)=>br(e,"GET",i,s,o,void 0,t),post:async(e,i,s,o,c)=>br(e,"POST",i,o,c,s,t),put:async(e,i,s,o,c)=>br(e,"PUT",i,o,c,s,t),head:async(e,i,s,o)=>br(e,"HEAD",i,re(re({},s),{},{noResolveJson:!0}),o,void 0,t),remove:async(e,i,s,o,c)=>br(e,"DELETE",i,o,c,s,t)}}const LR=J_("storage"),{get:Vr,post:mn,put:ef,head:PR,remove:Zf}=LR,Gt=J_("vectors");var _s=class{constructor(t,e={},i,s="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=jR(e),this.fetch=CR(i),this.namespace=s}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=ac(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(i){if(e.shouldThrowOnError)throw i;if(vc(i))return{data:null,error:i};throw i}}};let Z_;Z_=Symbol.toStringTag;var UR=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Z_]="StreamDownloadBuilder",this.promise=null}
211then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(vc(e))return{data:null,error:e};throw e}}};let ew;ew=Symbol.toStringTag;var BR=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[ew]="BlobDownloadBuilder",this.promise=null}asStream(){return new UR(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(vc(e))return{data:null,error:e};throw e}}};const zR={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},ab={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var VR=class extends _s{constructor(t,e={},i,s){super(t,e,s,"storage"),this.bucketId=i}async uploadOrUpdate(t,e,i,s){var o=this;return o.handleOperation(async()=>{let c;const u=re(re({},ab),s);let h=re(re({},o.headers),t==="POST"&&{"x-upsert":String(u.upsert)});const m=u.metadata;if(typeof Blob<"u"&&i instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),m&&c.append("metadata",o.encodeMetadata(m)),c.append("",i)):typeof FormData<"u"&&i instanceof FormData?(c=i,c.has("cacheControl")||c.append("cacheControl",u.cacheControl),m&&!c.has("metadata")&&c.append("metadata",o.encodeMetadata(m))):(c=i,h["cache-control"]=`max-age=${u.cacheControl}`,h["content-type"]=u.contentType,m&&(h["x-metadata"]=o.toBase64(o.encodeMetadata(m))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!u.duplex&&(u.duplex="half")),s!=null&&s.headers)for(const[x,_]of Object.entries(s.headers))h=ac(h,x,_);const p=o._removeEmptyFolders(e),y=o._getFinalPath(p),v=await(t=="PUT"?ef:mn)(o.fetch,`${o.url}/object/${y}`,c,re({headers:h},u!=null&&u.duplex?{duplex:u.duplex}:{}));return{path:p,id:v.Id,fullPath:v.Key}})}async upload(t,e,i){return this.uploadOrUpdate("POST",t,e,i)}async uploadToSignedUrl(t,e,i,s){var o=this;const c=o._removeEmptyFolders(t),u=o._getFinalPath(c),h=new URL(o.url+`/object/upload/sign/${u}`);return h.searchParams.set("token",e),o.handleOperation(async()=>{let m;const p=re(re({},ab),s);let y=re(re({},o.headers),{"x-upsert":String(p.upsert)});const v=p.metadata;if(typeof Blob<"u"&&i instanceof Blob?(m=new FormData,m.append("cacheControl",p.cacheControl),v&&m.append("metadata",o.encodeMetadata(v)),m.append("",i)):typeof FormData<"u"&&i instanceof FormData?(m=i,m.has("cacheControl")||m.append("cacheControl",p.cacheControl),v&&!m.has("metadata")&&m.append("metadata",o.encodeMetadata(v))):(m=i,y["cache-control"]=`max-age=${p.cacheControl}`,y["content-type"]=p.contentType,v&&(y["x-metadata"]=o.toBase64(o.encodeMetadata(v))),(typeof ReadableStream<"u"&&m instanceof ReadableStream||m&&typeof m=="object"&&"pipe"in m&&typeof m.pipe=="function")&&!p.duplex&&(p.duplex="half")),s!=null&&s.headers)for(const[x,_]of Object.entries(s.headers))y=ac(y,x,_);return{path:c,fullPath:(await ef(o.fetch,h.toString(),m,re({headers:y},p!=null&&p.duplex?{duplex:p.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var i=this;return i.handleOperation(async()=>{let s=i._getFinalPath(t);const o=re({},i.headers);e!=null&&e.upsert&&(o["x-upsert"]="true");const c=await mn(i.fetch,`${i.url}/object/upload/sign/${s}`,{},{headers:o}),u=new URL(i.url+c.url),h=u.searchParams.get("token");if(!h)throw new yc("No token returned by API");return{signedUrl:u.toString(),path:t,token:h}})}async update(t,e,i){return this.uploadOrUpdate("PUT",t,e,i)}async move(t,e,i){var s=this;return s.handleOperation(async()=>await mn(s.fetch,`${s.url}/object/move`,{bucketId:s.bucketId,sourceKey:t,destinationKey:e,destinationBucket:i==null?void 0:i.destinationBucket},{headers:s.headers}))}
211async copy(t,e,i){var s=this;return s.handleOperation(async()=>({path:(await mn(s.fetch,`${s.url}/object/copy`,{bucketId:s.bucketId,sourceKey:t,destinationKey:e,destinationBucket:i==null?void 0:i.destinationBucket},{headers:s.headers})).Key}))}async createSignedUrl(t,e,i){var s=this;return s.handleOperation(async()=>{let o=s._getFinalPath(t);const c=typeof(i==null?void 0:i.transform)=="object"&&i.transform!==null&&Object.keys(i.transform).length>0;let u=await mn(s.fetch,`${s.url}/object/sign/${o}`,re({expiresIn:e},c?{transform:i.transform}:{}),{headers:s.headers});const h=new URLSearchParams;i!=null&&i.download&&h.set("download",i.download===!0?"":i.download),(i==null?void 0:i.cacheNonce)!=null&&h.set("cacheNonce",String(i.cacheNonce));const m=h.toString();return{signedUrl:encodeURI(`${s.url}${u.signedURL}${m?`&${m}`:""}`)}})}async createSignedUrls(t,e,i){var s=this;return s.handleOperation(async()=>{const o=await mn(s.fetch,`${s.url}/object/sign/${s.bucketId}`,{expiresIn:e,paths:t},{headers:s.headers}),c=new URLSearchParams;i!=null&&i.download&&c.set("download",i.download===!0?"":i.download),(i==null?void 0:i.cacheNonce)!=null&&c.set("cacheNonce",String(i.cacheNonce));const u=c.toString();return o.map(h=>re(re({},h),{},{signedUrl:h.signedURL?encodeURI(`${s.url}${h.signedURL}${u?`&${u}`:""}`):null}))})}download(t,e,i){const s=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",o=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(o,e.transform),(e==null?void 0:e.cacheNonce)!=null&&o.set("cacheNonce",String(e.cacheNonce));const c=o.toString(),u=this._getFinalPath(t),h=()=>Vr(this.fetch,`${this.url}/${s}/${u}${c?`?${c}`:""}`,{headers:this.headers,noResolveJson:!0},i);return new BR(h,this.shouldThrowOnError)}async info(t){var e=this;const i=e._getFinalPath(t);return e.handleOperation(async()=>Zh(await Vr(e.fetch,`${e.url}/object/info/${i}`,{headers:e.headers})))}async exists(t){var e=this;const i=e._getFinalPath(t);try{return await PR(e.fetch,`${e.url}/object/${i}`,{headers:e.headers}),{data:!0,error:null}}catch(o){if(e.shouldThrowOnError)throw o;if(vc(o)){var s;const c=o instanceof Jh?o.status:o instanceof W_?(s=o.originalError)===null||s===void 0?void 0:s.status:void 0;if(c!==void 0&&[400,404].includes(c))return{data:!1,error:o}}throw o}}getPublicUrl(t,e){const i=this._getFinalPath(t),s=new URLSearchParams;e!=null&&e.download&&s.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const o=s.toString(),c=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${c}/public/${i}`)+(o?`?${o}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Zf(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,i){var s=this;return s.handleOperation(async()=>{const o=re(re(re({},zR),e),{},{prefix:t||""});return await mn(s.fetch,`${s.url}/object/list/${s.bucketId}`,o,{headers:s.headers},i)})}async listV2(t,e){var i=this;return i.handleOperation(async()=>{const s=re({},t);return await mn(i.fetch,`${i.url}/object/list-v2/${i.bucketId}`,s,{headers:i.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const HR="2.106.0",Jr={"X-Client-Info":`storage-js/${HR}`};var qR=class extends _s{constructor(t,e={},i,s){const o=new URL(t);s!=null&&s.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase."));const c=o.href.replace(/\/$/,""),u=re(re({},Jr),e);super(c,u,i,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const i=e.listBucketOptionsToQueryString(t);return await Vr(e.fetch,`${e.url}/bucket${i}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Vr(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var i=this;return i.handleOperation(async()=>await mn(i.fetch,`${i.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:i.headers}))}async updateBucket(t,e){var i=this;return i.handleOperation(async()=>await ef(i.fetch,`${i.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:i.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await mn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Zf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},$R=class extends _s{constructor(t,e={},i){const s=t.replace(/\/$/,""),o=re(re({},Jr),e);super(s,o,i,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await mn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const i=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&i.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&i.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&i.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&i.set("sortOrder",t.sortOrder),t!=null&&t.search&&i.set("search",t.search);const s=i.toString(),o=s?`${e.url}/bucket?${s}`:`${e.url}/bucket`;return await Vr(e.fetch,o,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Zf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!OR(t))throw new yc("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 i=new AR({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),s=this.shouldThrowOnError;return new Proxy(i,{get(o,c){const u=o[c];return typeof u!="function"?u:async(...h)=>{try{return{data:await u.apply(o,h),error:null}}catch(m){if(s)throw m;return{data:null,error:m}}}}})}},GR=class extends _s{constructor(t,e={},i){const s=t.replace(/\/$/,""),o=re(re({},Jr),{},{"Content-Type":"application/json"},e);super(s,o,i,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var i=this;return i.handleOperation(async()=>await Gt.post(i.fetch,`${i.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:i.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var i=this;return i.handleOperation(async()=>await Gt.post(i.fetch,`${i.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:i.headers})||{})}},IR=class extends _s{constructor(t,e={},i){const s=t.replace(/\/$/,""),o=re(re({},Jr),{},{"Content-Type":"application/json"},e);super(s,o,i,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
211if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},FR=class extends _s{constructor(t,e={},i){const s=t.replace(/\/$/,""),o=re(re({},Jr),{},{"Content-Type":"application/json"},e);super(s,o,i,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Gt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},KR=class extends FR{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new XR(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,i=this;return e().call(i,t)}async getBucket(t){var e=()=>super.getBucket,i=this;return e().call(i,t)}async listBuckets(t={}){var e=()=>super.listBuckets,i=this;return e().call(i,t)}async deleteBucket(t){var e=()=>super.deleteBucket,i=this;return e().call(i,t)}},XR=class extends GR{constructor(t,e,i,s){super(t,e,s),this.vectorBucketName=i}async createIndex(t){var e=()=>super.createIndex,i=this;return e().call(i,re(re({},t),{},{vectorBucketName:i.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,i=this;return e().call(i,re(re({},t),{},{vectorBucketName:i.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,i=this;return e().call(i,i.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,i=this;return e().call(i,i.vectorBucketName,t)}index(t){return new YR(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},YR=class extends IR{constructor(t,e,i,s,o){super(t,e,o),this.vectorBucketName=i,this.indexName=s}async putVectors(t){var e=()=>super.putVectors,i=this;return e().call(i,re(re({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async getVectors(t){var e=()=>super.getVectors,i=this;return e().call(i,re(re({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,i=this;return e().call(i,re(re({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,i=this;return e().call(i,re(re({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,i=this;return e().call(i,re(re({},t),{},{vectorBucketName:i.vectorBucketName,indexName:i.indexName}))}},QR=class extends qR{constructor(t,e={},i,s){super(t,e,i,s)}from(t){return new VR(this.url,this.headers,t,this.fetch)}get vectors(){return new KR(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new $R(this.url+"/iceberg",this.headers,this.fetch)}};const tw="2.106.0",as=30*1e3,tf=3,uh=tf*as,WR="http://localhost:9999",JR="supabase.auth.token",ZR={"X-Client-Info":`gotrue-js/${tw}`},nf="X-Supabase-Api-Version",nw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},e5=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,t5=600*1e3;class Hr extends Error{constructor(e,i,s){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=i,this.code=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function X(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class n5 extends Hr{constructor(e,i,s){super(e,i,s),this.name="AuthApiError",this.status=i,this.code=s}}function a5(t){return X(t)&&t.name==="AuthApiError"}class pn extends Hr{constructor(e,i){super(e),this.name="AuthUnknownError",this.originalError=i}}class na extends Hr{constructor(e,i,s,o){super(e,s,o),this.name=i,this.status=s}}class ot extends na{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function jl(t){return X(t)&&t.name==="AuthSessionMissingError"}class Wi extends na{constructor(){super("Auth session or user missing","AuthInvalidToken
211ResponseError",500,void 0)}}class Cl extends na{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Rl extends na{constructor(e,i=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function i5(t){return X(t)&&t.name==="AuthImplicitGrantRedirectError"}class ib extends na{constructor(e,i=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class s5 extends na{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 af extends na{constructor(e,i){super(e,"AuthRetryableFetchError",i,void 0)}}function dh(t){return X(t)&&t.name==="AuthRetryableFetchError"}class sb extends na{constructor(e,i,s){super(e,"AuthWeakPasswordError",i,"weak_password"),this.reasons=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class sf extends na{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const ic="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),rb=` 212\r=`.split(""),r5=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<rb.length;e+=1)t[rb[e].charCodeAt(0)]=-2;for(let e=0;e<ic.length;e+=1)t[ic[e].charCodeAt(0)]=e;return t})();function ob(t,e,i){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;i(ic[s]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const s=e.queue>>e.queuedBits-6&63;i(ic[s]),e.queuedBits-=6}}function aw(t,e,i){const s=r5[t];if(s>-1)for(e.queue=e.queue<<6|s,e.queuedBits+=6;e.queuedBits>=8;)i(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(s===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function lb(t){const e=[],i=u=>{e.push(String.fromCodePoint(u))},s={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},c=u=>{c5(u,s,i)};for(let u=0;u<t.length;u+=1)aw(t.charCodeAt(u),o,c);return e.join("")}function o5(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function l5(t,e){for(let i=0;i<t.length;i+=1){let s=t.charCodeAt(i);if(s>55295&&s<=56319){const o=(s-55296)*1024&65535;s=(t.charCodeAt(i+1)-56320&65535|o)+65536,i+=1}o5(s,e)}}function c5(t,e,i){if(e.utf8seq===0){if(t<=127){i(t);return}for(let s=1;s<6;s+=1)if((t>>7-s&1)===0){e.utf8seq=s;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&i(e.codepoint)}}function us(t){const e=[],i={queue:0,queuedBits:0},s=o=>{e.push(o)};for(let o=0;o<t.length;o+=1)aw(t.charCodeAt(o),i,s);return new Uint8Array(e)}function u5(t){const e=[];return l5(t,i=>e.push(i)),new Uint8Array(e)}function oi(t){const e=[],i={queue:0,queuedBits:0},s=o=>{e.push(o)};return t.forEach(o=>ob(o,i,s)),ob(null,i,s),e.join("")}function d5(t){return Math.round(Date.now()/1e3)+t}function h5(){return Symbol("auth-callback")}const pt=()=>typeof window<"u"&&typeof document<"u",ti={tested:!1,writable:!1},iw=()=>{if(!pt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ti.tested)return ti.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),ti.tested=!0,ti.writable=!0}catch{ti.tested=!0,ti.writable=!1}return ti.writable};function f5(t){const e={},i=new URL(t);if(i.hash&&i.hash[0]==="#")try{new URLSearchParams(i.hash.substring(1)).forEac
212h((o,c)=>{e[c]=o})}catch{}return i.searchParams.forEach((s,o)=>{e[o]=s}),e}const sw=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),m5=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",is=async(t,e,i)=>{await t.setItem(e,JSON.stringify(i))},ni=async(t,e)=>{const i=await t.getItem(e);if(!i)return null;try{return JSON.parse(i)}catch{return null}},mt=async(t,e)=>{await t.removeItem(e)};class bc{constructor(){this.promise=new bc.promiseConstructor((e,i)=>{this.resolve=e,this.reject=i})}}bc.promiseConstructor=Promise;function Ol(t){const e=t.split(".");if(e.length!==3)throw new sf("Invalid JWT structure");for(let s=0;s<e.length;s++)if(!e5.test(e[s]))throw new sf("JWT not in base64url format");return{header:JSON.parse(lb(e[0])),payload:JSON.parse(lb(e[1])),signature:us(e[2]),raw:{header:e[0],payload:e[1]}}}async function p5(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function g5(t,e){return new Promise((s,o)=>{(async()=>{for(let c=0;c<1/0;c++)try{const u=await t(c);if(!e(c,null,u)){s(u);return}}catch(u){if(!e(c,u)){o(u);return}}})()})}function y5(t){return("0"+t.toString(16)).substr(-2)}function v5(){const e=new Uint32Array(56);if(typeof crypto>"u"){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",s=i.length;let o="";for(let c=0;c<56;c++)o+=i.charAt(Math.floor(Math.random()*s));return o}return crypto.getRandomValues(e),Array.from(e,y5).join("")}async function b5(t){const i=new TextEncoder().encode(t),s=await crypto.subtle.digest("SHA-256",i),o=new Uint8Array(s);return Array.from(o).map(c=>String.fromCharCode(c)).join("")}async function x5(t){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."),t;const i=await b5(t);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ji(t,e,i=!1){const s=v5();let o=s;i&&(o+="/recovery"),await is(t,`${e}-code-verifier`,o);const c=await x5(s);return[c,s===c?"plain":"s256"]}const _5=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function w5(t){const e=t.headers.get(nf);if(!e||!e.match(_5))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function S5(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function T5(t){switch(t){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 A5=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Wn(t){if(!A5.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function fn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function hh(){const t={};return new Proxy(t,{get:(e,i)=>{if(i==="__isUserNotAvailableProxy")return!0;if(typeof i=="symbol"){const s=i.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="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 "${i}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,i)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${i}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,i)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${i}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function E5(t,e){return new Proxy(t,{get:(i,s,o)=>
212{if(s==="__isInsecureUserWarningProxy")return!0;if(typeof s=="symbol"){const c=s.toString();if(c==="Symbol(Symbol.toPrimitive)"||c==="Symbol(Symbol.toStringTag)"||c==="Symbol(util.inspect.custom)"||c==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(i,s,o)}return!e.value&&typeof s=="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."),e.value=!0),Reflect.get(i,s,o)}})}function cb(t){return JSON.parse(JSON.stringify(t))}const ii=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},N5=[502,503,504,520,521,522,523,524,530];async function ub(t){var e;if(!m5(t))throw new af(ii(t),0);if(N5.includes(t.status))throw new af(ii(t),t.status);let i;try{i=await t.json()}catch(c){throw new pn(ii(c),c)}let s;const o=w5(t);if(o&&o.getTime()>=nw["2024-01-01"].timestamp&&typeof i=="object"&&i&&typeof i.code=="string"?s=i.code:typeof i=="object"&&i&&typeof i.error_code=="string"&&(s=i.error_code),s){if(s==="weak_password")throw new sb(ii(i),t.status,((e=i.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(s==="session_not_found")throw new ot}else if(typeof i=="object"&&i&&typeof i.weak_password=="object"&&i.weak_password&&Array.isArray(i.weak_password.reasons)&&i.weak_password.reasons.length&&i.weak_password.reasons.reduce((c,u)=>c&&typeof u=="string",!0))throw new sb(ii(i),t.status,i.weak_password.reasons);throw new n5(ii(i),t.status||500,s)}const k5=(t,e,i,s)=>{const o={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),o.body=JSON.stringify(s),Object.assign(Object.assign({},o),i))};async function ee(t,e,i,s){var o;const c=Object.assign({},s==null?void 0:s.headers);c[nf]||(c[nf]=nw["2024-01-01"].name),s!=null&&s.jwt&&(c.Authorization=`Bearer ${s.jwt}`);const u=(o=s==null?void 0:s.query)!==null&&o!==void 0?o:{};s!=null&&s.redirectTo&&(u.redirect_to=s.redirectTo);const h=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",m=await j5(t,e,i+h,{headers:c,noResolveJson:s==null?void 0:s.noResolveJson},{},s==null?void 0:s.body);return s!=null&&s.xform?s==null?void 0:s.xform(m):{data:Object.assign({},m),error:null}}async function j5(t,e,i,s,o,c){const u=k5(e,s,o,c);let h;try{h=await t(i,Object.assign({},u))}catch(m){throw console.error(m),new af(ii(m),0)}if(h.ok||await ub(h),s!=null&&s.noResolveJson)return h;try{return await h.json()}catch(m){await ub(m)}}function nn(t){var e;let i=null;O5(t)&&(i=Object.assign({},t),t.expires_at||(i.expires_at=d5(t.expires_in)));const s=(e=t.user)!==null&&e!==void 0?e:null;return{data:{session:i,user:s},error:null}}function db(t){const e=nn(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((i,s)=>i&&typeof s=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Ra(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function C5(t){return{data:t,error:null}}function R5(t){const{action_link:e,email_otp:i,hashed_token:s,redirect_to:o,verification_type:c}=t,u=gc(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),h={action_link:e,email_otp:i,hashed_token:s,redirect_to:o,verification_type:c},m=Object.assign({},u);return{data:{properties:h,user:m},error:null}}function hb(t){return t}function O5(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const fh=["global","local","others"];class D5{constructor({url:e="",headers:i={},fetch:s,experimental:o}){this.url=e,this.headers=i,this.fetch=sw(s),this.experimental=o??{},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)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,i=fh[0]){if(fh.indexOf(i)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${fh.join(", ")}`);try{return await ee(this.fetch,"POST",`${this.url}/logout?scope=${i}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(s){if(X(s))return{data:null,error:s};throw s}}async inviteUserByEmail(e,i={}){try{return await ee(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:i.data},headers:this.headers,redirectTo:i.redirectTo,xform:Ra})}catch(s){if(X(s))return{data:{user:null},error:s};throw s}}async generateLink(e){try{const{options:i}=e,s=gc(e,["options"]),o=Object.assign(Object.assign({},s),i);return"newEmail"in s&&(o.new_email=s==null?void 0:s.newEmail,delete o.newEmail),await ee(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:R5,redirectTo:i==null?void 0:i.redirectTo})}catch(i){if(X(i))return{data:{properties:null,user:null},error:i};throw i}}async createUser(e){try{return await ee(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Ra})}catch(i){if(X(i))return{data:{user:null},error:i};throw i}}async listUsers(e){var i,s,o,c,u,h,m;try{const p={nextPage:null,lastPage:0,total:0},y=await ee(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(i=e==null?void 0:e.page)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:"",per_page:(c=(o=e==null?void 0:e.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:hb});if(y.error)throw y.error;const v=await y.json(),x=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(m=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&m!==void 0?m:[];return _.length>0&&(_.forEach(S=>{const T=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),k=JSON.parse(S.split(";")[1].split("=")[1]);p[`${k}Page`]=T}),p.total=parseInt(x)),{data:Object.assign(Object.assign({},v),p),error:null}}catch(p){if(X(p))return{data:{users:[]},error:p};throw p}}async getUserById(e){Wn(e);try{return await ee(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Ra})}catch(i){if(X(i))return{data:{user:null},error:i};throw i}}async updateUserById(e,i){Wn(e);try{return await ee(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:i,headers:this.headers,xform:Ra})}catch(s){if(X(s))return{data:{user:null},error:s};throw s}}async deleteUser(e,i=!1){Wn(e);
212try{return await ee(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:i},xform:Ra})}catch(s){if(X(s))return{data:{user:null},error:s};throw s}}async _listFactors(e){Wn(e.userId);try{const{data:i,error:s}=await ee(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:i,error:s}}catch(i){if(X(i))return{data:null,error:i};throw i}}async _deleteFactor(e){Wn(e.userId),Wn(e.id);try{return{data:await ee(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(i){if(X(i))return{data:null,error:i};throw i}}async _listOAuthClients(e){var i,s,o,c,u,h,m;try{const p={nextPage:null,lastPage:0,total:0},y=await ee(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(s=(i=e==null?void 0:e.page)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:"",per_page:(c=(o=e==null?void 0:e.perPage)===null||o===void 0?void 0:o.toString())!==null&&c!==void 0?c:""},xform:hb});if(y.error)throw y.error;const v=await y.json(),x=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,_=(m=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&m!==void 0?m:[];return _.length>0&&(_.forEach(S=>{const T=parseInt(S.split(";")[0].split("=")[1].substring(0,1)),k=JSON.parse(S.split(";")[1].split("=")[1]);p[`${k}Page`]=T}),p.total=parseInt(x)),{data:Object.assign(Object.assign({},v),p),error:null}}catch(p){if(X(p))return{data:{clients:[]},error:p};throw p}}async _createOAuthClient(e){try{return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(X(i))return{data:null,error:i};throw i}}async _getOAuthClient(e){try{return await ee(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(X(i))return{data:null,error:i};throw i}}async _updateOAuthClient(e,i){try{return await ee(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:i,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(X(s))return{data:null,error:s};throw s}}async _deleteOAuthClient(e){try{return await ee(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(i){if(X(i))return{data:null,error:i};throw i}}async _regenerateOAuthClientSecret(e){try{return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(X(i))return{data:null,error:i};throw i}}async _listCustomProviders(e){try{const i={};return e!=null&&e.type&&(i.type=e.type),await ee(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:i,xform:s=>{var o;return{data:{providers:(o=s==null?void 0:s.providers)!==null&&o!==void 0?o:[]},error:null}}})}catch(i){if(X(i))return{data:{providers:[]},error:i};throw i}}async _createCustomProvider(e){try{return await ee(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(X(i))return{data:null,error:i};throw i}}async _getCustomProvider(e){try{return await ee(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(X(i))return{data:null,error:i};throw i}}async _updateCustomProvider(e,i){try{return await ee(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:i,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(X(s))return{data:null,error:s};throw s}}async _deleteCustomProvider(e){try{return await ee(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(i){if(X(i))return{data:null,error:i};throw i}}async _adminListPasskeys(e){fn(this.experimental),Wn(e.userId);try{return await ee(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(X(i))return{data:null,error:i};throw i}}async _adminDeletePasskey(e){fn(this.experimental),Wn(e.userId),Wn(e.passkeyId);
212try{return await ee(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(i){if(X(i))return{data:null,error:i};throw i}}}function fb(t={}){return{getItem:e=>t[e]||null,setItem:(e,i)=>{t[e]=i},removeItem:e=>{delete t[e]}}}const An={debug:!!(globalThis&&iw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class rw extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class mb extends rw{}async function M5(t,e,i){An.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const s=new globalThis.AbortController;let o;e>0&&(o=setTimeout(()=>{s.abort(),An.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:s.signal},async c=>{if(c){clearTimeout(o),An.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,c.name);try{return await i()}finally{An.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,c.name)}}else{if(e===0)throw An.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new mb(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(An.debug)try{const u=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(u,null," "))}catch(u){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",u)}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"),clearTimeout(o),await i()}})}catch(c){if(e>0&&clearTimeout(o),c!==null&&typeof c=="object"&&"name"in c&&c.name==="AbortError"&&e>0){if(s.signal.aborted)return An.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async u=>{if(u){An.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,u.name);try{return await i()}finally{An.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,u.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await i()}));throw An.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new mb(`Lock "${t}" was released because another request stole it`)}throw c}}function L5(){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 ow(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function P5(t){return parseInt(t,16)}function U5(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,s=>s.toString(16).padStart(2,"0")).join("")}function B5(t){var e;const{chainId:i,domain:s,expirationTime:o,issuedAt:c=new Date,nonce:u,notBefore:h,requestId:m,resources:p,scheme:y,uri:v,version:x}=t;{if(!Number.isInteger(i))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${i}`);if(!s)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!v)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(x!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${x}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 213`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const _=ow(t.address),S=y?`${y}://${s}`:s,T=t.statement?`${t.statement} 214`:"",k=`${S} wants you to sign in with your Ethereum account: 215${_} 216 217${T}`;let E=`URI: ${v} 218Version: ${x} 219Chain ID: ${i}${u?` 220Nonce: ${u}`:""} 221Issued At: ${c.toISOString()}`;
221if(o&&(E+=` 222Expiration Time: ${o.toISOString()}`),h&&(E+=` 223Not Before: ${h.toISOString()}`),m&&(E+=` 224Request ID: ${m}`),p){let D=` 225Resources:`;for(const j of p){if(!j||typeof j!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${j}`);D+=` 226- ${j}`}E+=D}return`${k} 227${E}`}class tt extends Error{constructor({message:e,code:i,cause:s,name:o}){var c;super(e,{cause:s}),this.__isWebAuthnError=!0,this.name=(c=o??(s instanceof Error?s.name:void 0))!==null&&c!==void 0?c:"Unknown Error",this.code=i}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class sc extends tt{constructor(e,i){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:i,message:e}),this.name="WebAuthnUnknownError",this.originalError=i}}function z5({error:t,options:e}){var i,s,o;const{publicKey:c}=e;if(!c)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new tt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((i=c.authenticatorSelection)===null||i===void 0?void 0:i.requireResidentKey)===!0)return new tt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((s=c.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new tt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((o=c.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new tt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new tt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new tt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return c.pubKeyCredParams.filter(h=>h.type==="public-key").length===0?new tt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new tt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const u=window.location.hostname;if(lw(u)){if(c.rp.id!==u)return new tt({message:`The RP ID "${c.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new tt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(c.user.id.byteLength<1||c.user.id.byteLength>64)return new tt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new tt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function V5({error:t,options:e}){const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new tt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new tt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const s=window.location.hostname;if(lw(s)){if(i.rpId!==s)return new tt({message:`The RP ID "${i.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new tt({message:`${window.location.hostname}
227 is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new tt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class H5{createNewAbortSignal(){if(this.controller){const i=new Error("Cancelling existing WebAuthn API call for new one");i.name="AbortError",this.controller.abort(i)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const rf=new H5;function pb(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:i,excludeCredentials:s}=t,o=gc(t,["challenge","user","excludeCredentials"]),c=us(e).buffer,u=Object.assign(Object.assign({},i),{id:us(i.id).buffer}),h=Object.assign(Object.assign({},o),{challenge:c,user:u});if(s&&s.length>0){h.excludeCredentials=new Array(s.length);for(let m=0;m<s.length;m++){const p=s[m];h.excludeCredentials[m]=Object.assign(Object.assign({},p),{id:us(p.id).buffer,type:p.type||"public-key",transports:p.transports})}}return h}function gb(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:i}=t,s=gc(t,["challenge","allowCredentials"]),o=us(e).buffer,c=Object.assign(Object.assign({},s),{challenge:o});if(i&&i.length>0){c.allowCredentials=new Array(i.length);for(let u=0;u<i.length;u++){const h=i[u];c.allowCredentials[u]=Object.assign(Object.assign({},h),{id:us(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return c}function yb(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const i=t;return{id:t.id,rawId:t.id,response:{attestationObject:oi(new Uint8Array(t.response.attestationObject)),clientDataJSON:oi(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=i.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function vb(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const i=t,s=t.getClientExtensionResults(),o=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:oi(new Uint8Array(o.authenticatorData)),clientDataJSON:oi(new Uint8Array(o.clientDataJSON)),signature:oi(new Uint8Array(o.signature)),userHandle:o.userHandle?oi(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:s,authenticatorAttachment:(e=i.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function lw(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function rc(){var t,e;return!!(pt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function cw(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new sc("Browser returned unexpected credential type",e)}:{data:null,error:new sc("Empty credential response",e)}}catch(e){return{data:null,error:z5({error:e,options:t})}}}async function uw(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new sc("Browser returned unexpected credential type",e)}:{data:null,error:new sc("Empty credential response",e)}}catch(e){return{data:null,error:V5({error:e,options:t})}}}const q5={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},$5={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function oc(...t){const e=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),i=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),s={};
227for(const o of t)if(o)for(const c in o){const u=o[c];if(u!==void 0)if(Array.isArray(u))s[c]=u;else if(i(u))s[c]=u;else if(e(u)){const h=s[c];e(h)?s[c]=oc(h,u):s[c]=oc(u)}else s[c]=u}return s}function G5(t,e){return oc(q5,t,e||{})}function I5(t,e){return oc($5,t,e||{})}class F5{constructor(e){this.client=e,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(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:i,friendlyName:s,signal:o},c){var u;try{const{data:h,error:m}=await this.client.mfa.challenge({factorId:e,webauthn:i});if(!h)return{data:null,error:m};const p=o??rf.createNewAbortSignal();if(h.webauthn.type==="create"){const{user:y}=h.webauthn.credential_options.publicKey;if(!y.name){const v=s;if(v)y.name=`${y.id}:${v}`;else{const _=(await this.client.getUser()).data.user,S=((u=_==null?void 0:_.user_metadata)===null||u===void 0?void 0:u.name)||(_==null?void 0:_.email)||(_==null?void 0:_.id)||"User";y.name=`${y.id}:${S}`}}y.displayName||(y.displayName=y.name)}switch(h.webauthn.type){case"create":{const y=G5(h.webauthn.credential_options.publicKey,c==null?void 0:c.create),{data:v,error:x}=await cw({publicKey:y,signal:p});return v?{data:{factorId:e,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:v}},error:null}:{data:null,error:x}}case"request":{const y=I5(h.webauthn.credential_options.publicKey,c==null?void 0:c.request),{data:v,error:x}=await uw(Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:y,signal:p}));return v?{data:{factorId:e,challengeId:h.id,webauthn:{type:h.webauthn.type,credential_response:v}},error:null}:{data:null,error:x}}}}catch(h){return X(h)?{data:null,error:h}:{data:null,error:new pn("Unexpected error in challenge",h)}}}async _verify({challengeId:e,factorId:i,webauthn:s}){return this.client.mfa.verify({factorId:i,challengeId:e,webauthn:s})}async _authenticate({factorId:e,webauthn:{rpId:i=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!i)return{data:null,error:new Hr("rpId is required for WebAuthn authentication")};try{if(!rc())return{data:null,error:new pn("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this.challenge({factorId:e,webauthn:{rpId:i,rpOrigins:s},signal:o},{request:c});if(!u)return{data:null,error:h};const{webauthn:m}=u;return this._verify({factorId:e,challengeId:u.challengeId,webauthn:{type:m.type,rpId:i,rpOrigins:s,credential_response:m.credential_response}})}catch(u){return X(u)?{data:null,error:u}:{data:null,error:new pn("Unexpected error in authenticate",u)}}}async _register({friendlyName:e,webauthn:{rpId:i=typeof window<"u"?window.location.hostname:void 0,rpOrigins:s=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},c){if(!i)return{data:null,error:new Hr("rpId is required for WebAuthn registration")};try{if(!rc())return{data:null,error:new pn("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this._enroll({friendlyName:e});if(!u)return await this.client.mfa.listFactors().then(y=>{var v;return(v=y.data)===null||v===void 0?void 0:v.all.find(x=>x.factor_type==="webauthn"&&x.friendly_name===e&&x.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y==null?void 0:y.id}):void 0),{data:null,error:h};const{data:m,error:p}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:i,rpOrigins:s},signal:o},{create:c});return m?this._verify({factorId:u.id,challengeId:m.challengeId,webauthn:{rpId:i,rpOrigins:s,type:m.webauthn.type,credential_response:m.webauthn.credential_response}}):{data:null,error:p}}catch(u){return X(u)?{data:null,error:u}:{data:null,error:new pn("Unexpected error in register",u)}}}}L5();const K5={url:WR,storageKey:JR,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ZR,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function bb(t,e,i){return await i()}const Zi={};class qr{get jwks(){var e,i;return(i=(e=Zi[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&i!==void 0?i:{keys:[]}}set jwks(e){Zi[this.storageKey]=Object.assign(Object.assign({},Zi[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,i;return(i=(e=Zi[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&i!==void 0?i:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Zi[this.storageKey]=Object.assign(Object.assign({},Zi[this.storageKey]),{cachedAt:e})}constructor(e){var i,s,o,c;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 u=Object.assign(Object.assign({},K5),e);
227if(this.storageKey=u.storageKey,this.instanceID=(i=qr.nextInstanceID[this.storageKey])!==null&&i!==void 0?i:0,qr.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&pt()){const h=`${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(h),this.logDebugMessages&&console.trace(h)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(s=u.experimental)!==null&&s!==void 0?s:{},this.admin=new D5({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=sw(u.fetch),this.lock=u.lock||bb,this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCustomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock?this.lock=u.lock:this.persistSession&&pt()&&(!((o=globalThis==null?void 0:globalThis.navigator)===null||o===void 0)&&o.locks)?this.lock=M5:this.lock=bb,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 F5(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.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(u.storage?this.storage=u.storage:iw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=fb(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=fb(this.memoryStorage)),pt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(h){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",h)}(c=this.broadcastChannel)===null||c===void 0||c.addEventListener("message",async h=>{this._debug("received broadcast notification from other tab or client",h);try{await this._notifyAllSubscribers(h.data.event,h.data.session,!1)}catch(m){this._debug("#broadcastChannel","error",m)}})}u.skipAutoInitialize||this.initialize().catch(h=>{this._debug("#initialize()","error",h)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${tw}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),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 e;try{let i={},s="none";if(pt()&&(i=f5(window.location.href),this._isImplicitGrantCallback(i)?s="implicit":await this._isPKCECallback(i)&&(s="pkce")),pt()&&this.detectSessionInUrl&&s!=="none"){const{data:o,error:c}=await this._getSessionFromURL(i,s);if(c){if(this._debug("#_initialize()","error detecting session from URL",c),i5(c)){const m=(e=c.details)===null||e===void 0?void 0:e.code;if(m==="identity_already_exists"||m==="identity_not_found"||m==="single_identity_not_deletable")return{error:c}}return{error:c}}const{session:u,redirectType:h}=o;return this._debug("#_initialize()","detected session in URL",u,"redirect type",h),await this._saveSession(u),setTimeout(async()=>{h==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(i){return X(i)?this._returnResult({error:i}):this._returnResult({error:new pn("Unexpected error during initialization",i)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var i,s,o;try{const c=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(s=(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:(o=e==null?void 0:e.options)===null||o===void 0?void 0:o.captchaToken}},xform:nn}),{data:u,error:h}=c;if(h||!u)return this._returnResult({data:{user:null,session:null},error:h});const m=u.session,p=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",m)),this._returnResult({data:{user:p,session:m},error:null})}catch(c){if(X(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signUp(e){var i,s,o;try{let c;if("email"in e){const{email:y,password:v,options:x}=e;let _=null,S=null;this.flowType==="pkce"&&([_,S]=await Ji(this.storage,this.storageKey)),c=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:x==null?void 0:x.emailRedirectTo,body:{email:y,password:v,data:(i=x==null?void 0:x.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:x==null?void 0:x.captchaToken},code_challenge:_,code_challenge_method:S},xform:nn})}else if("phone"in e){const{phone:y,password:v,options:x}=e;c=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:v,data:(s=x==null?void 0:x.data)!==null&&s!==void 0?s:{},channel:(o=x==null?void 0:x.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:x==null?void 0:x.captchaToken}},xform:nn})}else throw new Cl("You must provide either an email or phone number and a password");const{data:u,error:h}=c;if(h||!u)return await mt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h});const m=u.session,p=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",m)),this._returnResult({data:{user:p,session:m},error:null})}catch(c){if(await mt(this.storage,`${this.storageKey}-code-verifier`),X(c))return this._returnResult({data:{user:null,session:null},error:c});throw c}}async signInWithPassword(e){try{let i;if("email"in e){const{email:c,password:u,options:h}=e;i=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:c,password:u,gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:db})}else if("phone"in e){const{phone:c,password:u,options:h}=e;i=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:c,password:u,gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:db})}else throw new Cl("You must provide either an email or phone number and a password");const{data:s,error:o}=i;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!s||!s.session||!s.user){const c=new Wi;return this._returnResult({data:{user:null,session:null},error:c})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:o})}catch(i){if(X(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithOAuth(e){var i,s,o,c;return await this._handleProviderSignIn(e.provider,{redirectTo:(i=e.options)===null||i===void 0?void 0:i.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(o=e.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(c=e.options)===null||c===void 0?void 0:c.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:i}=e;switch(i){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${i}"`)}}async signInWithEthereum(e){var i,s,o,c,u,h,m,p,y,v,x;let _,S;if("message"in e)_=e.message,S=e.signature;else{const{chain:T,wallet:k,statement:E,options:D}=e;let j;if(pt())if(typeof k=="object")j=k;else{const oe=window;if("ethereum"in oe&&typeof oe.ethereum=="object"&&"request"in oe.ethereum&&typeof oe.ethereum.request=="function")j=oe.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 k!="object"||!(D!=null&&D.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=k}const U=new URL((i=D==null?void 0:D.url)!==null&&i!==void 0?i:window.location.href),G=await j.request({method:"eth_requestAccounts"}).then(oe=>oe).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!G||G.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const F=ow(G[0]);let I=(s=D==null?void 0:D.signInWithEthereum)===null||s===void 0?void 0:s.chainId;if(!I){const oe=await j.request({method:"eth_chainId"});I=P5(oe)}const Q={domain:U.host,address:F,statement:E,uri:U.href,version:"1",chainId:I,nonce:(o=D==null?void 0:D.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(u=(c=D==null?void 0:D.signInWithEthereum)===null||c===void 0?void 0:c.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(h=D==null?void 0:D.signInWithEthereum)===null||h===void 0?void 0:h.expirationTime,notBefore:(m=D==null?void 0:D.signInWithEthereum)===null||m===void 0?void 0:m.notBefore,requestId:(p=D==null?void 0:D.signInWithEthereum)===null||p===void 0?void 0:p.requestId,resources:(y=D==null?void 0:D.signInWithEthereum)===null||y===void 0?void 0:y.resources};_=B5(Q),S=await j.request({method:"personal_sign",params:[U5(_),F]})}try{const{data:T,error:k}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:_,signature:S},!((v=e.options)===null||v===void 0)&&v.captchaToken?{gotrue_meta_security:{captcha_token:(x=e.options)===null||x===void 0?void 0:x.captchaToken}}:null),xform:nn});if(k)throw k;if(!T||!T.session||!T.user){const E=new Wi;return this._returnResult({data:{user:null,session:null},error:E})}
227return T.session&&(await this._saveSession(T.session),await this._notifyAllSubscribers("SIGNED_IN",T.session)),this._returnResult({data:Object.assign({},T),error:k})}catch(T){if(X(T))return this._returnResult({data:{user:null,session:null},error:T});throw T}}async signInWithSolana(e){var i,s,o,c,u,h,m,p,y,v,x,_;let S,T;if("message"in e)S=e.message,T=e.signature;else{const{chain:k,wallet:E,statement:D,options:j}=e;let U;if(pt())if(typeof E=="object")U=E;else{const F=window;if("solana"in F&&typeof F.solana=="object"&&("signIn"in F.solana&&typeof F.solana.signIn=="function"||"signMessage"in F.solana&&typeof F.solana.signMessage=="function"))U=F.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 E!="object"||!(j!=null&&j.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");U=E}const G=new URL((i=j==null?void 0:j.url)!==null&&i!==void 0?i:window.location.href);if("signIn"in U&&U.signIn){const F=await U.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j==null?void 0:j.signInWithSolana),{version:"1",domain:G.host,uri:G.href}),D?{statement:D}:null));let I;if(Array.isArray(F)&&F[0]&&typeof F[0]=="object")I=F[0];else if(F&&typeof F=="object"&&"signedMessage"in F&&"signature"in F)I=F;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in I&&"signature"in I&&(typeof I.signedMessage=="string"||I.signedMessage instanceof Uint8Array)&&I.signature instanceof Uint8Array)S=typeof I.signedMessage=="string"?I.signedMessage:new TextDecoder().decode(I.signedMessage),T=I.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in U)||typeof U.signMessage!="function"||!("publicKey"in U)||typeof U!="object"||!U.publicKey||!("toBase58"in U.publicKey)||typeof U.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");S=[`${G.host} wants you to sign in with your Solana account:`,U.publicKey.toBase58(),...D?["",D,""]:[""],"Version: 1",`URI: ${G.href}`,`Issued At: ${(o=(s=j==null?void 0:j.signInWithSolana)===null||s===void 0?void 0:s.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((c=j==null?void 0:j.signInWithSolana)===null||c===void 0)&&c.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((u=j==null?void 0:j.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((h=j==null?void 0:j.signInWithSolana)===null||h===void 0)&&h.chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((m=j==null?void 0:j.signInWithSolana)===null||m===void 0)&&m.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((p=j==null?void 0:j.signInWithSolana)===null||p===void 0)&&p.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((v=(y=j==null?void 0:j.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||v===void 0)&&v.length?["Resources",...j.signInWithSolana.resources.map(I=>`- ${I}`)]:[]].join(` 228`);const F=await U.signMessage(new TextEncoder().encode(S),"utf8");if(!F||!(F instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");T=F}}try{const{data:k,error:E}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:S,signature:oi(T)},!((x=e.options)===null||x===void 0)&&x.captchaToken?{gotrue_meta_security:{captcha_token:(_=e.options)===null||_===void 0?void 0:_.captchaToken}}:null),xform:nn});if(E)throw E;if(!k||!k.session||!k.user){const D=new Wi;return this._returnResult({data:{user:null,session:null},error:D})}return k.session&&(await this._saveSession(k.session),await this._notifyAllSubscribers("SIGNED_IN",k.session)),this._returnResult({data:Object.assign({},k),error:E})}catch(k){if(X(k))return this._returnResult({data:{user:null,session:null},error:k});throw k}}async _exchangeCodeForSession(e){const i=await ni(this.storage,`${this.storageKey}-code-verifier`),[s,o]=(i??"").split("/");try{if(!s&&this.flowType==="pkce")throw new s5;const{data:c,error:u}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:nn});if(await mt(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!c||!c.session||!c.user){const h=new Wi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(o==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:o??null}),error:u})}catch(c){if(await mt(this.storage,`${this.storageKey}-code-verifier`),X(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(e){try{const{options:i,provider:s,token:o,access_token:c,nonce:u}=e,h=await ee(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:o,access_token:c,nonce:u,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:nn}),{data:m,error:p}=h;if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!m||!m.session||!m.user){const y=new Wi;return this._returnResult({data:{user:null,session:null},error:y})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:m,error:p})}catch(i){if(X(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithOtp(e){var i,s,o,c,u;try{if("email"in e){const{email:h,options:m}=e;let p=null,y=null;this.flowType==="pkce"&&([p,y]=await Ji(this.storage,this.storageKey));const{error:v}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:h,data:(i=m==null?void 0:m.data)!==null&&i!==void 0?i:{},create_user:(s=m==null?void 0:m.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken},code_challenge:p,code_challenge_method:y},redirectTo:m==null?void 0:m.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:v})}if("phone"in e){const{phone:h,options:m}=e,{data:p,error:y}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:h,data:(o=m==null?void 0:m.data)!==null&&o!==void 0?o:{},create_user:(c=m==null?void 0:m.shouldCreateUser)!==null&&c!==void 0?c:!0,gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken},channel:(u=m==null?void 0:m.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:p==null?void 0:p.message_id},error:y})}throw new Cl("You must provide either an email or phone number.")}catch(h){if(await mt(this.storage,`${this.storageKey}-code-verifier`),X(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async verifyOtp(e){var i,s;try{let o,c;"options"in e&&(o=(i=e.options)===null||i===void 0?void 0:i.redirectTo,c=(s=e.options)===null||s===void 0?void 0:s.captchaToken);const{data:u,error:h}=await ee(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:c}}),redirectTo:o,xform:nn});if(h)throw h;if(!u)throw new Error("An error occurred on token verification.");const m=u.session,p=u.user;return m!=null&&m.access_token&&(await this._saveSession(m),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",m)),this._returnResult({data:{user:p,session:m},error:null})}catch(o){if(X(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(e){var i,s,o,c,u;try{let h=null,m=null;this.flowType==="pkce"&&([h,m]=await Ji(this.storage,this.storageKey));const p=await ee(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(s=(i=e.options)===null||i===void 0?void 0:i.redirectTo)!==null&&s!==void 0?s:void 0}),!((o=e==null?void 0:e.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:h,code_challenge_method:m}),headers:this.headers,xform:C5});return!((c=p.data)===null||c===void 0)&&c.url&&pt()&&!(!((u=e.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(p.data.url),this._returnResult(p)}catch(h){if(await mt(this.storage,`${this.storageKey}-code-verifier`),X(h))return this._returnResult({data:null,error:h});throw h}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:i},error:s}=e;if(s)throw s;if(!i)throw new ot;const{error:o}=await ee(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:i.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(e){if(X(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const i=`${this.url}/resend`;if("email"in e){const{email:s,type:o,options:c}=e,{error:u}=await ee(this.fetch,"POST",i,{headers:this.headers,body:{email:s,type:o,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken}},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in e){const{phone:s,type:o,options:c}=e,{data:u,error:h}=await ee(this.fetch,"POST",i,{headers:this.headers,body:{phone:s,type:o,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:h})}throw new Cl("You must provide either an email or phone number and a type")}catch(i){if(X(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async i=>i))}async _acquireLock(e,i){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const s=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await s,await i()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const s=i();for(this.pendingInLock.push((async()=>{try{await s}catch{}})()),await s;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await s}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const i=await this.__loadSession();return await e(i)}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 e=null;const i=await ni(this.storage,this.storageKey);
228if(this._debug("#getSession()","session from storage",i),i!==null&&(this._isValidSession(i)?e=i:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const s=e.expires_at?e.expires_at*1e3-Date.now()<uh:!1;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s){if(this.userStorage){const u=await ni(this.userStorage,this.storageKey+"-user");u!=null&&u.user?e.user=u.user:e.user=hh()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};e.user=E5(e.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:o,error:c}=await this._callRefreshToken(e.refresh_token);return c?this._returnResult({data:{session:null},error:c}):this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const i=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return i.data.user&&(this.suppressGetSessionWarning=!0),i}async _getUser(e){try{return e?await ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Ra}):await this._useSession(async i=>{var s,o,c;const{data:u,error:h}=i;if(h)throw h;return!(!((s=u.session)===null||s===void 0)&&s.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ot}:await ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(c=(o=u.session)===null||o===void 0?void 0:o.access_token)!==null&&c!==void 0?c:void 0,xform:Ra})})}catch(i){if(X(i))return jl(i)&&(await this._removeSession(),await mt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:i});throw i}}async updateUser(e,i={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,i))}async _updateUser(e,i={}){try{return await this._useSession(async s=>{const{data:o,error:c}=s;if(c)throw c;if(!o.session)throw new ot;const u=o.session;let h=null,m=null;this.flowType==="pkce"&&e.email!=null&&([h,m]=await Ji(this.storage,this.storageKey));const{data:p,error:y}=await ee(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:i==null?void 0:i.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:h,code_challenge_method:m}),jwt:u.access_token,xform:Ra});if(y)throw y;return u.user=p.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(s){if(await mt(this.storage,`${this.storageKey}-code-verifier`),X(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ot;const i=Date.now()/1e3;let s=i,o=!0,c=null;const{payload:u}=Ol(e.access_token);if(u.exp&&(s=u.exp,o=s<=i),o){const{data:h,error:m}=await this._callRefreshToken(e.refresh_token);if(m)return this._returnResult({data:{user:null,session:null},error:m});if(!h)return{data:{user:null,session:null},error:null};c=h}else{const{data:h,error:m}=await this._getUser(e.access_token);if(m)return this._returnResult({data:{user:null,session:null},error:m});c={access_token:e.access_token,refresh_token:e.refresh_token,user:h.user,token_type:"bearer",expires_in:s-i,expires_at:s},await this._saveSession(c),await this._notifyAllSubscribers("SIGNED_IN",c)}return this._returnResult({data:{user:c.user,session:c},error:null})}catch(i){if(X(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async i=>{var s;if(!e){const{data:u,error:h}=i;if(h)throw h;e=(s=u.session)!==null&&s!==void 0?s:void 0}if(!(e!=null&&e.refresh_token))throw new ot;const{data:o,error:c}=await this._callRefreshToken(e.refresh_token);return c?this._returnResult({data:{user:null,session:null},error:c}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(i){if(X(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async _getSessionFromURL(e,i){var s;try{if(!pt())throw new Rl("No browser detected.");
228if(e.error||e.error_description||e.error_code)throw new Rl(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(i){case"implicit":if(this.flowType==="pkce")throw new ib("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Rl("Not a valid implicit grant flow url.");break;default:}if(i==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new ib("No code detected.");const{data:j,error:U}=await this._exchangeCodeForSession(e.code);if(U)throw U;const G=new URL(window.location.href);return G.searchParams.delete("code"),window.history.replaceState(window.history.state,"",G.toString()),{data:{session:j.session,redirectType:(s=j.redirectType)!==null&&s!==void 0?s:null},error:null}}const{provider_token:o,provider_refresh_token:c,access_token:u,refresh_token:h,expires_in:m,expires_at:p,token_type:y}=e;if(!u||!m||!h||!y)throw new Rl("No session defined in URL");const v=Math.round(Date.now()/1e3),x=parseInt(m);let _=v+x;p&&(_=parseInt(p));const S=_-v;S*1e3<=as&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${S}s, should have been closer to ${x}s`);const T=_-x;v-T>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",T,_,v):v-T<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",T,_,v);const{data:k,error:E}=await this._getUser(u);if(E)throw E;const D={provider_token:o,provider_refresh_token:c,access_token:u,expires_in:x,expires_at:_,refresh_token:h,token_type:y,user:k.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:D,redirectType:e.type},error:null})}catch(o){if(X(o))return this._returnResult({data:{session:null,redirectType:null},error:o});throw o}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const i=await ni(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&i)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async i=>{var s;const{data:o,error:c}=i;if(c&&!jl(c))return this._returnResult({error:c});const u=(s=o.session)===null||s===void 0?void 0:s.access_token;if(u){const{error:h}=await this.admin.signOut(u,e);if(h&&!(a5(h)&&(h.status===404||h.status===401||h.status===403)||jl(h)))return this._returnResult({error:h})}return e!=="others"&&(await this._removeSession(),await mt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const i=h5(),s={id:i,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",i),this.stateChangeEmitters.delete(i)}};return this._debug("#onAuthStateChange()","registered callback with id",i),this.stateChangeEmitters.set(i,s),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(i)})))(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession(async i=>{var s,o;try{const{data:{session:c},error:u}=i;if(u)throw u;await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",c)),this._debug("INITIAL_SESSION","callback id",e,"session",c)}catch(c){await((o=this.stateChangeEmitters.get(e))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",c),jl(c)?console.warn(c):console.error(c)}})}async resetPasswordForEmail(e,i={}){let s=null,o=null;this.flowType==="pkce"&&([s,o]=await Ji(this.storage,this.storageKey,!0));try{return await ee(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:o,gotrue_meta_security:{captcha_token:i.captchaToken}},headers:this.headers,redirectTo:i.redirectTo})}catch(c){if(await mt(this.storage,`${this.storageKey}-code-verifier`),X(c))return this._returnResult({data:null,error:c});throw c}}async getUserIdentities(){var e;try{const{data:i,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:(e=i.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var i;try{const{data:s,error:o}=await this._useSession(async c=>{var u,h,m,p,y;const{data:v,error:x}=c;if(x)throw x;const _=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(u=e.options)===null||u===void 0?void 0:u.redirectTo,scopes:(h=e.options)===null||h===void 0?void 0:h.scopes,queryParams:(m=e.options)===null||m===void 0?void 0:m.queryParams,skipBrowserRedirect:!0});return await ee(this.fetch,"GET",_,{headers:this.headers,jwt:(y=(p=v.session)===null||p===void 0?void 0:p.access_token)!==null&&y!==void 0?y:void 0})});if(o)throw o;return pt()&&!(!((i=e.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(s==null?void 0:s.url),this._returnResult({data:{provider:e.provider,url:s==null?void 0:s.url},error:null})}catch(s){if(X(s))return this._returnResult({data:{provider:e.provider,url:null},error:s});throw s}}async linkIdentityIdToken(e){return await this._useSession(async i=>{var s;try{const{error:o,data:{session:c}}=i;if(o)throw o;const{options:u,provider:h,token:m,access_token:p,nonce:y}=e,v=await ee(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(s=c==null?void 0:c.access_token)!==null&&s!==void 0?s:void 0,body:{provider:h,id_token:m,access_token:p,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:nn}),{data:x,error:_}=v;return _?this._returnResult({data:{user:null,session:null},error:_}):!x||!x.session||!x.user?this._returnResult({data:{user:null,session:null},error:new Wi}):(x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("USER_UPDATED",x.session)),this._returnResult({data:x,error:_}))}catch(o){if(await mt(this.storage,`${this.storageKey}-code-verifier`),X(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(e){try{return await this._useSession(async i=>{var s,o;const{data:c,error:u}=i;if(u)throw u;
228return await ee(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(o=(s=c.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0})})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async _refreshAccessToken(e){const i=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{const s=Date.now();return await g5(async o=>(o>0&&await p5(200*Math.pow(2,o-1)),this._debug(i,"refreshing attempt",o),await ee(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:nn})),(o,c)=>{const u=200*Math.pow(2,o);return c&&dh(c)&&Date.now()+u-s<as})}catch(s){if(this._debug(i,"error",s),X(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}finally{this._debug(i,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,i){const s=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:i.redirectTo,scopes:i.scopes,queryParams:i.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",i,"url",s),pt()&&!i.skipBrowserRedirect&&window.location.assign(s),{data:{provider:e,url:s},error:null}}async _recoverAndRefresh(){var e,i;const s="#_recoverAndRefresh()";this._debug(s,"begin");try{const o=await ni(this.storage,this.storageKey);if(o&&this.userStorage){let u=await ni(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:o.user},await is(this.userStorage,this.storageKey+"-user",u)),o.user=(e=u==null?void 0:u.user)!==null&&e!==void 0?e:hh()}else if(o&&!o.user&&!o.user){const u=await ni(this.storage,this.storageKey+"-user");u&&(u!=null&&u.user)?(o.user=u.user,await mt(this.storage,this.storageKey+"-user"),await is(this.storage,this.storageKey,o)):o.user=hh()}if(this._debug(s,"session from storage",o),!this._isValidSession(o)){this._debug(s,"session is not valid"),o!==null&&await this._removeSession();return}const c=((i=o.expires_at)!==null&&i!==void 0?i:1/0)*1e3-Date.now()<uh;if(this._debug(s,`session has${c?"":" not"} expired with margin of ${uh}s`),c){if(this.autoRefreshToken&&o.refresh_token){const{error:u}=await this._callRefreshToken(o.refresh_token);u&&(console.error(u),dh(u)||(this._debug(s,"refresh failed with a non-retryable error, removing the session",u),await this._removeSession()))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:h}=await this._getUser(o.access_token);!h&&(u!=null&&u.user)?(o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(s,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(s,"error",o),console.error(o);return}finally{this._debug(s,"end")}}async _callRefreshToken(e){var i,s;if(!e)throw new ot;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(o,"begin");try{this.refreshingDeferred=new bc;const{data:c,error:u}=await this._refreshAccessToken(e);if(u)throw u;if(!c.session)throw new ot;await this._saveSession(c.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",c.session);const h={data:c.session,error:null};return this.refreshingDeferred.resolve(h),h}catch(c){if(this._debug(o,"error",c),X(c)){const u={data:null,error:c};return dh(c)||await this._removeSession(),(i=this.refreshingDeferred)===null||i===void 0||i.resolve(u),u}throw(s=this.refreshingDeferred)===null||s===void 0||s.reject(c),c}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(e,i,s=!0){const o=`#_notifyAllSubscribers(${e})`;this._debug(o,"begin",i,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:e,session:i});const c=[],u=Array.from(this.stateChangeEmitters.values()).map(async h=>{try{await h.callback(e,i)}catch(m){c.push(m)}});if(await Promise.all(u),c.length>0){for(let h=0;h<c.length;h+=1)console.error(c[h]);throw c[0]}}finally{this._debug(o,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await mt(this.storage,`${this.storageKey}-code-verifier`);const i=Object.assign({},e),s=i.user&&i.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!s&&i.user&&await is(this.userStorage,this.storageKey+"-user",{user:i.user});const o=Object.assign({},i);delete o.user;const c=cb(o);await is(this.storage,this.storageKey,c)}else{const o=cb(i);await is(this.storage,this.storageKey,o)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await mt(this.storage,this.storageKey),await mt(this.storage,this.storageKey+"-code-verifier"),await mt(this.storage,this.storageKey+"-user"),this.userStorage&&await mt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&pt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
228catch(i){console.error("removing visibilitychange callback failed",i)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),as);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const i=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=i,i&&typeof i=="object"&&typeof i.unref=="function"?i.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(i)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const i=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,i&&clearTimeout(i)}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 e=Date.now();try{return await this._useSession(async i=>{const{data:{session:s}}=i;if(!s||!s.refresh_token||!s.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((s.expires_at*1e3-e)/as);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${as}ms, refresh threshold is ${tf} ticks`),o<=tf&&await this._callRefreshToken(s.refresh_token)})}catch(i){console.error("Auto refresh tick failed with error. This is likely a transient error.",i)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof rw)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!pt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const i=`#_onVisibilityChanged(${e})`;this._debug(i,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(i,"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(e,i,s){const o=[`provider=${encodeURIComponent(i)}`];if(s!=null&&s.redirectTo&&o.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),s!=null&&s.scopes&&o.push(`scopes=${encodeURIComponent(s.scopes)}`),this.flowType==="pkce"){const[c,u]=await Ji(this.storage,this.storageKey),h=new URLSearchParams({code_challenge:`${encodeURIComponent(c)}`,code_challenge_method:`${encodeURIComponent(u)}`});o.push(h.toString())}if(s!=null&&s.queryParams){const c=new URLSearchParams(s.queryParams);o.push(c.toString())}return s!=null&&s.skipBrowserRedirect&&o.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${o.join("&")}`}async _unenroll(e){try{return await this._useSession(async i=>{var s;const{data:o,error:c}=i;return c?this._returnResult({data:null,error:c}):await ee(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(s=o==null?void 0:o.session)===null||s===void 0?void 0:s.access_token})})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async _enroll(e){try{return await this._useSession(async i=>{var s,o;const{data:c,error:u}=i;if(u)return this._returnResult({data:null,error:u});const h=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:m,error:p}=await ee(this.fetch,"POST",`${this.url}/factors`,{body:h,headers:this.headers,jwt:(s=c==null?void 0:c.session)===null||s===void 0?void 0:s.access_token});return p?this._returnResult({data:null,error:p}):(e.factorType==="totp"&&m.type==="totp"&&(!((o=m==null?void 0:m.totp)===null||o===void 0)&&o.qr_code)&&(m.totp.qr_code=`data:image/svg+xml;utf-8,${m.totp.qr_code}`),this._returnResult({data:m,error:null}))})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async i=>{var s;const{data:o,error:c}=i;
228if(c)return this._returnResult({data:null,error:c});const u=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?yb(e.webauthn.credential_response):vb(e.webauthn.credential_response)})}:{code:e.code}),{data:h,error:m}=await ee(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:u,headers:this.headers,jwt:(s=o==null?void 0:o.session)===null||s===void 0?void 0:s.access_token});return m?this._returnResult({data:null,error:m}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+h.expires_in},h)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",h),this._returnResult({data:h,error:m}))})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async i=>{var s;const{data:o,error:c}=i;if(c)return this._returnResult({data:null,error:c});const u=await ee(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(s=o==null?void 0:o.session)===null||s===void 0?void 0:s.access_token});if(u.error)return u;const{data:h}=u;if(h.type!=="webauthn")return{data:h,error:null};switch(h.webauthn.type){case"create":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:pb(h.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:gb(h.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}})}async _challengeAndVerify(e){const{data:i,error:s}=await this._challenge({factorId:e.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:e.factorId,challengeId:i.id,code:e.code})}async _listFactors(){var e;const{data:{user:i},error:s}=await this.getUser();if(s)return{data:null,error:s};const o={all:[],phone:[],totp:[],webauthn:[]};for(const c of(e=i==null?void 0:i.factors)!==null&&e!==void 0?e:[])o.all.push(c),c.status==="verified"&&o[c.factor_type].push(c);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(e){var i,s,o,c;if(e)try{const{payload:_}=Ol(e);let S=null;_.aal&&(S=_.aal);let T=S;const{data:{user:k},error:E}=await this.getUser(e);if(E)return this._returnResult({data:null,error:E});((s=(i=k==null?void 0:k.factors)===null||i===void 0?void 0:i.filter(U=>U.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(T="aal2");const j=_.amr||[];return{data:{currentLevel:S,nextLevel:T,currentAuthenticationMethods:j},error:null}}catch(_){if(X(_))return this._returnResult({data:null,error:_});throw _}const{data:{session:u},error:h}
228=await this.getSession();if(h)return this._returnResult({data:null,error:h});if(!u)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:m}=Ol(u.access_token);let p=null;m.aal&&(p=m.aal);let y=p;((c=(o=u.user.factors)===null||o===void 0?void 0:o.filter(_=>_.status==="verified"))!==null&&c!==void 0?c:[]).length>0&&(y="aal2");const x=m.amr||[];return{data:{currentLevel:p,nextLevel:y,currentAuthenticationMethods:x},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async i=>{const{data:{session:s},error:o}=i;return o?this._returnResult({data:null,error:o}):s?await ee(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:s.access_token,xform:c=>({data:c,error:null})}):this._returnResult({data:null,error:new ot})})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async _approveAuthorization(e,i){try{return await this._useSession(async s=>{const{data:{session:o},error:c}=s;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new ot});const u=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:h=>({data:h,error:null})});return u.data&&u.data.redirect_url&&pt()&&!(i!=null&&i.skipBrowserRedirect)&&window.location.assign(u.data.redirect_url),u})}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}}async _denyAuthorization(e,i){try{return await this._useSession(async s=>{const{data:{session:o},error:c}=s;if(c)return this._returnResult({data:null,error:c});if(!o)return this._returnResult({data:null,error:new ot});const u=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:h=>({data:h,error:null})});return u.data&&u.data.redirect_url&&pt()&&!(i!=null&&i.skipBrowserRedirect)&&window.location.assign(u.data.redirect_url),u})}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:i},error:s}=e;return s?this._returnResult({data:null,error:s}):i?await ee(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new ot})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async i=>{const{data:{session:s},error:o}=i;return o?this._returnResult({data:null,error:o}):s?(await ee(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ot})})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async fetchJwk(e,i={keys:[]}){let s=i.keys.find(h=>h.kid===e);if(s)return s;const o=Date.now();if(s=this.jwks.keys.find(h=>h.kid===e),s&&this.jwks_cached_at+t5>o)return s;const{data:c,error:u}=await ee(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!c.keys||c.keys.length===0||(this.jwks=c,this.jwks_cached_at=o,s=c.keys.find(h=>h.kid===e),!s)?null:s}async getClaims(e,i={}){try{let s=e;if(!s){const{data:_,error:S}
228=await this.getSession();if(S||!_.session)return this._returnResult({data:null,error:S});s=_.session.access_token}const{header:o,payload:c,signature:u,raw:{header:h,payload:m}}=Ol(s);i!=null&&i.allowExpired||S5(c.exp);const p=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,i!=null&&i.keys?{keys:i.keys}:i==null?void 0:i.jwks);if(!p){const{error:_}=await this.getUser(s);if(_)throw _;return{data:{claims:c,header:o,signature:u},error:null}}const y=T5(o.alg),v=await crypto.subtle.importKey("jwk",p,y,!0,["verify"]);if(!await crypto.subtle.verify(y,v,u,u5(`${h}.${m}`)))throw new sf("Invalid JWT signature");return{data:{claims:c,header:o,signature:u},error:null}}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}}async signInWithPasskey(e){var i,s,o;fn(this.experimental);try{if(!rc())return this._returnResult({data:null,error:new pn("Browser does not support WebAuthn",null)});const{data:c,error:u}=await this._startPasskeyAuthentication({options:{captchaToken:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}});if(u||!c)return this._returnResult({data:null,error:u});const h=gb(c.options),m=(o=(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.signal)!==null&&o!==void 0?o:rf.createNewAbortSignal(),{data:p,error:y}=await uw({publicKey:h,signal:m});if(y||!p)return this._returnResult({data:null,error:y??new pn("WebAuthn ceremony failed",null)});const v=vb(p);return this._verifyPasskeyAuthentication({challengeId:c.challenge_id,credential:v})}catch(c){if(X(c))return this._returnResult({data:null,error:c});throw c}}async registerPasskey(e){var i,s;fn(this.experimental);try{if(!rc())return this._returnResult({data:null,error:new pn("Browser does not support WebAuthn",null)});const{data:o,error:c}=await this._startPasskeyRegistration();if(c||!o)return this._returnResult({data:null,error:c});const u=pb(o.options),h=(s=(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.signal)!==null&&s!==void 0?s:rf.createNewAbortSignal(),{data:m,error:p}=await cw({publicKey:u,signal:h});if(p||!m)return this._returnResult({data:null,error:p??new pn("WebAuthn ceremony failed",null)});const y=yb(m);return this._verifyPasskeyRegistration({challengeId:o.challenge_id,credential:y})}catch(o){if(X(o))return this._returnResult({data:null,error:o});throw o}}async _startPasskeyRegistration(){fn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:i},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new ot});const{data:o,error:c}=await ee(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:i.access_token,body:{}});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){fn(this.experimental);try{return await this._useSession(async i=>{const{data:{session:s},error:o}=i;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new ot});const{data:c,error:u}=await ee(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyAuthentication(e){var i;fn(this.experimental);try{const{data:s,error:o}=await ee(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:s,error:null})}catch(s){if(X(s))return this._returnResult({data:null,error:s});throw s}}async _verifyPasskeyAuthentication(e){fn(this.experimental);try{const{data:i,error:s}=await ee(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:nn});return s?this._returnResult({data:null,error:s}):(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:i,error:null}))}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async _listPasskeys(){fn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:i},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new ot});const{data:o,error:c}=await ee(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:i.access_token,xform:u=>({data:u,error:null})});return c?this._returnResult({data:null,error:c}):this._returnResult({data:o,error:null})})}catch(e){if(X(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){fn(this.experimental);try{return await this._useSession(async i=>{const{data:{session:s},error:o}=i;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new ot});const{data:c,error:u}=await ee(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:e.friendlyName}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:c,error:null})})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}async _deletePasskey(e){fn(this.experimental);try{return await this._useSession(async i=>{const{data:{session:s},error:o}=i;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new ot});const{error:c}
228=await ee(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return c?this._returnResult({data:null,error:c}):this._returnResult({data:null,error:null})})}catch(i){if(X(i))return this._returnResult({data:null,error:i});throw i}}}qr.nextInstanceID={};const X5=qr,Y5="2.106.0";let Sr="";typeof Deno<"u"?Sr="deno":typeof document<"u"?Sr="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Sr="react-native":Sr="node";const Q5={"X-Client-Info":`supabase-js-${Sr}/${Y5}`},W5={headers:Q5},J5={schema:"public"},Z5={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},eO={},tO={enabled:!1,respectSamplingDecision:!0};function nO(t,e,i,s){function o(c){return c instanceof i?c:new i(function(u){u(c)})}return new(i||(i=Promise))(function(c,u){function h(y){try{p(s.next(y))}catch(v){u(v)}}function m(y){try{p(s.throw(y))}catch(v){u(v)}}function p(y){y.done?c(y.value):o(y.value).then(h,m)}p((s=s.apply(t,[])).next())})}let mh=null;const aO="@opentelemetry/api";function iO(){return mh===null&&(mh=import(aO).catch(()=>null)),mh}function sO(){return nO(this,void 0,void 0,function*(){try{const t=yield iO();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const i=e.traceparent;return i?{traceparent:i,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function rO(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[i,s,o,c]=e;if(i.length!==2||s.length!==32||o.length!==16||c.length!==2)return null;const u=/^[0-9a-f]+$/i;return!u.test(i)||!u.test(s)||!u.test(o)||!u.test(c)||s==="00000000000000000000000000000000"||o==="0000000000000000"?null:{version:i,traceId:s,parentId:o,traceFlags:c,isSampled:(parseInt(c,16)&1)===1}}function oO(t,e){if(!t||!e||e.length===0)return!1;let i;if(t instanceof URL)i=t;else try{i=new URL(t)}catch{return!1}for(const s of e)try{if(typeof s=="string"){if(lO(i.hostname,s))return!0}else if(s instanceof RegExp){if(s.test(i.hostname))return!0}else if(typeof s=="function"&&s(i))return!0}catch{continue}return!1}function lO(t,e){if(e===t)return!0;if(e.startsWith("*.")){const i=e.slice(2);if(t.endsWith(i)&&(t===i||t.endsWith("."+i)))return!0}return!1}function cO(t){const e=[];try{const i=new URL(t);e.push(i.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function $r(t){"@babel/helpers - typeof";return $r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$r(t)}function uO(t,e){if($r(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var s=i.call(t,e);if($r(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dO(t){var e=uO(t,"string");return $r(e)=="symbol"?e:e+""}function hO(t,e,i){return(e=dO(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function xb(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),i.push.apply(i,s)}return i}function Ie(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?xb(Object(i),!0).forEach(function(s){hO(t,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):xb(Object(i)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(i,s))})}return t}const fO=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),mO=()=>Headers,pO=(t,e,i,s,o)=>{const c=fO(s),u=mO(),h=(o==null?void 0:o.enabled)===!0,m=(o==null?void 0:o.respectSamplingDecision)!==!1,p=h?cO(e):null;return async(y,v)=>{var x;const _=(x=await i())!==null&&x!==void 0?x:t;let S=new u(v==null?void 0:v.headers);if(S.has("apikey")||S.set("apikey",t),S.has("Authorization")||S.set("Authorization",`Bearer ${_}`),p){const T=await gO(y,p,m);T&&(T.traceparent&&!S.has("traceparent")&&S.set("traceparent",T.traceparent),T.tracestate&&!S.has("tracestate")&&S.set("tracestate",T.tracestate),T.baggage&&!S.has("baggage")&&S.set("baggage",T.baggage))}return c(y,Ie(Ie({},v),{},{headers:S}))}};async function gO(t,e,i){if(!oO(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const s=await sO();if(!s||!s.traceparent)return null;if(i){const o=rO(s.traceparent);if(o&&!o.isSampled)return null}return s}function _b(t){return typeof t=="boolean"?{enabled:t}:t}function yO(t){return t.endsWith("/")?t:t+"/"}function vO(t,e){var i,s,o,c,u,h;const{db:m,auth:p,realtime:y,global:v}=t,{db:x,auth:_,realtime:S,global:T}=e,k=_b(t.tracePropagation),E=_b(e.tracePropagation),D={db:Ie(Ie({},x),m),auth:Ie(Ie({},_),p),realtime:Ie(Ie({},S),y),storage:{},global:Ie(Ie(Ie({},T),v),{},{headers:Ie(Ie({},(i=T==null?void 0:T.headers)!==null&&i!==void 0?i:{}),(s=v==null?void 0:v.headers)!==null&&s!==void 0?s:{})}),tracePropagation:{enabled:(o=(c=k==null?void 0:k.enabled)!==null&&c!==void 0?c:E==null?void 0:E.enabled)!==null&&o!==void 0?o:!1,respectSamplingDecision:(u=(h=k==null?void 0:k.respectSamplingDecision)!==null&&h!==void 0?h:E==null?void 0:E.respectSamplingDecision)!==null&&u!==void 0?u:!0},accessToken:async()=>""};return t.accessToken?D.accessToken=t.accessToken:delete D.accessToken,D}function bO(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");
228if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(yO(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var xO=class extends X5{constructor(t){super(t)}},_O=class{constructor(t,e,i){var s,o;this.supabaseUrl=t,this.supabaseKey=e;const c=bO(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",c),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",c),this.storageUrl=new URL("storage/v1",c),this.functionsUrl=new URL("functions/v1",c);const u=`sb-${c.hostname.split(".")[0]}-auth-token`,h={db:J5,realtime:eO,auth:Ie(Ie({},Z5),{},{storageKey:u}),global:W5,tracePropagation:tO},m=vO(i??{},h);if(this.settings=m,this.storageKey=(s=m.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=m.global.headers)!==null&&o!==void 0?o:{},m.accessToken)this.accessToken=m.accessToken,this.auth=new Proxy({},{get:(y,v)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(v)} is not possible`)}});else{var p;this.auth=this._initSupabaseAuthClient((p=m.auth)!==null&&p!==void 0?p:{},this.headers,m.global.fetch)}this.fetch=pO(e,t,this._getAccessToken.bind(this),m.global.fetch,m.tracePropagation),this.realtime=this._initRealtimeClient(Ie({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},m.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(y=>this.realtime.setAuth(y)).catch(y=>console.warn("Failed to set initial Realtime auth token:",y)),this.rest=new UC(new URL("rest/v1",c).href,{headers:this.headers,schema:m.db.schema,fetch:this.fetch,timeout:m.db.timeout,urlLengthLimit:m.db.urlLengthLimit}),this.storage=new QR(this.storageUrl.href,this.headers,this.fetch,i==null?void 0:i.storage),m.accessToken||this._listenForAuthEvents()}get functions(){return new NC(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},i={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,i)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,i;if(t.accessToken)return await t.accessToken();const{data:s}=await t.auth.getSession();return(e=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:i,storage:s,userStorage:o,storageKey:c,flowType:u,lock:h,debug:m,throwOnError:p,experimental:y,lockAcquireTimeout:v,skipAutoInitialize:x},_,S){const T={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new xO({url:this.authUrl.href,headers:Ie(Ie({},T),_),storageKey:c,autoRefreshToken:t,persistSession:e,detectSessionInUrl:i,storage:s,userStorage:o,flowType:u,lock:h,debug:m,throwOnError:p,experimental:y,fetch:S,lockAcquireTimeout:v,skipAutoInitialize:x,hasCustomAuthorizationHeader:Object.keys(this.headers).some(k=>k.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new bR(this.realtimeUrl.href,Ie(Ie({},t),{},{params:Ie(Ie({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,i){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==i?(this.changedAccessToken=i,this.realtime.setAuth(i)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const wO=(t,e,i)=>new _O(t,e,i);function SO(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const i=e.match(/^v(\d+)\./);return i?parseInt(i[1],10)<=18:!1}SO()&&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 N
228ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const dw="",TO="",ea=!!dw,AO=ea?wO(dw,TO):null;function EO(){const[t,e]=N.useState([]),[i,s]=N.useState(null),[o,c]=N.useState(""),[u,h]=N.useState(!1);N.useEffect(()=>{async function v(){const x=await sn.getProducts();e(x)}v()},[]);const m=v=>{s(v.id),c(v.price.toString())},p=async v=>{if(!ea){alert("Para editar os preços e sincronizar em tempo real, configure o banco de dados Supabase na aba Secrets."),s(null);return}try{h(!0);const x=parseFloat(o);if(isNaN(x))throw new Error("Preço inválido.");const{data:_,error:S}=await AO.from("products").update({price:x}).eq("id",v).select().single();if(S)throw S;e(T=>T.map(k=>k.id===v?{...k,price:x}:k)),s(null)}catch(x){alert(`Erro ao atualizar preço: ${x.message}`)}finally{h(!1)}},y=async v=>{if(!ea){alert("O banco não está configurado. Só testando localmente, exclusão bloqueada.");return}if(confirm("Tem certeza que deseja excluir este produto?"))try{await sn.deleteProduct(v),e(x=>x.filter(_=>_.id!==v))}catch(x){alert(`Erro ao excluir: ${x.message}`)}};return g.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[g.jsx(vt,{}),g.jsxs("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 pt-32 pb-12",children:[g.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-6 sm:gap-4 mb-8",children:[g.jsxs("div",{className:"max-w-2xl",children:[g.jsx("h1",{className:"text-3xl sm:text-4xl font-heading font-black uppercase tracking-tight",children:"Painel de Controle"}),g.jsx("p",{className:"text-gray-400 mt-2 text-sm sm:text-base",children:"Gerencie seu catálogo de produtos (Afiliados)."}),g.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs",children:[g.jsx("span",{className:`w-2 h-2 rounded-full ${ea?"bg-green-500":"bg-red-500"}`}),g.jsx("span",{className:ea?"text-green-500":"text-red-500",children:ea?"Supabase Conectado":"Supabase Desconectado"})]})]}),g.jsxs("div",{className:"flex items-center gap-3 w-full sm:w-auto",children:[g.jsx("button",{onClick:()=>{localStorage.removeItem("adminAuth"),window.location.reload()},className:"px-4 py-3 rounded-lg font-bold font-heading uppercase tracking-wider text-sm flex items-center gap-2 text-gray-400 hover:text-white hover:bg-surface transition-colors",children:"Sair"}),g.jsxs(Ne,{to:"/admin/produtos/novo",className:"shrink-0 flex-1 sm:flex-none justify-center bg-kinetic text-black px-6 py-3 rounded-lg font-bold font-heading uppercase tracking-wider text-sm flex items-center gap-2 hover:bg-white transition-colors",children:[g.jsx(Qf,{size:18}),"Novo"]})]})]}),!ea&&g.jsxs("div",{className:"mb-8 p-4 rounded-lg bg-red-900/20 border border-red-500/50 flex items-start gap-4",children:[g.jsx(B_,{className:"text-red-500 mt-1 shrink-0"}),g.jsxs("div",{children:[g.jsx("h3",{className:"font-bold text-red-400 uppercase font-heading",children:"Supabase não configurado"}),g.jsxs("p",{className:"text-sm text-red-200/70 mt-1",children:["Para tornar este painel funcional, configure ",g.jsx("code",{className:"bg-black/50 px-1 py-0.5 rounded text-white",children:"VITE_SUPABASE_URL"})," e ",g.jsx("code",{className:"bg-black/50 px-1 py-0.5 rounded text-white",children:"VITE_SUPABASE_ANON_KEY"})," nas variáveis de ambiente. Exibindo dados de demonstração (somente leitura). Base de dados necessária: tabela `products`."]})]})]}),g.jsx("div",{className:"bg-surface border border-surface rounded-xl overflow-hidden shadow-xl",children:g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-left text-sm",children:[g.jsx("thead",{className:"text-xs text-gray-400 uppercase bg-[#252525] border-b border-surface",children:g.jsxs("tr",{children:[g.jsx("th",{scope:"col",className:"px-6 py-4 font-heading tracking-wider",children:"Produto"}),g.jsx("th",{scope:"col",className:"px-6 py-4 font-heading tracking-wider",children:"Categoria"}),g.jsx("th",{scope:"col",className:"px-6 py-4 font-heading tracking-wider",children:"Preço"}),g.jsx("th",{scope:"col",className:"px-6 py-4 font-heading tracking-wider",children:"Destaque"}),g.jsx("th",{scope:"col",className:"px-6 py-4 font-heading tracking-wider text-right",children:"Ações"})]})}),g.jsx("tbody",{children:t.map(v=>g.jsxs("tr",{className:"border-b border-surface hover:bg-[#2a2a2a] transition-colors",children:[g.jsx("td",{className:"px-6 py-4",children:g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx("div",{className:"w-12 h-12 rounded bg-black overflow-hidden shrink-0 border border-surface",children:g.jsx("img",{src:v.image_url,alt:v.title,className:"w-full h-full object-cover"})}),g.jsxs("div",{children:[g.jsx("div",{className:"font-bold text-white mb-1 line-clamp-1",children:v.title}),g.jsx("div",{className:"flex gap-2",children:g.jsxs("a",{href:v.affiliate_link,className:"text-xs text-kinetic hover:underline flex items-center gap-1",children:[g.jsx(Wj,{size:10})," Link Afiliado"]})})]})]})}),g.jsx("td",{className:"px-6 py-4",children:g.jsx("span",{className:"bg-background px-2 py-1 rounded text-xs text-gray-300 border border-surface",children:v.category})}),g.jsx("td",{className:"px-6 py-4 font-mono",children:i===v.id?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"number",value:o,onChange:x=>c(x.target.value),className:"bg-[#1a1a1a] border border-surface text-white px-2 py-1 rounded w-24 text-sm",autoFocus:!0,disabled:u,step:"0.01"}),g.jsx("button",{disabled:u,onClick:()=>p(v.id),className:"p-1 text-kinetic hover:bg-kinetic/10 rounded transition-colors",children:g.jsx(Pr,{size:16})}),g.jsx("button",{disabled:u,onClick:()=>s(null),className:"p-1 text-red-500 hover:bg-red-500/10 rounded transition-colors",children:g.jsx(ps,{size:16})})]}):g.jsxs("div",{className:"flex items-center justify-between group",children:[g.jsxs("span",{children:["R$ ",v.price.toFixed(2)]}),g.jsx("button",{onClick:()=>m(v),className:"text-gray-500 hover:text-kinetic opacity-0 group-hover:opacity-100 transition-opacity",title:"Editar Preç
228o",children:g.jsx($v,{size:14})})]})}),g.jsx("td",{className:"px-6 py-4",children:v.is_featured?g.jsx("span",{className:"w-3 h-3 rounded-full bg-kinetic shadow-[0_0_8px_#CCFF00] inline-block"}):g.jsx("span",{className:"w-3 h-3 rounded-full bg-surface inline-block"})}),g.jsx("td",{className:"px-6 py-4",children:g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(Ne,{to:`/admin/produtos/editar/${v.id}`,className:"p-2 text-gray-400 hover:text-white hover:bg-surface rounded-lg transition-colors",children:g.jsx($v,{size:16})}),g.jsx("button",{onClick:()=>y(v.id),className:"p-2 text-gray-400 hover:text-red-500 hover:bg-red-500/10 rounded-lg transition-colors",children:g.jsx(cC,{size:16})})]})})]},v.id))})]})})})]}),g.jsx(Tt,{})]})}function wb(){const{id:t}=Ub(),e=Pb(),i=!!t,[s,o]=N.useState(i),[c,u]=N.useState(!1),[h,m]=N.useState(!1),[p,y]=N.useState(null),[v,x]=N.useState(null),[_,S]=N.useState({title:"",price:0,description:"",category:"Suplementos",tags:[],image_url:"",affiliate_link:"",is_featured:!1,rating:5,brand:""}),[T,k]=N.useState("");N.useEffect(()=>{async function j(){if(t)try{const U=await sn.getProduct(t);U?(S({title:U.title,price:U.price,description:U.description,category:U.category,tags:U.tags,image_url:U.image_url,affiliate_link:U.affiliate_link,is_featured:U.is_featured,rating:U.rating,brand:U.brand||""}),k(U.tags.join(", "))):x("Produto não encontrado.")}catch{x("Erro ao carregar produto.")}finally{o(!1)}}j()},[t]);const E=j=>{const{name:U,value:G,type:F}=j.target;if(F==="checkbox"){const I=j.target.checked;S(Q=>({...Q,[U]:I}))}else S(F==="number"?I=>({...I,[U]:parseFloat(G)||0}):I=>({...I,[U]:G}))},D=async j=>{if(j.preventDefault(),!ea){alert("Configuração do Supabase pendente. Não é possÃvel salvar produtos localmente.");return}try{u(!0),x(null);const U={..._,tags:T.split(",").map(G=>G.trim()).filter(Boolean)};i&&t?await sn.updateProduct(t,U):await sn.createProduct(U),e("/admin")}catch(U){x(U.message||"Erro ao salvar o produto.")}finally{u(!1)}};return s?g.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 pt-32 pb-12 flex items-center justify-center",children:g.jsx("div",{className:"w-8 h-8 rounded-full border-4 border-surface border-t-kinetic animate-spin"})})]}):g.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[g.jsx(vt,{}),g.jsxs("main",{className:"flex-1 max-w-4xl w-full mx-auto px-4 sm:px-6 pt-32 pb-12",children:[g.jsxs("div",{className:"mb-8 flex items-center gap-4",children:[g.jsx(Ne,{to:"/admin",className:"p-2 bg-surface hover:bg-kinetic hover:text-black rounded-lg transition-colors text-white",children:g.jsx(Yf,{size:20})}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-3xl font-heading font-black uppercase tracking-tight",children:i?"Editar Produto":"Novo Produto"}),g.jsx("p",{className:"text-gray-400 mt-1",children:"Preencha os dados do produto para catálogo."})]})]}),!ea&&g.jsxs("div",{className:"mb-8 p-4 rounded-lg bg-red-900/20 border border-red-500/50 flex items-start gap-4",children:[g.jsx(B_,{className:"text-red-500 mt-1 shrink-0"}),g.jsxs("div",{children:[g.jsx("h3",{className:"font-bold text-red-400 uppercase font-heading",children:"Supabase não configurado"}),g.jsx("p",{className:"text-sm text-red-200/70 mt-1",children:"Você não poderá salvar. Configure as variáveis de ambiente primeiro."})]})]}),v&&g.jsx("div",{className:"mb-8 p-4 rounded-lg bg-red-900/20 border border-red-500/50 text-red-400",children:v}),g.jsxs("form",{onSubmit:D,className:"bg-surface rounded-xl p-6 sm:p-8 space-y-6 shadow-xl border border-surface",children:[g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-bold text-gray-300 uppercase tracking-wider",children:"TÃtulo do Produto"}),g.jsx("input",{required:!0,type:"text",name:"title",value:_.title,onChange:E,className:"w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors",placeholder:"Ex: Impact Whey Protein"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-bold text-gray-300 uppercase tracking-wider",children:"Marca"}),g.jsx("input",{type:"text",name:"brand",value:_.brand,onChange:E,className:"w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors",placeholder:"Ex: Growth Supplements"})]})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-bold text-gray-300 uppercase tracking-wider",children:"Preç
228o (R$)"}),g.jsx("input",{required:!0,type:"number",name:"price",step:"0.01",min:"0",value:_.price,onChange:E,className:"w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors font-mono"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-bold text-gray-300 uppercase tracking-wider",children:"Categoria"}),g.jsx("select",{name:"category",value:_.category,onChange:E,className:"w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors",children:pc.map(j=>g.jsx("option",{value:j.label,children:j.label},j.label))})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-bold text-gray-300 uppercase tracking-wider",children:"Descrição"}),g.jsx("textarea",{required:!0,name:"description",value:_.description,onChange:E,rows:4,className:"w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors resize-none",placeholder:"Descreva o produto com detalhes..."})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-bold text-gray-300 uppercase tracking-wider",children:"URL ou Arquivo da Imagem"}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center",children:[g.jsx("input",{required:!0,type:"text",name:"image_url",value:_.image_url,onChange:E,className:"flex-1 w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors",placeholder:"https://... ou /imagem.png"}),g.jsxs("div",{className:"relative shrink-0",children:[g.jsx("input",{type:"file",accept:"image/*",disabled:h,onChange:j=>{var F;const U=(F=j.target.files)==null?void 0:F[0];if(!U)return;m(!0),y(null);const G=new FileReader;G.onload=I=>{var oe;const Q=new Image;Q.onload=()=>{const ae=document.createElement("canvas");let de=Q.width,me=Q.height;const Ue=800;de>me&&de>Ue?(me*=Ue/de,de=Ue):me>Ue&&(de*=Ue/me,me=Ue),ae.width=de,ae.height=me;const Me=ae.getContext("2d");Me==null||Me.drawImage(Q,0,0,de,me);const Se=ae.toDataURL("image/webp",.8);S(z=>({...z,image_url:Se})),m(!1)},Q.onerror=()=>{y("Falha ao processar a imagem localmente."),m(!1)},Q.src=(oe=I.target)==null?void 0:oe.result},G.onerror=()=>{y("Falha ao ler o arquivo."),m(!1)},G.readAsDataURL(U),j.target.value=""},className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed",title:"Fazer upload de imagem"}),g.jsx("button",{type:"button",disabled:h,className:"bg-surface hover:bg-kinetic hover:text-black text-white px-6 py-3 rounded-lg font-bold font-heading uppercase tracking-wider text-sm transition-colors w-full disabled:opacity-50 flex items-center justify-center gap-2",children:h?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-white border-t-transparent animate-spin"}),"Processando..."]}):"Upload do PC/Celular"})]})]}),p&&g.jsxs("div",{className:"mt-2 p-3 bg-red-900/40 border border-red-500/50 rounded text-red-200 text-sm",children:[g.jsx("strong",{children:"ATENÃÃO:"})," ",p]}),_.image_url&&g.jsx("div",{className:"mt-4 p-4 bg-[#1a1a1a] rounded flex justify-center border border-surface",children:g.jsx("img",{src:_.image_url,alt:"Preview",className:"h-32 object-contain",onError:j=>j.currentTarget.style.display="none"})})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-bold text-gray-300 uppercase tracking-wider",children:"Link de Afiliado"}),g.jsx("input",{required:!0,type:"url",name:"affiliate_link",value:_.affiliate_link,onChange:E,className:"w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors text-kinetic",placeholder:"https://..."})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-bold text-gray-300 uppercase tracking-wider",children:"Tags (separadas por vÃrgula)"}),g.jsx("input",{type:"text",value:T,onChange:j=>k(j.target.value),className:"w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors",placeholder:"Ex: Whey, ProteÃna, Concentrado"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{className:"text-sm font-bold text-gray-300 uppercase tracking-wider",children:"Avaliação (0 a 5)"}),g.jsx("input",{type:"number",name:"rating",step:"0.1",min:"0",max:"5",value:_.rating,onChange:E,className:"w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors"})]})]}),g.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-surface",children:[g.jsx("input",{type:"checkbox",id:"is_featured",name:"is_featured",checked:_.is_featured,onChange:E,className:"w-5 h-5 accent-kinetic bg-[#1a1a1a] border-surface rounded"}),g.jsx("label",{htmlFor:"is_featured",className:"text-white font-bold cursor-pointer",children:"Destacar Produto (Is Featured)"})]}),g.jsx("div",{className:"pt-6 flex justify-end",children:g.jsxs("button",{type:"submit",disabled:c,
228className:"bg-kinetic text-black px-8 py-4 rounded-lg font-bold font-heading uppercase tracking-wider flex items-center gap-2 hover:bg-white transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c?g.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-black border-t-transparent animate-spin"}):g.jsx(aC,{size:20}),c?"Salvando...":"Salvar Produto"]})})]})]}),g.jsx(Tt,{})]})}function NO(){const[t,e]=N.useState([]),i=xn();N.useEffect(()=>{async function u(){const h=await sn.getProducts();e(h)}u()},[]),N.useEffect(()=>{i.hash&&t.length>0&&setTimeout(()=>{const u=i.hash.replace("#",""),h=document.getElementById(u);h&&h.scrollIntoView({behavior:"smooth"})},500)},[i.hash,t.length]);const s=new URLSearchParams(i.search),o=s.get("brand")||void 0,c=s.get("categoria");return g.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[g.jsx(vt,{}),g.jsxs("main",{className:"flex-1 pt-28 md:pt-32 pb-12 overflow-x-hidden",children:[g.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-8 md:mb-12",children:[g.jsx("span",{className:"text-kinetic text-xs md:text-sm font-bold uppercase tracking-widest mb-1 md:mb-2 block",children:"Catálogo Completo"}),g.jsx("h1",{className:"text-4xl md:text-6xl lg:text-7xl font-heading font-black uppercase",children:c||"Todas as Categorias"}),g.jsx("p",{className:"text-gray-400 mt-4 max-w-2xl text-sm md:text-base leading-relaxed",children:c?`Explore nossa seleção completa de produtos da categoria ${c}.`:"Explore nossa seleção completa de produtos para alta performance. Filtre por marca e encontre os melhores suplementos, roupas e equipamentos."})]}),g.jsx("div",{className:"w-full",children:pc.filter(u=>!c||u.label.toLowerCase()===c.toLowerCase()).map(u=>{const h=t.filter(m=>m.category===u.label);return h.length===0?null:g.jsx(q_,{title:u.label,products:h,initialBrand:o},u.label)})})]}),g.jsx(Tt,{})]})}const kO="admin123";function ph({children:t}){const[e,i]=N.useState(()=>localStorage.getItem("adminAuth")==="true"),[s,o]=N.useState(""),[c,u]=N.useState(!1);N.useEffect(()=>{e&&localStorage.setItem("adminAuth","true")},[e]);const h=m=>{m.preventDefault(),s===kO?(i(!0),u(!1)):(u(!0),o(""))};return e?g.jsx(g.Fragment,{children:t}):g.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-background px-4 relative",children:[g.jsx("div",{className:"absolute top-4 left-4 sm:top-8 sm:left-8",children:g.jsxs(Ne,{to:"/",className:"text-gray-400 hover:text-white flex items-center gap-2 transition-colors",children:[g.jsx(Yf,{size:20}),g.jsx("span",{className:"font-bold uppercase tracking-wider text-sm hidden sm:inline",children:"Voltar para o Site"})]})}),g.jsxs("div",{className:"max-w-md w-full bg-surface border border-surface rounded-xl p-8 shadow-xl",children:[g.jsx("h2",{className:"text-2xl font-heading font-black uppercase text-center mb-6",children:"Acesso Restrito"}),g.jsxs("form",{onSubmit:h,className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("input",{type:"password",value:s,onChange:m=>o(m.target.value),placeholder:"Digite a senha...",className:"w-full bg-[#1a1a1a] border border-surface rounded-lg px-4 py-3 text-white focus:outline-none focus:border-kinetic transition-colors",autoFocus:!0}),c&&g.jsx("p",{className:"text-red-500 text-sm mt-2",children:"Senha incorreta. Tente novamente."})]}),g.jsx("button",{type:"submit",className:"w-full bg-kinetic text-black px-6 py-3 rounded-lg font-bold font-heading uppercase tracking-wider text-sm hover:bg-white transition-colors",children:"Acessar Painel"})]}),g.jsxs("p",{className:"text-gray-500 text-xs text-center mt-6",children:["A senha padrão é ",g.jsx("code",{className:"bg-black/50 px-1 py-0.5 rounded text-white",children:"admin123"}),". Você pode alterá-la adicionando ",g.jsx("code",{className:"bg-black/50 px-1 py-0.5 rounded text-white",children:"VITE_ADMIN_PASSWORD"})," nas variáveis de ambiente."]})]})]})}function jO(){const{pathname:t,hash:e}=xn();return N.useEffect(()=>{e?setTimeout(()=>{const i=e.replace("#",""),s=document.getElementById(i);s&&s.scrollIntoView({behavior:"smooth"})},100):window.scrollTo(0,0)},[t,e]),null}function CO(){return g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-32 pb-16 px-4",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsx("h1",{className:"text-4xl font-heading font-black uppercase tracking-tight mb-8",children:"Fale Conosco"}),g.jsxs("div",{className:"bg-surface p-8 rounded-xl border border-surface/50 text-gray-300 space-y-6",children:[g.jsx("p",{children:"Ainda não possuÃmos um e-mail direto para suporte."}),g.jsx("p",{children:"Como somos um site que indica produtos (através de links de afiliados), a venda, entrega e garantia são diretamente no site onde você finalizou a compra (por exemplo, Amazon, Shopee, Mercado Livre)."}),g.jsx("p",{children:"Se você teve algum problema com sua compra, por favor, entre em contato com o suporte da loja na qual o pedido foi realizado."})]})]})}),g.jsx(Tt,{})]})}function RO(){return g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-32 pb-16 px-4",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsx("h1",{className:"text-4xl font-heading font-black uppercase tracking-tight mb-8",children:"Perguntas Frequentes"}),g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"bg-surface p-6 rounded-xl border border-surface/50",children:[g.jsx("h3",{className:"font-bold text-lg mb-2 text-white",children:"Como comprar no site?"}),g.jsx("p",{className:"text-gray-400 leading-relaxed",children:"Nós funcionamos como uma vitrine dos melhores produtos para o seu corpo. Ao clicar no botão de compra, você será redirecionado aos nossos distribuidores parceiros (como Amazon, Mercado Livre, Shopee) com toda segurança, apenas para concluir a compra."})]}),g.jsxs("div",{className:"bg-surface p-6 rounded-xl border border-surface/50",children:[g.jsx("h3",{className:"font-bold text-lg mb-2 text-white",children:"A loja vende os produtos diretamente?"}),g.jsx("p",{className:"text-gray-400 leading-relaxed",children:"Não. Nós apenas selecionamos os melhores produtos disponÃveis no mercado brasileiro através do modelo de afiliação. Todo o pagamento, envio e pós-venda é responsabilidade exclusiva da loja na qual você efetuará as compras finais."})]}),g.jsxs("div",{className:"bg-surface p-6 rounded-xl border border-surface/50",children:[g.jsx("h3",{className:"font-bold text-lg mb-2 text-white",children:"à seguro ser redirecionado para comprar?"}),g.jsx("p",{className:"text-gray-400 leading-relaxed",children:"Sim! Sem dúvidas. Nós selecionamos produtos e vendedores rigorosamente consolidados e em portais gigantescos e seguros."})]}),g.jsxs("div",{className:"bg-surface p-6 rounded-xl border border-surface/50",children:[g.jsx("h3",{className:"font-bold text-lg mb-2 text-white",children:"O produto está mais caro usando os links daqui?"}),g.jsx("p",{className:"text-gray-400 leading-relaxed",children:"Não! Garantimos que nossos links trazem você ao exato pre
228ço do comércio original (descontando fretes ou impostos locais que possam ser adicionados pela plataforma). Apenas recebemos uma comissão da loja e isso não afeta os seus custos pessoais."})]})]})]})}),g.jsx(Tt,{})]})}function OO(){return g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-32 pb-16 px-4",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsx("h1",{className:"text-4xl font-heading font-black uppercase tracking-tight mb-8",children:"Rastrear Pedido"}),g.jsxs("div",{className:"bg-surface p-8 rounded-xl border border-surface/50 text-gray-300 space-y-6",children:[g.jsxs("p",{className:"leading-relaxed",children:["Como atuamos indicando produtos e ferramentas através de plataformas parceiras (programa de marketing de afiliados), ",g.jsx("strong",{children:"nós não possuÃmos acesso aos dados do seu envio ou rastreamento."})]}),g.jsxs("div",{className:"bg-[#1a1a1a] p-6 rounded-lg border border-surface",children:[g.jsx("h3",{className:"font-bold text-lg text-white mb-4",children:"Para rastrear seu pedido, siga as instruções:"}),g.jsxs("ol",{className:"list-decimal pl-5 space-y-3 text-gray-400",children:[g.jsx("li",{children:"Acesse o site da loja onde a compra foi efetivamente concluÃda (Ex: Amazon, Centauro, Mercado Livre, Shopee)."}),g.jsx("li",{children:"Faça login na sua conta da respectiva plataforma."}),g.jsx("li",{children:'Vá até a aba de "Meus Pedidos" ou "Minhas Compras".'}),g.jsx("li",{children:"Localize a última compra efetuada pelo redirecionamento, lá estarão os detalhes e código de rastreamento do envio."})]})]})]})]})}),g.jsx(Tt,{})]})}function DO(){return g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-32 pb-16 px-4",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsx("h1",{className:"text-4xl font-heading font-black uppercase tracking-tight mb-8",children:"Trocas e Devoluções"}),g.jsxs("div",{className:"bg-surface p-8 rounded-xl border border-surface/50 text-gray-300 space-y-6",children:[g.jsxs("p",{className:"leading-relaxed",children:["O nosso sistema atual é projetado para encaminhar os usuários com segurança para canais diretos de fornecedores dos materiais de treinos. Deste modo, como ",g.jsx("strong",{children:"não processamos o pagamento nem despachamos envios dos produtos"}),", não gerenciamos trocas ou devoluções em nossos servidores."]}),g.jsx("p",{className:"leading-relaxed",children:"Todas as polÃticas sobre garantia, reembolso na data estabelecida pelos órgãos e defeitos dos produtos deve ser obrigatoriamente tratada de forma direta com o lojista ou plataforma fornecedora do seu equipamento / suplemento (Ex: Amazon, Mercado Livre)."}),g.jsxs("div",{className:"bg-[#1a1a1a] p-6 rounded-lg border border-surface mt-8",children:[g.jsx("h3",{className:"font-bold text-lg text-white mb-3",children:"Como solicitar na loja que o item foi comprado?"}),g.jsx("p",{className:"text-gray-400",children:'Localize sua aba "Meus Pedidos / Devoluções" depois de efetuar seu login no site de origem da mercadoria com o qual nós o direcionamos (por exemplo, dentro do aplicativo da plataforma). Iniciar o trâmite através da própria interface deles garantem os termos de reembolso e proteção do cliente, pois fornecem rótulos impressos prontos da própria distribuidora, correios na logÃstica reversa e retorno do seu montante adquirido no crédito ou na fatura do cliente de modo imediato.'})]})]})]})}),g.jsx(Tt,{})]})}function MO(){return g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-32 pb-16 px-4",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsx("h1",{className:"text-4xl font-heading font-black uppercase tracking-tight mb-8",children:"Termos de Uso"}),g.jsxs("div",{className:"bg-surface p-8 rounded-xl border border-surface/50 text-gray-300 space-y-8",children:[g.jsx("p",{children:"Bem-vindo ao site. Estes Termos de Uso regem e informam o procedimento de todos os produtos aqui mostrados, lidos ou indicados."}),g.jsxs("section",{children:[g.jsx("h3",{className:"text-xl font-bold text-white mb-3 text-kinetic",children:"1. Aceitação"}),g.jsx("p",{className:"leading-relaxed text-gray-400",children:"Ao utilizar o nosso website para consultas sobre o mercado fitness, o usuário concorda na Ãntegra em se submeter à s informações abaixo relatadas, sob diretriz que são puramente recomendações curadas em redes logÃsticas virtuais."})]}),g.jsxs("section",{children:[g.jsx("h3",{className:"text-xl font-bold text-white mb-3 text-kinetic",children:"2. Operacionalidade e Venda (Marketing de Associados)"}),g.jsx("p",{className:"leading-relaxed text-gray-400",children:"Informamos que este domÃnio digital age de maneira filiada, e como ponte interligada de publicidade ou afiliação. Portanto todo artigo esportivo, acessório e conteúdo final será monetizado internamente sob intermédio entre o criador e a plataforma-alvo. O cliente final acessará nossa plataforma apenas para descobrir, investigar o melhor valor-custo-benefÃcio sob nossos guias em link, sem efetiva capacidade computacional de pagar diretamente ao site, transferindo a integridade dos compromissos e fechamentos para entidades seguras do mercado online internacional, ex. (Programa Amazon de Associação), entre outros afins de nichos."})]}),g.jsxs("section",{children:[g.jsx("h3",{className:"text-xl font-bold text-white mb-3 text-kinetic",children:"3. Ausência de Responsabilidade"}),g.jsx("p",{className:"leading-relaxed text-gray-400",children:"Salientamos de bom grado à comunidade esportiva que, o nosso núcleo administrador de desenvolvedores, se isenta perante contratempos inerentes aos produtos finais adquiridos nas lojas oficiais sugeridas por hyperlink em forma de afiliação ou recomendações gratuitas de artigos de conteúdo de sites do varejista de fora que é terceirizado: entregas não recebidas; atrasos na transportadora logÃsticas; má usabilidade e durabilidade ou estado do material. O comprador deverá entrar com representação contra a procedência de onde pagou, de origem atestado."})]})]})]})}),g.jsx(Tt,{})]})}function LO(){return g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-32 pb-16 px-4",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsx("h1",{className:"text-4xl font-heading font-black uppercase tracking-tight mb-8",children:"PolÃtica de Privacidade"}),g.jsxs("div",{className:"bg-surface p-8 rounded-xl border border-surface/50 text-gray-300 space-y-6 text-justify",children:[g.jsx("p",{className:"leading-relaxed text-gray-400",children:"Valorizamos o sigilo das suas informações e garantimos que nossa polÃtica está adaptada as rigorosas tendências no ambiente digital da web."}),g.jsx("p",{className:"leading-relaxed text-gray-400",children:"A natureza de nossos portfólios no momento atua de modo não reter qualquer número de pagamentos, boletos, contas correntes e e-mails de compra, haja vista que os sistemas apenas te direcionam aos provedores originários de seu interesse para compra direta nas plataformas afiliadas, não salvando bancos de dados neste servidor do tráfego."}),g.jsx("p",{className:"leading-relaxed text-gray-400",children:"Garantimos aos visualizadores também que terceiros em links indicados por exemplo são confiáveis e resguardarão os cookies dos visitantes se estiver atuando por parte do nosso tráfego em suas navegações posteriores no app e PC local."})]})]})}),g.jsx(Tt,{})]})}function PO(){return g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-32 pb-16 px-4",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsx("h1",{className:"text-4xl font-heading font-black uppercase tracking-tight mb-8",children:"PolÃtica de Afiliados"}),g.jsxs("div",{className:"bg-surface p-8 rounded-xl border border-surface/50 text-gray-300 space-y-6",children:[g.jsx("p",{className:"leading-relaxed text-gray-400",children:'Deixamos de modo transparente e evidente aos nossos frequentadores e parceiros que participamos na adesão e operação massiva do modelo de "Programa de Associados ou Afiliados".'}),g.jsx("p",{className:"leading-relaxed text-gray-400",children:"Por finalidade disto, em virtude aos clientes que decidem seguir os atalhos, cliques de imagem de produtos da qualificação esportiva de suplementos entre os artigos de vestuário e engajamentos por anúncios diretos, recebemos uma pequena compensação por intermédio digital."}),g.jsxs("div",{className:"bg-[#1a1a1a] p-6 rounded-lg border border-surface mt-8",children:[g.jsx("h3",{className:"font-bold text-lg text-white mb-3",children:"Isso Altera O Que Pago Nas Compras?"}),g.jsx("p",{className:"text-gray-400",children:"Pelo contrário: Os gastos e cupons promocionais estarão intactos com a mesma forma e estrutura original independentemente por onde originaram sua rota até o portal (quer seja digitando, ou no nosso link facilitador). O site de terceiros distribui internamente partes da publicidade pra quem leva as tráfego à este local orgânico, gerando benefÃcios mutúos na nossa estrutura atual que fomenta os melhores criadores fitness do catálogo nacional em uma só tela prático ou smartphone do cliente esportivo para treinar sem perdas de minutos e gastos."})]})]})]})}),g.jsx(Tt,{})]})}function UO(){return g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-32 pb-16 px-4",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsx("h1",{className:"text-4xl font-heading font-black uppercase tracking-tight mb-8",children:"PolÃtica de Cookies"}),g.jsxs("div",{className:"bg-surface p-8 rounded-xl border border-surface/50 text-gray-300 space-y-6",children:[g.jsx("p",{className:"leading-relaxed text-gray-400",children:'A navegação por esta interface requer aceitar tecnologias chamadas "Cookies".'}),g.jsx("p",{className:"leading-relaxed text-gray-400",children:"Usamos Co
228okies apenas de caráter essenciais de monitoramento sem prejudicar com scripts nocivos e rastreadores agressivos na privacidade: A principal serventia deles atua por fins analÃticos nas taxas e visibilidade dos cliques dos portfólios no momento (para gerar os pequenos percentuais no painel de redes do modelo de afiliados nos comércios virtuais indicados sob responsabilidades daquele app que foi acessado posterior)."}),g.jsx("p",{className:"leading-relaxed text-gray-400",children:"Ao navegar pelo sistema o utilizador não terá restrições forçadas do PC, porém você poderá, opcional ou a qualquer exato momento, formatar e retirar de acordo na aba interna dos seus próprios navegadores. Ressalta-se do mais, as integrações entre este app virtual apenas processam contagens anônimas (sem perfis individuais rastreados)."})]})]})}),g.jsx(Tt,{})]})}function BO(){const{id:t}=Ub(),[e,i]=N.useState(null),[s,o]=N.useState(!0),{compareList:c,toggleCompare:u,setCompareModalOpen:h}=Wr(),m=e?c.some(y=>y.id===e.id):!1;N.useEffect(()=>{(async()=>{if(o(!0),t){const v=await sn.getProduct(t);i(v)}o(!1)})()},[t]);const p=()=>{e&&(m||u(e),h(!0))};return s?g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-32 flex items-center justify-center",children:g.jsx("div",{className:"w-12 h-12 rounded-full border-4 border-kinetic border-t-transparent animate-spin"})}),g.jsx(Tt,{})]}):e?g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsx("main",{className:"flex-1 pt-24 md:pt-32 pb-16 px-4",children:g.jsxs("div",{className:"max-w-7xl mx-auto",children:[g.jsxs(Ne,{to:"/categorias",className:"inline-flex items-center gap-2 text-gray-400 hover:text-kinetic transition-colors mb-8 font-medium",children:[g.jsx(Yf,{size:18}),g.jsx("span",{children:"Voltar para Produtos"})]}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-12 items-start",children:[g.jsxs("div",{className:"relative bg-[#0a0a0a] rounded-3xl border border-surface aspect-square overflow-hidden flex items-center justify-center w-full max-w-md mx-auto lg:max-w-none shadow-lg group",children:[g.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#0a0a0a] via-transparent to-[#0a0a0a]/50 z-20 pointer-events-none opacity-90"}),g.jsx("div",{className:"absolute inset-0 shadow-[inset_0_0_80px_rgba(10,10,10,1)] z-20 pointer-events-none"}),e.is_featured&&g.jsx("div",{className:"absolute top-4 left-4 sm:top-6 sm:left-6 z-30 bg-kinetic text-black text-[10px] sm:text-xs font-bold px-3 py-1.5 sm:px-4 sm:py-2 rounded-full uppercase tracking-widest shadow-md",children:"Em Destaque"}),g.jsx("button",{onClick:p,className:`absolute top-4 right-4 sm:top-6 sm:right-6 z-30 w-10 h-10 sm:w-12 sm:h-12 rounded-full flex items-center justify-center transition-all shadow-lg backdrop-blur-md ${m?"bg-kinetic text-black":"bg-surface/80 text-white hover:bg-kinetic hover:text-black hover:scale-110"}`,title:"Comparar Produto",children:m?g.jsx(Pr,{size:20}):g.jsx(Ih,{size:20})}),g.jsx("img",{src:e.image_url,alt:e.title,className:"w-full h-full object-cover relative z-10 transform group-hover:scale-110 transition-transform duration-700"})]}),g.jsxs("div",{className:"flex flex-col",children:[g.jsxs("div",{className:"mb-6",children:[g.jsxs("div",{className:"flex items-center gap-4 mb-3",children:[g.jsx("span",{className:"text-kinetic font-mono font-bold tracking-widest text-sm uppercase px-3 py-1 bg-kinetic/10 rounded border border-kinetic/20",children:e.brand}),g.jsxs("div",{className:"flex items-center gap-1.5 text-yellow-400 bg-yellow-400/10 px-3 py-1 rounded border border-yellow-400/20",children:[g.jsx(Wf,{size:14,className:"fill-current"}),g.jsx("span",{className:"font-bold text-sm tracking-wide",children:e.rating.toFixed(1)})]})]}),g.jsx("h1",{className:"text-2xl sm:text-3xl lg:text-4xl font-heading font-black leading-tight mb-2 text-white",children:e.title}),g.jsx("p",{className:"text-gray-400 text-sm sm:text-base lg:text-lg font-medium tracking-wide",children:e.category})]}),g.jsxs("div",{className:"mb-6",children:[g.jsxs("div",{className:"flex items-baseline gap-1.5 mb-1",children:[g.jsx("span",{className:"text-base lg:text-lg text-gray-400 font-medium tracking-widest",children:"R$"}),g.jsx("span",{className:"text-3xl lg:text-5xl font-black font-heading text-white tracking-tight",children:e.price.toFixed(2)})]}),g.jsxs("p",{className:"text-green-400 text-xs sm:text-sm font-bold tracking-wider up
228percase flex items-center gap-1.5 mt-2",children:[g.jsx(V_,{size:14}),"Compra Segura Garantida"]})]}),g.jsx("div",{className:"prose prose-invert max-w-none mb-8 text-gray-300 leading-relaxed text-base",children:g.jsx("p",{children:e.description})}),e.tags&&e.tags.length>0&&g.jsxs("div",{className:"mb-10",children:[g.jsx("h3",{className:"text-sm font-bold text-gray-500 uppercase tracking-widest mb-3",children:"Principais CaracterÃsticas"}),g.jsx("div",{className:"flex flex-wrap gap-2",children:e.tags.map(y=>g.jsx("span",{className:"text-sm font-mono px-3 py-1.5 rounded-lg bg-surface text-gray-300 border border-surface hover:border-gray-600 transition-colors",children:y},y))})]}),g.jsxs("div",{className:"mt-auto pt-6 border-t border-surface space-y-4",children:[g.jsxs("a",{href:e.affiliate_link,target:"_blank",rel:"noopener noreferrer",className:"w-full group relative overflow-hidden bg-white text-black py-4 rounded-xl font-black font-heading uppercase tracking-widest text-sm flex items-center justify-center gap-3 hover:bg-kinetic transition-all shadow-lg hover:shadow-kinetic/20",children:[g.jsx("span",{children:"Comprar Oficial"}),g.jsx(tc,{size:18,className:"transform group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]}),g.jsxs("button",{onClick:p,className:`w-full group py-4 rounded-xl font-bold font-heading uppercase tracking-widest text-sm flex items-center justify-center gap-3 transition-all border ${m?"bg-kinetic/10 border-kinetic text-kinetic":"bg-transparent border-surface text-gray-400 hover:border-kinetic/50 hover:text-white"}`,children:[m?g.jsx(Pr,{size:18}):g.jsx(Ih,{size:18}),g.jsx("span",{children:m?"Comparando Produto":"Comparar Produto"})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"flex items-center gap-3 justify-center p-4 rounded-xl bg-surface/50 border border-surface text-gray-400",children:[g.jsx(dC,{size:20,className:"text-kinetic"}),g.jsx("span",{className:"text-sm font-medium",children:"Envio Rápido"})]}),g.jsxs("div",{className:"flex items-center gap-3 justify-center p-4 rounded-xl bg-surface/50 border border-surface text-gray-400",children:[g.jsx(tC,{size:20,className:"text-kinetic"}),g.jsx("span",{className:"text-sm font-medium",children:"Troca Fácil"})]})]}),g.jsx("p",{className:"text-center text-xs text-gray-500 mt-4 leading-relaxed max-w-sm mx-auto",children:"* Você será redirecionado para a loja oficial do parceiro para concluir sua compra com total segurança."})]})]})]})]})}),g.jsx(Tt,{})]}):g.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[g.jsx(vt,{}),g.jsxs("main",{className:"flex-1 pt-32 pb-16 px-4 flex flex-col items-center justify-center text-center",children:[g.jsx("h1",{className:"text-4xl font-heading font-black uppercase mb-4 text-white",children:"Produto Não Encontrado"}),g.jsx("p",{className:"text-gray-400 mb-8 max-w-md",children:"O produto que você está procurando pode ter sido removido ou o link está incorreto."}),g.jsx(Ne,{to:"/",className:"bg-kinetic text-black px-8 py-4 rounded-lg font-bold font-heading uppercase tracking-wider hover:bg-white transition-colors",children:"Voltar para o InÃcio"})]}),g.jsx(Tt,{})]})}function zO(){const{compareList:t,removeCompare:e,clearCompare:i,setCompareModalOpen:s}=Wr(),[o,c]=N.useState(!1);return t.length===0?null:g.jsxs(g.Fragment,{children:[g.jsx(mc.div,{initial:{y:100},animate:{y:0},exit:{y:100},className:"fixed bottom-0 left-0 w-full z-40 bg-surface/95 backdrop-blur-md border-t border-kinetic/30 shadow-[0_-10px_40px_rgba(0,0,0,0.5)] p-4",children:g.jsxs("div",{className:"max-w-7xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-4",children:[g.jsxs("div",{className:"flex gap-4 overflow-x-auto custom-scrollbar pb-2 sm:pb-0 w-full sm:w-auto",children:[t.map(u=>g.jsxs("div",{className:"relative w-16 h-16 sm:w-20 sm:h-20 bg-background rounded-lg border border-surface flex items-center justify-center shrink-0",children:[g.jsx("button",{onClick:()=>e(u.id),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-0.5 hover:scale-110 transition-transform z-10",children:g.jsx(ps,{size:14})}),g.jsx("img",{src:u.image_url,alt:u.title,className:"max-w-full max-h-full object-contain p-2"})]},u.id)),Array.from({length:Math.max(0,4-t.length)}).map((u,h)=>g.jsxs("button",{onClick:()=>c(!0),className:"w-16 h-16 sm:w-20 sm:h-20 rounded-lg border border-dashed border-gray-600 bg-surface/30 flex flex-col items-center justify-center shrink-0 text-gray-500 hover:border-kinetic hover:text-kinetic transition-all group cursor-pointer",children:[g.jsx(Qf,{size:20,className:"mb-1 group-hover:scale-110 transition-transform"}),g.jsx("span",{className:"text-[10px] sm:text-xs text-center font-bold",children:"Adicionar"})]},`placeholder-${h}`))]}),g.jsxs("div",{className:"flex gap-3 w-full sm:w-auto justify-end",children:[g.jsx("button",{onClick:i,className:"px-4 py-2 text-sm text-gray-400 hover:text-white transition-colors",children:"Limpar"}),g.jsx("button",{onClick:()=>s(!0),disabled:t.length<2,className:`px-6 py-2 rounded-lg font-heading font-bold uppercase tracking-wider text-sm transition-colors ${t.length>=2?"bg-kinetic text-black hover:bg-white":"bg-surface border border-gray-700 text-gray-500 cursor-not-allowed"}`,children:"Comparar"})]})]})}),g.jsx(VO,{isOpen:o,onClose:()=>c(!1)})]})}function VO({isOpen:t,onClose:e}){const{compareList:i,toggleCompare:s}=Wr(),[o,c]=N.useState([]),u=i.length>0?i[0].category:null;return N.useEffect(()=>{t&&u&&sn.getProducts().then(h=>{c(h.filter(m=>m.category===u&&!i.some(p=>p.id===m.id)))})},[t,u,i]),t?g.jsx("div",{className:"fixed inset-0 z-[100] bg-background/95 backdrop-blur-sm flex items-center justify-center p-4",children:g.jsxs("div",{className:"bg-[#1a1a1a] rounded-2xl w-full max-w-3xl max-h-[80vh] flex flex-col border border-surface shadow-2xl relative",children:[g.jsxs("div",{className:"p-4 sm:p-6 border-b border-surface flex justify-between items-center",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-xl sm:text-2xl font-heading font-black uppercase text-white",children:"Adicionar à Comparação"}),g.jsxs("p",{className:"text-sm text-gray-400 mt-1",children:["Selecione mais itens da categoria ",g.jsx("span",{className:"text-kinetic",children:u})]})]}),g.jsx("button",{onClick:e,className:"text-gray-400 hover:text-white transition-colors p-2",children:g.jsx(ps,{size:28})})]}),g.jsx("div",{className:"p-4 sm:p-6 overflow-y-auto custom-scrollbar grid grid-cols-1 sm:grid-cols-2 gap-4",children:o.length===0?g.jsx("div",{className:"col-span-full py-12 text-center text-gray-500",children:"Nenhum outro produto disponÃvel nesta categoria para comparar."}):o.map(h=>g.jsxs("button",{onClick:()=>{s(h),e()},className:"flex items-center gap-4 p-4 rounded-xl border border-surface bg-surface/30 hover:border-kinetic/50 transition-all text-left text-white group",children:[g.jsx("div",{className:"w-16 h-16 shrink-0 bg-white rounded-lg p-2 flex items-center justify-center group-hover:scale-105 transition-transform",children:g.jsx("img",{src:h.image_url,alt:h.title,className:"max-w-full max-h-full object-contain"})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("h3",{className:"font-bold text-sm sm:text-base line-clamp-2 leading-tight group-hover:text-kinetic transition-colors",children:h.title}),g.jsx("p",{className:"text-gray-400 text-xs mt-1",children:h.brand})]}),g.jsx("div",{className:"w-8 h-8 rounded-full border border-surface flex items-center justify-center group-hover:bg-kinetic group-hover:text-black group-hover:border-kinetic transition-all",children:g.jsx(Qf,{size:16})})]}
228,h.id))})]})}):null}function HO(){const{compareList:t,isCompareModalOpen:e,setCompareModalOpen:i,removeCompare:s}=Wr(),o=Array.from(new Set(t.flatMap(c=>Object.keys(c.nutritional_info||{}))));return e?g.jsx("div",{className:"fixed inset-0 z-50 bg-background/95 backdrop-blur-sm flex items-center justify-center p-4",children:g.jsxs("div",{className:"bg-[#1a1a1a] rounded-2xl w-full max-w-6xl max-h-[90vh] flex flex-col border border-surface shadow-2xl overflow-hidden relative",children:[g.jsxs("div",{className:"p-4 sm:p-6 border-b border-surface flex justify-between items-center bg-surface/50",children:[g.jsx("h2",{className:"text-xl sm:text-2xl font-heading font-black uppercase text-white",children:"Comparação de Produtos"}),g.jsx("button",{onClick:()=>i(!1),className:"text-gray-400 hover:text-white transition-colors",children:g.jsx(ps,{size:28})})]}),g.jsx("div",{className:"p-4 sm:p-6 overflow-auto custom-scrollbar flex-1",children:g.jsx("div",{className:"min-w-[800px]",children:g.jsxs("table",{className:"w-full text-left border-collapse",children:[g.jsx("thead",{children:g.jsxs("tr",{children:[g.jsx("th",{className:"p-4 border-b border-surface/50 w-1/5 font-bold uppercase text-gray-500 tracking-wider text-sm",children:"CaracterÃsticas"}),t.map(c=>g.jsxs("th",{className:"p-4 border-b border-surface/50 w-1/5 align-top relative",children:[g.jsx("button",{onClick:()=>s(c.id),className:"absolute right-4 top-4 text-gray-500 hover:text-red-400 transition-colors z-10",children:g.jsx(ps,{size:18})}),g.jsx("div",{className:"aspect-square bg-white rounded-lg p-4 flex items-center justify-center mb-4",children:g.jsx("img",{src:c.image_url,alt:c.title,className:"max-w-full max-h-full object-contain"})}),g.jsx("h3",{className:"font-bold text-sm mb-1 leading-tight line-clamp-2 text-white",children:c.title}),g.jsxs("div",{className:"text-kinetic font-black text-xl mt-2",children:["R$ ",c.price.toFixed(2)]})]},c.id)),Array.from({length:Math.max(0,4-t.length)}).map((c,u)=>g.jsx("th",{className:"p-4 border-b border-surface/50 w-1/5"},`empty-head-${u}`))]})}),g.jsxs("tbody",{children:[g.jsxs("tr",{children:[g.jsx("td",{className:"p-4 border-b border-surface/50 font-medium text-gray-400",children:"Marca"}),t.map(c=>g.jsx("td",{className:"p-4 border-b border-surface/50 font-bold text-white",children:c.brand||"-"},c.id)),Array.from({length:Math.max(0,4-t.length)}).map((c,u)=>g.jsx("td",{className:"p-4 border-b border-surface/50"},`empty-brand-${u}`))]}),g.jsxs("tr",{children:[g.jsx("td",{className:"p-4 border-b border-surface/50 font-medium text-gray-400",children:"Categoria"}),t.map(c=>g.jsx("td",{className:"p-4 border-b border-surface/50 text-gray-300",children:c.category},c.id)),Array.from({length:Math.max(0,4-t.length)}).map((c,u)=>g.jsx("td",{className:"p-4 border-b border-surface/50"},`empty-cat-${u}`))]}),g.jsxs("tr",{children:[g.jsx("td",{className:"p-4 border-b border-surface/50 font-medium text-gray-400",children:"Avaliação"}),t.map(c=>g.jsx("td",{className:"p-4 border-b border-surface/50",children:g.jsxs("div",{className:"flex items-center gap-1 text-yellow-400 bg-yellow-400/10 px-2 py-1 rounded inline-flex border border-yellow-400/20",children:[g.jsx("span",{className:"font-bold text-sm",children:c.rating.toFixed(1)}),g.jsx(Pr,{size:14,className:"opacity-80"})]})},c.id)),Array.from({length:Math.max(0,4-t.length)}).map((c,u)=>g.jsx("td",{className:"p-4 border-b border-surface/50"},`empty-rating-${u}`))]}),g.jsxs("tr",{children:[g.jsx("td",{className:"p-4 border-b border-surface/50 font-medium text-gray-400",children:"Tags"}),t.map(c=>g.jsx("td",{className:"p-4 border-b border-surface/50",children:g.jsx("div",{className:"flex flex-wrap gap-1",children:c.tags.map(u=>g.jsx("span",{className:"text-[10px] font-mono px-2 py-1 rounded-md bg-surface text-gray-300 border border-surface",children:u},u))})},c.id)),Array.from({length:Math.max(0,4-t.length)}).map((c,u)=>g.jsx("td",{className:"p-4 border-b border-surface/50"},`empty-tags-${u}`))]}),o.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("tr",{children:g.jsx("td",{colSpan:5,className:"p-4 bg-surface/30 font-bold uppercase tracking-widest text-xs text-kinetic",children:"Tabela Nutricional"})}),o.map(c=>g.jsxs("tr",{children:[g.jsx("td",{className:"p-4 border-b border-surface/50 font-medium text-gray-400",children:c}),t.map(u=>{var h;return g.jsx("td",{className:"p-4 border-b border-surface/50 font-bold text-white",children:((h=u.nutritional_info)==null?void 0:h[c])||"-"},`${u.id}-${c}`)}),Array.from({length:Math.max(0,4-t.length)}).map((u,h)=>g.jsx("td",{className:"p-4 border-b border-surface/50"},`empty-nutri-${c}-${h}`))]},c))]}),g.jsxs("tr",{children:[g.jsx("td",{className:"p-4 border-b border-surface/50 font-medium text-gray-400",children:"Descrição"}),t.map(c=>g.jsx("td",{className:"p-4 border-b border-surface/50 text-sm text-gray-400 leading-relaxed align-top",children:c.description},c.id)),Array.from({length:Math.max(0,4-t.length)}).map((c,u)=>g.jsx("td",{className:"p-4 border-b border-surface/50"},`empty-desc-${u}`))]}),g.jsxs("tr",{children:[g.jsx("td",{className:"p-4"}),t.map(c=>g.jsx("td",{className:"p-4 pt-6",children:g.jsx("a",{href:c.affiliate_link,target:"_blank",rel:"noopener noreferrer",className:"w-full inline-block text-center bg-kinetic text-black py-3 px-4 roun
228ded-xl font-bold font-heading uppercase tracking-wider text-sm hover:bg-white transition-colors",children:"Comprar Oficial"})},c.id)),Array.from({length:Math.max(0,4-t.length)}).map((c,u)=>g.jsx("td",{className:"p-4"},`empty-action-${u}`))]})]})]})})})]})}):null}function qO(){return g.jsx(_C,{children:g.jsxs(hT,{children:[g.jsx(jO,{}),g.jsxs(q2,{children:[g.jsx(_t,{path:"/",element:g.jsx(SC,{})}),g.jsx(_t,{path:"/produto/:id",element:g.jsx(BO,{})}),g.jsx(_t,{path:"/admin",element:g.jsx(ph,{children:g.jsx(EO,{})})}),g.jsx(_t,{path:"/admin/produtos/novo",element:g.jsx(ph,{children:g.jsx(wb,{})})}),g.jsx(_t,{path:"/admin/produtos/editar/:id",element:g.jsx(ph,{children:g.jsx(wb,{})})}),g.jsx(_t,{path:"/categorias",element:g.jsx(NO,{})}),g.jsx(_t,{path:"/suporte/fale-conosco",element:g.jsx(CO,{})}),g.jsx(_t,{path:"/suporte/faq",element:g.jsx(RO,{})}),g.jsx(_t,{path:"/suporte/rastrear-pedido",element:g.jsx(OO,{})}),g.jsx(_t,{path:"/suporte/trocas-e-devolucoes",element:g.jsx(DO,{})}),g.jsx(_t,{path:"/legal/termos-de-uso",element:g.jsx(MO,{})}),g.jsx(_t,{path:"/legal/politica-de-privacidade",element:g.jsx(LO,{})}),g.jsx(_t,{path:"/legal/politica-de-afiliados",element:g.jsx(PO,{})}),g.jsx(_t,{path:"/legal/cookies",element:g.jsx(UO,{})})]}),g.jsx(zO,{}),g.jsx(HO,{})]})})}GS.createRoot(document.getElementById("root")).render(g.jsx(N.StrictMode,{children:g.jsx(qO,{})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.