1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Home-DSmXdfuM.js","assets/badge-0opIDXum.js","assets/mail-DajEdysn.js","assets/gift-YqyB8rty.js","assets/useVip-Zata2WpK.js","assets/GuestWarningDialog-BGMAceLo.js","assets/coins-BxvycCmF.js","assets/history-Da3UAflj.js","assets/medal-Bv-BpE0U.js","assets/useFriends-CWZQhUPa.js","assets/index-u1Zb2F0B.js","assets/index-C1PTMpaD.js","assets/tabs-Ddd_EGfT.js","assets/index-B4bQwslR.js","assets/search-XlQpT-7x.js","assets/check-DO2h59tK.js","assets/arrow-left-BPWQicxC.js","assets/send-CJGf-9X9.js","assets/message-circle-HGntKeu4.js","assets/index-BdQq_4o_.js","assets/radio-DIzDOQTs.js","assets/en-US-b51mc3lz.js","assets/calendar-B4WsJgEC.js","assets/truco-DTCEwY2D.js","assets/index-DZualLqL.js","assets/useCopa-C-vM8Qii.js","assets/sparkles-ZTy_Al7L.js","assets/chevron-right-DR6O0cYb.js","assets/gem-BVWUbbR8.js","assets/package-CoOZba4p.js","assets/crown-EWN8roU1.js","assets/flame-QQTTBYJj.js","assets/copy-BjT6bLEY.js","assets/ShareVictoryCard-5q2TAmpQ.js","assets/share-2-Ductc1Az.js","assets/useGuestGameCounter-DjttEiJS.js","assets/clock-Dv6wD055.js","assets/timer-CFn2d2Uk.js","assets/lock-Iju27F5e.js","assets/Game-ByRmzuVX.js","assets/sounds-CobxRhIy.js","assets/soundManager-CKIcGoFm.js","assets/EmoteWheel-BILLUKiz.js","assets/popover-D2tq8_v8.js","assets/emoteAssets-CzFtICTt.js","assets/dialog-DweTeEuJ.js","assets/settings-BenDXpGV.js","assets/eye-off-C5BjkanN.js","assets/shouts-DmkZFXPM.js","assets/achievements-qHXN0PNg.js","assets/volume-x-C8_RybU2.js","assets/mic-C0M74KeG.js","assets/Ranking-Bxq5l63Y.js","assets/Profile-BgGBqg6o.js","assets/select-BP4Umloa.js","assets/index-B1z-3UfI.js","assets/switch-NDcBPzFH.js","assets/trending-up-ZKwZB9kp.js","assets/swords-BYiDIQLJ.js","assets/log-out-C7IzUoRN.js","assets/pencil-B_ggcy7W.js","assets/Shop-DbBiGkat.js","assets/useShop-CzmeVafm.js","assets/target-D_MZSuBv.js","assets/rotate-ccw-utczDTzt.js","assets/shopping-cart-BTDXJNGt.js","assets/Lobby-CzLLOkDy.js","assets/refresh-cw-CfNxEb45.js","assets/Achievements-B2zi5ckE.js","assets/Admin-DPLdPc87.js","assets/useAdmin-D65jBVjl.js","assets/card-ChhGZcGV.js","assets/input-B0p7C18L.js","assets/textarea-MO4ZzQ_D.js","assets/table-BFMAzGRt.js","assets/label-sUmXVs-s.js","assets/brain-BFiXRgOy.js","assets/trash-2-Crdop1uR.js","assets/plus-B7_uDzv_.js","assets/eye-DLcUOSbb.js","assets/Tournaments-BilAhIKl.js","assets/CreateTournament-Kk_OBe7j.js","assets/TournamentDetail-CXUOTa6C.js","assets/progress-CkilwKJD.js","assets/file-text-Q20EA27p.js","assets/Vip-Cx1QCMAw.js","assets/Rules-Cw3IVUWK.js","assets/Privacy-Dpficsx_.js","assets/Terms-CAeFKbG_.js","assets/DeleteAccount-Bf97jtyH.js","assets/Clans-L5xPnInt.js","assets/Support-DrJiYYU9.js","assets/Copa-BHz7O50J.js","assets/Referrals-9YK9L3WO.js","assets/circle-check-DYMOTULW.js","assets/InviteLanding-S1gnu1vx.js","assets/BattlePass-D-nuYxvG.js","assets/Shouts-CDZsIKGL.js","assets/EmotesCollection-Czq-9lQA.js","assets/TrucoOnline-pQhS1fCo.js","assets/JogarTrucoOnline-DcVTE81f.js","assets/TrucoComAmigos-Nj41U-J9.js","assets/ComoJogarTruco-JDmwPwJg.js","assets/AnotadorDeTruco-DfTaa6u6.js","assets/LiveArena-ChlqUJsB.js","assets/TrucoTV-CRYmqpK5.js","assets/Collection-D4LDSR4v.js"])))=>i.map(i=>d[i]); 2var pT=Object.defineProperty;var dg=e=>{throw TypeError(e)};var mT=(e,t,n)=>t in e?pT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var oe=(e,t,n)=>mT(e,typeof t!="symbol"?t+"":t,n),Ju=(e,t,n)=>t.has(e)||dg("Cannot "+n);var O=(e,t,n)=>(Ju(e,t,"read from private field"),n?n.call(e):t.get(e)),se=(e,t,n)=>t.has(e)?dg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),X=(e,t,n,r)=>(Ju(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Xe=(e,t,n)=>(Ju(e,t,"access private method"),n);var Za=(e,t,n,r)=>({set _(s){X(e,t,s,n)},get _(){return O(e,t,r)}});function gT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var U4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};
vendor: 1,830 bytes, lines 2-10
2function Ia(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fw={exports:{}},ru={},Bw={exports:{}},te={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var Da=Symbol.for("react.element"),yT=Symbol.for("react.portal"),vT=Symbol.for("react.fragment"),wT=Symbol.for("react.strict_mode"),xT=Symbol.for("react.profiler"),bT=Symbol.for("react.provider"),_T=Symbol.for("react.context"),ST=Symbol.for("react.forward_ref"),ET=Symbol.for("react.suspense"),TT=Symbol.for("react.memo"),kT=Symbol.for("react.lazy"),hg=Symbol.iterator;function CT(e){return e===null||typeof e!="object"?null:(e=hg&&e[hg]||e["@@iterator"],typeof e=="function"?e:null)}var zw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Hw=Object.assign,Ww={};function Yi(e,t,n){this.props=e,this.context=t,this.refs=Ww,this.updater=n||zw}Yi.prototype.isReactComponent={};Yi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qw(){}qw.prototype=Yi.prototype;function lp(e,t,n){this.props=e,this.context=t,this.refs=Ww,this.updater=n||zw}var cp=lp.prototype=new qw;cp.constructor=lp;Hw(cp,Yi.prototype);cp.isPureReactComponent=!0;var fg=Array.isArray,Kw=Object.prototype.hasOwnProperty,up={current:null},Gw={key:!0,ref:!0,__self:!0,__source:!0};
vendor: 5,587 bytes, lines 10-18
10function Jw(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Kw.call(t,r)&&!Gw.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Da,type:e,key:i,ref:o,props:s,_owner:up.current}}function PT(e,t){return{$$typeof:Da,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function dp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Da}function AT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var pg=/\/+/g;function Yu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?AT(""+e.key):t.toString(36)}function Dl(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Da:case yT:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Yu(o,0):r,fg(s)?(n="",e!=null&&(n=e.replace(pg,"$&/")+"/"),Dl(s,t,n,"",function(c){return c})):s!=null&&(dp(s)&&(s=PT(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(pg,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",fg(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Yu(i,a);o+=Dl(i,t,n,l,s)}else if(l=CT(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Yu(i,a++),o+=Dl(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function el(e,t,n){if(e==null)return e;var r=[],s=0;return Dl(e,r,"","",function(i){return t.call(n,i,s++)}),r}function RT(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ut={current:null},Ml={transition:null},OT={ReactCurrentDispatcher:ut,ReactCurrentBatchConfig:Ml,ReactCurrentOwner:up};function Yw(){throw Error("act(...) is not supported in production builds of React.")}te.Children={map:el,forEach:function(e,t,n){el(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return el(e,function(){t++}),t},toArray:function(e){return el(e,function(t){return t})||[]},only:function(e){if(!dp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Component=Yi;te.Fragment=vT;te.Profiler=xT;te.PureComponent=lp;te.StrictMode=wT;te.Suspense=ET;te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OT;te.act=Yw;te.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Hw({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=up.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Kw.call(t,l)&&!Gw.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Da,type:e.type,key:s,ref:i,props:r,_owner:o}};te.createContext=function(e){return e={$$typeof:_T,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:bT,_context:e},e.Consumer=e};te.createElement=Jw;te.createFactory=function(e){var t=Jw.bind(null,e);return t.type=e,t};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:ST,render:e}};te.isValidElement=dp;te.lazy=function(e){return{$$typeof:kT,_payload:{_status:-1,_result:e},_init:RT}};te.memo=function(e,t){return{$$typeof:TT,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=Ml.transition;Ml.transition={};try{e()}finally{Ml.transition=t}};te.unstable_act=Yw;te.useCallback=function(e,t){return ut.current.useCallback(e,t)};te.useContext=function(e){return ut.current.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e){return ut.current.useDeferredValue(e)};te.useEffect=function(e,t){return ut.current.useEffect(e,t)};te.useId=function(){return ut.current.useId()};te.useImperativeHandle=function(e,t,n){return ut.current.useImperativeHandle(e,t,n)};te.useInsertionEffect=function(e,t){return ut.current.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return ut.current.useLayoutEffect(e,t)};te.useMemo=function(e,t){return ut.current.useMemo(e,t)};te.useReducer=function(e,t,n){return ut.current.useReducer(e,t,n)};te.useRef=function(e){return ut.current.useRef(e)};te.useState=function(e){return ut.current.useState(e)};te.useSyncExternalStore=function(e,t,n){return ut.current.useSyncExternalStore(e,t,n)};te.useTransition=function(){return ut.current.useTransition()};te.version="18.3.1";Bw.exports=te;var b=Bw.exports;const j=Ia(b),hp=gT({__proto__:null,default:j},[b]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var jT=b,NT=Symbol.for("react.element"),LT=Symbol.for("react.fragment"),IT=Object.prototype.hasOwnProperty,DT=jT.__SECRET_INT
vendor: 11,418 bytes, lines 18-35
18ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,MT={key:!0,ref:!0,__self:!0,__source:!0};function Qw(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)IT.call(t,r)&&!MT.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:NT,type:e,key:i,ref:o,props:s,_owner:DT.current}}ru.Fragment=LT;ru.jsx=Qw;ru.jsxs=Qw;Fw.exports=ru;var p=Fw.exports,Xw={exports:{}},Rt={},Zw={exports:{}},ex={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(A,R){var M=A.length;A.push(R);e:for(;0<M;){var K=M-1>>>1,W=A[K];if(0<s(W,R))A[K]=R,A[M]=W,M=K;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var R=A[0],M=A.pop();if(M!==R){A[0]=M;e:for(var K=0,W=A.length,ee=W>>>1;K<ee;){var ne=2*(K+1)-1,je=A[ne],Qe=ne+1,ie=A[Qe];if(0>s(je,M))Qe<W&&0>s(ie,je)?(A[K]=ie,A[Qe]=M,K=Qe):(A[K]=je,A[ne]=M,K=ne);else if(Qe<W&&0>s(ie,M))A[K]=ie,A[Qe]=M,K=Qe;else break e}}return R}function s(A,R){var M=A.sortIndex-R.sortIndex;return M!==0?M:A.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,h=3,f=!1,y=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(A){for(var R=n(c);R!==null;){if(R.callback===null)r(c);else if(R.startTime<=A)r(c),R.sortIndex=R.expirationTime,t(l,R);else break;R=n(c)}}function _(A){if(g=!1,w(A),!y)if(n(l)!==null)y=!0,z(S);else{var R=n(c);R!==null&&Y(_,R.startTime-A)}}function S(A,R){y=!1,g&&(g=!1,v(k),k=-1),f=!0;var M=h;try{for(w(R),d=n(l);d!==null&&(!(d.expirationTime>R)||A&&!I());){var K=d.callback;if(typeof K=="function"){d.callback=null,h=d.priorityLevel;var W=K(d.expirationTime<=R);R=e.unstable_now(),typeof W=="function"?d.callback=W:d===n(l)&&r(l),w(R)}else r(l);d=n(l)}if(d!==null)var ee=!0;else{var ne=n(c);ne!==null&&Y(_,ne.startTime-R),ee=!1}return ee}finally{d=null,h=M,f=!1}}var T=!1,E=null,k=-1,P=5,C=-1;function I(){return!(e.unstable_now()-C<P)}function N(){if(E!==null){var A=e.unstable_now();C=A;var R=!0;try{R=E(!0,A)}finally{R?U():(T=!1,E=null)}}else T=!1}var U;if(typeof m=="function")U=function(){m(N)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,q=D.port2;D.port1.onmessage=N,U=function(){q.postMessage(null)}}else U=function(){x(N,0)};function z(A){E=A,T||(T=!0,U())}function Y(A,R){k=x(function(){A(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){y||f||(y=!0,z(S))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(A){switch(h){case 1:case 2:case 3:var R=3;break;default:R=h}var M=h;h=R;try{return A()}finally{h=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,R){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var M=h;h=A;try{return R()}finally{h=M}},e.unstable_scheduleCallback=function(A,R,M){var K=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?K+M:K):M=K,A){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=M+W,A={id:u++,callback:R,priorityLevel:A,startTime:M,expirationTime:W,sortIndex:-1},M>K?(A.sortIndex=M,t(c,A),n(l)===null&&A===n(c)&&(g?(v(k),k=-1):g=!0,Y(_,M-K))):(A.sortIndex=W,t(l,A),y||f||(y=!0,z(S))),A},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(A){var R=h;return function(){var M=h;h=R;try{return A.apply(this,arguments)}finally{h=M}}}})(ex);Zw.exports=ex;var $T=Zw.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var UT=b,At=$T;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var tx=new Set,Qo={};function Os(e,t){Di(e,t),Di(e+"Capture",t)}function Di(e,t){for(Qo[e]=t,e=0;e<t.length;e++)tx.add(t[e])}var Wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sh=Object.prototype.hasOwnProperty,VT=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,mg={},gg={};function FT(e){return sh.call(gg,e)?!0:sh.call(mg,e)?!1:VT.test(e)?gg[e]=!0:(mg[e]=!0,!1)}function BT(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zT(e,t,n,r){if(t===null||typeof t>"u"||BT(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function dt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new dt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new dt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new dt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new dt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new dt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new dt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new dt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new dt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new dt(e,5,!1,e.toLowerCase(),null,!1,!1)});var fp=/[\-:]([a-z])/g;function pp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fp,pp);Ye[t]=new dt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fp,pp);Ye[t]=new dt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fp,pp);Ye[t]=new dt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new dt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new dt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new dt(e,1,!1,e.toLowerCase(),null,!0,!0)});function mp(e,t,n,r){var s=Ye.hasOwnProperty(t)?Ye[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(zT(t,n,s,r)&&(n=null),r||s===null?FT(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zn=UT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,tl=Symbol.for("react.element"),ti=Symbol.for("react.portal"),ni=Symbol.for("react.fragment"),gp=Symbol.for("react.strict_mode"),ih=Symbol.for("react.profiler"),nx=Symbol.for("react.provider"),rx=Symbol.for("react.context"),yp=Symbol.for("react.forward_ref"),oh=Symbol.for("react.suspense"),ah=Symbol.for("react.suspense_list"),vp=Symbol.for("react.memo"),fr=Symbol.for("react.lazy"),sx=Symbol.for("react.offscreen"),yg=Symbol.iterator;function ho(e){return e===null||typeof e!="object"?null:(e=yg&&e[yg]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Object.assign,Qu;function Co(e){if(Qu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Qu=t&&t[1]||""}return` 35`+Qu+e}var Xu=!1;function Zu(e,t){if(!e||Xu)return"";Xu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}
vendor: 14,090 bytes, lines 35-38
35catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(` 36`),i=r.stack.split(` 37`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 38`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Xu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Co(e):""}function HT(e){switch(e.tag){case 5:return Co(e.type);case 16:return Co("Lazy");case 13:return Co("Suspense");case 19:return Co("SuspenseList");case 0:case 2:case 15:return e=Zu(e.type,!1),e;case 11:return e=Zu(e.type.render,!1),e;case 1:return e=Zu(e.type,!0),e;default:return""}}function lh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ni:return"Fragment";case ti:return"Portal";case ih:return"Profiler";case gp:return"StrictMode";case oh:return"Suspense";case ah:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rx:return(e.displayName||"Context")+".Consumer";case nx:return(e._context.displayName||"Context")+".Provider";case yp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vp:return t=e.displayName||null,t!==null?t:lh(e.type)||"Memo";case fr:t=e._payload,e=e._init;try{return lh(e(t))}catch{}}return null}function WT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return lh(t);case 8:return t===gp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Mr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ix(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qT(e){var t=ix(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nl(e){e._valueTracker||(e._valueTracker=qT(e))}function ox(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ix(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function uc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ch(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ax(e,t){t=t.checked,t!=null&&mp(e,"checked",t,!1)}function uh(e,t){ax(e,t);var n=Mr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?dh(e,t.type,n):t.hasOwnProperty("defaultValue")&&dh(e,t.type,Mr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function wg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function dh(e,t,n){(t!=="number"||uc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Po=Array.isArray;function yi(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Mr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function hh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return Te({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function xg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(Po(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Mr(n)}}function lx(e,t){var n=Mr(t.value),r=Mr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function bg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function cx(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?cx(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var rl,ux=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(rl=rl||document.createElement("div"),rl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=rl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Lo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},KT=["Webkit","ms","Moz","O"];Object.keys(Lo).forEach(function(e){KT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lo[t]=Lo[e]})});function dx(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Lo.hasOwnProperty(e)&&Lo[e]?(""+t).trim():t+"px"}function hx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=dx(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var GT=Te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ph(e,t){if(t){if(GT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function mh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gh=null;function wp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yh=null,vi=null,wi=null;function _g(e){if(e=Ua(e)){if(typeof yh!="function")throw Error(L(280));var t=e.stateNode;t&&(t=lu(t),yh(e.stateNode,e.type,t))}}function fx(e){vi?wi?wi.push(e):wi=[e]:vi=e}function px(){if(vi){var e=vi,t=wi;if(wi=vi=null,_g(e),t)for(e=0;e<t.length;e++)_g(t[e])}}function mx(e,t){return e(t)}function gx(){}var ed=!1;function yx(e,t,n){if(ed)return e(t,n);ed=!0;try{return mx(e,t,n)}finally{ed=!1,(vi!==null||wi!==null)&&(gx(),px())}}function Zo(e,t){var n=e.stateNode;if(n===null)return null;var r=lu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var vh=!1;if(Wn)try{var fo={};Object.defineProperty(fo,"passive",{get:function(){vh=!0}}),window.addEventListener("test",fo,fo),window.removeEventListener("test",fo,fo)}catch{vh=!1}function JT(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Io=!1,dc=null,hc=!1,wh=null,YT={onError:function(e){Io=!0,dc=e}};function QT(e,t,n,r,s,i,o,a,l){Io=!1,dc=null,JT.apply(YT,arguments)}function XT(e,t,n,r,s,i,o,a,l){if(QT.apply(this,arguments),Io){if(Io){var c=dc;Io=!1,dc=null}else throw Error(L(198));hc||(hc=!0,wh=c)}}function js(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function vx(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Sg(e){if(js(e)!==e)throw Error(L(188))}function ZT(e){var t=e.alternate;if(!t){if(t=js(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Sg(s),e;if(i===r)return Sg(s),t;i=i.sibling}throw Error(L(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function wx(e){return e=ZT(e),e!==null?xx(e):null}function xx(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=xx(e);if(t!==null)return t;e=e.sibling}return null}var bx=At.unstable_scheduleCallback,Eg=At.unstable_cancelCallback,ek=At.unstable_shouldYield,tk=At.unstable_requestPaint,Oe=At.unstable_now,nk=At.unstable_getCurrentPriorityLevel,xp=At.unstable_ImmediatePriority,_x=At.unstable_UserBlockingPriority,fc=At.unstable_NormalPriority,rk=At.unstable_LowPriority,Sx=At.unstable_IdlePriority,su=null,Cn=null;function sk(e){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(su,e,void 0,(e.current.flags&128)===128)}catch{}}var an=Math.clz32?Math.clz32:ak,ik=Math.log,ok=Math.LN2;function ak(e){return e>>>=0,e===0?32:31-(ik(e)/ok|0)|0}var sl=64,il=4194304;function Ao(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Ao(a):(i&=o,i!==0&&(r=Ao(i)))}else o=n&~s,o!==0?r=Ao(o):i!==0&&(r=Ao(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-an(t),s=1<<n,r|=e[n],t&=~s;return r}function lk(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ck(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-an(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=lk(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function xh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ex(){var e=sl;return sl<<=1,!(sl&4194240)&&(sl=64),e}function td(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}
vendor: 4,087 bytes, line 38
38function Ma(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-an(t),e[t]=n}function uk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-an(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function bp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-an(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var le=0;function Tx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var kx,_p,Cx,Px,Ax,bh=!1,ol=[],Pr=null,Ar=null,Rr=null,ea=new Map,ta=new Map,mr=[],dk="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Tg(e,t){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":ea.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ta.delete(t.pointerId)}}function po(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Ua(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function hk(e,t,n,r,s){switch(t){case"focusin":return Pr=po(Pr,e,t,n,r,s),!0;case"dragenter":return Ar=po(Ar,e,t,n,r,s),!0;case"mouseover":return Rr=po(Rr,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return ea.set(i,po(ea.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,ta.set(i,po(ta.get(i)||null,e,t,n,r,s)),!0}return!1}function Rx(e){var t=ls(e.target);if(t!==null){var n=js(t);if(n!==null){if(t=n.tag,t===13){if(t=vx(n),t!==null){e.blockedOn=t,Ax(e.priority,function(){Cx(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_h(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);gh=r,n.target.dispatchEvent(r),gh=null}else return t=Ua(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function kg(e,t,n){$l(e)&&n.delete(t)}function fk(){bh=!1,Pr!==null&&$l(Pr)&&(Pr=null),Ar!==null&&$l(Ar)&&(Ar=null),Rr!==null&&$l(Rr)&&(Rr=null),ea.forEach(kg),ta.forEach(kg)}function mo(e,t){e.blockedOn===t&&(e.blockedOn=null,bh||(bh=!0,At.unstable_scheduleCallback(At.unstable_NormalPriority,fk)))}function na(e){function t(s){return mo(s,e)}if(0<ol.length){mo(ol[0],e);for(var n=1;n<ol.length;n++){var r=ol[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&mo(Pr,e),Ar!==null&&mo(Ar,e),Rr!==null&&mo(Rr,e),ea.forEach(t),ta.forEach(t),n=0;n<mr.length;n++)r=mr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<mr.length&&(n=mr[0],n.blockedOn===null);)Rx(n),n.blockedOn===null&&mr.shift()}var xi=Zn.ReactCurrentBatchConfig,mc=!0;function pk(e,t,n,r){var s=le,i=xi.transition;xi.transition=null;try{le=1,Sp(e,t,n,r)}finally{le=s,xi.transition=i}}function mk(e,t,n,r){var s=le,i=xi.transition;xi.transition=null;try{le=4,Sp(e,t,n,r)}finally{le=s,xi.transition=i}}function Sp(e,t,n,r){if(mc){var s=_h(e,t,n,r);if(s===null)dd(e,t,r,gc,n),Tg(e,r);else if(hk(s,e,t,n,r))r.stopPropagation();else if(Tg(e,r),t&4&&-1<dk.indexOf(e)){for(;s!==null;){var i=Ua(s);if(i!==null&&kx(i),i=_h(e,t,n,r),i===null&&dd(e,t,r,gc,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else dd(e,t,r,null,n)}}var gc=null;function _h(e,t,n,r){if(gc=null,e=wp(r),e=ls(e),e!==null)if(t=js(e),t===null)e=null;else if(n=t.tag,n===13){if(e=vx(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return gc=e,null}
vendor: 10,401 bytes, line 38
38function Ox(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(nk()){case xp:return 1;case _x:return 4;case fc:case rk:return 16;case Sx:return 536870912;default:return 16}default:return 16}}var Er=null,Ep=null,Ul=null;function jx(){if(Ul)return Ul;var e,t=Ep,n=t.length,r,s="value"in Er?Er.value:Er.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Ul=s.slice(e,1<r?1-r:void 0)}function Vl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function al(){return!0}function Cg(){return!1}function Ot(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?al:Cg,this.isPropagationStopped=Cg,this}return Te(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=al)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=al)},persist:function(){},isPersistent:al}),t}var Qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tp=Ot(Qi),$a=Te({},Qi,{view:0,detail:0}),gk=Ot($a),nd,rd,go,iu=Te({},$a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==go&&(go&&e.type==="mousemove"?(nd=e.screenX-go.screenX,rd=e.screenY-go.screenY):rd=nd=0,go=e),nd)},movementY:function(e){return"movementY"in e?e.movementY:rd}}),Pg=Ot(iu),yk=Te({},iu,{dataTransfer:0}),vk=Ot(yk),wk=Te({},$a,{relatedTarget:0}),sd=Ot(wk),xk=Te({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),bk=Ot(xk),_k=Te({},Qi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sk=Ot(_k),Ek=Te({},Qi,{data:0}),Ag=Ot(Ek),Tk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kk={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"},Ck={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ck[e])?!!t[e]:!1}function kp(){return Pk}var Ak=Te({},$a,{key:function(e){if(e.key){var t=Tk[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?kk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kp,charCode:function(e){return e.type==="keypress"?Vl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Rk=Ot(Ak),Ok=Te({},iu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rg=Ot(Ok),jk=Te({},$a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kp}),Nk=Ot(jk),Lk=Te({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ik=Ot(Lk),Dk=Te({},iu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Mk=Ot(Dk),$k=[9,13,27,32],Cp=Wn&&"CompositionEvent"in window,Do=null;Wn&&"documentMode"in document&&(Do=document.documentMode);var Uk=Wn&&"TextEvent"in window&&!Do,Nx=Wn&&(!Cp||Do&&8<Do&&11>=Do),Og=" ",jg=!1;function Lx(e,t){switch(e){case"keyup":return $k.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ix(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ri=!1;function Vk(e,t){switch(e){case"compositionend":return Ix(t);case"keypress":return t.which!==32?null:(jg=!0,Og);case"textInput":return e=t.data,e===Og&&jg?null:e;default:return null}}function Fk(e,t){if(ri)return e==="compositionend"||!Cp&&Lx(e,t)?(e=jx(),Ul=Ep=Er=null,ri=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nx&&t.locale!=="ko"?null:t.data;default:return null}}var Bk={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 Ng(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Bk[e.type]:t==="textarea"}function Dx(e,t,n,r){fx(r),t=yc(t,"onChange"),0<t.length&&(n=new Tp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Mo=null,ra=null;function zk(e){Kx(e,0)}function ou(e){var t=oi(e);if(ox(t))return e}function Hk(e,t){if(e==="change")return t}var Mx=!1;if(Wn){var id;if(Wn){var od="oninput"in document;if(!od){var Lg=document.createElement("div");Lg.setAttribute("oninput","return;"),od=typeof Lg.oninput=="function"}id=od}else id=!1;Mx=id&&(!document.documentMode||9<document.documentMode)}function Ig(){Mo&&(Mo.detachEvent("onpropertychange",$x),ra=Mo=null)}function $x(e){if(e.propertyName==="value"&&ou(ra)){var t=[];Dx(t,ra,e,wp(e)),yx(zk,t)}}function Wk(e,t,n){e==="focusin"?(Ig(),Mo=t,ra=n,Mo.attachEvent("onpropertychange",$x)):e==="focusout"&&Ig()}function qk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ou(ra)}function Kk(e,t){if(e==="click")return ou(t)}function Gk(e,t){if(e==="input"||e==="change")return ou(t)}function Jk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var un=typeof Object.is=="function"?Object.is:Jk;function sa(e,t){if(un(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!sh.call(t,s)||!un(e[s],t[s]))return!1}return!0}function Dg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mg(e,t){var n=Dg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Dg(n)}}function Ux(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ux(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vx(){for(var e=window,t=uc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=uc(e.document)}return t}function Pp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yk(e){var t=Vx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ux(n.ownerDocument.documentElement,n)){if(r!==null&&Pp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Mg(n,i);var o=Mg(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Qk=Wn&&"documentMode"in document&&11>=document.documentMode,si=null,Sh=null,$o=null,Eh=!1;function $g(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Eh||si==null||si!==uc(r)||(r=si,"selectionStart"in r&&Pp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,352 bytes, line 38
38sNode:r.focusNode,focusOffset:r.focusOffset}),$o&&sa($o,r)||($o=r,r=yc(Sh,"onSelect"),0<r.length&&(t=new Tp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=si)))}function ll(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ii={animationend:ll("Animation","AnimationEnd"),animationiteration:ll("Animation","AnimationIteration"),animationstart:ll("Animation","AnimationStart"),transitionend:ll("Transition","TransitionEnd")},ad={},Fx={};Wn&&(Fx=document.createElement("div").style,"AnimationEvent"in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),"TransitionEvent"in window||delete ii.transitionend.transition);function au(e){if(ad[e])return ad[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fx)return ad[e]=t[n];return e}var Bx=au("animationend"),zx=au("animationiteration"),Hx=au("animationstart"),Wx=au("transitionend"),qx=new Map,Ug="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Hr(e,t){qx.set(e,t),Os(t,[e])}for(var ld=0;ld<Ug.length;ld++){var cd=Ug[ld],Xk=cd.toLowerCase(),Zk=cd[0].toUpperCase()+cd.slice(1);Hr(Xk,"on"+Zk)}Hr(Bx,"onAnimationEnd");Hr(zx,"onAnimationIteration");Hr(Hx,"onAnimationStart");Hr("dblclick","onDoubleClick");Hr("focusin","onFocus");Hr("focusout","onBlur");Hr(Wx,"onTransitionEnd");Di("onMouseEnter",["mouseout","mouseover"]);Di("onMouseLeave",["mouseout","mouseover"]);Di("onPointerEnter",["pointerout","pointerover"]);Di("onPointerLeave",["pointerout","pointerover"]);Os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Os("onBeforeInput",["compositionend","keypress","textInput","paste"]);Os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ro="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(" "),eC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ro));function Vg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,XT(r,t,void 0,e),e.currentTarget=null}function Kx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Vg(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Vg(s,a,c),i=l}}}if(hc)throw e=wh,hc=!1,wh=null,e}function me(e,t){var n=t[Ah];n===void 0&&(n=t[Ah]=new Set);var r=e+"__bubble";n.has(r)||(Gx(t,e,2,!1),n.add(r))}function ud(e,t,n){var r=0;t&&(r|=4),Gx(n,e,r,t)}var cl="_reactListening"+Math.random().toString(36).slice(2);function ia(e){if(!e[cl]){e[cl]=!0,tx.forEach(function(n){n!=="selectionchange"&&(eC.has(n)||ud(n,!1,e),ud(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cl]||(t[cl]=!0,ud("selectionchange",!1,t))}}function Gx(e,t,n,r){switch(Ox(t)){case 1:var s=pk;break;case 4:s=mk;break;default:s=Sp}n=s.bind(null,t,n,e),s=void 0,!vh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}
vendor: 2,676 bytes, line 38
38function dd(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=ls(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}yx(function(){var c=i,u=wp(n),d=[];e:{var h=qx.get(e);if(h!==void 0){var f=Tp,y=e;switch(e){case"keypress":if(Vl(n)===0)break e;case"keydown":case"keyup":f=Rk;break;case"focusin":y="focus",f=sd;break;case"focusout":y="blur",f=sd;break;case"beforeblur":case"afterblur":f=sd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Pg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=vk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Nk;break;case Bx:case zx:case Hx:f=bk;break;case Wx:f=Ik;break;case"scroll":f=gk;break;case"wheel":f=Mk;break;case"copy":case"cut":case"paste":f=Sk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Rg}var g=(t&4)!==0,x=!g&&e==="scroll",v=g?h!==null?h+"Capture":null:h;g=[];for(var m=c,w;m!==null;){w=m;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,v!==null&&(_=Zo(m,v),_!=null&&g.push(oa(m,_,w)))),x)break;m=m.return}0<g.length&&(h=new f(h,y,null,n,u),d.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",h&&n!==gh&&(y=n.relatedTarget||n.fromElement)&&(ls(y)||y[qn]))break e;if((f||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,f?(y=n.relatedTarget||n.toElement,f=c,y=y?ls(y):null,y!==null&&(x=js(y),y!==x||y.tag!==5&&y.tag!==6)&&(y=null)):(f=null,y=c),f!==y)){if(g=Pg,_="onMouseLeave",v="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(g=Rg,_="onPointerLeave",v="onPointerEnter",m="pointer"),x=f==null?h:oi(f),w=y==null?h:oi(y),h=new g(_,m+"leave",f,n,u),h.target=x,h.relatedTarget=w,_=null,ls(u)===c&&(g=new g(v,m+"enter",y,n,u),g.target=w,g.relatedTarget=x,_=g),x=_,f&&y)t:{for(g=f,v=y,m=0,w=g;w;w=Fs(w))m++;for(w=0,_=v;_;_=Fs(_))w++;for(;0<m-w;)g=Fs(g),m--;for(;0<w-m;)v=Fs(v),w--;for(;m--;){if(g===v||v!==null&&g===v.alternate)break t;g=Fs(g),v=Fs(v)}g=null}else g=null;f!==null&&Fg(d,h,f,g,!1),y!==null&&x!==null&&Fg(d,x,y,g,!0)}}
vendor: 5,681 bytes, lines 38-39
38e:{if(h=c?oi(c):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var S=Hk;else if(Ng(h))if(Mx)S=Gk;else{S=qk;var T=Wk}else(f=h.nodeName)&&f.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(S=Kk);if(S&&(S=S(e,c))){Dx(d,S,n,u);break e}T&&T(e,h,c),e==="focusout"&&(T=h._wrapperState)&&T.controlled&&h.type==="number"&&dh(h,"number",h.value)}switch(T=c?oi(c):window,e){case"focusin":(Ng(T)||T.contentEditable==="true")&&(si=T,Sh=c,$o=null);break;case"focusout":$o=Sh=si=null;break;case"mousedown":Eh=!0;break;case"contextmenu":case"mouseup":case"dragend":Eh=!1,$g(d,n,u);break;case"selectionchange":if(Qk)break;case"keydown":case"keyup":$g(d,n,u)}var E;if(Cp)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else ri?Lx(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(Nx&&n.locale!=="ko"&&(ri||k!=="onCompositionStart"?k==="onCompositionEnd"&&ri&&(E=jx()):(Er=u,Ep="value"in Er?Er.value:Er.textContent,ri=!0)),T=yc(c,k),0<T.length&&(k=new Ag(k,e,null,n,u),d.push({event:k,listeners:T}),E?k.data=E:(E=Ix(n),E!==null&&(k.data=E)))),(E=Uk?Vk(e,n):Fk(e,n))&&(c=yc(c,"onBeforeInput"),0<c.length&&(u=new Ag("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=E))}Kx(d,t)})}function oa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function yc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Zo(e,n),i!=null&&r.unshift(oa(e,i,s)),i=Zo(e,t),i!=null&&r.push(oa(e,i,s))),e=e.return}return r}function Fs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Fg(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Zo(n,i),l!=null&&o.unshift(oa(n,l,a))):s||(l=Zo(n,i),l!=null&&o.push(oa(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var tC=/\r\n?/g,nC=/\u0000|\uFFFD/g;function Bg(e){return(typeof e=="string"?e:""+e).replace(tC,` 39`).replace(nC,"")}function ul(e,t,n){if(t=Bg(t),Bg(e)!==t&&n)throw Error(L(425))}function vc(){}var Th=null,kh=null;function Ch(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ph=typeof setTimeout=="function"?setTimeout:void 0,rC=typeof clearTimeout=="function"?clearTimeout:void 0,zg=typeof Promise=="function"?Promise:void 0,sC=typeof queueMicrotask=="function"?queueMicrotask:typeof zg<"u"?function(e){return zg.resolve(null).then(e).catch(iC)}:Ph;function iC(e){setTimeout(function(){throw e})}function hd(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),na(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);na(t)}function Or(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Hg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Xi=Math.random().toString(36).slice(2),Tn="__reactFiber$"+Xi,aa="__reactProps$"+Xi,qn="__reactContainer$"+Xi,Ah="__reactEvents$"+Xi,oC="__reactListeners$"+Xi,aC="__reactHandles$"+Xi;function ls(e){var t=e[Tn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qn]||n[Tn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hg(e);e!==null;){if(n=e[Tn])return n;e=Hg(e)}return t}e=n,n=e.parentNode}return null}function Ua(e){return e=e[Tn]||e[qn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function oi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function lu(e){return e[aa]||null}var Rh=[],ai=-1;function Wr(e){return{current:e}}function ye(e){0>ai||(e.current=Rh[ai],Rh[ai]=null,ai--)}function fe(e,t){ai++,Rh[ai]=e.current,e.current=t}var $r={},rt=Wr($r),gt=Wr(!1),Ts=$r;function Mi(e,t){var n=e.type.contextTypes;if(!n)return $r;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function yt(e){return e=e.childContextTypes,e!=null}function wc(){ye(gt),ye(rt)}function Wg(e,t,n){if(rt.current!==$r)throw Error(L(168));fe(rt,t),fe(gt,n)}function Jx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(L(108,WT(e)||"Unknown",s));return Te({},n,r)}function xc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$r,Ts=rt.current,fe(rt,e),fe(gt,gt.current),!0}function qg(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=Jx(e,t,Ts),r.__reactInternalMemoizedMergedChildContext=e,ye(gt),ye(rt),fe(rt,e)):ye(gt),fe(gt,n)}var Un=null,cu=!1,fd=!1;function Yx(e){Un===null?Un=[e]:Un.push(e)}function lC(e){cu=!0,Yx(e)}function qr(){if(!fd&&Un!==null){fd=!0;var e=0,t=le;try{var n=Un;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Un=null,cu=!1}catch(s){throw Un!==null&&(Un=Un.slice(e+1)),bx(xp,qr),s}finally{le=t,fd=!1}}return null}var li=[],ci=0,bc=null,_c=0,Dt=[],Mt=0,ks=null,Bn=1,zn="";function ns(e,t){li[ci++]=_c,li[ci++]=bc,bc=e,_c=t}
vendor: 12,391 bytes, line 39
39function Qx(e,t,n){Dt[Mt++]=Bn,Dt[Mt++]=zn,Dt[Mt++]=ks,ks=e;var r=Bn;e=zn;var s=32-an(r)-1;r&=~(1<<s),n+=1;var i=32-an(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Bn=1<<32-an(t)+s|n<<s|r,zn=i+e}else Bn=1<<i|n<<s|r,zn=e}function Ap(e){e.return!==null&&(ns(e,1),Qx(e,1,0))}function Rp(e){for(;e===bc;)bc=li[--ci],li[ci]=null,_c=li[--ci],li[ci]=null;for(;e===ks;)ks=Dt[--Mt],Dt[Mt]=null,zn=Dt[--Mt],Dt[Mt]=null,Bn=Dt[--Mt],Dt[Mt]=null}var Ct=null,kt=null,xe=!1,sn=null;function Xx(e,t){var n=$t(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Kg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ct=e,kt=Or(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ct=e,kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ks!==null?{id:Bn,overflow:zn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=$t(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ct=e,kt=null,!0):!1;default:return!1}}function Oh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function jh(e){if(xe){var t=kt;if(t){var n=t;if(!Kg(e,t)){if(Oh(e))throw Error(L(418));t=Or(n.nextSibling);var r=Ct;t&&Kg(e,t)?Xx(r,n):(e.flags=e.flags&-4097|2,xe=!1,Ct=e)}}else{if(Oh(e))throw Error(L(418));e.flags=e.flags&-4097|2,xe=!1,Ct=e}}}function Gg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ct=e}function dl(e){if(e!==Ct)return!1;if(!xe)return Gg(e),xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ch(e.type,e.memoizedProps)),t&&(t=kt)){if(Oh(e))throw Zx(),Error(L(418));for(;t;)Xx(e,t),t=Or(t.nextSibling)}if(Gg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){kt=Or(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}kt=null}}else kt=Ct?Or(e.stateNode.nextSibling):null;return!0}function Zx(){for(var e=kt;e;)e=Or(e.nextSibling)}function $i(){kt=Ct=null,xe=!1}function Op(e){sn===null?sn=[e]:sn.push(e)}var cC=Zn.ReactCurrentBatchConfig;function yo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function hl(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Jg(e){var t=e._init;return t(e._payload)}function eb(e){function t(v,m){if(e){var w=v.deletions;w===null?(v.deletions=[m],v.flags|=16):w.push(m)}}function n(v,m){if(!e)return null;for(;m!==null;)t(v,m),m=m.sibling;return null}function r(v,m){for(v=new Map;m!==null;)m.key!==null?v.set(m.key,m):v.set(m.index,m),m=m.sibling;return v}function s(v,m){return v=Ir(v,m),v.index=0,v.sibling=null,v}function i(v,m,w){return v.index=w,e?(w=v.alternate,w!==null?(w=w.index,w<m?(v.flags|=2,m):w):(v.flags|=2,m)):(v.flags|=1048576,m)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,m,w,_){return m===null||m.tag!==6?(m=xd(w,v.mode,_),m.return=v,m):(m=s(m,w),m.return=v,m)}function l(v,m,w,_){var S=w.type;return S===ni?u(v,m,w.props.children,_,w.key):m!==null&&(m.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===fr&&Jg(S)===m.type)?(_=s(m,w.props),_.ref=yo(v,m,w),_.return=v,_):(_=Kl(w.type,w.key,w.props,null,v.mode,_),_.ref=yo(v,m,w),_.return=v,_)}function c(v,m,w,_){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=bd(w,v.mode,_),m.return=v,m):(m=s(m,w.children||[]),m.return=v,m)}function u(v,m,w,_,S){return m===null||m.tag!==7?(m=_s(w,v.mode,_,S),m.return=v,m):(m=s(m,w),m.return=v,m)}function d(v,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=xd(""+m,v.mode,w),m.return=v,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case tl:return w=Kl(m.type,m.key,m.props,null,v.mode,w),w.ref=yo(v,null,m),w.return=v,w;case ti:return m=bd(m,v.mode,w),m.return=v,m;case fr:var _=m._init;return d(v,_(m._payload),w)}if(Po(m)||ho(m))return m=_s(m,v.mode,w,null),m.return=v,m;hl(v,m)}return null}function h(v,m,w,_){var S=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(v,m,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case tl:return w.key===S?l(v,m,w,_):null;case ti:return w.key===S?c(v,m,w,_):null;case fr:return S=w._init,h(v,m,S(w._payload),_)}if(Po(w)||ho(w))return S!==null?null:u(v,m,w,_,null);hl(v,w)}return null}function f(v,m,w,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return v=v.get(w)||null,a(m,v,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case tl:return v=v.get(_.key===null?w:_.key)||null,l(m,v,_,S);case ti:return v=v.get(_.key===null?w:_.key)||null,c(m,v,_,S);case fr:var T=_._init;return f(v,m,w,T(_._payload),S)}if(Po(_)||ho(_))return v=v.get(w)||null,u(m,v,_,S,null);hl(m,_)}return null}function y(v,m,w,_){for(var S=null,T=null,E=m,k=m=0,P=null;E!==null&&k<w.length;k++){E.index>k?(P=E,E=null):P=E.sibling;var C=h(v,E,w[k],_);if(C===null){E===null&&(E=P);break}e&&E&&C.alternate===null&&t(v,E),m=i(C,m,k),T===null?S=C:T.sibling=C,T=C,E=P}if(k===w.length)return n(v,E),xe&&ns(v,k),S;if(E===null){for(;k<w.length;k++)E=d(v,w[k],_),E!==null&&(m=i(E,m,k),T===null?S=E:T.sibling=E,T=E);return xe&&ns(v,k),S}for(E=r(v,E);k<w.length;k++)P=f(E,v,k,w[k],_),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?k:P.key),m=i(P,m,k),T===null?S=P:T.sibling=P,T=P);return e&&E.forEach(function(I){return t(v,I)}),xe&&ns(v,k),S}function g(v,m,w,_){var S=ho(w);if(typeof S!="function")throw Error(L(150));if(w=S.call(w),w==null)throw Error(L(151));for(var T=S=null,E=m,k=m=0,P=null,C=w.next();E!==null&&!C.done;k++,C=w.next()){E.index>k?(P=E,E=null):P=E.sibling;var I=h(v,E,C.value,_);if(I===null){E===null&&(E=P);break}e&&E&&I.alternate===null&&t(v,E),m=i(I,m,k),T===null?S=I:T.sibling=I,T=I,E=P}if(C.done)return n(v,E),xe&&ns(v,k),S;if(E===null){for(;!C.done;k++,C=w.next())C=d(v,C.value,_),C!==null&&(m=i(C,m,k),T===null?S=C:T.sibling=C,T=C);return xe&&ns(v,k),S}for(E=r(v,E);!C.done;k++,C=w.next())C=f(E,v,k,C.value,_),C!==null&&(e&&C.alternate!==null&&E.delete(C.key===null?k:C.key),m=i(C,m,k),T===null?S=C:T.sibling=C,T=C);return e&&E.forEach(function(N){return t(v,N)}),xe&&ns(v,k),S}function x(v,m,w,_){if(typeof w=="object"&&w!==null&&w.type===ni&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case tl:e:{for(var S=w.key,T=m;T!==null;){if(T.key===S){if(S=w.type,S===ni){if(T.tag===7){n(v,T.sibling),m=s(T,w.props.children),m.return=v,v=m;break e}}else if(T.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===fr&&Jg(S)===T.type){n(v,T.sibling),m=s(T,w.props),m.ref=yo(v,T,w),m.return=v,v=m;break e}n(v,T);break}else t(v,T);T=T.sibling}w.type===ni?(m=_s(w.props.children,v.mode,_,w.key),m.return=v,v=m):(_=Kl(w.type,w.key,w.props,null,v.mode,_),_.ref=yo(v,m,w),_.return=v,v=_)}return o(v);case ti:e:{for(T=w.key;m!==null;){if(m.key===T)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){n(v,m.sibling),m=s(m,w.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=bd(w,v.mode,_),m.return=v,v=m}return o(v);case fr:return T=w._init,x(v,m,T(w._payload),_)}if(Po(w))return y(v,m,w,_);if(ho(w))return g(v,m,w,_);hl(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(v,m.sibling),m=s(m,w),m.return=v,v=m):(n(v,m),m=xd(w,v.mode,_),m.return=v,v=m),o(v)):n(v,m)}return x}var Ui=eb(!0),tb=eb(!1),Sc=Wr(null),Ec=null,ui=null,jp=null;function Np(){jp=ui=Ec=null}function Lp(e){var t=Sc.current;ye(Sc),e._currentValue=t}function Nh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function bi(e,t){Ec=e,jp=ui=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(mt=!0),e.firstContext=null)}function Bt(e){var t=e._currentValue;if(jp!==e)if(e={context:e,memoizedValue:t,next:null},ui===null){if(Ec===null)throw Error(L(308));ui=e,Ec.dependencies={lanes:0,firstContext:e}}else ui=ui.next=e;return t}var cs=null;function Ip(e){cs===null?cs=[e]:cs.push(e)}function nb(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ip(t)):(n.next=s.next,s.next=n),t.interleaved=n,Kn(e,r)}function Kn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var pr=!1;function Dp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rb(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Hn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,re&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Kn(e,n)}return s=r.interleaved,s===null?(t.next=t,Ip(r)):(t.next=s.next,s.next=t),r.interleaved=t,Kn(e,n)}function Fl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bp(e,n)}}function Yg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Tc(e,t,n,r){var s=e.updateQueue;pr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,u=c=l=null,a=i;do{var h=a.lane,f=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,g=a;switch(h=t,f=n,g.tag){case 1:if(y=g.payload,typeof y=="function"){d=y.call(f,d,h);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,h=typeof y=="function"?y.call(f,d,h):y,h==null)break e;d=Te({},d,h);break e;case 2:pr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ps|=o,e.lanes=o,e.memoizedState=d}}function Qg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(L(191,s));s.call(r)}}}var Va={},Pn=Wr(Va),la=Wr(Va),ca=Wr(Va);function us(e){if(e===Va)throw Error(L(174));return e}function Mp(e,t){switch(fe(ca,t),fe(la,e),fe(Pn,Va),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fh(t,e)}ye(Pn),fe(Pn,t)}function Vi(){ye(Pn),ye(la),ye(ca)}
vendor: 5,850 bytes, line 39
39function sb(e){us(ca.current);var t=us(Pn.current),n=fh(t,e.type);t!==n&&(fe(la,e),fe(Pn,n))}function $p(e){la.current===e&&(ye(Pn),ye(la))}var Se=Wr(0);function kc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pd=[];function Up(){for(var e=0;e<pd.length;e++)pd[e]._workInProgressVersionPrimary=null;pd.length=0}var Bl=Zn.ReactCurrentDispatcher,md=Zn.ReactCurrentBatchConfig,Cs=0,Ee=null,$e=null,Be=null,Cc=!1,Uo=!1,ua=0,uC=0;function Ze(){throw Error(L(321))}function Vp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!un(e[n],t[n]))return!1;return!0}function Fp(e,t,n,r,s,i){if(Cs=i,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bl.current=e===null||e.memoizedState===null?pC:mC,e=n(r,s),Uo){i=0;do{if(Uo=!1,ua=0,25<=i)throw Error(L(301));i+=1,Be=$e=null,t.updateQueue=null,Bl.current=gC,e=n(r,s)}while(Uo)}if(Bl.current=Pc,t=$e!==null&&$e.next!==null,Cs=0,Be=$e=Ee=null,Cc=!1,t)throw Error(L(300));return e}function Bp(){var e=ua!==0;return ua=0,e}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Ee.memoizedState=Be=e:Be=Be.next=e,Be}function zt(){if($e===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=Be===null?Ee.memoizedState:Be.next;if(t!==null)Be=t,$e=e;else{if(e===null)throw Error(L(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Be===null?Ee.memoizedState=Be=e:Be=Be.next=e}return Be}function da(e,t){return typeof t=="function"?t(e):t}function gd(e){var t=zt(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=$e,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((Cs&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Ee.lanes|=u,Ps|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,un(r,t.memoizedState)||(mt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Ee.lanes|=i,Ps|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function yd(e){var t=zt(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);un(i,t.memoizedState)||(mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ib(){}function ob(e,t){var n=Ee,r=zt(),s=t(),i=!un(r.memoizedState,s);if(i&&(r.memoizedState=s,mt=!0),r=r.queue,zp(cb.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Be!==null&&Be.memoizedState.tag&1){if(n.flags|=2048,ha(9,lb.bind(null,n,r,s,t),void 0,null),ze===null)throw Error(L(349));Cs&30||ab(n,t,s)}return s}function ab(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lb(e,t,n,r){t.value=n,t.getSnapshot=r,ub(t)&&db(e)}function cb(e,t,n){return n(function(){ub(t)&&db(e)})}function ub(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!un(e,n)}catch{return!0}}function db(e){var t=Kn(e,1);t!==null&&ln(t,e,1,-1)}function Xg(e){var t=gn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:e},t.queue=e,e=e.dispatch=fC.bind(null,Ee,e),[t.memoizedState,e]}function ha(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function hb(){return zt().memoizedState}function zl(e,t,n,r){var s=gn();Ee.flags|=e,s.memoizedState=ha(1|t,n,void 0,r===void 0?null:r)}function uu(e,t,n,r){var s=zt();r=r===void 0?null:r;var i=void 0;if($e!==null){var o=$e.memoizedState;if(i=o.destroy,r!==null&&Vp(r,o.deps)){s.memoizedState=ha(t,n,i,r);return}}Ee.flags|=e,s.memoizedState=ha(1|t,n,i,r)}function Zg(e,t){return zl(8390656,8,e,t)}function zp(e,t){return uu(2048,8,e,t)}function fb(e,t){return uu(4,2,e,t)}function pb(e,t){return uu(4,4,e,t)}function mb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gb(e,t,n){return n=n!=null?n.concat([e]):null,uu(4,4,mb.bind(null,t,e),n)}function Hp(){}function yb(e,t){var n=zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vb(e,t){var n=zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wb(e,t,n){return Cs&21?(un(n,t)||(n=Ex(),Ee.lanes|=n,Ps|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,mt=!0),e.memoizedState=n)}function dC(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=md.transition;md.transition={};try{e(!1),t()}finally{le=n,md.transition=r}}function xb(){return zt().memoizedState}function hC(e,t,n){var r=Lr(e);
vendor: 7,404 bytes, lines 39-41
39if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bb(e))_b(t,n);else if(n=nb(e,t,n,r),n!==null){var s=ct();ln(n,e,r,s),Sb(n,t,r)}}function fC(e,t,n){var r=Lr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bb(e))_b(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,un(a,o)){var l=t.interleaved;l===null?(s.next=s,Ip(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=nb(e,t,s,r),n!==null&&(s=ct(),ln(n,e,r,s),Sb(n,t,r))}}function bb(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function _b(e,t){Uo=Cc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bp(e,n)}}var Pc={readContext:Bt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},pC={readContext:Bt,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:Bt,useEffect:Zg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zl(4194308,4,mb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zl(4194308,4,e,t)},useInsertionEffect:function(e,t){return zl(4,2,e,t)},useMemo:function(e,t){var n=gn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=hC.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:Xg,useDebugValue:Hp,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=Xg(!1),t=e[0];return e=dC.bind(null,e[1]),gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ee,s=gn();if(xe){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),ze===null)throw Error(L(349));Cs&30||ab(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Zg(cb.bind(null,r,i,e),[e]),r.flags|=2048,ha(9,lb.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gn(),t=ze.identifierPrefix;if(xe){var n=zn,r=Bn;n=(r&~(1<<32-an(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ua++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=uC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mC={readContext:Bt,useCallback:yb,useContext:Bt,useEffect:zp,useImperativeHandle:gb,useInsertionEffect:fb,useLayoutEffect:pb,useMemo:vb,useReducer:gd,useRef:hb,useState:function(){return gd(da)},useDebugValue:Hp,useDeferredValue:function(e){var t=zt();return wb(t,$e.memoizedState,e)},useTransition:function(){var e=gd(da)[0],t=zt().memoizedState;return[e,t]},useMutableSource:ib,useSyncExternalStore:ob,useId:xb,unstable_isNewReconciler:!1},gC={readContext:Bt,useCallback:yb,useContext:Bt,useEffect:zp,useImperativeHandle:gb,useInsertionEffect:fb,useLayoutEffect:pb,useMemo:vb,useReducer:yd,useRef:hb,useState:function(){return yd(da)},useDebugValue:Hp,useDeferredValue:function(e){var t=zt();return $e===null?t.memoizedState=e:wb(t,$e.memoizedState,e)},useTransition:function(){var e=yd(da)[0],t=zt().memoizedState;return[e,t]},useMutableSource:ib,useSyncExternalStore:ob,useId:xb,unstable_isNewReconciler:!1};function Xt(e,t){if(e&&e.defaultProps){t=Te({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Lh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var du={isMounted:function(e){return(e=e._reactInternals)?js(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ct(),s=Lr(e),i=Hn(r,s);i.payload=t,n!=null&&(i.callback=n),t=jr(e,i,s),t!==null&&(ln(t,e,s,r),Fl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ct(),s=Lr(e),i=Hn(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=jr(e,i,s),t!==null&&(ln(t,e,s,r),Fl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ct(),r=Lr(e),s=Hn(n,r);s.tag=2,t!=null&&(s.callback=t),t=jr(e,s,r),t!==null&&(ln(t,e,r,n),Fl(t,e,r))}};function ey(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!sa(n,r)||!sa(s,i):!0}function Eb(e,t,n){var r=!1,s=$r,i=t.contextType;return typeof i=="object"&&i!==null?i=Bt(i):(s=yt(t)?Ts:rt.current,r=t.contextTypes,i=(r=r!=null)?Mi(e,s):$r),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=du,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function ty(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&du.enqueueReplaceState(t,t.state,null)}function Ih(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Dp(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Bt(i):(i=yt(t)?Ts:rt.current,s.context=Mi(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Lh(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&du.enqueueReplaceState(s,s.state,null),Tc(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Fi(e,t){try{var n="",r=t;do n+=HT(r),r=r.return;while(r);var s=n}catch(i){s=` 40Error generating stack: `+i.message+` 41`+i.stack}return{value:e,source:t,stack:s,digest:null}}function vd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Dh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var yC=typeof WeakMap=="function"?WeakMap:Map;function Tb(e,t,n){n=Hn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rc||(Rc=!0,qh=r),Dh(e,t)},n}function kb(e,t,n){n=Hn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Dh(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Dh(e,t),typeof r!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function ny(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new yC;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=OC.bind(null,e,t,n),t.then(e,e))}function ry(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}
vendor: 10,061 bytes, line 41
41function sy(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Hn(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var vC=Zn.ReactCurrentOwner,mt=!1;function it(e,t,n,r){t.child=e===null?tb(t,null,n,r):Ui(t,e.child,n,r)}function iy(e,t,n,r,s){n=n.render;var i=t.ref;return bi(t,s),r=Fp(e,t,n,r,i,s),n=Bp(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Gn(e,t,s)):(xe&&n&&Ap(t),t.flags|=1,it(e,t,r,s),t.child)}function oy(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Xp(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Cb(e,t,i,r,s)):(e=Kl(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:sa,n(o,r)&&e.ref===t.ref)return Gn(e,t,s)}return t.flags|=1,e=Ir(i,r),e.ref=t.ref,e.return=t,t.child=e}function Cb(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(sa(i,r)&&e.ref===t.ref)if(mt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(mt=!0);else return t.lanes=e.lanes,Gn(e,t,s)}return Mh(e,t,n,r,s)}function Pb(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},fe(hi,_t),_t|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,fe(hi,_t),_t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,fe(hi,_t),_t|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,fe(hi,_t),_t|=r;return it(e,t,s,n),t.child}function Ab(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mh(e,t,n,r,s){var i=yt(n)?Ts:rt.current;return i=Mi(t,i),bi(t,s),n=Fp(e,t,n,r,i,s),r=Bp(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Gn(e,t,s)):(xe&&r&&Ap(t),t.flags|=1,it(e,t,n,s),t.child)}function ay(e,t,n,r,s){if(yt(n)){var i=!0;xc(t)}else i=!1;if(bi(t,s),t.stateNode===null)Hl(e,t),Eb(t,n,r),Ih(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Bt(c):(c=yt(n)?Ts:rt.current,c=Mi(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&ty(t,o,r,c),pr=!1;var h=t.memoizedState;o.state=h,Tc(t,r,o,s),l=t.memoizedState,a!==r||h!==l||gt.current||pr?(typeof u=="function"&&(Lh(t,n,u,r),l=t.memoizedState),(a=pr||ey(t,n,a,r,h,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,rb(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Xt(t.type,a),o.props=c,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Bt(l):(l=yt(n)?Ts:rt.current,l=Mi(t,l));var f=n.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&ty(t,o,r,l),pr=!1,h=t.memoizedState,o.state=h,Tc(t,r,o,s);var y=t.memoizedState;a!==d||h!==y||gt.current||pr?(typeof f=="function"&&(Lh(t,n,f,r),y=t.memoizedState),(c=pr||ey(t,n,c,r,h,y,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return $h(e,t,n,r,i,s)}function $h(e,t,n,r,s,i){Ab(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&qg(t,n,!1),Gn(e,t,i);r=t.stateNode,vC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ui(t,e.child,null,i),t.child=Ui(t,null,a,i)):it(e,t,a,i),t.memoizedState=r.state,s&&qg(t,n,!0),t.child}function Rb(e){var t=e.stateNode;t.pendingContext?Wg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Wg(e,t.context,!1),Mp(e,t.containerInfo)}function ly(e,t,n,r,s){return $i(),Op(s),t.flags|=256,it(e,t,n,r),t.child}var Uh={dehydrated:null,treeContext:null,retryLane:0};function Vh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ob(e,t,n){var r=t.pendingProps,s=Se.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),fe(Se,s&1),e===null)return jh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=pu(o,r,0,null),e=_s(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Vh(n),t.memoizedState=Uh,e):Wp(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return wC(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Ir(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Ir(a,i):(i=_s(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Vh(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Uh,r}return i=e.child,e=i.sibling,r=Ir(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Wp(e,t){return t=pu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fl(e,t,n,r){return r!==null&&Op(r),Ui(t,e.child,null,n),e=Wp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wC(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=vd(Error(L(422))),fl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=pu({mode:"visible",children:r.children},s,0,null),i=_s(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Ui(t,e.child,null,o),t.child.memoizedState=Vh(o),t.memoizedState=Uh,i);if(!(t.mode&1))return fl(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(L(419)),r=vd(i,r,void 0),fl(e,t,o,r)}if(a=(o&e.childLanes)!==0,mt||a){if(r=ze,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Kn(e,s),ln(r,e,s,-1))}return Qp(),r=vd(Error(L(421))),fl(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=jC.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,kt=Or(s.nextSibling),Ct=t,xe=!0,sn=null,e!==null&&(Dt[Mt++]=Bn,Dt[Mt++]=zn,Dt[Mt++]=ks,Bn=e.id,zn=e.overflow,ks=t),t=Wp(t,r.children),t.flags|=4096,t)}function cy(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Nh(e.return,t,n)}function wd(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function jb(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(it(e,t,r.children,n),r=Se.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cy(e,n,t);else if(e.tag===19)cy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fe(Se,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&kc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),wd(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&kc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}wd(t,!0,n,null,i);break;case"together":wd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ps|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));
vendor: 4,746 bytes, line 41
41if(t.child!==null){for(e=t.child,n=Ir(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ir(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xC(e,t,n){switch(t.tag){case 3:Rb(t),$i();break;case 5:sb(t);break;case 1:yt(t.type)&&xc(t);break;case 4:Mp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;fe(Sc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(fe(Se,Se.current&1),t.flags|=128,null):n&t.child.childLanes?Ob(e,t,n):(fe(Se,Se.current&1),e=Gn(e,t,n),e!==null?e.sibling:null);fe(Se,Se.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jb(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),fe(Se,Se.current),r)break;return null;case 22:case 23:return t.lanes=0,Pb(e,t,n)}return Gn(e,t,n)}var Nb,Fh,Lb,Ib;Nb=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Fh=function(){};Lb=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,us(Pn.current);var i=null;switch(n){case"input":s=ch(e,s),r=ch(e,r),i=[];break;case"select":s=Te({},s,{value:void 0}),r=Te({},r,{value:void 0}),i=[];break;case"textarea":s=hh(e,s),r=hh(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=vc)}ph(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Qo.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Qo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&me("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Ib=function(e,t,n,r){n!==r&&(t.flags|=4)};function vo(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function bC(e,t,n){var r=t.pendingProps;switch(Rp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return yt(t.type)&&wc(),et(t),null;case 3:return r=t.stateNode,Vi(),ye(gt),ye(rt),Up(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(dl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,sn!==null&&(Jh(sn),sn=null))),Fh(e,t),et(t),null;case 5:$p(t);var s=us(ca.current);if(n=t.type,e!==null&&t.stateNode!=null)Lb(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return et(t),null}if(e=us(Pn.current),dl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Tn]=t,r[aa]=i,e=(t.mode&1)!==0,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(s=0;s<Ro.length;s++)me(Ro[s],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":vg(r,i),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},me("invalid",r);break;case"textarea":xg(r,i),me("invalid",r)}ph(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 28,896 bytes, line 41
41o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&ul(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ul(r.textContent,a,e),s=["children",""+a]):Qo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&me("scroll",r)}switch(n){case"input":nl(r),wg(r,i,!0);break;case"textarea":nl(r),bg(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=vc)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=cx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Tn]=t,e[aa]=r,Nb(e,t,!1,!1),t.stateNode=e;e:{switch(o=mh(n,r),n){case"dialog":me("cancel",e),me("close",e),s=r;break;case"iframe":case"object":case"embed":me("load",e),s=r;break;case"video":case"audio":for(s=0;s<Ro.length;s++)me(Ro[s],e);s=r;break;case"source":me("error",e),s=r;break;case"img":case"image":case"link":me("error",e),me("load",e),s=r;break;case"details":me("toggle",e),s=r;break;case"input":vg(e,r),s=ch(e,r),me("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Te({},r,{value:void 0}),me("invalid",e);break;case"textarea":xg(e,r),s=hh(e,r),me("invalid",e);break;default:s=r}ph(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?hx(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ux(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Xo(e,l):typeof l=="number"&&Xo(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Qo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&me("scroll",e):l!=null&&mp(e,i,l,o))}switch(n){case"input":nl(e),wg(e,r,!1);break;case"textarea":nl(e),bg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Mr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?yi(e,!!r.multiple,i,!1):r.defaultValue!=null&&yi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=vc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return et(t),null;case 6:if(e&&t.stateNode!=null)Ib(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=us(ca.current),us(Pn.current),dl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tn]=t,(i=r.nodeValue!==n)&&(e=Ct,e!==null))switch(e.tag){case 3:ul(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ul(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Tn]=t,t.stateNode=r}return et(t),null;case 13:if(ye(Se),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(xe&&kt!==null&&t.mode&1&&!(t.flags&128))Zx(),$i(),t.flags|=98560,i=!1;else if(i=dl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(L(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[Tn]=t}else $i(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),i=!1}else sn!==null&&(Jh(sn),sn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Se.current&1?Ve===0&&(Ve=3):Qp())),t.updateQueue!==null&&(t.flags|=4),et(t),null);case 4:return Vi(),Fh(e,t),e===null&&ia(t.stateNode.containerInfo),et(t),null;case 10:return Lp(t.type._context),et(t),null;case 17:return yt(t.type)&&wc(),et(t),null;case 19:if(ye(Se),i=t.memoizedState,i===null)return et(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)vo(i,!1);else{if(Ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=kc(e),o!==null){for(t.flags|=128,vo(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fe(Se,Se.current&1|2),t.child}e=e.sibling}i.tail!==null&&Oe()>Bi&&(t.flags|=128,r=!0,vo(i,!1),t.lanes=4194304)}else{if(!r)if(e=kc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!xe)return et(t),null}else 2*Oe()-i.renderingStartTime>Bi&&n!==1073741824&&(t.flags|=128,r=!0,vo(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Oe(),t.sibling=null,n=Se.current,fe(Se,r?n&1|2:n&1),t):(et(t),null);case 22:case 23:return Yp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_t&1073741824&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function _C(e,t){switch(Rp(t),t.tag){case 1:return yt(t.type)&&wc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi(),ye(gt),ye(rt),Up(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return $p(t),null;case 13:if(ye(Se),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(Se),null;case 4:return Vi(),null;case 10:return Lp(t.type._context),null;case 22:case 23:return Yp(),null;case 24:return null;default:return null}}var pl=!1,nt=!1,SC=typeof WeakSet=="function"?WeakSet:Set,V=null;function di(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Pe(e,t,r)}else n.current=null}function Bh(e,t,n){try{n()}catch(r){Pe(e,t,r)}}var uy=!1;function EC(e,t){if(Th=mc,e=Vx(),Pp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=e,h=null;t:for(;;){for(var f;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++u===r&&(l=o),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(kh={focusedElem:e,selectionRange:n},mc=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,x=y.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Xt(t.type,g),x);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(_){Pe(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return y=uy,uy=!1,y}function Vo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Bh(t,n,i)}s=s.next}while(s!==r)}}function hu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function zh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Db(e){var t=e.alternate;t!==null&&(e.alternate=null,Db(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tn],delete t[aa],delete t[Ah],delete t[oC],delete t[aC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Mb(e){return e.tag===5||e.tag===3||e.tag===4}function dy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vc));else if(r!==4&&(e=e.child,e!==null))for(Hh(e,t,n),e=e.sibling;e!==null;)Hh(e,t,n),e=e.sibling}function Wh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wh(e,t,n),e=e.sibling;e!==null;)Wh(e,t,n),e=e.sibling}var qe=null,rn=!1;function ar(e,t,n){for(n=n.child;n!==null;)$b(e,t,n),n=n.sibling}function $b(e,t,n){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(su,n)}catch{}switch(n.tag){case 5:nt||di(n,t);case 6:var r=qe,s=rn;qe=null,ar(e,t,n),qe=r,rn=s,qe!==null&&(rn?(e=qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qe.removeChild(n.stateNode));break;case 18:qe!==null&&(rn?(e=qe,n=n.stateNode,e.nodeType===8?hd(e.parentNode,n):e.nodeType===1&&hd(e,n),na(e)):hd(qe,n.stateNode));break;case 4:r=qe,s=rn,qe=n.stateNode.containerInfo,rn=!0,ar(e,t,n),qe=r,rn=s;break;case 0:case 11:case 14:case 15:if(!nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Bh(n,t,o),s=s.next}while(s!==r)}ar(e,t,n);break;case 1:if(!nt&&(di(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Pe(n,t,a)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(nt=(r=nt)||n.memoizedState!==null,ar(e,t,n),nt=r):ar(e,t,n);break;default:ar(e,t,n)}}function hy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new SC),t.forEach(function(r){var s=NC.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Kt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:qe=a.stateNode,rn=!1;break e;case 3:qe=a.stateNode.containerInfo,rn=!0;break e;case 4:qe=a.stateNode.containerInfo,rn=!0;break e}a=a.return}if(qe===null)throw Error(L(160));$b(i,o,s),qe=null,rn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Pe(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ub(t,e),t=t.sibling}function Ub(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Kt(t,e),pn(e),r&4){try{Vo(3,e,e.return),hu(3,e)}catch(g){Pe(e,e.return,g)}try{Vo(5,e,e.return)}catch(g){Pe(e,e.return,g)}}break;case 1:Kt(t,e),pn(e),r&512&&n!==null&&di(n,n.return);break;case 5:if(Kt(t,e),pn(e),r&512&&n!==null&&di(n,n.return),e.flags&32){var s=e.stateNode;try{Xo(s,"")}catch(g){Pe(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&ax(s,i),mh(a,o);var c=mh(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?hx(s,d):u==="dangerouslySetInnerHTML"?ux(s,d):u==="children"?Xo(s,d):mp(s,u,d,c)}switch(a){case"input":uh(s,i);break;case"textarea":lx(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?yi(s,!!i.multiple,f,!1):h!==!!i.multiple&&(i.defaultValue!=null?yi(s,!!i.multiple,i.defaultValue,!0):yi(s,!!i.multiple,i.multiple?[]:"",!1))}s[aa]=i}catch(g){Pe(e,e.return,g)}}break;case 6:if(Kt(t,e),pn(e),r&4){if(e.stateNode===null)throw Error(L(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){Pe(e,e.return,g)}}break;case 3:if(Kt(t,e),pn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{na(t.containerInfo)}catch(g){Pe(e,e.return,g)}break;case 4:Kt(t,e),pn(e);break;case 13:Kt(t,e),pn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Gp=Oe())),r&4&&hy(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(nt=(c=nt)||u,Kt(t,e),nt=c):Kt(t,e),pn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(V=e,u=e.child;u!==null;){for(d=V=u;V!==null;){switch(h=V,f=h.child,h.tag){case 0:case 11:case 14:case 15:Vo(4,h,h.return);break;case 1:di(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(g){Pe(r,n,g)}}break;case 5:di(h,h.return);break;case 22:if(h.memoizedState!==null){py(d);continue}}f!==null?(f.return=h,V=f):py(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=dx("display",o))}catch(g){Pe(e,e.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Pe(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Kt(t,e),pn(e),r&4&&hy(e);break;case 21:break;default:Kt(t,e),pn(e)}}function pn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Mb(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Xo(s,""),r.flags&=-33);var i=dy(e);Wh(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=dy(e);Hh(e,a,o);break;default:throw Error(L(161))}}catch(l){Pe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function TC(e,t,n){V=e,Vb(e)}function Vb(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var s=V,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||pl;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||nt;a=pl;var c=nt;if(pl=o,(nt=l)&&!c)for(V=s;V!==null;)o=V,l=o.child,o.tag===22&&o.memoizedState!==null?my(s):l!==null?(l.return=o,V=l):my(s);for(;i!==null;)V=i,Vb(i),i=i.sibling;V=s,pl=a,nt=c}fy(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,V=i):fy(e)}}function fy(e){for(;V!==null;){var t=V;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:nt||hu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!nt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Xt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Qg(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Qg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&na(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}nt||t.flags&512&&zh(t)}catch(h){Pe(t,t.return,h)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function py(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function my(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{hu(4,t)}catch(l){Pe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Pe(t,s,l)}}var i=t.return;try{zh(t)}catch(l){Pe(t,i,l)}break;case 5:var o=t.return;try{zh(t)}catch(l){Pe(t,o,l)}}}catch(l){Pe(t,t.return,l)}if(t===e){V=null;break}var a=t.sibling;if(a!==null){a.return=t.return,V=a;break}V=t.return}}var kC=Math.ceil,Ac=Zn.ReactCurrentDispatcher,qp=Zn.ReactCurrentOwner,Vt=Zn.ReactCurrentBatchConfig,re=0,ze=null,Ie=null,Je=0,_t=0,hi=Wr(0),Ve=0,fa=null,Ps=0,fu=0,Kp=0,Fo=null,pt=null,Gp=0,Bi=1/0,Dn=null,Rc=!1,qh=null,Nr=null,ml=!1,Tr=null,Oc=0,Bo=0,Kh=null,Wl=-1,ql=0;function ct(){return re&6?Oe():Wl!==-1?Wl:Wl=Oe()}function Lr(e){return e.mode&1?re&2&&Je!==0?Je&-Je:cC.transition!==null?(ql===0&&(ql=Ex()),ql):(e=le,e!==0||(e=window.event,e=e===void 0?16:Ox(e.type)),e):1}function ln(e,t,n,r){if(50<Bo)throw Bo=0,Kh=null,Error(L(185));Ma(e,n,r),(!(re&2)||e!==ze)&&(e===ze&&(!(re&2)&&(fu|=n),Ve===4&&gr(e,Je)),vt(e,r),n===1&&re===0&&!(t.mode&1)&&(Bi=Oe()+500,cu&&qr()))}function vt(e,t){var n=e.callbackNode;ck(e,t);var r=pc(e,e===ze?Je:0);if(r===0)n!==null&&Eg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Eg(n),t===1)e.tag===0?lC(gy.bind(null,e)):Yx(gy.bind(null,e)),sC(function(){!(re&6)&&qr()}),n=null;else{switch(Tx(r)){case 1:n=xp;break;case 4:n=_x;break;case 16:n=fc;break;case 536870912:n=Sx;break;default:n=fc}n=Gb(n,Fb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fb(e,t){if(Wl=-1,ql=0,re&6)throw Error(L(327));var n=e.callbackNode;if(_i()&&e.callbackNode!==n)return null;var r=pc(e,e===ze?Je:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=jc(e,r);else{t=r;var s=re;re|=2;var i=zb();(ze!==e||Je!==t)&&(Dn=null,Bi=Oe()+500,bs(e,t));do try{AC();break}catch(a){Bb(e,a)}while(!0);Np(),Ac.current=i,re=s,Ie!==null?t=0:(ze=null,Je=0,t=Ve)}if(t!==0){if(t===2&&(s=xh(e),s!==0&&(r=s,t=Gh(e,s))),t===1)throw n=fa,bs(e,0),gr(e,r),vt(e,Oe()),n;if(t===6)gr(e,r);else{if(s=e.current.alternate,!(r&30)&&!CC(s)&&(t=jc(e,r),t===2&&(i=xh(e),i!==0&&(r=i,t=Gh(e,i))),t===1))throw n=fa,bs(e,0),gr(e,r),vt(e,Oe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:rs(e,pt,Dn);break;case 3:if(gr(e,r),(r&130023424)===r&&(t=Gp+500-Oe(),10<t)){if(pc(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){ct(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ph(rs.bind(null,e,pt,Dn),t);break}rs(e,pt,Dn);break;case 4:if(gr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-an(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=Oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kC(r/1960))-r,10<r){e.timeoutHandle=Ph(rs.bind(null,e,pt,Dn),r);break}rs(e,pt,Dn);break;case 5:rs(e,pt,Dn);break;default:throw Error(L(329))}}}return vt(e,Oe()),e.callbackNode===n?Fb.bind(null,e):null}function Gh(e,t){var n=Fo;return e.current.memoizedState.isDehydrated&&(bs(e,t).flags|=256),e=jc(e,t),e!==2&&(t=pt,pt=n,t!==null&&Jh(t)),e}function Jh(e){pt===null?pt=e:pt.push.apply(pt,e)}function CC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!un(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gr(e,t){for(t&=~Kp,t&=~fu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-an(t),r=1<<n;e[n]=-1,t&=~r}}function gy(e){if(re&6)throw Error(L(327));_i();var t=pc(e,0);if(!(t&1))return vt(e,Oe()),null;var n=jc(e,t);if(e.tag!==0&&n===2){var r=xh(e);r!==0&&(t=r,n=Gh(e,r))}if(n===1)throw n=fa,bs(e,0),gr(e,t),vt(e,Oe()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,rs(e,pt,Dn),vt(e,Oe()),null}function Jp(e,t){var n=re;re|=1;try{return e(t)}finally{re=n,re===0&&(Bi=Oe()+500,cu&&qr())}}function As(e){Tr!==null&&Tr.tag===0&&!(re&6)&&_i();var t=re;re|=1;var n=Vt.transition,r=le;try{if(Vt.transition=null,le=1,e)return e()}finally{le=r,Vt.transition=n,re=t,!(re&6)&&qr()}}function Yp(){_t=hi.current,ye(hi)}function bs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,rC(n)),Ie!==null)for(n=Ie.return;n!==null;){var r=n;switch(Rp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&wc();break;case 3:Vi(),ye(gt),ye(rt),Up();break;case 5:$p(r);break;case 4:Vi();break;case 13:ye(Se);break;case 19:ye(Se);break;case 10:Lp(r.type._context);break;case 22:case 23:Yp()}n=n.return}if(ze=e,Ie=e=Ir(e.current,null),Je=_t=t,Ve=0,fa=null,Kp=fu=Ps=0,pt=Fo=null,cs!==null){for(t=0;t<cs.length;t++)if(n=cs[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}cs=null}return e}function Bb(e,t){do{var n=Ie;try{if(Np(),Bl.current=Pc,Cc){for(var r=Ee.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Cc=!1}if(Cs=0,Be=$e=Ee=null,Uo=!1,ua=0,qp.current=null,n===null||n.return===null){Ve=1,fa=t,Ie=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Je,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=ry(o);if(f!==null){f.flags&=-257,sy(f,o,a,i,t),f.mode&1&&ny(i,c,t),t=f,l=c;var y=t.updateQueue;if(y===null){var g=new Set;g.add(l),t.updateQueue=g}else y.add(l);break e}else{if(!(t&1)){ny(i,c,t),Qp();break e}l=Error(L(426))}}else if(xe&&a.mode&1){var x=ry(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),sy(x,o,a,i,t),Op(Fi(l,a));break e}}i=l=Fi(l,a),Ve!==4&&(Ve=2),Fo===null?Fo=[i]:Fo.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=Tb(i,l,t);Yg(i,v);break e;case 1:a=l;var m=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Nr===null||!Nr.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=kb(i,a,t);Yg(i,_);break e}}i=i.return}while(i!==null)}Wb(n)}catch(S){t=S,Ie===n&&n!==null&&(Ie=n=n.return);continue}break}while(!0)}function zb(){var e=Ac.current;return Ac.current=Pc,e===null?Pc:e}function Qp(){(Ve===0||Ve===3||Ve===2)&&(Ve=4),ze===null||!(Ps&268435455)&&!(fu&268435455)||gr(ze,Je)}function jc(e,t){var n=re;re|=2;var r=zb();(ze!==e||Je!==t)&&(Dn=null,bs(e,t));do try{PC();break}catch(s){Bb(e,s)}while(!0);if(Np(),re=n,Ac.current=r,Ie!==null)throw Error(L(261));return ze=null,Je=0,Ve}function PC(){for(;Ie!==null;)Hb(Ie)}function AC(){for(;Ie!==null&&!ek();)Hb(Ie)}function Hb(e){var t=Kb(e.alternate,e,_t);e.memoizedProps=e.pendingProps,t===null?Wb(e):Ie=t,qp.current=null}function Wb(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_C(n,t),n!==null){n.flags&=32767,Ie=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ve=6,Ie=null;return}}else if(n=bC(n,t,_t),n!==null){Ie=n;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);Ve===0&&(Ve=5)}function rs(e,t,n){var r=le,s=Vt.transition;try{Vt.transition=null,le=1,RC(e,t,n,r)}finally{Vt.transition=s,le=r}return null}function RC(e,t,n,r){do _i();while(Tr!==null);if(re&6)throw Error(L(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(uk(e,i),e===ze&&(Ie=ze=null,Je=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ml||(ml=!0,Gb(fc,function(){return _i(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Vt.transition,Vt.transition=null;var o=le;le=1;var a=re;re|=4,qp.current=null,EC(e,n),Ub(n,e),Yk(kh),mc=!!Th,kh=Th=null,e.current=n,TC(n),tk(),re=a,le=o,Vt.transition=i}else e.current=n;if(ml&&(ml=!1,Tr=e,Oc=s),i=e.pendingLanes,i===0&&(Nr=null),sk(n.stateNode),vt(e,Oe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Rc)throw Rc=!1,e=qh,qh=null,e;return Oc&1&&e.tag!==0&&_i(),i=e.pendingLanes,i&1?e===Kh?Bo++:(Bo=0,Kh=e):Bo=0,qr(),null}function _i(){if(Tr!==null){var e=Tx(Oc),t=Vt.transition,n=le;try{if(Vt.transition=null,le=16>e?16:e,Tr===null)var r=!1;else{if(e=Tr,Tr=null,Oc=0,re&6)throw Error(L(331));var s=re;for(re|=4,V=e.current;V!==null;){var i=V,o=i.child;if(V.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(V=c;V!==null;){var u=V;switch(u.tag){case 0:case 11:case 15:Vo(8,u,i)}var d=u.child;if(d!==null)d.return=u,V=d;else for(;V!==null;){u=V;var h=u.sibling,f=u.return;if(Db(u),u===c){V=null;break}if(h!==null){h.return=f,V=h;break}V=f}}}var y=i.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}V=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,V=o;else e:for(;V!==null;){if(i=V,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Vo(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,V=v;break e}V=i.return}}var m=e.current;for(V=m;V!==null;){o=V;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,V=w;else e:for(o=m;V!==null;){if(a=V,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:hu(9,a)}}catch(S){Pe(a,a.return,S)}if(a===o){V=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,V=_;break e}V=a.return}}if(re=s,qr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(su,e)}catch{}r=!0}return r}finally{le=n,Vt.transition=t}}return!1}function yy(e,t,n){t=Fi(n,t),t=Tb(e,t,1),e=jr(e,t,1),t=ct(),e!==null&&(Ma(e,1,t),vt(e,t))}function Pe(e,t,n){if(e.tag===3)yy(e,e,n);else for(;t!==null;){if(t.tag===3){yy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Nr===null||!Nr.has(r))){e=Fi(n,e),e=kb(t,e,1),t=jr(t,e,1),e=ct(),t!==null&&(Ma(t,1,e),vt(t,e));break}}t=t.return}}function OC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ct(),e.pingedLanes|=e.suspendedLanes&n,ze===e&&(Je&n)===n&&(Ve===4||Ve===3&&(Je&130023424)===Je&&500>Oe()-Gp?bs(e,0):Kp|=n),vt(e,t)}function qb(e,t){t===0&&(e.mode&1?(t=il,il<<=1,!(il&130023424)&&(il=4194304)):t=1);var n=ct();e=Kn(e,t),e!==null&&(Ma(e,t,n),vt(e,n))}function jC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qb(e,n)}function NC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),qb(e,n)}var Kb;Kb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||gt.current)mt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return mt=!1,xC(e,t,n);mt=!!(e.flags&131072)}else mt=!1,xe&&t.flags&1048576&&Qx(t,_c,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hl(e,t),e=t.pendingProps;var s=Mi(t,rt.current);bi(t,n),s=Fp(null,t,r,e,s,n);var i=Bp();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yt(r)?(i=!0,xc(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Dp(t),s.updater=du,t.stateNode=s,s._reactInternals=t,Ih(t,r,e,n),t=$h(null,t,r,!0,i,n)):(t.tag=0,xe&&i&&Ap(t),it(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hl(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=IC(r),e=Xt(r,e),s){case 0:t=Mh(null,t,r,e,n);break e;case 1:t=ay(null,t,r,e,n);break e;case 11:t=iy(null,t,r,e,n);break e;case 14:t=oy(null,t,r,Xt(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xt(r,s),Mh(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xt(r,s),ay(e,t,r,s,n);case 3:e:{if(Rb(t),e===null)throw Error(L(387));
vendor: 4,107 bytes, line 41
41r=t.pendingProps,i=t.memoizedState,s=i.element,rb(e,t),Tc(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Fi(Error(L(423)),t),t=ly(e,t,r,n,s);break e}else if(r!==s){s=Fi(Error(L(424)),t),t=ly(e,t,r,n,s);break e}else for(kt=Or(t.stateNode.containerInfo.firstChild),Ct=t,xe=!0,sn=null,n=tb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($i(),r===s){t=Gn(e,t,n);break e}it(e,t,r,n)}t=t.child}return t;case 5:return sb(t),e===null&&jh(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Ch(r,s)?o=null:i!==null&&Ch(r,i)&&(t.flags|=32),Ab(e,t),it(e,t,o,n),t.child;case 6:return e===null&&jh(t),null;case 13:return Ob(e,t,n);case 4:return Mp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ui(t,null,r,n):it(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xt(r,s),iy(e,t,r,s,n);case 7:return it(e,t,t.pendingProps,n),t.child;case 8:return it(e,t,t.pendingProps.children,n),t.child;case 12:return it(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,fe(Sc,r._currentValue),r._currentValue=o,i!==null)if(un(i.value,o)){if(i.children===s.children&&!gt.current){t=Gn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Hn(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Nh(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Nh(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}it(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,bi(t,n),s=Bt(s),r=r(s),t.flags|=1,it(e,t,r,n),t.child;case 14:return r=t.type,s=Xt(r,t.pendingProps),s=Xt(r.type,s),oy(e,t,r,s,n);case 15:return Cb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xt(r,s),Hl(e,t),t.tag=1,yt(r)?(e=!0,xc(t)):e=!1,bi(t,n),Eb(t,r,s),Ih(t,r,s,n),$h(null,t,r,!0,e,n);case 19:return jb(e,t,n);case 22:return Pb(e,t,n)}throw Error(L(156,t.tag))};function Gb(e,t){return bx(e,t)}function LC(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,t,n,r){return new LC(e,t,n,r)}function Xp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function IC(e){if(typeof e=="function")return Xp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yp)return 11;if(e===vp)return 14}return 2}function Ir(e,t){var n=e.alternate;return n===null?(n=$t(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Kl(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Xp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ni:return _s(n.children,s,i,t);case gp:o=8,s|=8;break;case ih:return e=$t(12,n,t,s|2),e.elementType=ih,e.lanes=i,e;
vendor: 4,232 bytes, line 41
41case oh:return e=$t(13,n,t,s),e.elementType=oh,e.lanes=i,e;case ah:return e=$t(19,n,t,s),e.elementType=ah,e.lanes=i,e;case sx:return pu(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nx:o=10;break e;case rx:o=9;break e;case yp:o=11;break e;case vp:o=14;break e;case fr:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=$t(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function _s(e,t,n,r){return e=$t(7,e,r,t),e.lanes=n,e}function pu(e,t,n,r){return e=$t(22,e,r,t),e.elementType=sx,e.lanes=n,e.stateNode={isHidden:!1},e}function xd(e,t,n){return e=$t(6,e,null,t),e.lanes=n,e}function bd(e,t,n){return t=$t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function DC(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=td(0),this.expirationTimes=td(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=td(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Zp(e,t,n,r,s,i,o,a,l){return e=new DC(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=$t(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dp(i),e}function MC(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ti,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Jb(e){if(!e)return $r;e=e._reactInternals;e:{if(js(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(yt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(yt(n))return Jx(e,n,t)}return t}function Yb(e,t,n,r,s,i,o,a,l){return e=Zp(n,r,!0,e,s,i,o,a,l),e.context=Jb(null),n=e.current,r=ct(),s=Lr(n),i=Hn(r,s),i.callback=t??null,jr(n,i,s),e.current.lanes=s,Ma(e,s,r),vt(e,r),e}function mu(e,t,n,r){var s=t.current,i=ct(),o=Lr(s);return n=Jb(n),t.context===null?t.context=n:t.pendingContext=n,t=Hn(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(s,t,o),e!==null&&(ln(e,s,o,i),Fl(e,s,o)),o}function Nc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function vy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function em(e,t){vy(e,t),(e=e.alternate)&&vy(e,t)}function $C(){return null}var Qb=typeof reportError=="function"?reportError:function(e){console.error(e)};function tm(e){this._internalRoot=e}gu.prototype.render=tm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));mu(e,t,null,null)};gu.prototype.unmount=tm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;As(function(){mu(null,e,null,null)}),t[qn]=null}};function gu(e){this._internalRoot=e}gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Px();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mr.length&&t!==0&&t<mr[n].priority;n++);mr.splice(n,0,e),n===0&&Rx(e)}};function nm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function wy(){}function UC(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Nc(o);i.call(c)}}var o=Yb(t,r,e,0,null,!1,!1,"",wy);return e._reactRootContainer=o,e[qn]=o.current,ia(e.nodeType===8?e.parentNode:e),As(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=Nc(l);a.call(c)}}var l=Zp(e,0,!1,null,null,!1,!1,"",wy);return e._reactRootContainer=l,e[qn]=l.current,ia(e.nodeType===8?e.parentNode:e),As(function(){mu(t,l,n,r)}),l}
vendor: 4,606 bytes, line 41
41function vu(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Nc(o);a.call(l)}}mu(t,o,e,s)}else o=UC(n,t,e,s,r);return Nc(o)}kx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ao(t.pendingLanes);n!==0&&(bp(t,n|1),vt(t,Oe()),!(re&6)&&(Bi=Oe()+500,qr()))}break;case 13:As(function(){var r=Kn(e,1);if(r!==null){var s=ct();ln(r,e,1,s)}}),em(e,1)}};_p=function(e){if(e.tag===13){var t=Kn(e,134217728);if(t!==null){var n=ct();ln(t,e,134217728,n)}em(e,134217728)}};Cx=function(e){if(e.tag===13){var t=Lr(e),n=Kn(e,t);if(n!==null){var r=ct();ln(n,e,t,r)}em(e,t)}};Px=function(){return le};Ax=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};yh=function(e,t,n){switch(t){case"input":if(uh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=lu(r);if(!s)throw Error(L(90));ox(r),uh(r,s)}}}break;case"textarea":lx(e,n);break;case"select":t=n.value,t!=null&&yi(e,!!n.multiple,t,!1)}};mx=Jp;gx=As;var VC={usingClientEntryPoint:!1,Events:[Ua,oi,lu,fx,px,Jp]},wo={findFiberByHostInstance:ls,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},FC={bundleType:wo.bundleType,version:wo.version,rendererPackageName:wo.rendererPackageName,rendererConfig:wo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wx(e),e===null?null:e.stateNode},findFiberByHostInstance:wo.findFiberByHostInstance||$C,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gl.isDisabled&&gl.supportsFiber)try{su=gl.inject(FC),Cn=gl}catch{}}Rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VC;Rt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nm(t))throw Error(L(200));return MC(e,t,null,n)};Rt.createRoot=function(e,t){if(!nm(e))throw Error(L(299));var n=!1,r="",s=Qb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Zp(e,1,!1,null,null,n,!1,r,s),e[qn]=t.current,ia(e.nodeType===8?e.parentNode:e),new tm(t)};Rt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=wx(t),e=e===null?null:e.stateNode,e};Rt.flushSync=function(e){return As(e)};Rt.hydrate=function(e,t,n){if(!yu(t))throw Error(L(200));return vu(null,e,t,!0,n)};Rt.hydrateRoot=function(e,t,n){if(!nm(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Qb;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Yb(t,null,e,1,n??null,s,!1,i,o),e[qn]=t.current,ia(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new gu(t)};Rt.render=function(e,t,n){if(!yu(t))throw Error(L(200));return vu(null,e,t,!1,n)};Rt.unmountComponentAtNode=function(e){if(!yu(e))throw Error(L(40));return e._reactRootContainer?(As(function(){vu(null,null,e,!1,function(){e._reactRootContainer=null,e[qn]=null})}),!0):!1};Rt.unstable_batchedUpdates=Jp;Rt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yu(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return vu(e,t,n,!1,r)};Rt.version="18.3.1-next-f1338f8080-20240426";function Xb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xb)}catch(e){console.error(e)}}Xb(),Xw.exports=Rt;var Fa=Xw.exports;const Zb=Ia(Fa);var e1,xy=Fa;e1=xy.createRoot,xy.hydrateRoot;var BC=typeof Element<"u",zC=typeof Map=="function",HC=typeof Set=="function",WC=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Gl(e,t){if(e===t)return!0;
41if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Gl(e[r],t[r]))return!1;return!0}var i;if(zC&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Gl(r.value[1],t.get(r.value[0])))return!1;return!0}if(HC&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(WC&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(BC&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!Gl(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}
41var qC=function(t,n){try{return Gl(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const KC=Ia(qC);var GC=function(e,t,n,r,s,i,o,a){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,s,i,o,a],u=0;l=new Error(t.replace(/%s/g,function(){return c[u++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},JC=GC;const by=Ia(JC);var YC=function(t,n,r,s){var i=r?r.call(s,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var o=Object.keys(t),a=Object.keys(n);if(o.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),c=0;c<o.length;c++){var u=o[c];if(!l(u))return!1;var d=t[u],h=n[u];if(i=r?r.call(s,d,h,u):void 0,i===!1||i===void 0&&d!==h)return!1}return!0};const QC=Ia(YC);var t1=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(t1||{}),_d={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},_y=Object.values(t1),wu={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},n1=Object.entries(wu).reduce((e,[t,n])=>(e[n]=t,e),{}),on="data-rh",Si={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Ei=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},XC=e=>{let t=Ei(e,"title");const n=Ei(e,Si.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Ei(e,Si.DEFAULT_TITLE);return t||r||void 0},ZC=e=>Ei(e,Si.ON_CHANGE_CLIENT_STATE)||(()=>{}),Sd=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),eP=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const a=s[i].toLowerCase();if(e.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),tP=e=>console&&typeof console.warn=="function"&&console.warn(e),xo=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&tP(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,i)=>{const o={};i.filter(l=>{let c;const u=Object.keys(l);for(let h=0;h<u.length;h+=1){const f=u[h],y=f.toLowerCase();t.indexOf(y)!==-1&&!(c==="rel"&&l[c].toLowerCase()==="canonical")&&!(y==="rel"&&l[y].toLowerCase()==="stylesheet")&&(c=y),t.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(c=f)}if(!c||!l[c])return!1;const d=l[c].toLowerCase();return r[c]||(r[c]={}),o[c]||(o[c]={}),r[c][d]?!1:(o[c][d]=!0,!0)}).reverse().forEach(l=>s.push(l));const a=Object.keys(o);for(let l=0;l<a.length;l+=1){const c=a[l],u={...r[c],...o[c]};r[c]=u}return s},[]).reverse()},nP=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},rP=e=>({baseTag:eP(["href"],e),bodyAttributes:Sd("bodyAttributes",e),defer:Ei(e,Si.DEFER),encode:Ei(e,Si.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Sd("htmlAttributes",e),linkTags:xo("link",["rel","href"],e),metaTags:xo("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:xo("noscript",["innerHTML"],e),onChangeClientState:ZC(e),scriptTags:xo("script",["src","innerHTML"],e),styleTags:xo("style",["cssText"],e),title:XC(e),titleAttributes:Sd("titleAttributes",e),prioritizeSeoTags:nP(e,Si.PRIORITIZE_SEO_TAGS)}),r1=e=>Array.isArray(e)?e.join(""):e,sP=(e,t)=>
41{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Ed=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(sP(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},Sy=(e,t)=>({...e,[t]:void 0}),iP=["noscript","script","style"],Yh=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),s1=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),oP=(e,t,n,r)=>{const s=s1(n),i=r1(t);return s?`<${e} ${on}="true" ${s}>${Yh(i,r)}</${e}>`:`<${e} ${on}="true">${Yh(i,r)}</${e}>`},aP=(e,t,n=!0)=>t.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,u)=>{const d=typeof i[u]>"u"?u:`${u}="${Yh(i[u],n)}"`;return c?`${c} ${d}`:d},""),a=i.innerHTML||i.cssText||"",l=iP.indexOf(e)===-1;return`${r}<${e} ${on}="true" ${o}${l?"/>":`>${a}</${e}>`}`},""),i1=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=wu[r];return n[s||r]=e[r],n},t),lP=(e,t,n)=>{const r={key:t,[on]:!0},s=i1(n,r);return[j.createElement("title",s,t)]},Jl=(e,t)=>
41t.map((n,r)=>{const s={key:r,[on]:!0};return Object.keys(n).forEach(i=>{const a=wu[i]||i;if(a==="innerHTML"||a==="cssText"){const l=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[a]=n[i]}),j.createElement(e,s)}),Lt=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>lP(e,t.title,t.titleAttributes),toString:()=>oP(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>i1(t),toString:()=>s1(t)};default:return{toComponent:()=>Jl(e,t),toString:()=>aP(e,t,n)}}},cP=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=Ed(e,_d.meta),i=Ed(t,_d.link),o=Ed(n,_d.script);return{priorityMethods:{toComponent:()=>[...Jl("meta",s.priority),...Jl("link",i.priority),...Jl("script",o.priority)],toString:()=>`${Lt("meta",s.priority,r)} ${Lt("link",i.priority,r)} ${Lt("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},uP=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:a="",titleAttributes:l,prioritizeSeoTags:c}=e;let{linkTags:u,metaTags:d,scriptTags:h}=e,f={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:f,linkTags:u,metaTags:d,scriptTags:h}=cP(e)),{priority:f,base:Lt("base",t,r),bodyAttributes:Lt("bodyAttributes",n,r),htmlAttributes:Lt("htmlAttributes",s,r),link:Lt("link",u,r),meta:Lt("meta",d,r),noscript:Lt("noscript",i,r),script:Lt("script",h,r),style:Lt("style",o,r),title:Lt("title",{title:a,titleAttributes:l},r)}},Qh=uP,yl=[],rm=!!(typeof window<"u"&&window.document&&window.document.createElement),Xh=class{constructor(e,t){oe(this,"instances",[]);oe(this,"canUseDOM",rm);oe(this,"context");oe(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?yl:this.instances,add:e=>{(this.canUseDOM?yl:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?yl:this.instances).indexOf(e);(this.canUseDOM?yl:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Qh({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},dP=parseInt(j.version.split(".")[0],10),Zh=dP>=19,hP={},o1=j.createContext(hP),ps,a1=(ps=class extends b.Component{constructor(n){super(n);oe(this,"helmetData");Zh?this.helmetData=null:this.helmetData=new Xh(this.props.context||{},ps.canUseDOM)}render(){return Zh?j.createElement(j.Fragment,null,this.props.children):j.createElement(o1.Provider,{value:this.helmetData.value},this.props.children)}},oe(ps,"canUseDOM",rm),ps),Bs=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${on}]`),s=[].slice.call(r),i=[];let o;return t&&t.length&&t.forEach(a=>{const l=document.createElement(e);for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c))if(c==="innerHTML")l.innerHTML=a.innerHTML;else if(c==="cssText"){const u=a.cssText;l.appendChild(document.createTextNode(u))}else{const u=c,d=typeof a[u]>
41"u"?"":a[u];l.setAttribute(c,d)}l.setAttribute(on,"true"),s.some((c,u)=>(o=u,l.isEqualNode(c)))?s.splice(o,1):i.push(l)}),s.forEach(a=>{var l;return(l=a.parentNode)==null?void 0:l.removeChild(a)}),i.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:i}},ef=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(on),s=r?r.split(","):[],i=[...s],o=Object.keys(t);for(const a of o){const l=t[a]||"";n.getAttribute(a)!==l&&n.setAttribute(a,l),s.indexOf(a)===-1&&s.push(a);const c=i.indexOf(a);c!==-1&&i.splice(c,1)}for(let a=i.length-1;a>=0;a-=1)n.removeAttribute(i[a]);s.length===i.length?n.removeAttribute(on):n.getAttribute(on)!==o.join(",")&&n.setAttribute(on,o.join(","))},fP=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=r1(e)),ef("title",t)},Ey=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:a,onChangeClientState:l,scriptTags:c,styleTags:u,title:d,titleAttributes:h}=e;ef("body",r),ef("html",s),fP(d,h);const f={baseTag:Bs("base",n),linkTags:Bs("link",i),metaTags:Bs("meta",o),noscriptTags:Bs("noscript",a),scriptTags:Bs("script",c),styleTags:Bs("style",u)},y={},g={};Object.keys(f).forEach(x=>{const{newTags:v,oldTags:m}=f[x];v.length&&(y[x]=v),m.length&&(g[x]=f[x].oldTags)}),t&&t(),l(e,y,g)},bo=null,pP=e=>{bo&&cancelAnimationFrame(bo),e.defer?bo=requestAnimationFrame(()=>{Ey(e,()=>{bo=null})}):(Ey(e),bo=null)},mP=pP,Ty=class extends b.Component{constructor(){super(...arguments);oe(this,"rendered",!1)}shouldComponentUpdate(t){return!QC(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=rP(t.get().map(i=>{const{context:o,...a}=i.props;return a}));a1.canUseDOM?mP(s):Qh&&(r=Qh(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Yl=[],ky=e=>{const t={};for(const n of Object.keys(e))t[n1[n]||n]=e[n];return t},Xr=e=>{const t={};for(const n of Object.keys(e)){const r=wu[n];t[r||n]=e[n]}return t},Cy=(e,t)=>{if(!rm)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",s=n.getAttribute(r),i=s?s.split(","):[],o=Object.keys(t);for(const a of i)o.includes(a)||n.removeAttribute(a);for(const a of o){const l=t[a];l==null||l===!1?n.removeAttribute(a):l===!0?n.setAttribute(a,""):n.setAttribute(a,String(l))}o.length>0?n.setAttribute(r,o.join(",")):n.removeAttribute(r)},Td=()=>{const e={},t={};for(const n of Yl){const{htmlAttributes:r,bodyAttributes:s}=n.props;r&&Object.assign(e,ky(r)),s&&Object.assign(t,ky(s))}Cy("html",e),Cy("body",t)},gP=class extends b.Component{componentDidMount(){Yl.push(this),Td()}componentDidUpdate(){Td()}componentWillUnmount(){const e=Yl.indexOf(this);e!==-1&&Yl.splice(e,1),Td()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return j.createElement("title",Xr(t),e)}renderBase(){const{base:e}=this.props;return e?j.createElement("base",Xr(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>j.createElement("meta",{key:n,...Xr(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>j.createElement("link",{key:n,...Xr(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=Xr(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),j.createElement("script",{key:n,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{cssText:r,...s}=t,i=Xr(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),j.createElement("style",{key:n,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=Xr(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),j.createElement("noscript",{key:n,...i})})}render(){return j.createElement(j.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},rh,sm=(rh=class extends b.Component{shouldComponentUpdate(e){return!KC(Sy(this.props,"helmetData"),Sy(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}
41warnOnInvalidChildren(e,t){return by(_y.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${_y.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),by(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return j.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((l,c)=>(l[n1[c]||c]=i[c],l),{});let{type:a}=r;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:t=this.mapObjectTypeChildren(r,t,o,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Xh)){const s=r;r=new Xh(s.context,!0),delete n.helmetData}return Zh?j.createElement(gP,{...n}):r?j.createElement(Ty,{...n,context:r.value}):j.createElement(o1.Consumer,null,s=>j.createElement(Ty,{...n,context:s}))}},oe(rh,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),rh);const yP="modulepreload",vP=function(e){return"/"+e},Py={},$=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=vP(l),l in Py)return;Py[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":yP,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},wP=1,xP=1e6;let kd=0;function bP(){return kd=(kd+1)%Number.MAX_SAFE_INTEGER,kd.toString()}const Cd=new Map,Ay=e=>{if(Cd.has(e))return;const t=setTimeout(()=>{Cd.delete(e),zo({type:"REMOVE_TOAST",toastId:e})},xP);Cd.set(e,t)},_P=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,wP)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Ay(n):e.toasts.forEach(r=>{Ay(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Ql=[];let Xl={toasts:[]};function zo(e){Xl=_P(Xl,e),Ql.forEach(t=>{t(Xl)})}function SP({...e}){const t=bP(),n=s=>zo({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>zo({type:"DISMISS_TOAST",toastId:t});return zo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function EP(){const[e,t]=b.useState(Xl);return b.useEffect(()=>(Ql.push(t),()=>{const n=Ql.indexOf(t);n>-1&&Ql.splice(n,1)}),[e]),{...e,toast:SP,dismiss:n=>zo({type:"DISMISS_TOAST",toastId:n})}}function Ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Ry(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function l1(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Ry(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Ry(e[s],null)}}}}function dn(...e){return b.useCallback(l1(...e),e)}function V4(e,t){const n=b.createContext(t),r=i=>{const{children:o,...a}=i,l=b.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function s(i){const o=b.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function xu(e,t=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];const c=d=>{var v;const{scope:h,children:f,...y}=d,g=((v=h==null?void 0:h[e])==null?void 0:v[l])||a,x=b.useMemo(()=>y,Object.values(y));return p.jsx(g.Provider,{value:x,children:f})};c.displayName=i+"Provider";function u(d,h){var g;const f=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,y=b.useContext(f);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,TP(s,...t)]}function TP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c}
vendor: 10,635 bytes, line 41
41)=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Lc(e){const t=CP(e),n=b.forwardRef((r,s)=>{const{children:i,...o}=r,a=b.Children.toArray(i),l=a.find(AP);if(l){const c=l.props.children,u=a.map(d=>d===l?b.Children.count(c)>1?b.Children.only(null):b.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...o,ref:s,children:b.isValidElement(c)?b.cloneElement(c,void 0,u):null})}return p.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var kP=Lc("Slot");function CP(e){const t=b.forwardRef((n,r)=>{const{children:s,...i}=n;if(b.isValidElement(s)){const o=OP(s),a=RP(i,s.props);return s.type!==b.Fragment&&(a.ref=r?l1(r,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var c1=Symbol("radix.slottable");function PP(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=c1,t}function AP(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===c1}function RP(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function OP(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function jP(e){const t=e+"CollectionProvider",[n,r]=xu(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:x,children:v}=g,m=j.useRef(null),w=j.useRef(new Map).current;return p.jsx(s,{scope:x,itemMap:w,collectionRef:m,children:v})};o.displayName=t;const a=e+"CollectionSlot",l=Lc(a),c=j.forwardRef((g,x)=>{const{scope:v,children:m}=g,w=i(a,v),_=dn(x,w.collectionRef);return p.jsx(l,{ref:_,children:m})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=Lc(u),f=j.forwardRef((g,x)=>{const{scope:v,children:m,...w}=g,_=j.useRef(null),S=dn(x,_),T=i(u,v);return j.useEffect(()=>(T.itemMap.set(_,{ref:_,...w}),()=>void T.itemMap.delete(_))),p.jsx(h,{[d]:"",ref:S,children:m})});f.displayName=u;function y(g){const x=i(e+"CollectionConsumer",g);return j.useCallback(()=>{const m=x.collectionRef.current;if(!m)return[];const w=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((T,E)=>w.indexOf(T.ref.current)-w.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},y,r]}var NP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xt=NP.reduce((e,t)=>{const n=Lc(`Primitive.${t}`),r=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function u1(e,t){e&&Fa.flushSync(()=>e.dispatchEvent(t))}function Ur(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function LP(e,t=globalThis==null?void 0:globalThis.document){const n=Ur(e);b.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var IP="DismissableLayer",tf="dismissableLayer.update",DP="dismissableLayer.pointerDownOutside",MP="dismissableLayer.focusOutside",Oy,d1=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),im=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,c=b.useContext(d1),[u,d]=b.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),y=dn(t,E=>d(E)),g=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(x),m=u?g.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,_=m>=v,S=UP(E=>{const k=E.target,P=[...c.branches].some(C=>C.contains(k));!_||P||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},h),T=VP(E=>{const k=E.target;[...c.branches].some(C=>C.contains(k))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},h);return LP(E=>{m===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),b.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Oy=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),jy(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Oy)}},[u,h,n,c]),b.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),jy())},[u,c]),b.useEffect(()=>{const E=()=>f({});return document.addEventListener(tf,E),()=>document.removeEventListener(tf,E)},[]),p.jsx(xt.div,{...l,ref:y,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:Ue(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Ue(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Ue(e.onPointerDownCapture,S.onPointerDownCapture)})});im.displayName=IP;var $P="DismissableLayerBranch",h1=b.forwardRef((e,t)=>{const n=b.useContext(d1),r=b.useRef(null),s=dn(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(xt.div,{...e,ref:s})});h1.displayName=$P;function UP(e,t=globalThis==null?void 0:globalThis.document){const n=Ur(e),r=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){f1(DP,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function VP(e,t=globalThis==null?void 0:globalThis.document){const n=Ur(e),r=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!r.current&&f1(MP,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function jy(){const e=new CustomEvent(tf);document.dispatchEvent(e)}function f1(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?u1(s,i):s.dispatchEvent(i)}var FP=im,BP=h1,Jn=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},zP="Portal",p1=b.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=b.useState(!1);Jn(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Zb.createPortal(p.jsx(xt.div,{...r,ref:t}),o):null});p1.displayName=zP;function HP(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var om=e=>{const{present:t,children:n}=e,r=WP(t),s=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=dn(r.ref,qP(s));return typeof n=="function"||r.isPresent?b.cloneElement(s,{ref:i}):null};om.displayName="Presence";function WP(e){const[t,n]=b.useState(),r=b.useRef(null),s=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[a,l]=HP(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=vl(r.current);i.current=a==="mounted"?c:"none"},[a]),Jn(()=>{const c=r.current,u=s.current;if(u!==e){const h=i.current,f=vl(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Jn(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const g=vl(r.current).includes(f.animationName);if(f.target===t&&g&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=f=>{f.target===t&&(i.current=vl(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function vl(e){return(e==null?void 0:e.animationName)||"none"}function qP(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var KP=hp[" useInsertionEffect ".trim().toString()]||Jn;function m1({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=GP({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:s;{const u=b.useRef(e!==void 0);b.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=b.useCallback(u=>{var d;if(a){const h=JP(u)?u(e):u;h!==e&&((d=o.current)==null||d.call(o,h))}else i(u)},[a,e,i,o]);return[l,c]}function GP({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),s=b.useRef(n),i=b.useRef(t);return KP(()=>{i.current=t},[t]),b.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function JP(e){return typeof e=="function"}var YP=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),QP="VisuallyHidden",bu=b.forwardRef((e,t)=>
41p.jsx(xt.span,{...e,ref:t,style:{...YP,...e.style}}));bu.displayName=QP;var XP=bu,am="ToastProvider",[lm,ZP,eA]=jP("Toast"),[g1,F4]=xu("Toast",[eA]),[tA,_u]=g1(am),y1=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=b.useState(null),[c,u]=b.useState(0),d=b.useRef(!1),h=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${am}\`. Expected non-empty \`string\`.`),p.jsx(lm.Provider,{scope:t,children:p.jsx(tA,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>u(f=>f+1),[]),onToastRemove:b.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:o})})};y1.displayName=am;var v1="ToastViewport",nA=["F8"],nf="toast.viewportPause",rf="toast.viewportResume",w1=b.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=nA,label:s="Notifications ({hotkey})",...i}=e,o=_u(v1,n),a=ZP(n),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),h=dn(t,d,o.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;b.useEffect(()=>{const x=v=>{var w;r.length!==0&&r.every(_=>v[_]||v.code===_)&&((w=d.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),b.useEffect(()=>{const x=l.current,v=d.current;if(y&&x&&v){const m=()=>{if(!o.isClosePausedRef.current){const T=new CustomEvent(nf);v.dispatchEvent(T),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const T=new CustomEvent(rf);v.dispatchEvent(T),o.isClosePausedRef.current=!1}},_=T=>{!x.contains(T.relatedTarget)&&w()},S=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",m),x.addEventListener("focusout",_),x.addEventListener("pointermove",m),x.addEventListener("pointerleave",S),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",m),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",m),x.removeEventListener("pointerleave",S),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[y,o.isClosePausedRef]);const g=b.useCallback(({tabbingDirection:x})=>{const m=a().map(w=>{const _=w.ref.current,S=[_,...mA(_)];return x==="forwards"?S:S.reverse()});return(x==="forwards"?m.reverse():m).flat()},[a]);return b.useEffect(()=>{const x=d.current;if(x){const v=m=>{var S,T,E;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const k=document.activeElement,P=m.shiftKey;if(m.target===x&&P){(S=c.current)==null||S.focus();return}const N=g({tabbingDirection:P?"backwards":"forwards"}),U=N.findIndex(D=>D===k);Pd(N.slice(U+1))?m.preventDefault():P?(T=c.current)==null||T.focus():(E=u.current)==null||E.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[a,g]),p.jsxs(BP,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&p.jsx(sf,{ref:c,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"forwards"});Pd(x)}}),p.jsx(lm.Slot,{scope:n,children:p.jsx(xt.ol,{tabIndex:-1,...i,ref:h})}),y&&p.jsx(sf,{ref:u,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"backwards"});Pd(x)}})]})});w1.displayName=v1;var x1="ToastFocusProxy",sf=b.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=_u(x1,n);return p.jsx(bu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});sf.displayName=x1;var Ba="Toast",rA="toast.swipeStart",sA="toast.swipeMove",iA="toast.swipeCancel",oA="toast.swipeEnd",b1=b.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=m1({prop:r,defaultProp:s??!0,onChange:i,caller:Ba});return p.jsx(om,{present:n||a,children:p.jsx(cA,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Ur(e.onPause),onResume:Ur(e.onResume),onSwipeStart:Ue(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ue(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ue(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ue(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});b1.displayName=Ba;var[aA,lA]=g1(Ba,{onClose(){}}),cA=b.forwardRef((e,t)=>
41{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:f,...y}=e,g=_u(Ba,n),[x,v]=b.useState(null),m=dn(t,D=>v(D)),w=b.useRef(null),_=b.useRef(null),S=s||g.duration,T=b.useRef(0),E=b.useRef(S),k=b.useRef(0),{onToastAdd:P,onToastRemove:C}=g,I=Ur(()=>{var q;(x==null?void 0:x.contains(document.activeElement))&&((q=g.viewport)==null||q.focus()),o()}),N=b.useCallback(D=>{!D||D===1/0||(window.clearTimeout(k.current),T.current=new Date().getTime(),k.current=window.setTimeout(I,D))},[I]);b.useEffect(()=>{const D=g.viewport;if(D){const q=()=>{N(E.current),c==null||c()},z=()=>{const Y=new Date().getTime()-T.current;E.current=E.current-Y,window.clearTimeout(k.current),l==null||l()};return D.addEventListener(nf,z),D.addEventListener(rf,q),()=>{D.removeEventListener(nf,z),D.removeEventListener(rf,q)}}},[g.viewport,S,l,c,N]),b.useEffect(()=>{i&&!g.isClosePausedRef.current&&N(S)},[i,S,g.isClosePausedRef,N]),b.useEffect(()=>(P(),()=>C()),[P,C]);const U=b.useMemo(()=>x?P1(x):null,[x]);return g.viewport?p.jsxs(p.Fragment,{children:[U&&p.jsx(uA,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:U}),p.jsx(aA,{scope:n,onClose:I,children:Fa.createPortal(p.jsx(lm.ItemSlot,{scope:n,children:p.jsx(FP,{asChild:!0,onEscapeKeyDown:Ue(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||I(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(xt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ue(e.onKeyDown,D=>{D.key==="Escape"&&(a==null||a(D.nativeEvent),D.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:Ue(e.onPointerDown,D=>{D.button===0&&(w.current={x:D.clientX,y:D.clientY})}),onPointerMove:Ue(e.onPointerMove,D=>{if(!w.current)return;const q=D.clientX-w.current.x,z=D.clientY-w.current.y,Y=!!_.current,A=["left","right"].includes(g.swipeDirection),R=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,M=A?R(0,q):0,K=A?0:R(0,z),W=D.pointerType==="touch"?10:2,ee={x:M,y:K},ne={originalEvent:D,delta:ee};Y?(_.current=ee,wl(sA,d,ne,{discrete:!1})):Ny(ee,g.swipeDirection,W)?(_.current=ee,wl(rA,u,ne,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(q)>W||Math.abs(z)>W)&&(w.current=null)}),onPointerUp:Ue(e.onPointerUp,D=>{const q=_.current,z=D.target;if(z.hasPointerCapture(D.pointerId)&&z.releasePointerCapture(D.pointerId),_.current=null,w.current=null,q){const Y=D.currentTarget,A={originalEvent:D,delta:q};Ny(q,g.swipeDirection,g.swipeThreshold)?wl(oA,f,A,{discrete:!0}):wl(iA,h,A,{discrete:!0}),Y.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),uA=e=>{const{__scopeToast:t,children:n,...r}=e,s=_u(Ba,t),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return fA(()=>o(!0)),b.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:p.jsx(p1,{asChild:!0,children:p.jsx(bu,{...r,children:i&&p.jsxs(p.Fragment,{children:[s.label," ",n]})})})},dA="ToastTitle",_1=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(xt.div,{...r,ref:t})});_1.displayName=dA;var hA="ToastDescription",S1=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(xt.div,{...r,ref:t})});S1.displayName=hA;var E1="ToastAction",T1=b.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?p.jsx(C1,{altText:n,asChild:!0,children:p.jsx(cm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${E1}\`. Expected non-empty \`string\`.`),null)});T1.displayName=E1;var k1="ToastClose",cm=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=lA(k1,n);return p.jsx(C1,{asChild:!0,children:p.jsx(xt.button,{type:"button",...r,ref:t,onClick:Ue(e.onClick,s.onClose)})})});cm.displayName=k1;var C1=b.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return p.jsx(xt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function P1(e){const t=[];
vendor: 8,681 bytes, lines 41-121
41return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),pA(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...P1(r))}}),t}function wl(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?u1(s,i):s.dispatchEvent(i)}var Ny=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function fA(e=()=>{}){const t=Ur(e);Jn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function pA(e){return e.nodeType===e.ELEMENT_NODE}function mA(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var gA=y1,A1=w1,R1=b1,O1=_1,j1=S1,N1=T1,L1=cm;function I1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=I1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function D1(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=I1(e))&&(r&&(r+=" "),r+=t);return r}const Ly=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Iy=D1,M1=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Iy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const h=Ly(u)||Ly(d);return s[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(y=>{let[g,x]=y;return Array.isArray(x)?x.includes({...i,...a}[g]):{...i,...a}[g]===x})?[...c,d,h]:c},[]);return Iy(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const yA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var vA={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"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const wA=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...vA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:$1("lucide",s),...a},[...o.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const be=(e,t)=>{const n=b.forwardRef(({className:r,...s},i)=>b.createElement(wA,{ref:i,iconNode:t,className:$1(`lucide-${yA(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const xA=be("Album",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["polyline",{points:"11 3 11 11 14 8 17 11 17 3",key:"1wcwz3"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const U1=be("Apple",[["path",{d:"M12 20.94c1.5 0 2.75 1.06 4 1.06 3 0 6-8 6-12.22A4.91 4.91 0 0 0 17 5c-2.22 0-4 1.44-5 2-1-.56-2.78-2-5-2a4.9 4.9 0 0 0-5 4.78C2 14 5 22 8 22c1.25 0 2.5-1.06 4-1.06Z",key:"3s7exb"}],["path",{d:"M10 2c1 .5 2 2 2 5",key:"fcco2y"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const bA=be("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const _A=be("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const SA=be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const Dy=be("DoorOpen",[["path",{d:"M13 4h3a2 2 0 0 1 2 2v14",key:"hrm0s9"}],["path",{d:"M2 20h3",key:"1gaodv"}],["path",{d:"M13 20h9",key:"s90cdi"}],["path",{d:"M10 12v.01",key:"vx6srw"}],["path",{d:"M13 4.562v16.157a1 1 0 0 1-1.242.97L5 20V5.562a2 2 0 0 1 1.515-1.94l4-1A2 2 0 0 1 13 4.561Z",key:"199qr4"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const EA=be("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const Ic=be("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const TA=be("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const V1=be("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const Dc=be("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const My=be("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",ke
121y:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 122 * @license lucide-react v0.462.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const kA=be("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 127 * @license lucide-react v0.462.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const F1=be("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 132 * @license lucide-react v0.462.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const CA=be("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 137 * @license lucide-react v0.462.0 - ISC 138 * 139 * This source code is licensed under the ISC license. 140 * See the LICENSE file in the root directory of this source tree. 141 */const PA=be("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 142 * @license lucide-react v0.462.0 - ISC 143 * 144 * This source code is licensed under the ISC license. 145 * See the LICENSE file in the root directory of this source tree. 146 */const AA=be("Star",[["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"}]]);/** 147 * @license lucide-react v0.462.0 - ISC 148 * 149 * This source code is licensed under the ISC license. 150 * See the LICENSE file in the root directory of this source tree. 151 */const um=be("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** 152 * @license lucide-react v0.462.0 - ISC 153 * 154 * This source code is licensed under the ISC license. 155 * See the LICENSE file in the root directory of this source tree. 156 */const $y=be("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 157 * @license lucide-react v0.462.0 - ISC 158 * 159 * This source code is licensed under the ISC license. 160 * See the LICENSE file in the root directory of this source tree. 161 */const of=be("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 162 * @license lucide-react v0.462.0 - ISC 163 * 164 * This source code is licensed under the ISC license. 165 * See the LICENSE file in the root directory of this source tree. 166 */const B1=be("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 167 * @license lucide-react v0.462.0 - ISC 168 * 169 * This source code is licensed under the ISC license. 170 * See the LICENSE file in the root directory of this source tree. 171 */const RA=be("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}
vendor: 8,603 bytes, lines 171-181
171],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 172 * @license lucide-react v0.462.0 - ISC 173 * 174 * This source code is licensed under the ISC license. 175 * See the LICENSE file in the root directory of this source tree. 176 */const z1=be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 177 * @license lucide-react v0.462.0 - ISC 178 * 179 * This source code is licensed under the ISC license. 180 * See the LICENSE file in the root directory of this source tree. 181 */const Uy=be("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),dm="-",OA=e=>{const t=NA(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(dm);return a[0]===""&&a.length!==1&&a.shift(),H1(a,t)||jA(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},H1=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?H1(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(dm);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Vy=/^\[(.+)\]$/,jA=e=>{if(Vy.test(e)){const t=Vy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},NA=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return IA(Object.entries(e.classGroups),n).forEach(([i,o])=>{af(o,r,i,t)}),r},af=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Fy(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(LA(s)){af(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{af(o,Fy(t,i),n,r)})})},Fy=(e,t)=>{let n=e;return t.split(dm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},LA=e=>e.isThemeGetter,IA=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,DA=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},W1="!",MA=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let x=0;x<a.length;x++){let v=a[x];if(c===0){if(v===s&&(r||a.slice(x,x+i)===t)){l.push(a.slice(u,x)),u=x+i;continue}if(v==="/"){d=x;continue}}v==="["?c++:v==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(W1),y=f?h.substring(1):h,g=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:o}):o},$A=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},UA=e=>({cache:DA(e.cacheSize),parseClassName:MA(e),...OA(e)}),VA=/\s+/,FA=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(VA);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let y=!!f,g=r(y?h.substring(0,f):h);if(!g){if(!y){a=c+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=c+(a.length>0?" "+a:a);continue}y=!1}const x=$A(u).join(":"),v=d?x+W1:x,m=v+g;if(i.includes(m))continue;i.push(m);const w=s(g,y);for(let _=0;_<w.length;++_){const S=w[_];i.push(v+S)}a=c+(a.length>0?" "+a:a)}return a};function BA(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=q1(t))&&(r&&(r+=" "),r+=n);return r}const q1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=q1(e[r]))&&(n&&(n+=" "),n+=t);return n};function zA(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=UA(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=FA(l,n);return s(l,u),u}return function(){return i(BA.apply(null,arguments))}}const pe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},K1=/^\[(?:([a-z-]+):)?(.+)\]$/i,HA=/^\d+\/\d+$/,WA=new Set(["px","full","screen"]),qA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KA=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,GA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ln=e=>Ti(e)||WA.has(e)||HA.test(e),lr=e=>Zi(e,"length",sR),Ti=e=>!!e&&!Number.isNaN(Number(e)),Ad=e=>Zi(e,"number",Ti),_o=e=>!!e&&Number.isInteger(Number(e)),QA=e=>e.endsWith("%")&&Ti(e.slice(0,-1)),Z=e=>K1.test(e),cr=e=>qA.test(e),XA=new Set(["length","size","percentage"]),ZA=e=>Zi(e,XA,G1),eR=e=>Zi(e,"position",G1),tR=new Set(["image","url"]),nR=e=>Zi(e,tR,oR),rR=e=>Zi(e,"",iR),So=()=>!0,Zi=(e,t,n)=>{const r=K1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},sR=e=>KA.test(e)&&!GA.test(e),G1=()=>!1,iR=e=>JA.test(e),oR=e=>YA.test(e),aR=()=>{const e=pe("colors"),t=pe("spacing"),n=pe("blur"),r=pe("brightness"),s=pe("borderColor"),i=pe("borderRadius"),o=pe("borderSpacing"),a=pe("borderWidth"),l=pe("contrast"),c=pe("grayscale"),u=pe("hueRotate"),d=pe("invert"),h=pe("gap"),f=pe("gradientColorStops"),y=pe("gradientColorStopPositions"),g=pe("inset"),x=pe("margin"),v=pe("opacity"),m=pe("padding"),w=pe("saturate"),_=pe("scale"),S=pe("sepia"),T=pe("skew"),E=pe("space"),k=pe("translate"),P=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Z,t],N=()=>[Z,t],U=()=>["",Ln,lr],D=()=>["auto",Ti,Z],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Z],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[Ti,Z];return{cacheSize:500,separator:":",theme:{colors:[So],spacing:[Ln,lr],blur:["none","",cr,Z],brightness:K(),borderColor:[e],borderRadius:["none","","full",cr,Z],borderSpacing:N(),borderWidth:U(),contrast:K(),grayscale:R(),hueRotate:K(),invert:R(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[QA,lr],inset:I(),margin:I(),opacity:K(),padding:N(),saturate:K(),scale:K(),sepia:R(),skew:K(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Z]}],container:["container"],columns:[{columns:[cr]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...q(),Z]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_o,Z]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Z]}],grow:[{grow:R()}],shrink:[{shrink:R()}
vendor: 9,560 bytes, line 181
181],order:[{order:["first","last","none",_o,Z]}],"grid-cols":[{"grid-cols":[So]}],"col-start-end":[{col:["auto",{span:["full",_o,Z]},Z]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[So]}],"row-start-end":[{row:["auto",{span:[_o,Z]},Z]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Z]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Z,t]}],"min-w":[{"min-w":[Z,t,"min","max","fit"]}],"max-w":[{"max-w":[Z,t,"none","full","min","max","fit","prose",{screen:[cr]},cr]}],h:[{h:[Z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",cr,lr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ad]}],"font-family":[{font:[So]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Z]}],"line-clamp":[{"line-clamp":["none",Ti,Ad]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ln,Z]}],"list-image":[{"list-image":["none",Z]}],"list-style-type":[{list:["none","disc","decimal",Z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ln,lr]}],"underline-offset":[{"underline-offset":["auto",Ln,Z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),eR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ZA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:z()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[Ln,Z]}],"outline-w":[{outline:[Ln,lr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Ln,lr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",cr,rR]}],"shadow-color":[{shadow:[So]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...Y(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Y()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",cr,Z]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Z]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Z]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[_o,Z]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Z]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
181],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ln,lr,Ad]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},lR=zA(aR);function Re(...e){return lR(D1(e))}const cR=gA,J1=b.forwardRef(({className:e,...t},n)=>p.jsx(A1,{ref:n,className:Re("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));J1.displayName=A1.displayName;const uR=M1("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Y1=b.forwardRef(({className:e,variant:t,...n},r)=>p.jsx(R1,{ref:r,className:Re(uR({variant:t}),e),...n}));Y1.displayName=R1.displayName;const dR=b.forwardRef(({className:e,...t},n)=>p.jsx(N1,{ref:n,className:Re("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));dR.displayName=N1.displayName;const Q1=b.forwardRef(({className:e,...t},n)=>p.jsx(L1,{ref:n,className:Re("absolute right-2 top-2 rounded-md p-1 text-foreground
181/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(z1,{className:"h-4 w-4"})}));Q1.displayName=L1.displayName;const X1=b.forwardRef(({className:e,...t},n)=>p.jsx(O1,{ref:n,className:Re("text-sm font-semibold",e),...t}));X1.displayName=O1.displayName;const Z1=b.forwardRef(({className:e,...t},n)=>p.jsx(j1,{ref:n,className:Re("text-sm opacity-90",e),...t}));Z1.displayName=j1.displayName;function hR(){const{toasts:e}=EP();return p.jsxs(cR,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return p.jsxs(Y1,{...i,children:[p.jsxs("div",{className:"grid gap-1",children:[n&&p.jsx(X1,{children:n}),r&&p.jsx(Z1,{children:r})]}),s,p.jsx(Q1,{})]},t)}),p.jsx(J1,{})]})}var By=["light","dark"],fR="(prefers-color-scheme: dark)",pR=b.createContext(void 0),mR={setTheme:e=>{},themes:[]},gR=()=>{var e;return(e=b.useContext(pR))!=null?e:mR};b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?By.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(y,g=!1,x=!0)=>{let v=o?o[y]:y,m=g?y+"|| ''":`'${v}'`,w="";return s&&x&&!g&&By.includes(y)&&(w+=`d.style.colorScheme = '${y}';`),n==="class"?g||v?w+=`c.add(${m})`:w+="null":v&&(w+=`d[s](n,${m})`),w},f=e?`!function(){${u}${h(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${fR}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}${c?"":"else{"+h(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var yR=e=>{switch(e){case"success":return xR;case"info":return _R;case"warning":return bR;case"error":return SR;default:return null}},vR=Array(12).fill(0),wR=({visible:e,className:t})=>j.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},j.createElement("div",{className:"sonner-spinner"},vR.map((n,r)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),xR=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),bR=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),_R=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),SR=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ER=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),TR=()=>{let[e,t]=j.useState(document.hidden);return j.useEffect(()=>{let n=()=>{t(document.hidden)};
181return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},lf=1,kR=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:lf++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
181this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],j.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(PR(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||lf++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ft=new kR,CR=(e,t)=>{let n=(t==null?void 0:t.id)||lf++;return ft.addToast({title:e,...t,id:n}),n},PR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",AR=CR,RR=()=>ft.toasts,OR=()=>ft.getActiveToasts(),Ae=Object.assign(AR,{success:ft.success,info:ft.info,warning:ft.warning,error:ft.error,custom:ft.custom,message:ft.message,promise:ft.promise,dismiss:ft.dismiss,loading:ft.loading},{getHistory:RR,getToasts:OR});function jR(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}jR(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
181left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
181:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
181--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 182`);function xl(e){return e.label!==void 0}var NR=3,LR="32px",IR="16px",zy=4e3,DR=356,MR=14,$R=20,UR=200;function Gt(...e){return e.filter(Boolean).join(" ")}function VR(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var FR=e=>{var t,n,r,s,i,o,a,l,c,u,d;let{invert:h,toast:f,unstyled:y,interacting:g,setHeights:x,visibleToasts:v,heights:m,index:w,toasts:_,expanded:S,removeToast:T,defaultRichColors:E,closeButton:k,style:P,cancelButtonStyle:C,actionButtonStyle:I,className:N="",descriptionClassName:U="",duration:D,position:q,gap:z,loadingIcon:Y,expandByDefault:A,classNames:R,icons:M,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:W}=e,[ee,ne]=j.useState(null),[je,Qe]=j.useState(null),[ie,Is]=j.useState(!1),[tr,Jr]=j.useState(!1),[nr,Ds]=j.useState(!1),[rr,Ya]=j.useState(!1),[Wu,Qa]=j.useState(!1),[qu,co]=j.useState(0),[Ms,ig]=j.useState(0),uo=j.useRef(f.duration||D||zy),og=j.useRef(null),Yr=j.useRef(null),iT=w===0,oT=w+1<=v,jt=f.type,$s=f.dismissible!==!1,aT=f.className||"",lT=f.de
182scriptionClassName||"",Xa=j.useMemo(()=>m.findIndex(Q=>Q.toastId===f.id)||0,[m,f.id]),cT=j.useMemo(()=>{var Q;return(Q=f.closeButton)!=null?Q:k},[f.closeButton,k]),ag=j.useMemo(()=>f.duration||D||zy,[f.duration,D]),Ku=j.useRef(0),Us=j.useRef(0),lg=j.useRef(0),Vs=j.useRef(null),[uT,dT]=q.split("-"),cg=j.useMemo(()=>m.reduce((Q,ce,ve)=>ve>=Xa?Q:Q+ce.height,0),[m,Xa]),ug=TR(),hT=f.invert||h,Gu=jt==="loading";Us.current=j.useMemo(()=>Xa*z+cg,[Xa,cg]),j.useEffect(()=>{uo.current=ag},[ag]),j.useEffect(()=>{Is(!0)},[]),j.useEffect(()=>{let Q=Yr.current;if(Q){let ce=Q.getBoundingClientRect().height;return ig(ce),x(ve=>[{toastId:f.id,height:ce,position:f.position},...ve]),()=>x(ve=>ve.filter(Ht=>Ht.toastId!==f.id))}},[x,f.id]),j.useLayoutEffect(()=>{if(!ie)return;let Q=Yr.current,ce=Q.style.height;Q.style.height="auto";let ve=Q.getBoundingClientRect().height;Q.style.height=ce,ig(ve),x(Ht=>Ht.find(Wt=>Wt.toastId===f.id)?Ht.map(Wt=>Wt.toastId===f.id?{...Wt,height:ve}:Wt):[{toastId:f.id,height:ve,position:f.position},...Ht])},[ie,f.title,f.description,x,f.id]);let sr=j.useCallback(()=>{Jr(!0),co(Us.current),x(Q=>Q.filter(ce=>ce.toastId!==f.id)),setTimeout(()=>{T(f)},UR)},[f,T,x,Us]);j.useEffect(()=>{if(f.promise&&jt==="loading"||f.duration===1/0||f.type==="loading")return;let Q;return S||g||W&&ug?(()=>{if(lg.current<Ku.current){let ce=new Date().getTime()-Ku.current;uo.current=uo.current-ce}lg.current=new Date().getTime()})():uo.current!==1/0&&(Ku.current=new Date().getTime(),Q=setTimeout(()=>{var ce;(ce=f.onAutoClose)==null||ce.call(f,f),sr()},uo.current)),()=>clearTimeout(Q)},[S,g,f,jt,W,ug,sr]),j.useEffect(()=>{f.delete&&sr()},[sr,f.delete]);function fT(){var Q,ce,ve;return M!=null&&M.loading?j.createElement("div",{className:Gt(R==null?void 0:R.loader,(Q=f==null?void 0:f.classNames)==null?void 0:Q.loader,"sonner-loader"),"data-visible":jt==="loading"},M.loading):Y?j.createElement("div",{className:Gt(R==null?void 0:R.loader,(ce=f==null?void 0:f.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":jt==="loading"},Y):j.createElement(wR,{className:Gt(R==null?void 0:R.loader,(ve=f==null?void 0:f.classNames)==null?void 0:ve.loader),visible:jt==="loading"})}return j.createElement("li",{tabIndex:0,ref:Yr,className:Gt(N,aT,R==null?void 0:R.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[jt],(n=f==null?void 0:f.classNames)==null?void 0:n[jt]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:E,"data-styled":!(f.jsx||f.unstyled||y),"data-mounted":ie,"data-promise":!!f.promise,"data-swiped":Wu,"data-removed":tr,"data-visible":oT,"data-y-position":uT,"data-x-position":dT,"data-index":w,"data-front":iT,"data-swiping":nr,"data-dismissible":$s,"data-type":jt,"data-invert":hT,"data-swipe-out":rr,"data-swipe-direction":je,"data-expanded":!!(S||A&&ie),style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${tr?qu:Us.current}px`,"--initial-height":A?"auto":`${Ms}px`,...P,...f.style},onDragEnd:()=>{Ds(!1),ne(null),Vs.current=null},onPointerDown:Q=>{Gu||!$s||(og.current=new Date,co(Us.current),Q.target.setPointerCapture(Q.pointerId),Q.target.tagName!=="BUTTON"&&(Ds(!0),Vs.current={x:Q.clientX,y:Q.clientY}))},onPointerUp:()=>{var Q,ce,ve,Ht;if(rr||!$s)return;Vs.current=null;let Wt=Number(((Q=Yr.current)==null?void 0:Q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ir=Number(((ce=Yr.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Qr=new Date().getTime()-((ve=og.current)==null?void 0:ve.getTime()),qt=ee==="x"?Wt:ir,or=Math.abs(qt)/Qr;if(Math.abs(qt)>=$R||or>.11){co(Us.current),(Ht=f.onDismiss)==null||Ht.call(f,f),Qe(ee==="x"?Wt>0?"right":"left":ir>0?"down":"up"),sr(),Ya(!0),Qa(!1);return}Ds(!1),ne(null)},onPointerMove:Q=>{var ce,ve,Ht,Wt;if(!Vs.current||!$s||((ce=window.getSelection())==null?void 0:ce.toString().length)>0)return;let ir=Q.clientY-Vs.current.y,Qr=Q.clientX-Vs.current.x,qt=(ve=e.swipeDirections)!=null?ve:VR(q);!ee&&(Math.abs(Qr)>1||Math.abs(ir)>1)&&ne(Math.abs(Qr)>Math.abs(ir)?"x":"y");let or={x:0,y:0};ee==="y"?(qt.includes("top")||qt.includes("bottom"))&&(qt.includes("top")&&ir<0||qt.includes("bottom")&&ir>0)&&(or.y=ir):ee==="x"&&(qt.includes("left")||qt.includes("right"))&&(qt.includes("left")&&Qr<0||qt.includes("right")&&Qr>0)&&(or.x=Qr),(Math.abs(or.x)>0||Math.abs(or.y)>0)&&Qa(!0),(Ht=Yr.current)==null||Ht.style.setProperty("--swipe-amount-x",`${or.x}px`),(Wt=Yr.current)==null||Wt.style.setProperty("--swipe-amount-y",`${or.y}px`)}},cT&&!f.jsx?j.createElement("button",{"aria-label":K,"data-disabled":Gu,"data-close-button":!0,onClick:Gu||!$s?()=>{}:()=>{var Q;sr(),(Q=f.onDismiss)==null||Q.call(f,f)},className:Gt(R==null?void 0:R.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=M==null?void 0:M.close)!=null?i:ER):null,f.jsx||b.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:j.createElement(j.Fragment,null,jt||f.icon||f.promise?j.createElement("div",{"data-icon":"",className:Gt(R==null?void 0:R.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||fT():null,f.type!=="loading"?f.icon||(M==null?void 0:M[jt])||yR(jt):null):null,j.createElement("div",{"data-content":"",className:Gt(R==null?void 0:R.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},j.createElement("div",{"data-title":"",className:Gt(R==null?void 0:R.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?j.createElement("div",{"data-description":"",className:Gt(U,lT,R==null?void 0:R.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),b.isValidElement(f.cancel)?f.cancel:f.cancel&&xl(f.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||C,onClick:Q=>{var ce,ve;xl(f.cancel)&&$s&&((ve=(ce=f.cancel).onClick)==null||ve.call(ce,Q),sr())},className:Gt(R==null?void 0:R.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,b.isValidElement(f.action)?f.action:f.action&&xl(f.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||I,onClick:Q=>{var ce,ve;xl(f.action)&&((ve=(ce=f.action).onClick)==null||ve.call(ce,Q),!Q.defaultPrevented&&sr())},className:Gt(R==null?void 0:R.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function Hy(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function BR(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?IR:LR;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var e_=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:h,style:f,visibleToasts:y=NR,toastOptions:g,dir:x=Hy(),gap:v=MR,loadingIcon:m,icons:w,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[T,E]=j.useState([]),k=j.useMemo(()=>Array.from(new Set([r].concat(T.filter(W=>W.position).map(W=>W.position)))),[T,r]),[P,C]=j.useState([]),[I,N]=j.useState(!1),[U,D]=j.useState(!1),[q,z]=j.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
182k":"light"),Y=j.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=j.useRef(null),M=j.useRef(!1),K=j.useCallback(W=>{E(ee=>{var ne;return(ne=ee.find(je=>je.id===W.id))!=null&&ne.delete||ft.dismiss(W.id),ee.filter(({id:je})=>je!==W.id)})},[]);return j.useEffect(()=>ft.subscribe(W=>{if(W.dismiss){E(ee=>ee.map(ne=>ne.id===W.id?{...ne,delete:!0}:ne));return}setTimeout(()=>{Zb.flushSync(()=>{E(ee=>{let ne=ee.findIndex(je=>je.id===W.id);return ne!==-1?[...ee.slice(0,ne),{...ee[ne],...W},...ee.slice(ne+1)]:[W,...ee]})})})}),[]),j.useEffect(()=>{if(u!=="system"){z(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;let W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:ee})=>{z(ee?"dark":"light")})}catch{W.addListener(({matches:ne})=>{try{z(ne?"dark":"light")}catch(je){console.error(je)}})}},[u]),j.useEffect(()=>{T.length<=1&&N(!1)},[T]),j.useEffect(()=>{let W=ee=>{var ne,je;s.every(Qe=>ee[Qe]||ee.code===Qe)&&(N(!0),(ne=Y.current)==null||ne.focus()),ee.code==="Escape"&&(document.activeElement===Y.current||(je=Y.current)!=null&&je.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s]),j.useEffect(()=>{if(Y.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,M.current=!1)}},[Y.current]),j.createElement("section",{ref:t,"aria-label":`${_} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((W,ee)=>{var ne;let[je,Qe]=W.split("-");return T.length?j.createElement("ol",{key:W,dir:x==="auto"?Hy():x,tabIndex:-1,ref:Y,className:a,"data-sonner-toaster":!0,"data-theme":q,"data-y-position":je,"data-lifted":I&&T.length>1&&!i,"data-x-position":Qe,style:{"--front-toast-height":`${((ne=P[0])==null?void 0:ne.height)||0}px`,"--width":`${DR}px`,"--gap":`${v}px`,...f,...BR(l,c)},onBlur:ie=>{M.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(M.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||M.current||(M.current=!0,R.current=ie.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{U||N(!1)},onDragEnd:()=>N(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},T.filter(ie=>!ie.position&&ee===0||ie.position===W).map((ie,Is)=>{var tr,Jr;return j.createElement(FR,{key:ie.id,icons:w,index:Is,toast:ie,defaultRichColors:d,duration:(tr=g==null?void 0:g.duration)!=null?tr:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:y,closeButton:(Jr=g==null?void 0:g.closeButton)!=null?Jr:o,interacting:U,position:W,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:K,toasts:T.filter(nr=>nr.position==ie.position),heights:P.filter(nr=>nr.position==ie.position),setHeights:C,expandByDefault:i,gap:v,loadingIcon:m,expanded:I,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const zR=Object.freeze(Object.defineProperty({__proto__:null,Toaster:e_,toast:Ae},Symbol.toStringTag,{value:"Module"})),HR=({...e})=>{const{theme:t="system"}=gR();return p.jsx(e_,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var WR=hp[" useId ".trim().toString()]||(()=>{}),qR=0;function KR(e){const[t,n]=b.useState(WR());return Jn(()=>{e||n(r=>r??String(qR++))},[e]),e||(t?`radix-${t}`:"")}const GR=["top","right","bottom","left"],Vr=Math.min,St=Math.max,Mc=Math.round,bl=Math.floor,An=e=>({x:e,y:e}
vendor: 11,176 bytes, line 182
182),JR={left:"right",right:"left",bottom:"top",top:"bottom"},YR={start:"end",end:"start"};function cf(e,t,n){return St(e,Vr(t,n))}function Yn(e,t){return typeof e=="function"?e(t):e}function Qn(e){return e.split("-")[0]}function eo(e){return e.split("-")[1]}function hm(e){return e==="x"?"y":"x"}function fm(e){return e==="y"?"height":"width"}const QR=new Set(["top","bottom"]);function kn(e){return QR.has(Qn(e))?"y":"x"}function pm(e){return hm(kn(e))}function XR(e,t,n){n===void 0&&(n=!1);const r=eo(e),s=pm(e),i=fm(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=$c(o)),[o,$c(o)]}function ZR(e){const t=$c(e);return[uf(e),t,uf(t)]}function uf(e){return e.replace(/start|end/g,t=>YR[t])}const Wy=["left","right"],qy=["right","left"],eO=["top","bottom"],tO=["bottom","top"];function nO(e,t,n){switch(e){case"top":case"bottom":return n?t?qy:Wy:t?Wy:qy;case"left":case"right":return t?eO:tO;default:return[]}}function rO(e,t,n,r){const s=eo(e);let i=nO(Qn(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(uf)))),i}function $c(e){return e.replace(/left|right|bottom|top/g,t=>JR[t])}function sO(e){return{top:0,right:0,bottom:0,left:0,...e}}function t_(e){return typeof e!="number"?sO(e):{top:e,right:e,bottom:e,left:e}}function Uc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Ky(e,t,n){let{reference:r,floating:s}=e;const i=kn(t),o=pm(t),a=fm(o),l=Qn(t),c=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-s.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-s.width,y:d};break;default:f={x:r.x,y:r.y}}switch(eo(t)){case"start":f[o]-=h*(n&&c?-1:1);break;case"end":f[o]+=h*(n&&c?-1:1);break}return f}const iO=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=Ky(c,r,l),h=r,f={},y=0;for(let g=0;g<a.length;g++){const{name:x,fn:v}=a[g],{x:m,y:w,data:_,reset:S}=await v({x:u,y:d,initialPlacement:r,placement:h,strategy:s,middlewareData:f,rects:c,platform:o,elements:{reference:e,floating:t}});u=m??u,d=w??d,f={...f,[x]:{...f[x],..._}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:u,y:d}=Ky(c,h,l)),g=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:f}};async function pa(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=Yn(t,e),y=t_(f),x=a[h?d==="floating"?"reference":"floating":d],v=Uc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),m=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},S=Uc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:l}):m);return{top:(v.top-S.top+y.top)/_.y,bottom:(S.bottom-v.bottom+y.bottom)/_.y,left:(v.left-S.left+y.left)/_.x,right:(S.right-v.right+y.right)/_.x}}const oO=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Yn(e,t)||{};if(c==null)return{};const d=t_(u),h={x:n,y:r},f=pm(s),y=fm(f),g=await o.getDimensions(c),x=f==="y",v=x?"top":"left",m=x?"bottom":"right",w=x?"clientHeight":"clientWidth",_=i.reference[y]+i.reference[f]-h[f]-i.floating[y],S=h[f]-i.reference[f],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=T?T[w]:0;(!E||!await(o.isElement==null?void 0:o.isElement(T)))&&(E=a.floating[w]||i.floating[y]);const k=_/2-S/2,P=E/2-g[y]/2-1,C=Vr(d[v],P),I=Vr(d[m],P),N=C,U=E-g[y]-I,D=E/2-g[y]/2+k,q=cf(N,D,U),z=!l.arrow&&eo(s)!=null&&D!==q&&i.reference[y]/2-(D<N?C:I)-g[y]/2<0,Y=z?D<N?D-N:D-U:0;return{[f]:h[f]+Y,data:{[f]:q,centerOffset:D-q-Y,...z&&{alignmentOffset:Y}},reset:z}}}),aO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...x}=Yn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Qn(s),m=kn(a),w=Qn(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(w||!g?[$c(a)]:ZR(a)),T=y!=="none";!h&&T&&S.push(...rO(a,g,y,_));const E=[a,...S],k=await pa(t,x),P=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(k[v]),d){const D=XR(s,o,_);P.push(k[D[0]],k[D[1]])}if(C=[...C,{placement:s,overflows:P}],!P.every(D=>D<=0)){var I,N;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,q=E[D];if(q&&(!(d==="alignment"?m!==kn(q):!1)||C.every(A=>A.overflows[0]>0&&kn(A.placement)===m)))return{data:{index:D,overflows:C},reset:{placement:q}};let z=(N=C.filter(Y=>Y.overflows[0]<=0).sort((Y,A)=>Y.overflows[1]-A.overflows[1])[0])==null?void 0:N.placement;if(!z)switch(f){case"bestFit":{var U;const Y=(U=C.filter(A=>{if(T){const R=kn(A.placement);return R===m||R==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((A,R)=>A[1]-R[1])[0])==null?void 0:U[0];Y&&(z=Y);break}case"initialPlacement":z=a;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function Gy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jy(e){return GR.some(t=>e[t]>=0)}const lO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Yn(e,t);switch(r){case"referenceHidden":{const i=await pa(t,{...s,elementContext:"reference"}),o=Gy(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Jy(o)}}}case"escaped":{const i=await pa(t,{...s,altBoundary:!0}),o=Gy(i,n.floating);return{data:{escapedOffsets:o,escaped:Jy(o)}}}default:return{}}}}},n_=new Set(["left","top"]);async function cO(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=Qn(n),a=eo(n),l=kn(n)==="y",c=n_.has(o)?-1:1,u=i&&l?-1:1,d=Yn(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof y=="number"&&(f=a==="end"?y*-1:y),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const uO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await cO(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},dO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:v,y:m}=x;return{x:v,y:m}}},...l}=Yn(e,t),c={x:n,y:r},u=await pa(t,l),d=kn(Qn(s)),h=hm(d);let f=c[h],y=c[d];if(i){const x=h==="y"?"top":"left",v=h==="y"?"bottom":"right",m=f+u[x],w=f-u[v];f=cf(m,f,w)}if(o){const x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",m=y+u[x],w=y-u[v];y=cf(m,y,w)}const g=a.fn({...t,[h]:f,[d]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:i,[d]:o}}}}}},hO=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Yn(e,t),u={x:n,y:r},d=kn(s),h=hm(d);let f=u[h],y=u[d];const g=Yn(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=h==="y"?"height":"width",_=i.reference[h]-i.floating[w]+x.mainAxis,S=i.reference[h]+i.reference[w]-x.mainAxis;f<_?f=_:f>S&&(f=S)}if(c){var v,m;const w=h==="y"?"width":"height",_=n_.has(Qn(s)),S=i.reference[d]-i.floating[w]+(_&&((v=o.offset)==null?void 0:v[d])||0)+(_?0:x.crossAxis),T=i.reference[d]+i.reference[w]+(_?0:((m=o.offset)==null?void 0:m[d])||0)-(_?x.crossAxis:0);y<S?y=S:y>T&&(y=T)}return{[h]:f,[d]:y}}}},fO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=Yn(e,t),u=await pa(t,c),d=Qn(s),h=eo(s),f=kn(s)==="y",{width:y,height:g}=i.floating;let x,v;d==="top"||d==="bottom"?(x=d,v=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,x=h==="end"?"top":"bottom");const m=g-u.top-u.bottom,w=y-u.left-u.right,_=Vr(g-u[x],m),S=Vr(y-u[v],w),T=!t.middlewareData.shift;let E=_,k=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=m),T&&!h){const C=St(u.left,0),I=St(u.right,0),N=St(u.top,0),U=St(u.bottom,0);f?k=y-2*(C!==0||I!==0?C+I:St(u.left,u.right)):E=g-2*(N!==0||U!==0?N+U:St(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:E});const P=await o.getDimensions(a.floating);return y!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function Su(){return typeof window<"u"}function to(e){return r_(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nn(e){var t;return(t=(r_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function r_(e){return Su()?e instanceof Node||e instanceof Pt(e).Node:!1}function hn(e){return Su()?e instanceof Element||e instanceof Pt(e).Element:!1}function On(e){return Su()?e instanceof HTMLElement||e instanceof Pt(e).HTMLElement:!1}function Yy(e){return!Su()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}const pO=new Set(["inline","contents"]);function za(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=fn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!pO.has(s)}const mO=new Set(["table","td","th"]);function gO(e){return mO.has(to(e))}const yO=[":popover-open",":modal"];function Eu(e){return yO.some(t=>{try{return e.matches(t)}catch{return!1}})}const vO=["transform","translate","scale","rotate","perspective"],wO=["transform","translate","scale","rotate","perspective","filter"],xO=["paint","layout","strict","content"];function mm(e){const t=gm(),n=hn(e)?fn(e):e;return vO.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||wO.some(r=>(n.willChange||"").includes(r))||xO.some(r=>(n.contain||"").includes(r))}function bO(e){let t=Fr(e);for(;On(t)&&!zi(t);){if(mm(t))return t;if(Eu(t))return null;t=Fr(t)}
vendor: 4,225 bytes, line 182
182return null}function gm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _O=new Set(["html","body","#document"]);function zi(e){return _O.has(to(e))}function fn(e){return Pt(e).getComputedStyle(e)}function Tu(e){return hn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fr(e){if(to(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yy(e)&&e.host||Nn(e);return Yy(t)?t.host:t}function s_(e){const t=Fr(e);return zi(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&za(t)?t:s_(t)}function ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=s_(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=Pt(s);if(i){const a=df(o);return t.concat(o,o.visualViewport||[],za(s)?s:[],a&&n?ma(a):[])}return t.concat(s,ma(s,[],n))}function df(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function i_(e){const t=fn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=On(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Mc(n)!==i||Mc(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function ym(e){return hn(e)?e:e.contextElement}function ki(e){const t=ym(e);if(!On(t))return An(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=i_(t);let o=(i?Mc(n.width):n.width)/r,a=(i?Mc(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const SO=An(0);function o_(e){const t=Pt(e);return!gm()||!t.visualViewport?SO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function EO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function Rs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=ym(e);let o=An(1);t&&(r?hn(r)&&(o=ki(r)):o=ki(e));const a=EO(i,n,r)?o_(i):An(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const h=Pt(i),f=r&&hn(r)?Pt(r):r;let y=h,g=df(y);for(;g&&r&&f!==y;){const x=ki(g),v=g.getBoundingClientRect(),m=fn(g),w=v.left+(g.clientLeft+parseFloat(m.paddingLeft))*x.x,_=v.top+(g.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=w,c+=_,y=Pt(g),g=df(y)}}return Uc({width:u,height:d,x:l,y:c})}function vm(e,t){const n=Tu(e).scrollLeft;return t?t.left+n:Rs(Nn(e)).left+n}function a_(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:vm(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function TO(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=Nn(r),a=t?Eu(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=An(1);const u=An(0),d=On(r);if((d||!d&&!i)&&((to(r)!=="body"||za(o))&&(l=Tu(r)),On(r))){const f=Rs(r);c=ki(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=o&&!d&&!i?a_(o,l,!0):An(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function kO(e){return Array.from(e.getClientRects())}function CO(e){const t=Nn(e),n=Tu(e),r=e.ownerDocument.body,s=St(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=St(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+vm(e);const a=-n.scrollTop;return fn(r).direction==="rtl"&&(o+=St(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function PO(e,t){const n=Pt(e),r=Nn(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=gm();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const AO=new Set(["absolute","fixed"]);function RO(e,t){const n=Rs(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=On(e)?ki(e):An(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function Qy(e,t,n){let r;if(t==="viewport")r=PO(e,n);else if(t==="document")r=CO(Nn(e));else if(hn(t))r=RO(t,n);else{const s=o_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Uc(r)}function l_(e,t){const n=Fr(e);return n===t||!hn(n)||zi(n)?!1:fn(n).position==="fixed"||l_(n,t)}function OO(e,t){const n=t.get(e);if(n)return n;let r=ma(e,[],!1).filter(a=>hn(a)&&to(a)!=="body"),s=null;const i=fn(e).position==="fixed";let o=i?Fr(e):e;for(;hn(o)&&!zi(o);
vendor: 10,348 bytes, line 182
182){const a=fn(o),l=mm(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&AO.has(s.position)||za(o)&&!l&&l_(e,o))?r=r.filter(u=>u!==o):s=a,o=Fr(o)}return t.set(e,r),r}function jO(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?Eu(t)?[]:OO(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=Qy(t,u,s);return c.top=St(d.top,c.top),c.right=Vr(d.right,c.right),c.bottom=Vr(d.bottom,c.bottom),c.left=St(d.left,c.left),c},Qy(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function NO(e){const{width:t,height:n}=i_(e);return{width:t,height:n}}function LO(e,t,n){const r=On(t),s=Nn(t),i=n==="fixed",o=Rs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=An(0);function c(){l.x=vm(s)}if(r||!r&&!i)if((to(t)!=="body"||za(s))&&(a=Tu(t)),r){const f=Rs(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&c();i&&!r&&s&&c();const u=s&&!r&&!i?a_(s,a):An(0),d=o.left+a.scrollLeft-l.x-u.x,h=o.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:o.width,height:o.height}}function Rd(e){return fn(e).position==="static"}function Xy(e,t){if(!On(e)||fn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Nn(e)===n&&(n=n.ownerDocument.body),n}function c_(e,t){const n=Pt(e);if(Eu(e))return n;if(!On(e)){let s=Fr(e);for(;s&&!zi(s);){if(hn(s)&&!Rd(s))return s;s=Fr(s)}return n}let r=Xy(e,t);for(;r&&gO(r)&&Rd(r);)r=Xy(r,t);return r&&zi(r)&&Rd(r)&&!mm(r)?n:r||bO(e)||n}const IO=async function(e){const t=this.getOffsetParent||c_,n=this.getDimensions,r=await n(e.floating);return{reference:LO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function DO(e){return fn(e).direction==="rtl"}const MO={convertOffsetParentRelativeRectToViewportRelativeRect:TO,getDocumentElement:Nn,getClippingRect:jO,getOffsetParent:c_,getElementRects:IO,getClientRects:kO,getDimensions:NO,getScale:ki,isElement:hn,isRTL:DO};function u_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $O(e,t){let n=null,r;const s=Nn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(a||t(),!h||!f)return;const y=bl(d),g=bl(s.clientWidth-(u+h)),x=bl(s.clientHeight-(d+f)),v=bl(u),w={rootMargin:-y+"px "+-g+"px "+-x+"px "+-v+"px",threshold:St(0,Vr(1,l))||1};let _=!0;function S(T){const E=T[0].intersectionRatio;if(E!==l){if(!_)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!u_(c,e.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(S,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return o(!0),i}function UO(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ym(e),u=s||i?[...c?ma(c):[],...ma(t)]:[];u.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?$O(c,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(v=>{let[m]=v;m&&m.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let y,g=l?Rs(e):null;l&&x();function x(){const v=Rs(e);g&&!u_(g,v)&&n(),g=v,y=requestAnimationFrame(x)}return n(),()=>{var v;u.forEach(m=>{s&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),d==null||d(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(y)}}const VO=uO,FO=dO,BO=aO,zO=fO,HO=lO,Zy=oO,WO=hO,qO=(e,t,n)=>{const r=new Map,s={platform:MO,...n},i={...s.platform,_c:r};return iO(e,t,{...s,platform:i})};var KO=typeof document<"u",GO=function(){},Zl=KO?b.useLayoutEffect:GO;function Vc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vc(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!Vc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function d_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ev(e,t){const n=d_(e);return Math.round(t*n)/n}function Od(e){const t=b.useRef(e);return Zl(()=>{t.current=e}),t}function JO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=b.useState(r);Vc(h,r)||f(r);const[y,g]=b.useState(null),[x,v]=b.useState(null),m=b.useCallback(A=>{A!==T.current&&(T.current=A,g(A))},[]),w=b.useCallback(A=>{A!==E.current&&(E.current=A,v(A))},[]),_=i||y,S=o||x,T=b.useRef(null),E=b.useRef(null),k=b.useRef(u),P=l!=null,C=Od(l),I=Od(s),N=Od(c),U=b.useCallback(()=>{if(!T.current||!E.current)return;const A={placement:t,strategy:n,middleware:h};I.current&&(A.platform=I.current),qO(T.current,E.current,A).then(R=>{const M={...R,isPositioned:N.current!==!1};D.current&&!Vc(k.current,M)&&(k.current=M,Fa.flushSync(()=>{d(M)}))})},[h,t,n,I,N]);Zl(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[c]);const D=b.useRef(!1);Zl(()=>(D.current=!0,()=>{D.current=!1}),[]),Zl(()=>{if(_&&(T.current=_),S&&(E.current=S),_&&S){if(C.current)return C.current(_,S,U);U()}},[_,S,U,C,P]);const q=b.useMemo(()=>({reference:T,floating:E,setReference:m,setFloating:w}),[m,w]),z=b.useMemo(()=>({reference:_,floating:S}),[_,S]),Y=b.useMemo(()=>{const A={position:n,left:0,top:0};if(!z.floating)return A;const R=ev(z.floating,u.x),M=ev(z.floating,u.y);return a?{...A,transform:"translate("+R+"px, "+M+"px)",...d_(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:M}},[n,a,z.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:U,refs:q,elements:z,floatingStyles:Y}),[u,U,q,z,Y])}const YO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Zy({element:r.current,padding:s}).fn(n):{}:r?Zy({element:r,padding:s}).fn(n):{}}}},QO=(e,t)=>({...VO(e),options:[e,t]}),XO=(e,t)=>({...FO(e),options:[e,t]}),ZO=(e,t)=>({...WO(e),options:[e,t]}),ej=(e,t)=>({...BO(e),options:[e,t]}),tj=(e,t)=>({...zO(e),options:[e,t]}),nj=(e,t)=>({...HO(e),options:[e,t]}),rj=(e,t)=>({...YO(e),options:[e,t]});var sj="Arrow",h_=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return p.jsx(xt.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});h_.displayName=sj;var ij=h_;function oj(e){const[t,n]=b.useState(void 0);return Jn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var wm="Popper",[f_,p_]=xu(wm),[aj,m_]=f_(wm),g_=e=>{const{__scopePopper:t,children:n}=e,[r,s]=b.useState(null);return p.jsx(aj,{scope:t,anchor:r,onAnchorChange:s,children:n})};g_.displayName=wm;var y_="PopperAnchor",v_=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=m_(y_,n),o=b.useRef(null),a=dn(t,o);return b.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:p.jsx(xt.div,{...s,ref:a})});v_.displayName=y_;var xm="PopperContent",[lj,cj]=f_(xm),w_=b.forwardRef((e,t)=>{var ie,Is,tr,Jr,nr,Ds;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:f="optimized",onPlaced:y,...g}=e,x=m_(xm,n),[v,m]=b.useState(null),w=dn(t,rr=>m(rr)),[_,S]=b.useState(null),T=oj(_),E=(T==null?void 0:T.width)??0,k=(T==null?void 0:T.height)??0,P=r+(i!=="center"?"-"+i:""),C=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},I=Array.isArray(c)?c:[c],N=I.length>0,U={padding:C,boundary:I.filter(dj),altBoundary:N},{refs:D,floatingStyles:q,placement:z,isPositioned:Y,middlewareData:A}=JO({strategy:"fixed",placement:P,whileElementsMounted:(...rr)=>UO(...rr,{animationFrame:f==="always"}),elements:{reference:x.anchor},middleware:[QO({mainAxis:s+k,alignmentAxis:o}),l&&XO({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?ZO():void 0,...U}),l&&ej({...U}),tj({...U,apply:({elements:rr,rects:Ya,availableWidth:Wu,availableHeight:Qa})=>{const{width:qu,height:co}=Ya.reference,Ms=rr.floating.style;Ms.setProperty("--radix-popper-available-width",`${Wu}px`),Ms.setProperty("--radix-popper-available-height",`${Qa}px`),Ms.setProperty("--radix-popper-anchor-width",`${qu}px`),Ms.setProperty("--radix-popper-anchor-height",`${co}px`)}}),_&&rj({element:_,padding:a}),hj({arrowWidth:E,arrowHeight:k}),h&&nj({strategy:"referenceHidden",...U})]}),[R,M]=__(z),K=Ur(y);Jn(()=>{Y&&(K==null||K())},[Y,K]);const W=(ie=A.arrow)==null?void 0:ie.x,ee=(Is=A.arrow)==null?void 0:Is.y,ne=((tr=A.arrow)==null?void 0:tr.centerOffset)!==0,[je,Qe]=b.useState();return Jn(()=>{v&&Qe(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:Y?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:je,"--radix-popper-transform-origin":[(Jr=A.transformOrigin)==null?void 0:Jr.x,(nr=A.transformOrigin)==null?void 0:nr.y].join(" "),...((Ds=A.hide)==null?void 0:Ds.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(lj,{scope:n,placedSide:R,onArrowChange:S,arrowX:W,arrowY:ee,shouldHideArrow:ne,children:p.jsx(xt.div,{"data-side":R,"data-align":M,...g,ref:w,style:{...g.style,animation:Y?void 0:"none"}})})})});
vendor: 4,380 bytes, line 182
182w_.displayName=xm;var x_="PopperArrow",uj={top:"bottom",right:"left",bottom:"top",left:"right"},b_=b.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=cj(x_,r),o=uj[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(ij,{...s,ref:n,style:{...s.style,display:"block"}})})});b_.displayName=x_;function dj(e){return e!==null}var hj=e=>({name:"transformOrigin",options:e,fn(t){var x,v,m;const{placement:n,rects:r,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,u]=__(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,f=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let y="",g="";return c==="bottom"?(y=o?d:`${h}px`,g=`${-l}px`):c==="top"?(y=o?d:`${h}px`,g=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,g=o?d:`${f}px`):c==="left"&&(y=`${r.floating.width+l}px`,g=o?d:`${f}px`),{data:{x:y,y:g}}}});function __(e){const[t,n="center"]=e.split("-");return[t,n]}var fj=g_,pj=v_,mj=w_,gj=b_,[ku,B4]=xu("Tooltip",[p_]),Cu=p_(),S_="TooltipProvider",yj=700,hf="tooltip.open",[vj,bm]=ku(S_),E_=e=>{const{__scopeTooltip:t,delayDuration:n=yj,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(vj,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};E_.displayName=S_;var ga="Tooltip",[wj,Pu]=ku(ga),T_=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,l=bm(ga,e.__scopeTooltip),c=Cu(t),[u,d]=b.useState(null),h=KR(),f=b.useRef(0),y=o??l.disableHoverableContent,g=a??l.delayDuration,x=b.useRef(!1),[v,m]=m1({prop:r,defaultProp:s??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(hf))):l.onClose(),i==null||i(E)},caller:ga}),w=b.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),_=b.useCallback(()=>{window.clearTimeout(f.current),f.current=0,x.current=!1,m(!0)},[m]),S=b.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m(!1)},[m]),T=b.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{x.current=!0,m(!0),f.current=0},g)},[g,m]);return b.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),p.jsx(fj,{...c,children:p.jsx(wj,{scope:t,contentId:h,open:v,stateAttribute:w,trigger:u,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?T():_()},[l.isOpenDelayedRef,T,_]),onTriggerLeave:b.useCallback(()=>{y?S():(window.clearTimeout(f.current),f.current=0)},[S,y]),onOpen:_,onClose:S,disableHoverableContent:y,children:n})})};T_.displayName=ga;var ff="TooltipTrigger",k_=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Pu(ff,n),i=bm(ff,n),o=Cu(n),a=b.useRef(null),l=dn(t,a,s.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(pj,{asChild:!0,...o,children:p.jsx(xt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:Ue(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:Ue(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ue(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:Ue(e.onBlur,s.onClose),onClick:Ue(e.onClick,s.onClose)})})});k_.displayName=ff;var xj="TooltipPortal",[z4,bj]=ku(xj,{forceMount:void 0}),Hi="TooltipContent",C_=b.forwardRef((e,t)=>
vendor: 4,283 bytes, line 182
182{const n=bj(Hi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=Pu(Hi,e.__scopeTooltip);return p.jsx(om,{present:r||o.open,children:o.disableHoverableContent?p.jsx(P_,{side:s,...i,ref:t}):p.jsx(_j,{side:s,...i,ref:t})})}),_j=b.forwardRef((e,t)=>{const n=Pu(Hi,e.__scopeTooltip),r=bm(Hi,e.__scopeTooltip),s=b.useRef(null),i=dn(t,s),[o,a]=b.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:d}=r,h=b.useCallback(()=>{a(null),d(!1)},[d]),f=b.useCallback((y,g)=>{const x=y.currentTarget,v={x:y.clientX,y:y.clientY},m=Cj(v,x.getBoundingClientRect()),w=Pj(v,m),_=Aj(g.getBoundingClientRect()),S=Oj([...w,..._]);a(S),d(!0)},[d]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(l&&u){const y=x=>f(x,u),g=x=>f(x,l);return l.addEventListener("pointerleave",y),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",g)}}},[l,u,f,h]),b.useEffect(()=>{if(o){const y=g=>{const x=g.target,v={x:g.clientX,y:g.clientY},m=(l==null?void 0:l.contains(x))||(u==null?void 0:u.contains(x)),w=!Rj(v,o);m?h():w&&(h(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,u,o,c,h]),p.jsx(P_,{...e,ref:i})}),[Sj,Ej]=ku(ga,{isInside:!1}),Tj=PP("TooltipContent"),P_=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Pu(Hi,n),c=Cu(n),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(hf,u),()=>document.removeEventListener(hf,u)),[u]),b.useEffect(()=>{if(l.trigger){const d=h=>{const f=h.target;f!=null&&f.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),p.jsx(im,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(mj,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Tj,{children:r}),p.jsx(Sj,{scope:n,isInside:!0,children:p.jsx(XP,{id:l.contentId,role:"tooltip",children:s||r})})]})})});C_.displayName=Hi;var A_="TooltipArrow",kj=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Cu(n);return Ej(A_,n).isInside?null:p.jsx(gj,{...s,...r,ref:t})});kj.displayName=A_;function Cj(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Pj(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Aj(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function Rj(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],c=a.x,u=a.y,d=l.x,h=l.y;u>r!=h>r&&n<(d-c)*(r-u)/(h-u)+c&&(s=!s)}return s}function Oj(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),jj(t)}function jj(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Nj=E_,Lj=T_,Ij=k_,R_=C_;const Dj=Nj,H4=Lj,W4=Ij,Mj=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
vendor: 14,520 bytes, line 182
182p.jsx(R_,{ref:r,sideOffset:t,className:Re("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Mj.displayName=R_.displayName;var Au=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ru=typeof window>"u"||"Deno"in globalThis;function Zt(){}function $j(e,t){return typeof e=="function"?e(t):e}function Uj(e){return typeof e=="number"&&e>=0&&e!==1/0}function Vj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pf(e,t){return typeof e=="function"?e(t):e}function Fj(e,t){return typeof e=="function"?e(t):e}function tv(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==_m(o,t.options))return!1}else if(!va(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function nv(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ya(t.options.mutationKey)!==ya(i))return!1}else if(!va(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function _m(e,t){return((t==null?void 0:t.queryKeyHashFn)||ya)(e)}function ya(e){return JSON.stringify(e,(t,n)=>mf(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function va(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>va(e[n],t[n])):!1}function O_(e,t){if(e===t)return e;const n=rv(e)&&rv(t);if(n||mf(e)&&mf(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=O_(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function rv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function mf(e){if(!sv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!sv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sv(e){return Object.prototype.toString.call(e)==="[object Object]"}function Bj(e){return new Promise(t=>{setTimeout(t,e)})}function zj(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?O_(e,t):t}function Hj(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Wj(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Sm=Symbol();function j_(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Sm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ms,wr,Pi,Nw,qj=(Nw=class extends Au{constructor(){super();se(this,ms);se(this,wr);se(this,Pi);X(this,Pi,t=>{if(!Ru&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,wr)||this.setEventListener(O(this,Pi))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,wr))==null||t.call(this),X(this,wr,void 0))}setEventListener(t){var n;X(this,Pi,t),(n=O(this,wr))==null||n.call(this),X(this,wr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){O(this,ms)!==t&&(X(this,ms,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof O(this,ms)=="boolean"?O(this,ms):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ms=new WeakMap,wr=new WeakMap,Pi=new WeakMap,Nw),N_=new qj,Ai,xr,Ri,Lw,Kj=(Lw=class extends Au{constructor(){super();se(this,Ai,!0);se(this,xr);se(this,Ri);X(this,Ri,t=>{if(!Ru&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){O(this,xr)||this.setEventListener(O(this,Ri))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,xr))==null||t.call(this),X(this,xr,void 0))}setEventListener(t){var n;X(this,Ri,t),(n=O(this,xr))==null||n.call(this),X(this,xr,t(this.setOnline.bind(this)))}setOnline(t){O(this,Ai)!==t&&(X(this,Ai,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return O(this,Ai)}},Ai=new WeakMap,xr=new WeakMap,Ri=new WeakMap,Lw),Fc=new Kj;function Gj(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function Jj(e){return Math.min(1e3*2**e,3e4)}function L_(e){return(e??"online")==="online"?Fc.isOnline():!0}var I_=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function jd(e){return e instanceof I_}function D_(e){let t=!1,n=0,r=!1,s;const i=Gj(),o=g=>{var x;r||(h(new I_(g)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>N_.isFocused()&&(e.networkMode==="always"||Fc.isOnline())&&e.canRun(),u=()=>L_(e.networkMode)&&e.canRun(),d=g=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,g),s==null||s(),i.resolve(g))},h=g=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,g),s==null||s(),i.reject(g))},f=()=>new Promise(g=>{var x;s=v=>{(r||c())&&g(v)},(x=e.onPause)==null||x.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(r)return;let g;const x=n===0?e.initialPromise:void 0;try{g=x??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(d).catch(v=>{var T;if(r)return;const m=e.retry??(Ru?0:3),w=e.retryDelay??Jj,_=typeof w=="function"?w(n,v):w,S=m===!0||typeof m=="number"&&n<m||typeof m=="function"&&m(n,v);if(t||!S){h(v);return}n++,(T=e.onFail)==null||T.call(e,n,v),Bj(_).then(()=>c()?void 0:f()).then(()=>{t?h(v):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?y():f().then(y),i)}}var Yj=e=>setTimeout(e,0);function Qj(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=Yj;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var ot=Qj(),gs,Iw,M_=(Iw=class{constructor(){se(this,gs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Uj(this.gcTime)&&X(this,gs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ru?1/0:5*60*1e3))}clearGcTimeout(){O(this,gs)&&(clearTimeout(O(this,gs)),X(this,gs,void 0))}},gs=new WeakMap,Iw),Oi,ys,It,vs,tt,Na,ws,tn,In,Dw,Xj=(Dw=class extends M_{constructor(t){super();se(this,tn);se(this,Oi);se(this,ys);se(this,It);se(this,vs);se(this,tt);se(this,Na);se(this,ws);X(this,ws,!1),X(this,Na,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,vs,t.client),X(this,It,O(this,vs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Oi,eN(this.options)),this.state=t.state??O(this,Oi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,tt))==null?void 0:t.promise}setOptions(t){this.options={...O(this,Na),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,It).remove(this)}setData(t,n){const r=zj(this.state.data,t,this.options);return Xe(this,tn,In).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Xe(this,tn,In).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=O(this,tt))==null?void 0:r.promise;return(s=O(this,tt))==null||s.cancel(t),n?n.then(Zt).catch(Zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,Oi))}isActive(){return this.observers.some(t=>Fj(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Sm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pf(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Vj(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,It).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(O(this,tt)&&(O(this,ws)?O(this,tt).cancel({revert:!0}):O(this,tt).cancelRetry()),this.scheduleGc()),O(this,It).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Xe(this,tn,In).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,tt))return O(this,tt).continueRetry(),O(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(X(this,ws,!0),r.signal)})},i=()=>{const h=j_(this.options,n),y=(()=>{const g={client:O(this,vs),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return X(this,ws,!1),this.options.persister?this.options.persister(h,y,this):h(y)},a=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:O(this,vs),state:this.state,fetchFn:i};return s(h),h})();(c=this.options.behavior)==null||c.onFetch(a,this),X(this,ys,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&Xe(this,tn,In).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=h=>{var f,y,g,x;jd(h)&&h.silent||Xe(this,tn,In).call(this,{type:"error",error:h}),jd(h)||((y=(f=O(this,It).config).onError)==null||y.call(f,h,this),(x=(g=O(this,It).config).onSettled)==null||x.call(g,this.state.data,h,this)),this.scheduleGc()};return X(this,tt,D_({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var f,y,g,x;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(v){l(v);return}(y=(f=O(this,It).config).onSuccess)==null||y.call(f,h,this),(x=(g=O(this,It).config).onSettled)==null||x.call(g,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,f)=>{Xe(this,tn,In).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{Xe(this,tn,In).call(this,{type:"pause"})},onContinue:()=>{Xe(this,tn,In).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),O(this,tt).start()}},Oi=new WeakMap,ys=new WeakMap,It=new WeakMap,vs=new WeakMap,tt=new WeakMap,Na=new WeakMap,ws=new WeakMap,tn=new WeakSet,In=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Zj(r.data,this.options),fetchMeta:t.meta??null};case"success":return X(this,ys,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return jd(s)&&s.revert&&O(this,ys)?{...O(this,ys),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ot.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),O(this,It).notify({query:this,type:"updated",action:t})})},Dw);function Zj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:L_(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function eN(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var xn,Mw,tN=(Mw=class extends Au{constructor(t={}){super();se(this,xn);this.config=t,X(this,xn,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??_m(s,n);let o=this.get(i);return o||(o=new Xj({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){O(this,xn).has(t.queryHash)||(O(this,xn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=O(this,xn).get(t.queryHash);n&&(t.destroy(),n===t&&O(this,xn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ot.batch(()=>
182{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,xn).get(t)}getAll(){return[...O(this,xn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>tv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>tv(t,r)):n}notify(t){ot.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ot.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ot.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xn=new WeakMap,Mw),bn,st,xs,_n,ur,$w,nN=($w=class extends M_{constructor(t){super();se(this,_n);se(this,bn);se(this,st);se(this,xs);this.mutationId=t.mutationId,X(this,st,t.mutationCache),X(this,bn,[]),this.state=t.state||rN(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,bn).includes(t)||(O(this,bn).push(t),this.clearGcTimeout(),O(this,st).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,bn,O(this,bn).filter(n=>n!==t)),this.scheduleGc(),O(this,st).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,bn).length||(this.state.status==="pending"?this.scheduleGc():O(this,st).remove(this))}continue(){var t;return((t=O(this,xs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,u,d,h,f,y,g,x,v,m,w,_,S,T,E,k;const n=()=>{Xe(this,_n,ur).call(this,{type:"continue"})};X(this,xs,D_({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,C)=>{Xe(this,_n,ur).call(this,{type:"failed",failureCount:P,error:C})},onPause:()=>{Xe(this,_n,ur).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,st).canRun(this)}));const r=this.state.status==="pending",s=!O(this,xs).canStart();try{if(r)n();else{Xe(this,_n,ur).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=O(this,st).config).onMutate)==null?void 0:o.call(i,t,this));const C=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));C!==this.state.context&&Xe(this,_n,ur).call(this,{type:"pending",context:C,variables:t,isPaused:s})}const P=await O(this,xs).start();return await((u=(c=O(this,st).config).onSuccess)==null?void 0:u.call(c,P,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,P,t,this.state.context)),await((y=(f=O(this,st).config).onSettled)==null?void 0:y.call(f,P,null,this.state.variables,this.state.context,this)),await((x=(g=this.options).onSettled)==null?void 0:x.call(g,P,null,t,this.state.context)),Xe(this,_n,ur).call(this,{type:"success",data:P}),P}catch(P){try{throw await((m=(v=O(this,st).config).onError)==null?void 0:m.call(v,P,t,this.state.context,this)),await((_=(w=this.options).onError)==null?void 0:_.call(w,P,t,this.state.context)),await((T=(S=O(this,st).config).onSettled)==null?void 0:T.call(S,void 0,P,this.state.variables,this.state.context,this)),await((k=(E=this.options).onSettled)==null?void 0:k.call(E,void 0,P,t,this.state.context)),P}finally{Xe(this,_n,ur).call(this,{type:"error",error:P})}}finally{O(this,st).runNext(this)}}},bn=new WeakMap,st=new WeakMap,xs=new WeakMap,_n=new WeakSet,ur=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ot.batch(()=>{O(this,bn).forEach(r=>{r.onMutationUpdate(t)}),O(this,st).notify({mutation:this,type:"updated",action:t})})},$w);function rN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Vn,nn,La,Uw,sN=(Uw=class extends Au{constructor(t={}){super();se(this,Vn);se(this,nn);se(this,La);this.config=t,X(this,Vn,new Set),X(this,nn,new Map),X(this,La,0)}build(t,n,r){const s=new nN({mutationCache:this,mutationId:++Za(this,La)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){O(this,Vn).add(t);const n=_l(t);if(typeof n=="string"){const r=O(this,nn).get(n);r?r.push(t):O(this,nn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,Vn).delete(t)){const n=_l(t);if(typeof n=="string"){const r=O(this,nn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&O(this,nn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=_l(t);if(typeof n=="string"){const r=O(this,nn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=_l(t);if(typeof n=="string"){const s=(r=O(this,nn).get(n))==null?void 0:r.find(i=>
182i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ot.batch(()=>{O(this,Vn).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,Vn).clear(),O(this,nn).clear()})}getAll(){return Array.from(O(this,Vn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>nv(n,r))}findAll(t={}){return this.getAll().filter(n=>nv(t,n))}notify(t){ot.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ot.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zt))))}},Vn=new WeakMap,nn=new WeakMap,La=new WeakMap,Uw);function _l(e){var t;return(t=e.options.scope)==null?void 0:t.id}function iv(e){return{onFetch:(t,n)=>{var u,d,h,f,y;const r=t.options,s=(h=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},v=j_(t.options,t.fetchOptions),m=async(w,_,S)=>{if(g)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return x(I),I})(),k=await v(E),{maxPages:P}=t.options,C=S?Wj:Hj;return{pages:C(w.pages,k,P),pageParams:C(w.pageParams,_,P)}};if(s&&i.length){const w=s==="backward",_=w?iN:ov,S={pages:i,pageParams:o},T=_(r,S);a=await m(S,T,w)}else{const w=e??i.length;do{const _=l===0?o[0]??r.initialPageParam:ov(r,a);if(l>0&&_==null)break;a=await m(a,_),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var g,x;return(x=(g=t.options).persister)==null?void 0:x.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function ov(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function iN(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ke,br,_r,ji,Ni,Sr,Li,Ii,Vw,oN=(Vw=class{constructor(e={}){se(this,ke);se(this,br);se(this,_r);se(this,ji);se(this,Ni);se(this,Sr);se(this,Li);se(this,Ii);X(this,ke,e.queryCache||new tN),X(this,br,e.mutationCache||new sN),X(this,_r,e.defaultOptions||{}),X(this,ji,new Map),X(this,Ni,new Map),X(this,Sr,0)}mount(){Za(this,Sr)._++,O(this,Sr)===1&&(X(this,Li,N_.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,ke).onFocus())})),X(this,Ii,Fc.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,ke).onOnline())})))}unmount(){var e,t;Za(this,Sr)._--,O(this,Sr)===0&&((e=O(this,Li))==null||e.call(this),X(this,Li,void 0),(t=O(this,Ii))==null||t.call(this),X(this,Ii,void 0))}isFetching(e){return O(this,ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,br).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=O(this,ke).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pf(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return O(this,ke).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=O(this,ke).get(r.queryHash),i=s==null?void 0:s.state.data,o=$j(t,i);if(o!==void 0)return O(this,ke).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ot.batch(()=>O(this,ke).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=O(this,ke);ot.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=O(this,ke);return ot.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ot.batch(()=>O(this,ke).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Zt).catch(Zt)}invalidateQueries(e,t={}){return ot.batch(()=>(O(this,ke).findAll(e).forEach(n=>
182{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ot.batch(()=>O(this,ke).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Zt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=O(this,ke).build(this,t);return n.isStaleByTime(pf(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zt).catch(Zt)}fetchInfiniteQuery(e){return e.behavior=iv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zt).catch(Zt)}ensureInfiniteQueryData(e){return e.behavior=iv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Fc.isOnline()?O(this,br).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,ke)}getMutationCache(){return O(this,br)}getDefaultOptions(){return O(this,_r)}setDefaultOptions(e){X(this,_r,e)}setQueryDefaults(e,t){O(this,ji).set(ya(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,ji).values()],n={};return t.forEach(r=>{va(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){O(this,Ni).set(ya(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,Ni).values()],n={};return t.forEach(r=>{va(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,_r).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=_m(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Sm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,_r).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,ke).clear(),O(this,br).clear()}},ke=new WeakMap,br=new WeakMap,_r=new WeakMap,ji=new WeakMap,Ni=new WeakMap,Sr=new WeakMap,Li=new WeakMap,Ii=new WeakMap,Vw),aN=b.createContext(void 0),lN=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(aN.Provider,{value:e,children:t}));/** 183 * @remix-run/router v1.23.0 184 * 185 * Copyright (c) Remix Software Inc. 186 * 187 * This source code is licensed under the MIT license found in the 188 * LICENSE.md file in the root directory of this source tree. 189 * 190 * @license MIT 191 */function wa(){return wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wa.apply(this,arguments)}var kr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kr||(kr={}));const av="popstate";function cN(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return gf("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Bc(s)}return dN(t,n,null,e)}function De(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $_(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function uN(){return Math.random().toString(36).substr(2,8)}function lv(e,t){return{usr:e.state,key:e.key,idx:t}}function gf(e,t,n,r){return n===void 0&&(n=null),wa({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?no(t):t,{state:n,key:t&&t.key||r||uN()})}function Bc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function no(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function dN(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=kr.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(wa({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=kr.Pop;let x=u(),v=x==null?null:x-c;c=x,l&&l({action:a,location:g.location,delta:v})}function h(x,v){a=kr.Push;let m=gf(g.location,x,v);c=u()+1;let w=lv(m,c),_=g.createHref(m);try{o.pushState(w,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:g.location,delta:1})}function f(x,v){a=kr.Replace;let m=gf(g.location,x,v);c=u();let w=lv(m,c),_=g.createHref(m);o.replaceState(w,"",_),i&&l&&l({action:a,location:g.location,delta:0})}function y(x){let v=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof x=="str
191ing"?x:Bc(x);return m=m.replace(/ $/,"%20"),De(v,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,v)}let g={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(av,d),l=x,()=>{s.removeEventListener(av,d),l=null}},createHref(x){return t(s,x)},createURL:y,encodeLocation(x){let v=y(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:f,go(x){return o.go(x)}};return g}var cv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(cv||(cv={}));function hN(e,t,n){return n===void 0&&(n="/"),fN(e,t,n,!1)}function fN(e,t,n,r){let s=typeof t=="string"?no(t):t,i=Em(s.pathname||"/",n);if(i==null)return null;let o=U_(e);pN(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=TN(i);a=SN(o[l],c,r)}return a}function U_(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(De(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Dr([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(De(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),U_(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:bN(c,i.index),routesMeta:u})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of V_(i.path))s(i,o,l)}),t}function V_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=V_(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function pN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:_N(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const mN=/^:[\w-]+$/,gN=3,yN=2,vN=1,wN=10,xN=-2,uv=e=>e==="*";function bN(e,t){let n=e.split("/"),r=n.length;return n.some(uv)&&(r+=xN),t&&(r+=yN),n.filter(s=>!uv(s)).reduce((s,i)=>s+(mN.test(i)?gN:i===""?vN:wN),r)}function _N(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function SN(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",d=dv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=dv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 9,263 bytes, lines 191-200
191Object.assign(s,d.params),o.push({params:s,pathname:Dr([i,d.pathname]),pathnameBase:AN(Dr([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=Dr([i,d.pathnameBase]))}return o}function dv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=EN(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:h,isOptional:f}=u;if(h==="*"){let g=a[d]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const y=a[d];return f&&!y?c[h]=void 0:c[h]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function EN(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),$_(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function TN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return $_(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Em(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function kN(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?no(e):e;return{pathname:n?n.startsWith("/")?n:CN(n,t):t,search:RN(r),hash:ON(s)}}function CN(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Nd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function PN(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function F_(e,t){let n=PN(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function B_(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=no(e):(s=wa({},e),De(!s.pathname||!s.pathname.includes("?"),Nd("?","pathname","search",s)),De(!s.pathname||!s.pathname.includes("#"),Nd("#","pathname","hash",s)),De(!s.search||!s.search.includes("#"),Nd("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;s.pathname=h.join("/")}a=d>=0?t[d]:"/"}let l=kN(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Dr=e=>e.join("/").replace(/\/\/+/g,"/"),AN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),RN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ON=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function jN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const z_=["post","put","patch","delete"];new Set(z_);const NN=["get",...z_];new Set(NN);/** 192 * React Router v6.30.1 193 * 194 * Copyright (c) Remix Software Inc. 195 * 196 * This source code is licensed under the MIT license found in the 197 * LICENSE.md file in the root directory of this source tree. 198 * 199 * @license MIT 200 */function xa(){return xa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xa.apply(this,arguments)}const Tm=b.createContext(null),LN=b.createContext(null),Ns=b.createContext(null),Ou=b.createContext(null),Kr=b.createContext({outlet:null,matches:[],isDataRoute:!1}),H_=b.createContext(null);function IN(e,t){let{relative:n}=t===void 0?{}:t;Ha()||De(!1);let{basename:r,navigator:s}=b.useContext(Ns),{hash:i,pathname:o,search:a}=q_(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Dr([r,o])),s.createHref({pathname:l,search:a,hash:i})}function Ha(){return b.useContext(Ou)!=null}function Ls(){return Ha()||De(!1),b.useContext(Ou).location}function W_(e){b.useContext(Ns).static||b.useLayoutEffect(e)}function ro(){let{isDataRoute:e}=b.useContext(Kr);return e?GN():DN()}function DN(){Ha()||De(!1);let e=b.useContext(Tm),{basename:t,future:n,navigator:r}=b.useContext(Ns),{matches:s}=b.useContext(Kr),{pathname:i}=Ls(),o=JSON.stringify(F_(s,n.v7_relativeSplatPath)),a=b.useRef(!1);return W_(()=>{a.current=!0}),b.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=B_(c,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Dr([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,o,i,e])}function q4(){let{matches:e}=b.useContext(Kr),t=e[e.length-1];return t?t.params:{}}function q_(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Ns),{matches:s}=b.useContext(Kr),{pathname:i}=Ls(),o=JSON.stringify(F_(s,r.v7_relativeSplatPath));return b.useMemo(()=>B_(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function MN(e,t){return $N(e,t)}function $N(e,t,n,r){Ha()||De(!1);let{navigator:s}=b.useContext(Ns),{matches:i}=b.useContext(Kr),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Ls(),u;if(t){var d;let x=typeof t=="string"?no(t):t;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||De(!1),u=x}else u=c;let h=u.pathname||"/",f=h;if(l!=="/"){let x=l.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let y=hN(e,{pathname:f}),g=zN(y&&y.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Dr([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Dr([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&g?b.createElement(Ou.Provider,{value:{location:xa({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:kr.Pop}},g):g}function UN(){let e=KN(),t=jN(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:s},n):null,null)}const VN=b.createElement(UN,null);class FN extends b.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(Kr.Provider,{value:this.props.routeContext},b.createElement(H_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function BN(e){let{routeContext:t,match:n,children:r}=e,s=b.useContext(Tm);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Kr.Provider,{value:t},r)}function zN(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||De(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:h,errors:f}=n,y=d.route.loader&&h[d.route.id]===void 0&&(!f||f[d.route.id]===void 0);if(d.route.lazy||y){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,h)=>{let f,y=!1,g=null,x=null;n&&(f=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||VN,l&&(c<0&&h===0?(y=!0,x=null):c===h&&(y=!0,x=d.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,h+1)),m=()=>{let w;return f?w=g:y?w=x:d.route.Component?w=b.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=u,b.createElement(BN,{match:d,routeC
200ontext:{outlet:u,matches:v,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?b.createElement(FN,{location:n.location,revalidation:n.revalidation,component:g,error:f,children:m(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):m()},null)}var K_=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(K_||{}),zc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(zc||{});function HN(e){let t=b.useContext(Tm);return t||De(!1),t}function WN(e){let t=b.useContext(LN);return t||De(!1),t}function qN(e){let t=b.useContext(Kr);return t||De(!1),t}function G_(e){let t=qN(),n=t.matches[t.matches.length-1];return n.route.id||De(!1),n.route.id}function KN(){var e;let t=b.useContext(H_),n=WN(zc.UseRouteError),r=G_(zc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function GN(){let{router:e}=HN(K_.UseNavigateStable),t=G_(zc.UseNavigateStable),n=b.useRef(!1);return W_(()=>{n.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,xa({fromRouteId:t},i)))},[e,t])}function JN(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function G(e){De(!1)}function YN(e){let{basename:t="/",children:n=null,location:r,navigationType:s=kr.Pop,navigator:i,static:o=!1,future:a}=e;Ha()&&De(!1);let l=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:i,static:o,future:xa({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=no(r));let{pathname:u="/",search:d="",hash:h="",state:f=null,key:y="default"}=r,g=b.useMemo(()=>{let x=Em(u,l);return x==null?null:{location:{pathname:x,search:d,hash:h,state:f,key:y},navigationType:s}},[l,u,d,h,f,y,s]);return g==null?null:b.createElement(Ns.Provider,{value:c},b.createElement(Ou.Provider,{children:n,value:g}))}function QN(e){let{children:t,location:n}=e;return MN(yf(t),n)}new Promise(()=>{});function yf(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(r,s)=>{if(!b.isValidElement(r))return;let i=[...t,s];if(r.type===b.Fragment){n.push.apply(n,yf(r.props.children,i));return}r.type!==G&&De(!1),!r.props.index||!r.props.children||De(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=yf(r.props.children,i)),n.push(o)}),n}/** 201 * React Router DOM v6.30.1 202 * 203 * Copyright (c) Remix Software Inc. 204 * 205 * This source code is licensed under the MIT license found in the 206 * LICENSE.md file in the root directory of this source tree. 207 * 208 * @license MIT 209 */function vf(){return vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vf.apply(this,arguments)}function XN(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function ZN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function eL(e,t){return e.button===0&&(!t||t==="_self")&&!ZN(e)}function wf(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function tL(e,t){let n=wf(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const nL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],rL="6";try{window.__reactRouterVersion=rL}catch{}const sL="startTransition",hv=hp[sL];function iL(e){let{basename:t,children:n,future:r,window:s}=e,i=b.useRef();i.current==null&&(i.current=cN({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=b.useCallback(d=>{c&&hv?hv(()=>l(d)):l(d)},[l,c]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>JN(r),[r]),b.createElement(YN,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const oL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",aL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,K4=b.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,h=XN(t,nL),{basename:f}=b.useContext(Ns),y,g=!1;if(typeof c=="string"&&aL.test(c)&&(y=c,oL))try{let w=new URL(window.location.href),_=c.startsWith("//")?new URL(w.protocol+c):new URL(c),S=Em(_.pathname,f);_.origin===w.origin&&S!=null?c=S+_.search+_.hash:g=!0}catch{}let x=IN(c,{relative:s}),v=lL(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:d});function m(w){r&&r(w),w.defaultPrevented||v(w)}return b.createElement("a",vf({},h,{href:y||x,onClick:g||i?r:m,ref:n,target:l}))});var fv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(fv||(fv={}));var pv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(pv||(pv={}));function lL(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=ro(),c=Ls(),u=q_(e,{relative:o});return b.useCallback(d=>
209{if(eL(d,n)){d.preventDefault();let h=r!==void 0?r:Bc(c)===Bc(u);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,e,i,o,a])}function G4(e){let t=b.useRef(wf(e)),n=b.useRef(!1),r=Ls(),s=b.useMemo(()=>tL(r.search,n.current?null:t.current),[r.search]),i=ro(),o=b.useCallback((a,l)=>{const c=wf(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}const km=b.createContext({});function Cm(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const cL=typeof window<"u",J_=cL?b.useLayoutEffect:b.useEffect,ju=b.createContext(null);function Pm(e,t){e.indexOf(t)===-1&&e.push(t)}function Hc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const jn=(e,t,n)=>n>t?t:n<e?e:n;let Nu=()=>{},Wi=()=>{};const Br={},Y_=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Q_(e){return typeof e=="object"&&e!==null}const X_=e=>/^0[^.\s]+$/u.test(e);function Z_(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ft=e=>e,uL=(e,t)=>n=>t(e(n)),Wa=(...e)=>e.reduce(uL),ba=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Am{constructor(){this.subscriptions=[]}add(t){return Pm(this.subscriptions,t),()=>Hc(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wt=e=>e*1e3,Ut=e=>e/1e3;function eS(e,t){return t?e*(1e3/t):0}const tS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,dL=1e-7,hL=12;function fL(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=tS(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>dL&&++a<hL);return o}function qa(e,t,n,r){if(e===t&&n===r)return Ft;const s=i=>fL(i,0,1,e,n);return i=>i===0||i===1?i:tS(s(i),t,r)}const nS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rS=e=>t=>1-e(1-t),sS=qa(.33,1.53,.69,.99),Rm=rS(sS),iS=nS(Rm),oS=e=>e>=1?1:(e*=2)<1?.5*Rm(e):.5*(2-Math.pow(2,-10*(e-1))),Om=e=>1-Math.sin(Math.acos(e)),aS=rS(Om),lS=nS(Om),pL=qa(.42,0,1,1),mL=qa(0,0,.58,1),cS=qa(.42,0,.58,1),gL=e=>Array.isArray(e)&&typeof e[0]!="number",uS=e=>Array.isArray(e)&&typeof e[0]=="number",mv={linear:Ft,easeIn:pL,easeInOut:cS,easeOut:mL,circIn:Om,circInOut:lS,circOut:aS,backIn:Rm,backInOut:iS,backOut:sS,anticipate:oS},yL=e=>typeof e=="string",gv=e=>{if(uS(e)){Wi(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return qa(t,n,r,s)}else if(yL(e))return Wi(mv[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),mv[e];return e},Sl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],yv={value:null,addProjectionMetrics:null};function vL(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){o.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,h=!1,f=!1)=>{const g=f&&s?n:r;return h&&o.add(d),g.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(a=d,s){i=!0;return}s=!0;const h=n;n=r,r=h,n.forEach(c),t&&yv.value&&yv.value.frameloop[t].push(l),l=0,n.clear(),s=!1,i&&(i=!1,u.process(d))}};return u}const wL=40;function dS(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Sl.reduce((w,_)=>(w[_]=vL(i,t?_:void 0),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:y}=o,g=()=>{const w=Br.useManualTiming,_=w?s.timestamp:performance.now();n=!1,w||(s.delta=r?1e3/60:Math.max(Math.min(_-s.timestamp,wL),1)),s.timestamp=_,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),y.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},x=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:Sl.reduce((w,_)=>{const S=o[_];return w[_]=(T,E=!1,k=!1)=>(n||x(),S.schedule(T,E,k)),w},{}),cancel:w=>{for(let _=0;_<Sl.length;_++)o[Sl[_]].cancel(w)},state:s,steps:o}}const{schedule:de,cancel:zr,state:Ke,steps:Ld}=dS(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ft,!0);let ec;function xL(){ec=void 0}const at={now:()=>(ec===void 0&&at.set(Ke.isProcessing||Br.useManualTiming?Ke.timestamp:performance.now()),ec),set:e=>{ec=e,queueMicrotask(xL)}},hS=e=>t=>typeof t=="string"&&t.startsWith(e),fS=hS("--"),bL=hS("var(--"),jm=e=>bL(e)?_L.test(e.split("/*")[0].trim()):!1,_L=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function vv(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const so={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},_a={...so,transform:e=>jn(0,1,e)},El={...so,default:1},Ho=e=>Math.round(e*1e5)/1e5,Nm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function SL(e){return e==null}const EL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Lm=(e,t)=>n=>!!(typeof n=="string"&&EL.test(n)&&n.startsWith(e)||t&&!SL(n)&&Object.prototype.hasOwnProperty.call(n,t)),pS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Nm);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},TL=e=>jn(0,255,e),Id={...so,transform:e=>Math.round(TL(e))},ds={test:Lm("rgb","red"),parse:pS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Id.transform(e)+", "+Id.transform(t)+", "+Id.transform(n)+", "+Ho(_a.transform(r))+")"};function kL(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alph
vendor: 4,326 bytes, line 209
209a:s?parseInt(s,16)/255:1}}const xf={test:Lm("#"),parse:kL,transform:ds.transform},Ka=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),dr=Ka("deg"),Rn=Ka("%"),F=Ka("px"),CL=Ka("vh"),PL=Ka("vw"),wv={...Rn,parse:e=>Rn.parse(e)/100,transform:e=>Rn.transform(e*100)},fi={test:Lm("hsl","hue"),parse:pS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Rn.transform(Ho(t))+", "+Rn.transform(Ho(n))+", "+Ho(_a.transform(r))+")"},Le={test:e=>ds.test(e)||xf.test(e)||fi.test(e),parse:e=>ds.test(e)?ds.parse(e):fi.test(e)?fi.parse(e):xf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ds.transform(e):fi.transform(e),getAnimatableNone:e=>{const t=Le.parse(e);return t.alpha=0,Le.transform(t)}},AL=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function RL(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Nm))==null?void 0:t.length)||0)+(((n=e.match(AL))==null?void 0:n.length)||0)>0}const mS="number",gS="color",OL="var",jL="var(",xv="${}",NL=/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 qi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(NL,l=>(Le.test(l)?(r.color.push(i),s.push(gS),n.push(Le.parse(l))):l.startsWith(jL)?(r.var.push(i),s.push(OL),n.push(l)):(r.number.push(i),s.push(mS),n.push(parseFloat(l))),++i,xv)).split(xv);return{values:n,split:a,indexes:r,types:s}}function LL(e){return qi(e).values}function yS({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===mS?s+=Ho(r[i]):o===gS?s+=Le.transform(r[i]):s+=r[i]}return s}}function IL(e){return yS(qi(e))}const DL=e=>typeof e=="number"?0:Le.test(e)?Le.getAnimatableNone(e):e,ML=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:DL(e);function $L(e){const t=qi(e);return yS(t)(t.values.map((r,s)=>ML(r,t.split[s])))}const cn={test:RL,parse:LL,createTransformer:IL,getAnimatableNone:$L};function Dd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function UL({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Dd(l,a,e+1/3),i=Dd(l,a,e),o=Dd(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Wc(e,t){return n=>n>0?t:e}const ge=(e,t,n)=>e+(t-e)*n,Md=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},VL=[xf,ds,fi],FL=e=>VL.find(t=>t.test(e));function bv(e){const t=FL(e);if(Nu(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===fi&&(n=UL(n)),n}const _v=(e,t)=>{const n=bv(e),r=bv(t);if(!n||!r)return Wc(e,t);const s={...n};return i=>(s.red=Md(n.red,r.red,i),s.green=Md(n.green,r.green,i),s.blue=Md(n.blue,r.blue,i),s.alpha=ge(n.alpha,r.alpha,i),ds.transform(s))},bf=new Set(["none","hidden"]);function BL(e,t){return bf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function zL(e,t){return n=>ge(e,t,n)}function Im(e){return typeof e=="number"?zL:typeof e=="string"?jm(e)?Wc:Le.test(e)?_v:qL:Array.isArray(e)?vS:typeof e=="object"?Le.test(e)?_v:HL:Wc}function vS(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Im(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function HL(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Im(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function WL(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const qL=(e,t)=>{const n=cn.createTransformer(t),r=qi(e),s=qi(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?bf.has(e)&&!s.values.length||bf.has(t)&&!r.values.length?BL(e,t):Wa(vS(WL(r,s),s.values),n):(Nu(!0,`Complex values '${e}' and '${t}
209' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Wc(e,t))};function wS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ge(e,t,n):Im(e)(e,t)}const KL=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>de.update(t,n),stop:()=>zr(t),now:()=>Ke.isProcessing?Ke.timestamp:at.now()}},xS=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},qc=2e4;function Dm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<qc;)t+=n,r=e.next(t);return t>=qc?1/0:t}function GL(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Dm(r),qc);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Ut(s)}}const _e={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 _f(e,t){return e*Math.sqrt(1-t*t)}const JL=12;function YL(e,t,n){let r=n;for(let s=1;s<JL;s++)r=r-e(r)/t(r);return r}const $d=.001;function QL({duration:e=_e.duration,bounce:t=_e.bounce,velocity:n=_e.velocity,mass:r=_e.mass}){let s,i;Nu(e<=wt(_e.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=jn(_e.minDamping,_e.maxDamping,o),e=jn(_e.minDuration,_e.maxDuration,Ut(e)),o<1?(s=c=>{const u=c*o,d=u*e,h=u-n,f=_f(c,o),y=Math.exp(-d);return $d-h/f*y},i=c=>{const d=c*o*e,h=d*n+n,f=Math.pow(o,2)*Math.pow(c,2)*e,y=Math.exp(-d),g=_f(Math.pow(c,2),o);return(-s(c)+$d>0?-1:1)*((h-f)*y)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-$d+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=YL(s,i,a);if(e=wt(e),isNaN(l))return{stiffness:_e.stiffness,damping:_e.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const XL=["duration","bounce"],ZL=["stiffness","damping","mass"];function Sv(e,t){return t.some(n=>e[n]!==void 0)}function eI(e){let t={velocity:_e.velocity,stiffness:_e.stiffness,damping:_e.damping,mass:_e.mass,isResolvedFromDuration:!1,...e};if(!Sv(e,ZL)&&Sv(e,XL))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*jn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:_e.mass,stiffness:s,damping:i}}else{const n=QL({...e,velocity:0});t={...t,...n,mass:_e.mass},t.isResolvedFromDuration=!0}return t}function Kc(e=_e.visualDuration,t=_e.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=eI({...n,velocity:-Ut(n.velocity||0)}),y=h||0,g=c/(2*Math.sqrt(l*u)),x=o-i,v=Ut(Math.sqrt(l/u)),m=Math.abs(x)<5;r||(r=m?_e.restSpeed.granular:_e.restSpeed.default),s||(s=m?_e.restDelta.granular:_e.restDelta.default);let w,_,S,T,E,k;if(g<1)S=_f(v,g),T=(y+g*v*x)/S,w=C=>{const I=Math.exp(-g*v*C);return o-I*(T*Math.sin(S*C)+x*Math.cos(S*C))},E=g*v*T+x*S,k=g*v*x-T*S,_=C=>Math.exp(-g*v*C)*(E*Math.sin(S*C)+k*Math.cos(S*C));else if(g===1){w=I=>o-Math.exp(-v*I)*(x+(y+v*x)*I);const C=y+v*x;_=I=>Math.exp(-v*I)*(v*C*I-y)}else{const C=v*Math.sqrt(g*g-1);w=D=>{const q=Math.exp(-g*v*D),z=Math.min(C*D,300);return o-q*((y+g*v*x)*Math.sinh(z)+C*x*Math.cosh(z))/C};const I=(y+g*v*x)/C,N=g*v*I-x*C,U=g*v*x-I*C;_=D=>{const q=Math.exp(-g*v*D),z=Math.min(C*D,300);return q*(N*Math.sinh(z)+U*Math.cosh(z))}}const P={calculatedDuration:f&&d||null,velocity:C=>wt(_(C)),next:C=>{if(!f&&g<1){const N=Math.exp(-g*v*C),U=Math.sin(S*C),D=Math.cos(S*C),q=o-N*(T*U+x*D),z=wt(N*(E*U+k*D));return a.done=Math.abs(z)<=r&&Math.abs(o-q)<=s,a.value=a.done?o:q,a}const I=w(C);if(f)a.done=C>=d;else{const N=wt(_(C));a.done=Math.abs(N)<=r&&Math.abs(o-I)<=s}return a.value=a.done?o:I,a},toString:()=>{const C=Math.min(Dm(P),qc),I=xS(N=>P.next(C*N).value,C,30);return C+"ms "+I},toTransition:()=>{}};return P}Kc.applyToOptions=e=>{const t=GL(e,100,Kc);return e.ease=t.ease,e.duration=wt(t.duration),e.type="keyframes",e};const tI=5;function bS(e,t,n){const r=Math.max(t-tI,0);return eS(n-e(r),t-r)}function Sf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},f=k=>a!==void 0&&k<a||l!==void 0&&k>l,y=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let g=n*t;const x=d+g,v=o===void 0?x:o(x);v!==x&&(g=v-d);const m=k=>-g*Math.exp(-k/r),w=k=>v+m(k),_=k=>{const P=m(k),C=w(k);h.done=Math.abs(P)<=c,h.value=h.done?v:C};let S,T;const E=k=>{f(h.value)&&(S=k,T=Kc({keyframes:[h.value,y(h.value)],velocity:bS(w,k,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:k=>{let P=!1;return!T&&S===void 0&&(P=!0,_(k),E(k)),S!==void 0&&k>=S?T.next(k-S):(!P&&_(k),h)}}}function nI(e,t,n){const r=[],s=n||Br.mix||wS,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Ft:t;a=Wa(l,a)}r.push(a)}return r}function rI(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Wi(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=nI(t,r,s),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=ba(e[d],e[d+1],u);return a[d](h)};return n?u=>c(jn(e[0],e[i-1],u)):c}function sI(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ba(0,t,r);e.push(ge(n,1,s))}}function iI(e){const t=[0];return sI(t,e.length-1),t}function oI(e,t){return e.map(n=>n*t)}function aI(e,t){return e.map(()=>t||cS).splice(0,e.length-1)}function Wo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=gL(r)?r.map(gv):gv(r),i={done:!1,value:t[0]},o=oI(n&&n.length===t.length?n:iI(t),e),a=rI(o,t,{ease:Array.isArray(s)?s:aI(t,
209s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const lI=e=>e!==null;function Lu(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(lI),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const cI={decay:Sf,inertia:Sf,tween:Wo,keyframes:Wo,spring:Kc};function _S(e){typeof e.type=="string"&&(e.type=cI[e.type])}class Mm{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const uI=e=>e/100;class Gc extends Mm{constructor(t){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 r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==at.now()&&this.tick(at.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;_S(t);const{type:n=Wo,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Wo;l!==Wo&&typeof a[0]!="number"&&(this.mixKeyframes=Wa(uI,wS(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Dm(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:f,type:y,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),m=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,_=r;if(d){const k=Math.min(this.currentTime,s)/a;let P=Math.floor(k),C=k%1;!C&&k>=1&&(C=1),C===1&&P--,P=Math.min(P,d+1),!!(P%2)&&(h==="reverse"?(C=1-C,f&&(C-=f/a)):h==="mirror"&&(_=o)),w=jn(0,1,C)*a}let S;m?(this.delayState.value=u[0],S=this.delayState):S=_.next(w),i&&!m&&(S.value=i(S.value));let{done:T}=S;!m&&l!==null&&(T=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return E&&y!==Sf&&(S.value=Lu(u,this.options,x,this.speed)),g&&g(S.value),E&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Ut(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(this.currentTime)}set time(t){t=wt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return bS(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(at.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Ut(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=KL,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(at.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function dI(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}
vendor: 4,046 bytes, line 209
209const hs=e=>e*180/Math.PI,Ef=e=>{const t=hs(Math.atan2(e[1],e[0]));return Tf(t)},hI={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ef,rotateZ:Ef,skewX:e=>hs(Math.atan(e[1])),skewY:e=>hs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Tf=e=>(e=e%360,e<0&&(e+=360),e),Ev=Ef,Tv=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),kv=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fI={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tv,scaleY:kv,scale:e=>(Tv(e)+kv(e))/2,rotateX:e=>Tf(hs(Math.atan2(e[6],e[5]))),rotateY:e=>Tf(hs(Math.atan2(-e[2],e[0]))),rotateZ:Ev,rotate:Ev,skewX:e=>hs(Math.atan(e[4])),skewY:e=>hs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function kf(e){return e.includes("scale")?1:0}function Cf(e,t){if(!e||e==="none")return kf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=fI,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=hI,s=a}if(!s)return kf(t);const i=r[t],o=s[1].split(",").map(mI);return typeof i=="function"?i(o):o[i]}const pI=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Cf(n,t)};function mI(e){return parseFloat(e.trim())}const io=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],oo=new Set(io),Cv=e=>e===so||e===F,gI=new Set(["x","y","z"]),yI=io.filter(e=>!gI.has(e));function vI(e){const t=[];return yI.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Cr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Cf(t,"x"),y:(e,{transform:t})=>Cf(t,"y")};Cr.translateX=Cr.x;Cr.translateY=Cr.y;const Ss=new Set;let Pf=!1,Af=!1,Rf=!1;function SS(){if(Af){const e=Array.from(Ss).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=vI(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Af=!1,Pf=!1,Ss.forEach(e=>e.complete(Rf)),Ss.clear()}function ES(){Ss.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Af=!0)})}function wI(){Rf=!0,ES(),SS(),Rf=!1}class $m{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ss.add(this),Pf||(Pf=!0,de.read(ES),de.resolveKeyframes(SS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}dI(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ss.delete(this)}cancel(){this.state==="scheduled"&&(Ss.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xI=e=>e.startsWith("--");function TS(e,t,n){xI(t)?e.style.setProperty(t,n):e.style[t]=n}const bI={};function kS(e,t){const n=Z_(e);return()=>bI[t]??n()}const _I=kS(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),CS=kS(()=>{try{document.createElement("div").animate({opacity:0}
209,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Oo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Pv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Oo([0,.65,.55,1]),circOut:Oo([.55,0,1,.45]),backIn:Oo([.31,.01,.66,-.59]),backOut:Oo([.33,1.53,.69,.99])};function PS(e,t){if(e)return typeof e=="function"?CS()?xS(e,t):"ease-out":uS(e)?Oo(e):Array.isArray(e)?e.map(n=>PS(n,t)||Pv.easeOut):Pv[e]}function SI(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=PS(a,s);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function AS(e){return typeof e=="function"&&"applyToOptions"in e}function EI({type:e,...t}){return AS(e)&&CS()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class RS extends Mm{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Wi(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=EI(t);this.animation=SI(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Lu(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),TS(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ut(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=wt(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&_I()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Ft):s(this)}}const OS={anticipate:oS,backInOut:iS,circInOut:lS};function TI(e){return e in OS}function kI(e){typeof e.ease=="string"&&TI(e.ease)&&(e.ease=OS[e.ease])}const Ud=10;class CI extends RS{constructor(t){kI(t),_S(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Gc({...o,autoplay:!1}),l=Math.max(Ud,at.now()-this.startTime),c=jn(0,Ud,l-Ud),u=a.sample(l).value,{name:d}=this.options;i&&d&&TS(i,d,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const Av=(e,t)=>
209t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(cn.test(e)||e==="0")&&!e.startsWith("url("));function PI(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function AI(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=Av(s,t),a=Av(i,t);return Nu(o===a,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:PI(e)||(n==="spring"||AS(n))&&r}function Of(e){e.duration=0,e.type="keyframes"}const jS=new Set(["opacity","clipPath","filter","transform"]),RI=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function OI(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&RI.test(e[t]))return!0;return!1}const jI=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),NI=Z_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function LI(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return NI()&&n&&(jS.has(n)||jI.has(n)&&OI(a))&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const II=40;class DI extends Mm{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var y;super(),this.stop=()=>{var g,x;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=at.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:c,element:u,...d},f=(u==null?void 0:u.KeyframeResolver)||$m;this.keyframeResolver=new f(a,(g,x,v)=>this.onKeyframesResolved(g,x,h,!v),l,c,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,s){var v,m;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=at.now();let d=!0;AI(t,i,o,a)||(d=!1,(Br.instantAnimations||!l)&&(u==null||u(Lu(t,r,n))),t[0]=t[t.length-1],Of(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>II?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=d&&!c&&LI(f),g=(m=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:m.current;let x;if(y)try{x=new CI({...f,element:g})}catch{x=new Gc(f)}else x=new Gc(f);x.finished.then(()=>{this.notifyFinished()}).catch(Ft),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),wI()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function NS(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const MI=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $I(e){const t=MI.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const UI=4;function LS(e,t,n=1){Wi(n<=UI,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=$I(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return Y_(o)?parseFloat(o):o}return jm(s)?LS(s,t,n+1):s}const VI={type:"spring",stiffness:500,damping:25,restSpeed:10},FI=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),BI={type:"keyframes",duration:.8},zI={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},HI=(e,{keyframes:t})=>t.length>2?BI:oo.has(e)?e.startsWith("scale")?FI(t[1]):VI:zI;function IS(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Um(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?IS(n,e):n}const WI=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function qI(e){for(const t in e)if(!WI.has(t))return!0;return!1}const Vm=(e,t,n,r={},s,i)=>o=>{const a=Um(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-wt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};qI(a)||Object.assign(u,HI(e,u)),u.duration&&(u.duration=wt(u.duration)),u.repeatDelay&&(u.repeatDelay=wt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Of(u),u.delay===0&&(
209d=!0)),(Br.instantAnimations||Br.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,Of(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const h=Lu(u.keyframes,a);if(h!==void 0){de.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Gc(u):new DI(u)};function Rv(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Fm(e,t,n,r){if(typeof t=="function"){const[s,i]=Rv(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Rv(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Es(e,t,n){const r=e.getProps();return Fm(r,t,n!==void 0?n:r.custom,e)}const DS=new Set(["width","height","top","left","right","bottom",...io]),Ov=30,KI=e=>!isNaN(parseFloat(e));class GI{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=at.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=at.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=KI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Am);const r=this.events[t].add(n);return t==="change"?()=>{r(),de.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=at.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ov)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ov);return eS(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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 t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ki(e,t){return new GI(e,t)}const jf=e=>Array.isArray(e);function JI(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ki(n))}function YI(e){return jf(e)?e[e.length-1]||0:e}function QI(e,t){const n=Es(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=YI(i[o]);JI(e,o,a)}}const Ge=e=>!!(e&&e.getVelocity);function XI(e){return!!(Ge(e)&&e.add)}function Nf(e,t){const n=e.getValue("willChange");if(XI(n))return n.add(t);if(!n&&Br.WillChange){const r=new Br.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Bm(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ZI="framerAppearId",MS="data-"+Bm(ZI);function $S(e){return e.props[MS]}function e2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function US(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?IS(i,l):l;const c=i==null?void 0:i.reduceMotion;r&&(i=r);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const f=e.getValue(h,e.latestValues[h]??null),y=a[h];if(y===void 0||d&&e2(d,h))continue;const g={delay:n,...Um(i||{},h)},x=f.get();if(x!==void 0&&!f.isAnimating()&&!Array.isArray(y)&&y===x&&!g.velocity){de.update(()=>f.set(y));continue}let v=!1;if(window.MotionHandoffAnimation){const _=$S(e);if(_){const S=window.MotionHandoffAnimation(_,h,de);S!==null&&(g.startTime=S,v=!0)}}Nf(e,h);const m=c??e.shouldReduceMotion;f.start(Vm(h,f,y,m&&DS.has(h)?{type:!1}:g,e,v));const w=f.animation;w&&u.push(w)}if(o){const h=()=>de.update(()=>{o&&QI(e,o)});
vendor: 31,873 bytes, line 209
209u.length?Promise.all(u).then(h):h()}return u}function Lf(e,t,n={}){var l;const r=Es(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(US(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=s;return t2(e,t,c,u,d,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function t2(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Lf(l,t,{...o,delay:n+(typeof r=="function"?0:r)+NS(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function n2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Lf(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Lf(e,t,n);else{const s=typeof t=="function"?Es(e,t,n.custom):t;r=Promise.all(US(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const r2={test:e=>e==="auto",parse:e=>e},VS=e=>t=>t.test(e),FS=[so,F,Rn,dr,PL,CL,r2],jv=e=>FS.find(VS(e));function s2(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||X_(e):!0}const i2=new Set(["brightness","contrast","saturate","opacity"]);function o2(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Nm)||[];if(!r)return e;const s=n.replace(r,"");let i=i2.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const a2=/\b([a-z-]*)\(.*?\)/gu,If={...cn,getAnimatableNone:e=>{const t=e.match(a2);return t?t.map(o2).join(" "):e}},Df={...cn,getAnimatableNone:e=>{const t=cn.parse(e);return cn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Nv={...so,transform:Math.round},l2={rotate:dr,rotateX:dr,rotateY:dr,rotateZ:dr,scale:El,scaleX:El,scaleY:El,scaleZ:El,skew:dr,skewX:dr,skewY:dr,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:_a,originX:wv,originY:wv,originZ:F},zm={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,fontSize:F,backgroundPositionX:F,backgroundPositionY:F,...l2,zIndex:Nv,fillOpacity:_a,strokeOpacity:_a,numOctaves:Nv},c2={...zm,color:Le,backgroundColor:Le,outlineColor:Le,fill:Le,stroke:Le,borderColor:Le,borderTopColor:Le,borderRightColor:Le,borderBottomColor:Le,borderLeftColor:Le,filter:If,WebkitFilter:If,mask:Df,WebkitMask:Df},BS=e=>c2[e],u2=new Set([If,Df]);function zS(e,t){let n=BS(e);return u2.has(n)||(n=cn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const d2=new Set(["auto","none","0"]);function h2(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!d2.has(i)&&qi(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=zS(n,s)}class f2 extends $m{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),jm(d))){const h=LS(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!DS.has(r)||t.length!==2)return;const[s,i]=t,o=jv(s),a=jv(i),l=vv(s),c=vv(i);if(l!==c&&Cr[r]){this.needsMeasurement=!0;return}if(o!==a)if(Cv(o)&&Cv(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Cr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||s2(t[s]))&&r.push(s);r.length&&h2(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Cr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Cr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function HS(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const WS=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function tc(e){return Q_(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Hm,cancel:J4}=dS(queueMicrotask,!1),Qt={x:!1,y:!1};function qS(){return Qt.x||Qt.y}function p2(e){return e==="x"||e==="y"?Qt[e]?null:(Qt[e]=!0,()=>{Qt[e]=!1}):Qt.x||Qt.y?null:(Qt.x=Qt.y=!0,()=>{Qt.x=Qt.y=!1})}function KS(e,t){const n=HS(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function m2(e){return!(e.pointerType==="touch"||qS())}function g2(e,t,n={}){const[r,s,i]=KS(e,n);return r.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",y)},d=x=>{c&&(c(x),c=void 0),u()},h=x=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,d(x))},f=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},y=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},g=x=>{if(!m2(x))return;l=!1;const v=t(o,x);typeof v=="function"&&(c=v,o.addEventListener("pointerleave",y,s))};o.addEventListener("pointerenter",g,s),o.addEventListener("pointerdown",f,s)}),i}const GS=(e,t)=>t?e===t?!0:GS(e,t.parentElement):!1,Wm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,y2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function v2(e){return y2.has(e.tagName)||e.isContentEditable===!0}const w2=new Set(["INPUT","SELECT","TEXTAREA"]);function x2(e){return w2.has(e.tagName)||e.isContentEditable===!0}const nc=new WeakSet;function Lv(e){return t=>{t.key==="Enter"&&e(t)}}function Vd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const b2=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Lv(()=>{if(nc.has(n))return;Vd(n,"down");const s=Lv(()=>{Vd(n,"up")}),i=()=>Vd(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Iv(e){return Wm(e)&&!qS()}const Dv=new WeakSet;function _2(e,t,n={}){const[r,s,i]=KS(e,n),o=a=>{const l=a.currentTarget;if(!Iv(a)||Dv.has(a))return;nc.add(l),n.stopPropagation&&Dv.add(a);const c=t(l,a),u=(f,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),nc.has(l)&&nc.delete(l),Iv(f)&&typeof c=="function"&&c(f,{success:y})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||GS(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),tc(a)&&(a.addEventListener("focus",c=>b2(c,s)),!v2(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function qm(e){return Q_(e)&&"ownerSVGElement"in e}const rc=new WeakMap;let hr;const JS=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:qm(r)&&"getBBox"in r?r.getBBox()[t]:r[n],S2=JS("inline","width","offsetWidth"),E2=JS("block","height","offsetHeight");function T2({target:e,borderBoxSize:t}){var n;(n=rc.get(e))==null||n.forEach(r=>{r(e,{get width(){return S2(e,t)},get height(){return E2(e,t)}})})}function k2(e){e.forEach(T2)}function C2(){typeof ResizeObserver>"u"||(hr=new ResizeObserver(k2))}function P2(e,t){hr||C2();const n=HS(e);return n.forEach(r=>{let s=rc.get(r);s||(s=new Set,rc.set(r,s)),s.add(t),hr==null||hr.observe(r)}),()=>{n.forEach(r=>{const s=rc.get(r);s==null||s.delete(t),s!=null&&s.size||hr==null||hr.unobserve(r)})}}const sc=new Set;let pi;function A2(){pi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};sc.forEach(t=>t(e))},window.addEventListener("resize",pi)}function R2(e){return sc.add(e),pi||A2(),()=>{sc.delete(e),!sc.size&&typeof pi=="function"&&(window.removeEventListener("resize",pi),pi=void 0)}}function Mv(e,t){return typeof e=="function"?R2(e):P2(e,t)}function O2(e){return qm(e)&&e.tagName==="svg"}const j2=[...FS,Le,cn],N2=e=>j2.find(VS(e)),$v=()=>({translate:0,scale:1,origin:0,originPoint:0}),mi=()=>({x:$v(),y:$v()}),Uv=()=>({min:0,max:0}),Me=()=>({x:Uv(),y:Uv()}),L2=new WeakMap;function Iu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Sa(e){return typeof e=="string"||Array.isArray(e)}const Km=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gm=["initial",...Km];function Du(e){return Iu(e.animate)||Gm.some(t=>Sa(e[t]))}function YS(e){return!!(Du(e)||e.variants)}function I2(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Ge(s))e.addValue(r,s);else if(Ge(i))e.addValue(r,Ki(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Ki(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Mf={current:null},QS={current:!1},D2=typeof window<"u";function M2(){if(QS.current=!0,!!D2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Mf.current=e.matches;e.addEventListener("change",t),t()}else Mf.current=!1}const Vv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Jc={};function XS(e){Jc=e}function $2(){return Jc}class U2{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){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=$m,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 f=at.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,de.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Du(n),this.isVariantNode=YS(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const y=h[f];c[f]!==void 0&&Ge(y)&&y.set(c[f])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,L2.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(QS.current||M2(),this.shouldReduceMotion=Mf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&jS.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new RS({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:wt(u)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const r=oo.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&de.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Jc){const n=Jc[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Me()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Vv.length;r++){const s=Vv[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=I2(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ki(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Y_(r)||X_(r))?r=parseFloat(r):!N2(r)&&cn.test(n)&&(r=zS(t,n)),this.setBaseTarget(t,Ge(r)?r.get():r)),Ge(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Fm(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ge(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Am),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Hm.render(this.render)}}class ZS extends U2{constructor(){super(...arguments),this.KeyframeResolver=f2}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function eE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function V2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function F2(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fd(e){return e===void 0||e===1}function $f({scale:e,scaleX:t,scaleY:n}){return!Fd(e)||!Fd(t)||!Fd(n)}function ss(e){return $f(e)||tE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tE(e){return Fv(e.x)||Fv(e.y)}function Fv(e){return e&&e!=="0%"}function Yc(e,t,n){const r=e-n,s=t*r;return n+s}function Bv(e,t,n,r,s){return s!==void 0&&(e=Yc(e,s,r)),Yc(e,n,r)+t}function Uf(e,t=0,n=1,r,s){e.min=Bv(e.min,t,n,r,s),e.max=Bv(e.max,t,n,r,s)}function nE(e,{x:t,y:n}){Uf(e.x,t.translate,t.scale,t.originPoint),Uf(e.y,n.translate,n.scale,n.originPoint)}const zv=.999999999999,Hv=1.0000000000001;function B2(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Sn(e.x,-i.scroll.offset.x),Sn(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,nE(e,o)),r&&ss(i.latestValues)&&ic(e,i.latestValues,(a=i.layout)==null?void 0:a.layoutBox))}t.x<Hv&&t.x>zv&&(t.x=1),t.y<Hv&&t.y>zv&&(t.y=1)}function Sn(e,t){e.min+=t,e.max+=t}function Wv(e,t,n,r,s=.5){const i=ge(e.min,e.max,s);Uf(e,t,n,i,r)}function qv(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ic(e,t,n){const r=n??e;Wv(e.x,qv(t.x,r.x),t.scaleX,t.scale,t.originX),Wv(e.y,qv(t.y,r.y),t.scaleY,t.scale,t.originY)}function rE(e,t){return eE(F2(e.getBoundingClientRect(),t))}function z2(e,t,n){const r=rE(e,n),{scroll:s}=t;return s&&(Sn(r.x,s.offset.x),Sn(r.y,s.offset.y)),r}const H2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},W2=io.length;function q2(e,t,n){let r="",s=!0;for(let i=0;i<W2;i++){const o=io[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||n){const c=WS(a,zm[o]);if(!l){s=!1;const u=H2[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Jm(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(oo.has(l)){o=!0;continue}else if(fS(l)){s[l]=c;continue}else{const u=WS(c,zm[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=q2(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function sE(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function Kv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Eo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(F.test(e))e=parseFloat(e);else return e;const n=Kv(e,t.target.x),r=Kv(e,t.target.y);return`${n}% ${r}%`}},K2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=cn.parse(e);if(s.length>5)return r;const i=cn.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=ge(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},Vf={borderRadius:{...Eo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Eo,borderTopRightRadius:Eo,borderBottomLeftRadius:Eo,borderBottomRightRadius:Eo,boxShadow:K2};function iE(e,{layout:t,layoutId:n}){return oo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Vf[e]||e==="opacity")}function Ym(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(Ge(r[a])||s&&Ge(s[a])||iE(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function G2(e){return window.getComputedStyle(e)}class J2 extends ZS{constructor(){super(...arguments),this.type="html",this.renderInstance=sE}readValueFromInstance(t,n){var r;if(oo.has(n))return(r=this.projection)!=null&&r.isProjecting?kf(n):pI(t,n);{const s=G2(t),i=(fS(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return rE(t,n)}build(t,n,r){Jm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ym(t,n,r)}}const Y2={offset:"stroke-dashoffset",array:"stroke-dasharray"},Q2={offset:"strokeDashoffset",array:"strokeDasharray"};function X2(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?Y2:Q2;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const Z2=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function oE(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,c,u){if(Jm(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const f of Z2)d[f]!==void 0&&(h[f]=d[f],delete d[f]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&X2(d,s,i,o,!1)}const aE=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"]),lE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function eD(e,t,n,r){sE(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(aE.has(s)?s:Bm(s),t.attrs[s])}function cE(e,t,n){const r=Ym(e,t,n);for(const s in e)if(Ge(e[s])||Ge(t[s])){const i=io.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class tD extends ZS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Me}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(oo.has(n)){const r=BS(n);return r&&r.default||0}return n=aE.has(n)?n:Bm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return cE(t,n,r)}build(t,n,r){oE(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){eD(t,n,r,s)}mount(t){this.isSVGTag=lE(t.tagName),super.mount(t)}}const nD=Gm.length;function uE(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?uE(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<nD;n++){const r=Gm[n],s=e.props[r];(Sa(s)||s===!1)&&(t[r]=s)}return t}function dE(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const rD=[...Km].reverse(),sD=Km.length;function iD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>n2(e,n,r)))}function oD(e){let t=iD(e),n=Gv(),r=!0,s=!1;const i=c=>(u,d)=>{var f;const h=Es(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:y,transitionEnd:g,...x}=h;u={...u,...x,...g}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=uE(e.parent)||{},h=[],f=new Set;let y={},g=1/0;for(let v=0;v<sD;v++){const m=rD[v],w=n[m],_=u[m]!==void 0?u[m]:d[m],S=Sa(_),T=m===c?w.isActive:null;T===!1&&(g=v);let E=_===d[m]&&_!==u[m]&&S;if(E&&(r||s)&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...y},!w.isActive&&T===null||!_&&!w.prevProp||Iu(_)||typeof _=="boolean")continue;if(m==="exit"&&w.isActive&&T!==!0){w.prevResolvedValues&&(y={...y,...w.prevResolvedValues});continue}const k=aD(w.prevProp,_);let P=k||m===c&&w.isActive&&!E&&S||v>g&&S,C=!1;const I=Array.isArray(_)?_:[_];let N=I.reduce(i(m),{});T===!1&&(N={});const{prevResolvedValues:U={}}=w,D={...U,...N},q=A=>{P=!0,f.has(A)&&(C=!0,f.delete(A)),w.needsAnimating[A]=!0;const R=e.getValue(A);R&&(R.liveStyle=!1)};for(const A in D){const R=N[A],M=U[A];if(y.hasOwnProperty(A))continue;let K=!1;jf(R)&&jf(M)?K=!dE(R,M):K=R!==M,K?R!=null?q(A):f.add(A):R!==void 0&&f.has(A)?q(A):w.protectedKeys[A]=!0}w.prevProp=_,w.prevResolvedValues=N,w.isActive&&(y={...y,...N}),(r||s)&&e.blockInitialAnimation&&(P=!1);const z=E&&k;P&&(!z||C)&&h.push(...I.map(A=>{const R={type:m};if(typeof A=="string"&&(r||s)&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:M}=e,K=Es(M,A);if(M.enteringChildren&&K){const{delayChildren:W}=K.transition||{};R.delay=NS(M.enteringChildren,e,W)}}return{animation:A,options:R}}))}if(f.size){const v={};if(typeof u.initial!="boolean"){const m=Es(e,Array.isArray(u.initial)?u.initial[0]:u.initial);m&&m.transition&&(v.transition=m.transition)}f.forEach(m=>{const w=e.getBaseTarget(m),_=e.getValue(m);_&&(_.liveStyle=!0),v[m]=w??null}),h.push({animation:v})}let x=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,s=!1,x?t(h):Promise.resolve()}function l(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var y;return(y=f.animationState)==null?void 0:y.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Gv(),s=!0}}}function aD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!dE(t,e):!1}function Zr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Gv(){return{animate:Zr(!0),whileInView:Zr(),whileHover:Zr(),whileTap:Zr(),whileDrag:Zr(),whileFocus:Zr(),exit:Zr()}}function Ff(e,t){e.min=t.min,e.max=t.max}function Jt(e,t){Ff(e.x,t.x),Ff(e.y,t.y)}function Jv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const hE=1e-4,lD=1-hE,cD=1+hE,fE=.01,uD=0-fE,dD=0+fE;function lt(e){return e.max-e.min}function hD(e,t,n){return Math.abs(e-t)<=n}function Yv(e,t,n,r=.5){e.origin=r,e.originPoint=ge(t.min,t.max,e.origin),e.scale=lt(n)/lt(t),e.translate=ge(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lD&&e.scale<=cD||isNaN(e.scale))&&(e.scale=1),(e.translate>=uD&&e.translate<=dD||isNaN(e.translate))&&(e.translate=0)}function qo(e,t,n,r){Yv(e.x,t.x,n.x,r?r.originX:void 0),Yv(e.y,t.y,n.y,r?r.originY:void 0)}function Qv(e,t,n,r=0){const s=r?ge(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+lt(t)}function fD(e,t,n,r){Qv(e.x,t.x,n.x,r==null?void 0:r.x),Qv(e.y,t.y,n.y,r==null?void 0:r.y)}function Xv(e,t,n,r=0){const s=r?ge(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+lt(t)}function Qc(e,t,n,r){Xv(e.x,t.x,n.x,r==null?void 0:r.x),Xv(e.y,t.y,n.y,r==null?void 0:r.y)}function Zv(e,t,n,r,s){return e-=t,e=Yc(e,1/n,r),s!==void 0&&(e=Yc(e,1/s,r)),e}function pD(e,t=0,n=1,r=.5,s,i=e,o=e){if(Rn.test(t)&&(t=parseFloat(t),t=ge(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ge(i.min,i.max,r);e===i&&(a-=t),e.min=Zv(e.min,t,n,a,s),e.max=Zv(e.max,t,n,a,s)}function e0(e,t,[n,r,s],i,o){pD(e,t[n],t[r],t[s],t.scale,i,o)}const mD=["x","scaleX","originX"],gD=["y","scaleY","originY"];function t0(e,t,n,r){e0(e.x,t,mD,n?n.x:void 0,r?r.x:void 0),e0(e.y,t,gD,n?n.y:void 0,r?r.y:void 0)}function n0(e){return e.translate===0&&e.scale===1}function pE(e){return n0(e.x)&&n0(e.y)}function r0(e,t){return e.min===t.min&&e.max===t.max}function yD(e,t){return r0(e.x,t.x)&&r0(e.y,t.y)}function s0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mE(e,t){return s0(e.x,t.x)&&s0(e.y,t.y)}function i0(e){return lt(e.x)/lt(e.y)}function o0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function yn(e){return[e("x"),e("y")]}function vD(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const gE=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],wD=gE.length,a0=e=>typeof e=="string"?parseFloat(e):e,l0=e=>typeof e=="number"||F.test(e);function xD(e,t,n,r,s,i){s?(e.opacity=ge(0,n.opacity??1,bD(r)),e.opacityExit=ge(t.opacity??1,0,_D(r))):i&&(e.opacity=ge(t.opacity??1,n.opacity??1,r));for(let o=0;o<wD;o++){const a=gE[o];let l=c0(t,a),c=c0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||l0(l)===l0(c)?(e[a]=Math.max(ge(a0(l),a0(c),r),0),(Rn.test(c)||Rn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ge(t.rotate||0,n.rotate||0,r))}function c0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bD=yE(0,.5,aS),_D=yE(.5,.95,Ft);function yE(e,t,n){return r=>r<e?0:r>t?1:n(ba(e,t,r))}function SD(e,t,n){const r=Ge(e)?e:Ki(e);return r.start(Vm("",r,t,n)),r.animation}function Ea(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ED=(e,t)=>e.depth-t.depth;class TD{constructor(){this.children=[],this.isDirty=!1}add(t){Pm(this.children,t),this.isDirty=!0}remove(t){Hc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ED),this.isDirty=!1,this.children.forEac
209h(t)}}function kD(e,t){const n=at.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(zr(r),e(i-t))};return de.setup(r,!0),()=>zr(r)}function oc(e){return Ge(e)?e.get():e}class CD{constructor(){this.members=[]}add(t){Pm(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Hc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Hc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const ac={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Bd=["","X","Y","Z"],PD=1e3;let AD=0;function zd(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function vE(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=$S(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",de,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vE(r)}function wE({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=AD++,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(jD),this.nodes.forEach($D),this.nodes.forEach(UD),this.nodes.forEach(ND)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new TD)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Am),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=qm(o)&&!O2(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const h=()=>this.root.updateBlockedByResize=!1;de.read(()=>{d=window.innerWidth}),e(o,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,u&&u(),u=kD(h,250),ac.hasAnimatedSinceResize&&(ac.hasAnimatedSinceResize=!1,this.nodes.forEac
vendor: 4,537 bytes, line 209
209h(h0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||HD,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=c.getProps(),v=!this.targetLayout||!mE(this.targetLayout,f),m=!d&&h;if(this.options.layoutRoot||this.resumeFrom||m||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Um(y,"layout"),onPlay:g,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,m)}else d||h0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),zr(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(VD),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vE(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(ID),this.nodes.forEach(u0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(d0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(DD),this.nodes.forEach(MD),this.nodes.forEach(RD),this.nodes.forEach(OD)):this.nodes.forEach(d0),this.clearAllSnapshots();const a=at.now();Ke.delta=jn(0,1e3/60,a-Ke.timestamp),Ke.timestamp=a,Ke.isProcessing=!0,Ld.update.process(Ke),Ld.preRender.process(Ke),Ld.render.process(Ke),Ke.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(LD),this.sharedNodes.forEach(FD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,de.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){de.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!lt(this.snapshot.measuredBox.x)&&!lt(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Me()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);
209this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!pE(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||ss(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),WD(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Me();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(qD))){const{scroll:u}=this.root;u&&(Sn(a.x,u.offset.x),Sn(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Me();if(Jt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&Jt(a,o),Sn(a.x,d.offset.x),Sn(a.y,d.offset.y))}return a}applyTransform(o,a=!1,l){var u,d;const c=l||Me();Jt(c,o);for(let h=0;h<this.path.length;h++){const f=this.path[h];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Sn(c.x,-f.scroll.offset.x),Sn(c.y,-f.scroll.offset.y)),ss(f.latestValues)&&ic(c,f.latestValues,(u=f.layout)==null?void 0:u.layoutBox)}return ss(this.latestValues)&&ic(c,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),c}removeTransform(o){var l;const a=Me();Jt(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!ss(u.latestValues))continue;let d;u.instance&&($f(u.latestValues)&&u.updateSnapshot(),d=Me(),Jt(d,u.measurePageBox())),t0(a,u.latestValues,(l=u.snapshot)==null?void 0:l.layoutBox,d)}return ss(this.latestValues)&&t0(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==Ke.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Ke.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Me(),this.targetWithTransforms=Me()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fD(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Jt(this.target,this.layout.layoutBox),nE(this.target,this.targetDelta)):Jt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||$f(this.parent.latestValues)||tE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Me(),this.relativeTargetOrigin=Me(),Qc(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),Jt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&
vendor: 5,333 bytes, line 209
209(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ke.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Jt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;B2(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Me());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Jv(this.prevProjectionDelta.x,this.projectionDelta.x),Jv(this.prevProjectionDelta.y,this.projectionDelta.y)),qo(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!o0(this.projectionDelta.x,this.prevProjectionDelta.x)||!o0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=mi(),this.projectionDelta=mi(),this.projectionDeltaWithTransform=mi()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=mi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Me(),f=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=f!==y,x=this.getStack(),v=!x||x.members.length<=1,m=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(zD));this.animationProgress=0;let w;this.mixTargetDelta=_=>{const S=_/1e3;f0(d.x,o.x,S),f0(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qc(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),BD(this.relativeTarget,this.relativeTargetOrigin,h,S),w&&yD(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Me()),Jt(w,this.relativeTarget)),g&&(this.animationValues=u,xD(u,c,this.latestValues,S,m,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=de.update(()=>{ac.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ki(0)),this.motionValue.jump(0,!1),this.currentAnimation=SD(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(PD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&xE(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Me();const d=lt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=lt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Jt(a,l),ic(a,u),qo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new CD),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 4,506 bytes, line 209
209resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&zd("z",o,c,this.animationValues);for(let u=0;u<Bd.length;u++)zd(`rotate${Bd[u]}`,o,c,this.animationValues),zd(`skew${Bd[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=oc(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=oc(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ss(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=vD(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:h,y:f}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in Vf){if(u[y]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:v}=Vf[y],m=d==="none"?u[y]:g(u[y],c);if(x){const w=x.length;for(let _=0;_<w;_++)o[x[_]]=m}else v?this.options.visualElement.renderState.vars[y]=m:o[y]=m}this.options.layoutId&&(o.pointerEvents=c===this?oc(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(u0),this.root.sharedNodes.clear()}}}function RD(e){e.updateLayout()}function OD(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")yn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],f=lt(h);h.min=r[d].min,h.max=h.min+f});else if(i==="x"||i==="y"){const d=i==="x"?"y":"x";Ff(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else xE(i,t.layoutBox,r)&&yn(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],f=lt(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=mi();qo(a,r,t.layoutBox);const l=mi();o?qo(l,e.applyTransform(s,!0),t.measuredBox):qo(l,r,t.layoutBox);const c=!pE(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const y=e.options.layoutAnchor||void 0,g=Me();Qc(g,t.layoutBox,h.layoutBox,y);const x=Me();Qc(x,r,f.layoutBox,y),mE(g,x)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function jD(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ND(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function LD(e){e.clearSnapshot()}function u0(e){e.clearMeasurements()}function ID(e){e.isLayoutDirty=!0,e.updateLayout()}function d0(e){e.isLayoutDirty=!1}function DD(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function MD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function h0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function $D(e){e.resolveTargetDelta()}function UD(e){e.calcProjection()}
209function VD(e){e.resetSkewAndRotation()}function FD(e){e.removeLeadSnapshot()}function f0(e,t,n){e.translate=ge(t.translate,0,n),e.scale=ge(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function p0(e,t,n,r){e.min=ge(t.min,n.min,r),e.max=ge(t.max,n.max,r)}function BD(e,t,n,r){p0(e.x,t.x,n.x,r),p0(e.y,t.y,n.y,r)}function zD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const HD={duration:.45,ease:[.4,0,.1,1]},m0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),g0=m0("applewebkit/")&&!m0("chrome/")?Math.round:Ft;function y0(e){e.min=g0(e.min),e.max=g0(e.max)}function WD(e){y0(e.x),y0(e.y)}function xE(e,t,n){return e==="position"||e==="preserve-aspect"&&!hD(i0(t),i0(n),.2)}function qD(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const KD=wE({attachResizeListener:(e,t)=>Ea(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Hd={current:void 0},bE=wE({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hd.current){const e=new KD({});e.mount(window),e.setOptions({layoutScroll:!0}),Hd.current=e}return Hd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Qm=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function v0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GD(...e){return t=>{let n=!1;const r=e.map(s=>{const i=v0(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():v0(e[s],null)}}}}function JD(...e){return b.useCallback(GD(...e),e)}class YD extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(tc(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=tc(r)&&r.offsetWidth||0,i=tc(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function QD({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var h;const o=b.useId(),a=b.useRef(null),l=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=b.useContext(Qm),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),d=JD(a,u);return b.useInsertionEffect(()=>{const{width:f,height:y,top:g,left:x,right:v,bottom:m}=l.current;if(t||i===!1||!a.current||!f||!y)return;const w=n==="left"?`left: ${x}`:`right: ${v}`,_=r==="bottom"?`bottom: ${m}`:`top: ${g}`;a.current.dataset.motionPopId=o;const S=document.createElement("style");c&&(S.nonce=c);const T=s??document.head;return T.appendChild(S),S.sheet&&S.sheet.insertRule(` 210 [data-motion-pop-id="${o}"] { 211 position: absolute !important; 212 width: ${f}px !important; 213 height: ${y}px !important; 214 ${w}px !important; 215 ${_}px !important; 216 } 217 `),()=>{var E;(E=a.current)==null||E.removeAttribute("data-motion-pop-id"),T.contains(S)&&T.removeChild(S)}},[t]),p.jsx(YD,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:b.cloneElement(e,{ref:d})})}const XD=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:l,root:c})=>{const u=Cm(ZD),d=b.useId();let h=!0,f=b.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:s,onExitComplete:y=>{u.set(y,!0);for(const g of u.values())if(!g)return;r&&r()},register:y=>(u.set(y,!1),()=>u.delete(y))}),[n,u,r]);return i&&h&&(f={...f}),b.useMemo(()=>{u.forEach((y,g)=>u.set(g,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=p.jsx(QD,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),p.jsx(ju.Provider,{value:f,children:e})};function ZD(){return new Map}function _E(e=!0){const t=b.useContext(ju);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=b.useId();b.useEffect(()=>{if(e)return s(i)},[e]);const o=b.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Tl=e=>e.key||"";function w0(e){const t=[];
vendor: 8,843 bytes, line 217
217return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const SE=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=_E(o),h=b.useMemo(()=>w0(e),[e]),f=o&&!u?[]:h.map(Tl),y=b.useRef(!0),g=b.useRef(h),x=Cm(()=>new Map),v=b.useRef(new Set),[m,w]=b.useState(h),[_,S]=b.useState(h);J_(()=>{y.current=!1,g.current=h;for(let k=0;k<_.length;k++){const P=Tl(_[k]);f.includes(P)?(x.delete(P),v.current.delete(P)):x.get(P)!==!0&&x.set(P,!1)}},[_,f.length,f.join("-")]);const T=[];if(h!==m){let k=[...h];for(let P=0;P<_.length;P++){const C=_[P],I=Tl(C);f.includes(I)||(k.splice(P,0,C),T.push(C))}return i==="wait"&&T.length&&(k=T),S(w0(k)),w(h),null}const{forceRender:E}=b.useContext(km);return p.jsx(p.Fragment,{children:_.map(k=>{const P=Tl(k),C=o&&!u?!1:h===_||f.includes(P),I=()=>{if(v.current.has(P))return;if(x.has(P))v.current.add(P),x.set(P,!0);else return;let N=!0;x.forEach(U=>{U||(N=!1)}),N&&(E==null||E(),S(g.current),o&&(d==null||d()),r&&r())};return p.jsx(XD,{isPresent:C,initial:!y.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:C?void 0:I,anchorX:a,anchorY:l,children:k},P)})})},EE=b.createContext({strict:!1}),x0={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 b0=!1;function eM(){if(b0)return;const e={};for(const t in x0)e[t]={isEnabled:n=>x0[t].some(r=>!!n[r])};XS(e),b0=!0}function TE(){return eM(),$2()}function tM(e){const t=TE();for(const n in e)t[n]={...t[n],...e[n]};XS(t)}const nM=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 Xc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nM.has(e)}let kE=e=>!Xc(e);function rM(e){typeof e=="function"&&(kE=t=>t.startsWith("on")?!Xc(t):e(t))}try{rM(require("@emotion/is-prop-valid").default)}catch{}function sM(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Ge(e[s])||(kE(s)||n===!0&&Xc(s)||!t&&!Xc(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Mu=b.createContext({});function iM(e,t){if(Du(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Sa(n)?n:void 0,animate:Sa(r)?r:void 0}}return e.inherit!==!1?t:{}}function oM(e){const{initial:t,animate:n}=iM(e,b.useContext(Mu));return b.useMemo(()=>({initial:t,animate:n}),[_0(t),_0(n)])}function _0(e){return Array.isArray(e)?e.join(" "):e}const Xm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function CE(e,t,n){for(const r in t)!Ge(t[r])&&!iE(r,n)&&(e[r]=t[r])}function aM({transformTemplate:e},t){return b.useMemo(()=>{const n=Xm();return Jm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function lM(e,t){const n=e.style||{},r={};return CE(r,n,e),Object.assign(r,aM(e,t)),r}function cM(e,t){const n={},r=lM(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const PE=()=>({...Xm(),attrs:{}});function uM(e,t,n,r){const s=b.useMemo(()=>{const i=PE();return oE(i,t,lE(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};CE(i,e.style,e),s.style={...i,...s.style}}return s}const dM=["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 Zm(e){return typeof e!="string"||e.includes("-")?!1:!!(dM.indexOf(e)>-1||/[A-Z]/u.test(e))}function hM(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??Zm(e)?uM:cM)(t,r,s,e),c=sM(t,typeof e=="string",i),u=e!==b.Fragment?{...c,...l,ref:n}:{},{children:d}=t,h=b.useMemo(()=>Ge(d)?d.get():d,[d]);return b.createElement(e,{...u,children:h})}function fM({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:pM(n,r,s,e),renderState:t()}}function pM(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=oc(i[h]);let{initial:o,animate:a}=e;const l=Du(e),c=YS(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Iu(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const y=Fm(e,h[f]);if(y){const{transitionEnd:g,transition:x,...v}=y;for(const m in v){let w=v[m];if(Array.isArray(w)){const _=u?w.length-1:0;w=w[_]}w!==null&&(s[m]=w)}for(const m in g)s[m]=g[m]}}}return s}const AE=e=>(t,n)=>{const r=b.useContext(Mu),s=b.useContext(ju),i=()=>fM(e,t,r,s);return n?i():Cm(i)},mM=AE({scrapeMotionValuesFromProps:Ym,createRenderState:Xm}),gM=AE({scrapeMotionValuesFromProps:cE,createRenderState:PE}),yM=Symbol.for("motionComponentSymbol");function vM(e,t,n){const r=b.useRef(n);b.useInsertionEffect(()=>{r.current=n});const s=b.useRef(null);return b.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i));const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const RE=b.createContext({});function Ys(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function wM(e,t,n,r,s,i){var w,_;const{visualElement:o}=b.useContext(Mu),a=b.useContext(EE),l=b.useContext(ju),c=b.useContext(Qm),u=c.reducedMotion,d=c.skipAnimations,h=b.useRef(null),f=b.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const y=h.current,g=b.useContext(RE);y&&!y.projection&&s&&(y.type==="html"||y.type==="svg")&&xM(h.current,n,s,g);const x=b.useRef(!1);b.useInsertionEffect(()=>{y&&x.current&&y.update(n,l)});const v=n[MS],m=b.useRef(!!v&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,v))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,v)));return J_(()=>{f.current=!0,y&&(x.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),m.current&&y.animationState&&y.animationState.animateChanges())}),b.useEffect(()=>{y&&(!m.current&&y.animationState&&y.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,v)}),m.current=!1),y.enteringChildren=void 0)}),y}function xM(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:OE(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Ys(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function OE(e){if(e)return e.options.allowProjection!==!1?e.projection:OE(e.parent)}function Wd(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&tM(r);const i=n?n==="svg":Zm(e),o=i?gM:mM;function a(c,u){let d;const h={...b.useContext(Qm),...c,layoutId:bM(c)},{isStatic:f}=h,y=oM(c),g=o(c,f);if(!f&&typeof window<"u"){_M();const x=SM(h);d=x.MeasureLayout,y.visualElement=wM(e,g,h,s,x.ProjectionNode,i)}return p.jsxs(Mu.Provider,{value:y,children:[d&&y.visualElement?p.jsx(d,{visualElement:y.visualElement,...h}):null,hM(e,c,vM(g,y.visualElement,u),g,f,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=b.forwardRef(a);return l[yM]=e,l}function bM({layoutId:e}){const t=b.useContext(km).id;return t&&e!==void 0?t+"-"+e:e}function _M(e,t){b.useContext(EE).strict}function SM(e){const t=TE(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}
vendor: 19,125 bytes, line 217
217function EM(e,t){if(typeof Proxy>"u")return Wd;const n=new Map,r=(i,o)=>Wd(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,Wd(o,void 0,e,t)),n.get(o))})}const TM=(e,t)=>t.isSVG??Zm(e)?new tD(t):new J2(t,{allowProjection:e!==b.Fragment});class kM extends Gr{constructor(t){super(t),t.animationState||(t.animationState=oD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Iu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let CM=0;class PM extends Gr{constructor(){super(...arguments),this.id=CM++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=Es(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...d}=l;for(const h in d)(i=this.node.getValue(h))==null||i.jump(d[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const AM={animation:{Feature:kM},exit:{Feature:PM}};function Ga(e){return{point:{x:e.pageX,y:e.pageY}}}const RM=e=>t=>Wm(t)&&e(t,Ga(t));function Ko(e,t,n,r){return Ea(e,t,RM(n),r)}const jE=({current:e})=>e?e.ownerDocument.defaultView:null,S0=(e,t)=>Math.abs(e-t);function OM(e,t){const n=S0(e.x,t.x),r=S0(e.y,t.y);return Math.sqrt(n**2+r**2)}const E0=new Set(["auto","scroll"]);class NE{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){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=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=kl(this.lastRawMoveEventInfo,this.transformPagePoint));const f=qd(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,g=OM(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!g)return;const{point:x}=f,{timestamp:v}=Ke;this.history.push({...x,timestamp:v});const{onStart:m,onMove:w}=this.handlers;y||(m&&m(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,y)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=kl(y,this.transformPagePoint),de.update(this.updatePoint,!0)},this.handlePointerUp=(f,y)=>{this.end();const{onEnd:g,onSessionEnd:x,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=qd(f.type==="pointercancel"?this.lastMoveEventInfo:kl(y,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,m),x&&x(f,m)},!Wm(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=Ga(t),c=kl(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Ke;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,qd(c,this.history)),this.removeListeners=Wa(Ko(this.contextWindow,"pointermove",this.handlePointerMove),Ko(this.contextWindow,"pointerup",this.handlePointerUp),Ko(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(E0.has(r.overflowX)||E0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.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(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),de.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),zr(this.updatePoint)}}function kl(e,t){return t?{point:t(e.point)}:e}function T0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qd({point:e},t){return{point:e,delta:T0(e,LE(t)),offset:T0(e,jM(t)),velocity:NM(t,.1)}}function jM(e){return e[0]}function LE(e){return e[e.length-1]}function NM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=LE(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>wt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>wt(t)*2&&(r=e[1]);const i=Ut(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function LM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ge(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ge(n,e,r.max):Math.min(e,n)),e}function k0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function IM(e,{top:t,left:n,bottom:r,right:s}){return{x:k0(e.x,n,s),y:k0(e.y,t,r)}}function C0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function DM(e,t){return{x:C0(e.x,t.x),y:C0(e.y,t.y)}}function MM(e,t){let n=.5;const r=lt(e),s=lt(t);return s>r?n=ba(t.min,t.max-r,e.min):r>s&&(n=ba(e.min,e.max-s,t.min)),jn(0,1,n)}function $M(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Bf=.35;function UM(e=Bf){return e===!1?e=0:e===!0&&(e=Bf),{x:P0(e,"left","right"),y:P0(e,"top","bottom")}}function P0(e,t,n){return{min:A0(e,t),max:A0(e,n)}}function A0(e,t){return typeof e=="number"?e:e[t]||0}const VM=new WeakMap;class FM{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Me(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(Ga(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:f,dragPropagation:y,onDragStart:g}=this.getProps();if(f&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p2(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yn(v=>{let m=this.getAxisMotionValue(v).get()||0;if(Rn.test(m)){const{projection:w}=this.visualElement;if(w&&w.layout){const _=w.layout.layoutBox[v];_&&(m=lt(_)*(parseFloat(m)/100))}}this.originPoint[v]=m}),g&&de.update(()=>g(d,h),!1,!0),Nf(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:y,onDirectionLock:g,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=h;if(y&&this.currentDirection===null){this.currentDirection=zM(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),x&&de.update(()=>x(d,h),!1,!0)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new NE(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:jE(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&de.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Cl(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=LM(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&Ys(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=IM(r.layoutBox,t):this.constraints=!1,this.elastic=UM(n),s!==this.constraints&&!Ys(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&yn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=$M(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ys(t))return!1;const r=t.current;Wi(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=z2(r,s.root,this.visualElement.getTransformPagePoint());let o=DM(s.layout.layoutBox,i);if(n){const a=n(V2(o));this.hasMutatedConstraints=!!a,a&&(o=eE(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=yn(u=>{if(!Cl(u,n,this.currentDirection))return;let d=l&&l[u]||{};(o===!0||o===u)&&(d={min:0,max:0});const h=s?200:1e6,f=s?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Nf(this.visualElement,t),r.start(Vm(t,r,0,n,this.visualElement,!1))}stopAnimation(){yn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){yn(n=>{const{drag:r}=this.getProps();if(!Cl(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-ge(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ys(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};yn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=MM({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),yn(o=>{if(!Cl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(ge(l,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;VM.set(this.visualElement,this);const t=this.visualElement.current,n=Ko(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),h=c.target,f=h!==t&&x2(h);u&&d&&!f&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();Ys(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=BM(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),de.read(s);const a=Ea(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(yn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Bf,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function R0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function BM(e,t,n){const r=Mv(e,R0(n)),s=Mv(t,R0(n));return()=>{r(),s()}}function Cl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function zM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class HM extends Gr{constructor(t){super(t),this.removeGroupControls=Ft,this.removeListeners=Ft,this.controls=new FM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ft}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Kd=e=>(t,n)=>{e&&de.update(()=>e(t,n),!1,!0)};class WM extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Ft}onPointerDown(t){this.session=new NE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Kd(t),onStart:Kd(n),onMove:Kd(r),onEnd:(i,o)=>{delete this.session,s&&de.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Ko(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Gd=!1;class qM extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Gd&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ac.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Gd=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||de.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Hm.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Gd=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function IE(e){const[t,n]=_E(),r=b.useContext(km);return p.jsx(qM,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(RE),isPresent:t,safeToRemove:n})}const KM={pan:{Feature:WM},drag:{Feature:HM,ProjectionNode:bE,MeasureLayout:IE}};function O0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&de.postRender(()=>i(t,Ga(t)))}class GM extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=g2(t,(n,r)=>(O0(this.node,r,"Start"),s=>O0(this.node,s,"End"))))}unmount(){}}class JM extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Wa(Ea(this.node.current,"focus",()=>this.onFocus()),Ea(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function j0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&de.postRender(()=>i(t,Ga(t)))}class YM extends Gr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=_2(t,(s,i)=>(j0(this.node,i,"Start"),(o,{success:a})=>j0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const zf=new WeakMap,Jd=new WeakMap,QM=e=>{const t=zf.get(e.target);t&&t(e)},XM=e=>{e.forEach(QM)};function ZM({root:e,...t}){const n=e||document;Jd.has(n)||Jd.set(n,{});const r=Jd.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(XM,{root:e,...t})),r[s]}function e$(e,t,n){const r=ZM(t);return zf.set(e,n),r.observe(e),()=>{zf.delete(e),r.unobserve(e)}}const t$={some:0,all:1};
217class n$ extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:t$[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};this.stopObserver=e$(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(r$(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function r$({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const s$={inView:{Feature:n$},tap:{Feature:YM},focus:{Feature:JM},hover:{Feature:GM}},i$={layout:{ProjectionNode:bE,MeasureLayout:IE}},o$={...AM,...s$,...KM,...i$},we=EM(o$,TM),$u="/assets/logo-Bup2o8L3.png";function a$(){return p.jsxs("div",{className:"fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-background",children:[p.jsx(we.img,{src:$u,alt:"Truco Arena",className:"w-24 h-24 drop-shadow-2xl",initial:{scale:.7,opacity:0},animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:260,damping:18}}),p.jsx(we.h1,{className:"font-display text-2xl text-gold tracking-wider mt-3",initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:.15,duration:.25},children:"TRUCO ARENA"}),p.jsx(we.div,{className:"mt-6 w-10 h-1 rounded-full bg-gold/40 overflow-hidden",initial:{opacity:0}
217,animate:{opacity:1},transition:{delay:.2},children:p.jsx(we.div,{className:"h-full bg-gold rounded-full",initial:{width:"0%"},animate:{width:"100%"},transition:{duration:.7,delay:.2,ease:"easeOut"}})})]})}function l$(){const[e,t]=b.useState(!navigator.onLine);return b.useEffect(()=>{const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("offline",n),window.addEventListener("online",r),()=>{window.removeEventListener("offline",n),window.removeEventListener("online",r)}},[]),p.jsx(SE,{children:e&&p.jsxs(we.div,{initial:{y:-50,opacity:0},animate:{y:0,opacity:1},exit:{y:-50,opacity:0},className:"fixed top-0 left-0 right-0 z-[9998] bg-destructive text-destructive-foreground text-center py-2 px-4 text-sm font-semibold flex items-center justify-center gap-2",children:[p.jsx(RA,{size:16}),"Você está offline"]})})}/*! Capacitor: https://capacitorjs.com/ - MIT License */var Gi;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Gi||(Gi={}));class Yd extends Error{constructor(t,n,r){super(t),this.message=t,this.code=n,this.data=r}}const c$=e=>{var t,n;return e!=null&&e.androidBridge?"android":!((n=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},u$=e=>{const t=e.CapacitorCustomPlatform||null,n=e.Capacitor||{},r=n.Plugins=n.Plugins||{},s=()=>t!==null?t.name:c$(e),i=()=>s()!=="web",o=d=>{const h=c.get(d);return!!(h!=null&&h.platforms.has(s())||a(d))},a=d=>{var h;return(h=n.PluginHeaders)===null||h===void 0?void 0:h.find(f=>f.name===d)},l=d=>e.console.error(d),c=new Map,u=(d,h={})=>{const f=c.get(d);if(f)return console.warn(`Capacitor plugin "${d}" already registered. Cannot register plugins twice.`),f.proxy;const y=s(),g=a(d);let x;const v=async()=>(!x&&y in h?x=typeof h[y]=="function"?x=await h[y]():x=h[y]:t!==null&&!x&&"web"in h&&(x=typeof h.web=="function"?x=await h.web():x=h.web),x),m=(k,P)=>{var C,I;if(g){const N=g==null?void 0:g.methods.find(U=>P===U.name);if(N)return N.rtype==="promise"?U=>n.nativePromise(d,P.toString(),U):(U,D)=>n.nativeCallback(d,P.toString(),U,D);if(k)return(C=k[P])===null||C===void 0?void 0:C.bind(k)}else{if(k)return(I=k[P])===null||I===void 0?void 0:I.bind(k);throw new Yd(`"${d}" plugin is not implemented on ${y}`,Gi.Unimplemented)}},w=k=>{let P;const C=(...I)=>{const N=v().then(U=>{const D=m(U,k);if(D){const q=D(...I);return P=q==null?void 0:q.remove,q}else throw new Yd(`"${d}.${k}()" is not implemented on ${y}`,Gi.Unimplemented)});return k==="addListener"&&(N.remove=async()=>P()),N};return C.toString=()=>`${k.toString()}() { [capacitor code] }`,Object.defineProperty(C,"name",{value:k,writable:!1,configurable:!1}),C},_=w("addListener"),S=w("removeListener"),T=(k,P)=>{const C=_({eventName:k},P),I=async()=>{const U=await C;S({eventName:k,callbackId:U},P)},N=new Promise(U=>C.then(()=>U({remove:I})));return N.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await I()},N},E=new Proxy({},{get(k,P){switch(P){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return g?T:_;case"removeListener":return S;default:return w(P)}}});return r[d]=E,c.set(d,{name:d,proxy:E,platforms:new Set([...Object.keys(h),...g?[y]:[]])}),E};return n.convertFileSrc||(n.convertFileSrc=d=>d),n.getPlatform=s,n.handleError=l,n.isNativePlatform=i,n.isPluginAvailable=o,n.registerPlugin=u,n.Exception=Yd,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},d$=e=>e.Capacitor=u$(e),Xn=d$(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),ao=Xn.registerPlugin;class eg{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,n){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(n);const i=this.windowListeners[t];i&&!i.registered&&this.addWindowListener(i),r&&this.sendRetainedArgumentsForEvent(t);const o=async()=>this.removeListener(t,n);return Promise.resolve({remove:o})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,r){const s=this.listeners[t];if(!s){if(r){let i=this.retainedEventArguments[t];i||(i=[]),i.push(n),this.retainedEventArguments[t]=i}return}s.forEach(i=>
217i(n))}hasListeners(t){var n;return!!(!((n=this.listeners[t])===null||n===void 0)&&n.length)}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(t="not implemented"){return new Xn.Exception(t,Gi.Unimplemented)}unavailable(t="not available"){return new Xn.Exception(t,Gi.Unavailable)}async removeListener(t,n){const r=this.listeners[t];if(!r)return;const s=r.indexOf(n);this.listeners[t].splice(s,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(r=>{this.notifyListeners(t,r)}))}}const N0=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),L0=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class h$ extends eg{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[s,i]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");s=L0(s).trim(),i=L0(i).trim(),n[s]=i}),n}async setCookie(t){try{const n=N0(t.key),r=N0(t.value),s=t.expires?`; expires=${t.expires.replace("expires=","")}`:"",i=(t.path||"/").replace("path=",""),o=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${r||""}${s}; path=${i}; ${o};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}ao("CapacitorCookies",{web:()=>new h$});const f$=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const s=r.result;t(s.indexOf(",")>=0?s.split(",")[1]:s)},r.onerror=s=>n(s),r.readAsDataURL(e)}),p$=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(s=>s.toLocaleLowerCase()).reduce((s,i,o)=>(s[i]=e[t[o]],s),{})},m$=(e,t=!0)=>e?Object.entries(e).reduce((r,s)=>{const[i,o]=s;let a,l;return Array.isArray(o)?(l="",o.forEach(c=>{a=t?encodeURIComponent(c):c,l+=`${i}=${a}&`}),l.slice(0,-1)):(a=t?encodeURIComponent(o):o,l=`${i}=${a}`),`${r}&${l}`},"").substr(1):null,g$=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),s=p$(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(s.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[o,a]of Object.entries(e.data||{}))i.set(o,a);n.body=i.toString()}else if(s.includes("multipart/form-data")||e.data instanceof FormData){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((a,l)=>{i.append(l,a)});else for(const a of Object.keys(e.data))i.append(a,e.data[a]);n.body=i;const o=new Headers(n.headers);o.delete("content-type"),n.headers=o}else(s.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class y$ extends eg{async request(t){const n=g$(t,t.webFetchExtra),r=m$(t.params,t.shouldEncodeUrlParams),s=r?`${t.url}?${r}`:t.url,i=await fetch(s,n),o=i.headers.get("content-type")||"";let{responseType:a="text"}=i.ok?t:{};o.includes("application/json")&&(a="json");let l,c;switch(a){case"arraybuffer":case"blob":c=await i.blob(),l=await f$(c);break;case"json":l=await i.json();break;case"document":case"text":default:l=await i.text()}const u={};return i.headers.forEach((d,h)=>{u[h]=d}),{data:l,headers:u,status:i.status,url:i.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}ao("CapacitorHttp",{web:()=>new y$});var I0;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(I0||(I0={}));var D0;(function(e){e.StatusBar="StatusBar",e.NavigationBar="NavigationBar"})(D0||(D0={}));class v$ extends eg{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}}ao("SystemBars",{web:()=>new v$});var Ta;(function(e){e.Heavy="HEAVY",e.Medium="MEDIUM",e.Light="LIGHT"})(Ta||(Ta={}));var Hf;(function(e){e.Success="SUCCESS",e.Warning="WARNING",e.Error="ERROR"})(Hf||(Hf={}));const Uu=ao("Haptics",{web:()=>$(()=>import("./web-CDATUlcS.js"),[]).then(e=>new e.HapticsWeb)}),Vu=Xn.isNativePlatform();async function w$(){if(Vu)try{await Uu.impact({style:Ta.Light})}catch{}}async function Q4(){if(Vu)try{await Uu.impact({style:Ta.Medium})}catch{}}async function X4(){if(Vu)try{await Uu.impact({style:Ta.Heavy})}catch{}}async function Z4(){if(Vu)try{await Uu.notification({type:Hf.Success})}catch{}}const x$=[{icon:TA,label:"InÃcio",path:"/home"},{icon:Ic,label:"Jogar",path:"/lobby"},{icon:xA,label:"Copa",path:"/copa"},{icon:um,label:"Ranking",path:"/ranking"},{icon:of,label:"Perfil",path:"/profile"}];function b$(){const e=Ls(),t=ro();return["/home","/lobby","/ranking","/profile","/achievements","/shop","/tournaments","/vip","/copa"].some(s=>e.pathname.startsWith(s))?p.jsx("nav",{className:"fixed bottom-0 left-0 right-0 z-50 bg-card/95 backdrop-blur-lg border-t border-border",style:{paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:p.jsx("div",{className:"flex items-center justify-around h-14 sm:h-16 max-w-lg mx-auto px-2",children:x$.map(s=>{const i=e.pathname===s.path;return p.jsxs("button",{onClick:()=>{w$(),t(s.path)},className:Re("flex flex-col items-center justify-center gap-0.5 flex-1 py-1.5
217sm:py-2 rounded-xl transition-all duration-200 active:scale-95",i?"text-gold":"text-muted-foreground"),children:[p.jsx(s.icon,{size:20,strokeWidth:i?2.5:1.8,className:"sm:w-[22px] sm:h-[22px]"}),p.jsx("span",{className:Re("text-[9px] sm:text-[10px] font-semibold",i&&"text-gold"),children:s.label}),i&&p.jsx("div",{className:"absolute bottom-0.5 sm:bottom-1 w-5 sm:w-6 h-0.5 rounded-full bg-gold"})]},s.path)})})}):null}const _$=M1("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Et=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?kP:"button";return p.jsx(o,{className:Re(_$({variant:t,size:n,className:e})),ref:i,...s})});Et.displayName="Button";function Fu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function S$(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const E$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class tg extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class T$ extends tg{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class M0 extends tg{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class $0 extends tg{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Wf;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Wf||(Wf={}));class k${constructor(t,{headers:n={},customFetch:r,region:s=Wf.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=E$(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return S$(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:d}=r;let h={},{region:f}=r;f||(f=this.region);const y=new URL(`${this.url}/${n}`);f&&f!=="any"&&(h["x-region"]=f,y.searchParams.set("forceFunctionRegion",f));let g;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",g=c):typeof c=="string"?(h["Content-Type"]="text/plain",g=c):typeof FormData<"u"&&c instanceof FormData?g=c:(h["Content-Type"]="application/json",g=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?g=JSON.stringify(c):g=c;let x=u;d&&(o=new AbortController,i=setTimeout(()=>
217o.abort(),d),u?(x=o.signal,u.addEventListener("abort",()=>o.abort())):x=o.signal);const v=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),a),body:g,signal:x}).catch(S=>{throw new T$(S)}),m=v.headers.get("x-relay-error");if(m&&m==="true")throw new M0(v);if(!v.ok)throw new $0(v);let w=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return w==="application/json"?_=yield v.json():w==="application/octet-stream"||w==="application/pdf"?_=yield v.blob():w==="text/event-stream"?_=v:w==="multipart/form-data"?_=yield v.formData():_=yield v.text(),{data:_,error:null,response:v}}catch(a){return{data:null,error:a,response:a instanceof $0||a instanceof M0?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const DE=3,U0=e=>Math.min(1e3*2**e,3e4),C$=[520,503],ME=["GET","HEAD","OPTIONS"];var P$=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function V0(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",s),n()},e);function s(){clearTimeout(r),n()}t==null||t.addEventListener("abort",s)})}function A$(e,t,n,r){return!(!r||n>=DE||!ME.includes(e)||!C$.includes(t))}var R$=class{constructor(e){var t,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.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(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=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 o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(n.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await r(n.url.toString(),{method:n.method,headers:c,body:JSON.stringify(n.body,(d,h)=>typeof h=="bigint"?h.toString():h),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!ME.includes(n.method))throw d;if(n.retryEnabled&&o<DE){const h=U0(o);o++,await V0(h,n.signal);continue}throw d}if(A$(n.method,u.status,o,n.retryEnabled)){var a,l;const d=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,h=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:U0(o);await u.text(),o++,await V0(h,n.signal);continue}return await n.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const d=o==null?void 0:o.cause;if(d){var h,f,y,g;const m=(h=d==null?void 0:d.message)!==null&&h!==void 0?h:"",w=(f=d==null?void 0:d.code)!==null&&f!==void 0?f:"";l=`${(y=o==null?void 0:o.name)!==null&&y!==void 0?y:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 218 219Caused by: ${(g=d==null?void 0:d.name)!==null&&g!==void 0?g:"Error"}: ${m}`,w&&(l+=` (${w})`),d!=null&&d.stack&&(l+=` 220${d.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const v=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${v} 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.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(c+=`. Your request URL is ${v} 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:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
220)),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var c;const h=await e.text();h===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((c=t.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?r=h:r=JSON.parse(h))}const u=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&d&&d.length>1&&(s=parseInt(d[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const u=await e.text();try{n=JSON.parse(u),Array.isArray(n)&&e.status===404&&(r=[],n=null,i=200,o="OK")}catch{e.status===404&&u===""?(i=204,o="No Content"):n={message:u}}if(n&&t.shouldThrowOnError)throw new P$(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},O$=class extends R${select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const F0=new RegExp("[,()]");var Qs=class extends O${eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&F0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&F0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
220n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},j$=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new Qs({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
2200){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new Qs({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);a.searchParams.set("columns",u.join(","))}}return new Qs({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Qs({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Qs({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function ka(e){"@babel/helpers - typeof";return ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ka(e)}function N$(e,t){if(ka(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ka(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L$(e){var t=N$(e,"string");return ka(t)=="symbol"?t:t+""}function I$(e,t,n){return(t=L$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B0(Object(n),!0).forEach(function(r){I$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var D$=class $E{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const d=new AbortController,h=setTimeout(()=>d.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(h),l(c,u);const y=()=>{clearTimeout(h),d.abort()};return f.addEventListener("abort",y,{once:!0}),l(c,Pl(Pl({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(h),f.removeEventListener("abort",y)})}return l(c,Pl(Pl({},u),{},{signal:d.signal})).finally(()=>clearTimeout(h))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new j$(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new $E(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),d=r&&Object.values(n).some(u);d?(a="POST",c=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([f,y])=>y!==void 0).map(([f,y])=>[f,Array.isArray(y)?`{${y.join(",")}}`:`${y}
220`]).forEach(([f,y])=>{l.searchParams.append(f,y)})):(a="POST",c=n);const h=new Headers(this.headers);return d?h.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&h.set("Prefer",`count=${i}`),new Qs({method:a,url:l,headers:h,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class M${constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 221import ws from "ws" 222new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 223 224Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const $$="2.104.0",U$=`realtime-js/${$$}`,V$="1.0.0",UE="2.0.0",F$=UE,B$=1e4,z$=100,yr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},VE={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},qf={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class H${constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+d.length,f=new ArrayBuffer(this.HEADER_LENGTH+h);let y=new DataView(f),g=0;y.setUint8(g++,this.KINDS.userBroadcastPush),y.setUint8(g++,l.length),y.setUint8(g++,a.length),y.setUint8(g++,o.length),y.setUint8(g++,c.length),y.setUint8(g++,d.length),y.setUint8(g++,n),Array.from(l,v=>y.setUint8(g++,v.charCodeAt(0))),Array.from(a,v=>y.setUint8(g++,v.charCodeAt(0))),Array.from(o,v=>y.setUint8(g++,v.charCodeAt(0))),Array.from(c,v=>y.setUint8(g++,v.charCodeAt(0))),Array.from(d,v=>y.setUint8(g++,v.charCodeAt(0)));var x=new Uint8Array(f.byteLength+r.byteLength);return x.set(new Uint8Array(f),0),x.set(new Uint8Array(r),f.byteLength),x.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,a,l]=r;
224return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(t.slice(l,l+s));l=l+s;const u=r.decode(t.slice(l,l+i));l=l+i;const d=r.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,y={type:this.BROADCAST_EVENT,event:u,payload:f};return o>0&&(y.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var he;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(he||(he={}));const z0=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=W$(o,e,t,s),i),{}):{}},W$=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?FE(i,o):Kf(o)},FE=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return J$(t,n)}switch(e){case he.bool:return q$(t);case he.float4:case he.float8:case he.int2:case he.int4:case he.int8:case he.numeric:case he.oid:return K$(t);case he.json:case he.jsonb:return G$(t);case he.timestamp:return Y$(t);case he.abstime:case he.date:case he.daterange:case he.int4range:case he.int8range:case he.money:case he.reltime:case he.text:case he.time:case he.timestamptz:case he.timetz:case he.tsrange:case he.tstzrange:return Kf(t);default:return Kf(t)}},Kf=e=>e,q$=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},K$=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},G$=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},J$=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>FE(t,a))}return e},Y$=e=>typeof e=="string"?e.replace(" ","T"):e,BE=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Go=e=>typeof e=="function"?e:function(){return e},Q$=typeof self<"u"?self:null,Xs=typeof window<"u"?window:null,wn=Q$||Xs||globalThis,X$="2.0.0",Z$=1e4,eU=1e3,En={connecting:0,open:1,closing:2,closed:3},ht={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Mn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Gf={longpoll:"longpoll",websocket:"websocket"},tU={complete:4},Jf="base64url.bearer.phx.",Al=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,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(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 8,135 bytes, line 224
224matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}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,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},zE=class{constructor(e,t){this.callback=e,this.timerCalc=t,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))}},nU=class{constructor(e,t,n){this.state=ht.closed,this.topic=e,this.params=Go(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Al(this,Mn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new zE(()=>{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=ht.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=ht.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=ht.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=ht.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 Al(this,Mn.leave,Go({}),this.timeout).send(),this.state=ht.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Mn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=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=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ht.closed,this.bindings=[]}onClose(e){this.on(Mn.close,e)}onError(e){return this.on(Mn.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Al(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=ht.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Mn.close,"leave")},n=new Al(this,Mn.leave,Go({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ht.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===ht.closed}isErrored(){return this.state===ht.errored}isJoined(){return this.state===ht.joined}isJoining(){return this.state===ht.joining}isLeaving(){return this.state===ht.leaving}},Zc=class{static request(e,t,n,r,s,i,o){if(wn.XDomainRequest){let a=new wn.XDomainRequest;return this.xdomainRequest(a,e,t,r,s,i,o)}else if(wn.XMLHttpRequest){let a=new wn.XMLHttpRequest;return this.xhrRequest(a,e,t,n,r,s,i,o)}else{if(wn.fetch&&wn.AbortController)return this.fetchRequest(e,t,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,o){let a={method:e,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),wn.fetch(t,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,n,r,s,i,o){return e.timeout=s,e.open(t,n),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,o,a){e.open(t,n,!0),e.timeout=i;for(let[l,c]of Object.entries(r))e.setRequestHeader(l,c);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===tU.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},rU=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},zs=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Jf)&&(this.authToken=atob(t[1].slice(Jf.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(e),this.readyState=En.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Gf.websocket),"$1/"+Gf.longpoll)}endpointURL(){return Zc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=En.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===En.open||this.readyState===En.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=En.open,this.onopen({}),this.poll();break;
224case 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 ${n}`)}})}send(e){typeof e!="string"&&(e=rU(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 225`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=En.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=Zc.request(e,this.endpointURL(),t,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},sU=class jo{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=jo.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=jo.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=jo.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return jo.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.clone(t),o={},a={};return this.map(i,(l,c)=>{n[l]||(a[l]=c)}),this.map(n,(l,c)=>{let u=i[l];if(u){let d=c.metas.map(g=>g.phx_ref),h=u.metas.map(g=>g.phx_ref),f=c.metas.filter(g=>h.indexOf(g.phx_ref)<0),y=u.metas.filter(g=>d.indexOf(g.phx_ref)<0);f.length>0&&(o[l]=c,o[l].metas=f),y.length>0&&(a[l]=this.clone(u),a[l].metas=y)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(t,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=t[a];if(t[a]=this.clone(l),c){let u=t[a].metas.map(h=>h.phx_ref),d=c.metas.filter(h=>u.indexOf(h.phx_ref)<0);t[a].metas.unshift(...d)}r(a,c,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;let u=l.metas.map(d=>d.phx_ref);c.metas=c.metas.filter(d=>u.indexOf(d.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete t[a]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Rl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,i,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+n.length+s.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,n.length),l.setUint8(c++,s.length),l.setUint8(c++,r.length),Array.from(t,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(c++,d.charCodeAt(0)));var u=new Uint8Array(a.byteLength+i.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(i),a.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
225,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(e.slice(o,o+r));o=o+r;let l=n.decode(e.slice(o,o+s));o=o+s;let c=n.decode(e.slice(o,o+i));o=o+i;let u=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(a,a+r));a=a+r;let c=n.decode(e.slice(a,a+s));a=a+s;let u=n.decode(e.slice(a,a+i));a=a+i;let d=n.decode(e.slice(a,a+o));a=a+o;let h=e.slice(a,e.byteLength),f={status:d,response:h};return{join_ref:l,ref:c,topic:u,event:Mn.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(e.slice(i,i+r));i=i+r;let a=n.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},iU=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||Z$,this.transport=t.transport||wn.WebSocket||zs,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||wn&&wn.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Rl.encode.bind(Rl),this.defaultDecoder=Rl.decode.bind(Rl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==zs?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;Xs&&Xs.addEventListener&&(Xs.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),Xs.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),Xs.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=r=>t.rejoinAfterMs?t.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>t.reconnectAfterMs?t.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(r,s,i)=>{console.log(`${r}: ${s}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Go(t.params||{}),this.endPoint=`${e}/${Gf.websocket}`,this.vsn=t.vsn||X$,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new zE(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return zs}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Zc.appendParams(Zc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Go(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==zs?this.connectWithF
vendor: 4,339 bytes, line 225
225allback(zs,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case zs:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Jf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),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(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),eU,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===En.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError()}
225triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Mn.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case En.connecting:return"connecting";case En.open:return"open";case En.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new nU(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}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(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Jo{constructor(t,n){const r=aU(n);this.presence=new sU(t.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=Jo.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=Jo.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Jo.transformState(this.presence.state)}static transformState(t){return t=oU(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=lc(s),n},{})}static onJoinPayload(t,n,r){const s=H0(n),i=lc(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=H0(n),i=lc(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function lc(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function oU(e){return JSON.parse(JSON.stringify(e))}function aU(e){return(e==null?void 0:e.events)&&{events:e.events}}function H0(e){return e!=null&&e.metas?lc(e):[]}var W0;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(W0||(W0={}));class lU{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Jo(this.channel.channelAdapter,n)}}class cU{constructor(t,n,r){const s=uU(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>z$){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===yr.joined}isJoined(){return this.state===yr.joined}isJoining(){return this.state===yr.joining}isClosed(){return this.state===yr.closed}isLeaving(){return this.state===yr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function uU(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var q0;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(q0||(q0={}));var gi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(gi||(gi={}));var $n;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})($n||($n={}));class Yo{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}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(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new cU(this.socket.socketAdapter,t,this.params),this.presence=new lU(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=BE(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[gi.PRESENCE]&&this.bindings[gi.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},h={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(f=>{t==null||t($n.CHANNEL_ERROR,f)}),this._onClose(()=>t==null?void 0:t($n.CLOSED)),this.updateJoinPayload(Object.assign({config:h},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t($n.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=yr.errored,t==null||t($n.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t($n.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:c,schema:u,table:d,filter:h}}=l,f=t&&t[a];if(f&&f.event===c&&Yo.isFilterValueEqual(f.schema,u)&&Yo.isFilterValueEqual(f.table,d)&&Yo.isFilterValueEqual(f.filter,h))o.push(Object.assign(Object.assign({},l),{id:f.id}));
225else{this.unsubscribe(),this.state=yr.errored,n==null||n($n.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=yr.errored&&n&&n($n.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===gi.PRESENCE||t===gi.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
225in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(t,n,r){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,r),o={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,o,a,l,c,u;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const h=(s=this.bindings[d])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!h)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in h){const f=h.id,y=(i=h.filter)===null||i===void 0?void 0:i.event;return f&&((o=n.ids)===null||o===void 0?void 0:o.includes(f))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(c=(l=h==null?void 0:h.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return f==="*"||f===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:o}=VE;return n&&[r,s,i,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(s))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=z0(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=z0(t.columns,t.old_record)),n}}class dU{constructor(t,n){this.socket=new iU(t,n)}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(t){this.socket.heartbeatCallback=t}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(t,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==qf.connecting}isDisconnecting(){return this.socket.connectionState()==qf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const hU={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},fU=[1e3,2e3,5e3,1e4],pU=1e4,mU=` 226 addEventListener("message", (e) => { 227 if (e.data.event === "start") { 228 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 229 } 230 });`;class gU{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(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
230,this.ref=0,this.serializer=new H$,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new dU(t,s),this.httpEndpoint=BE(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n} 231 232To use Realtime in Node.js, you need to provide a WebSocket implementation: 233 234Option 1: Use Node.js 22+ which has native WebSocket support 235Option 2: Install and provide the "ws" package: 236 237 npm install ws 238 239 import ws from "ws" 240 const client = new RealtimeClient(url, { 241 ...options, 242 transport: ws 243 })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||qf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Yo(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:U$};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(VE.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.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(t){let n;if(t)n=t;else{const r=new Blob([mU],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,o,a,l,c,u;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const d={};
243d.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:B$,d.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:hU.HEARTBEAT_INTERVAL,d.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:M$.getWebSocketConstructor(),d.params=t==null?void 0:t.params,d.logger=t==null?void 0:t.logger,d.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),d.reconnectAfterMs=(a=t==null?void 0:t.reconnectAfterMs)!==null&&a!==void 0?a:g=>fU[g-1]||pU;let h,f;const y=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:F$;switch(y){case V$:h=(g,x)=>x(JSON.stringify(g)),f=(g,x)=>x(JSON.parse(g));break;case UE:h=this.serializer.encode.bind(this.serializer),f=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${d.vsn}`)}if(d.vsn=y,d.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:h,d.decode=(u=t==null?void 0:t.decode)!==null&&u!==void 0?u:f,d.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,d.params=Object.assign(Object.assign({},d.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,d.autoSendHeartbeat=!this.worker}return d}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var Ca=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function yU(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function vU(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function wU(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=yU(e.baseUrl,r,s),l=await vU(e.auth),c=await t(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),h=d&&u?JSON.parse(u):u;if(!c.ok){const f=d?h:void 0,y=f==null?void 0:f.error;throw new Ca((y==null?void 0:y.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:f})}return{status:c.status,headers:c.headers,data:h}}}}function Ol(e){return e.join("�")}var xU=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Ol(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ol(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ol(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ol(e.namespace)}`}),!0}catch(t){if(t instanceof Ca&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Ca&&n.status===409)return;throw n}}};function Hs(e){return e.join("�")}var bU=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Hs(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Ca&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Ca&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},_U=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=wU({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new xU(this.client,t),this.tableOps=new bU(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
243async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function Pa(e){"@babel/helpers - typeof";return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(e)}function SU(e,t){if(Pa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Pa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EU(e){var t=SU(e,"string");return Pa(t)=="symbol"?t:t+""}function TU(e,t,n){return(t=EU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K0(Object(n),!0).forEach(function(r){TU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Bu=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function zu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Yf=class extends Bu{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return J({},super.toJSON())}},HE=class extends Bu{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function ng(e,t,n){const r=J({},e),s=t.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function kU(e){const t={};for(const[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}const CU=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),PU=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Qf=e=>{if(Array.isArray(e))return e.map(n=>Qf(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=Qf(r)}),t},AU=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),G0=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},RU=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Yf(G0(o),i,a,r))}).catch(()=>{const o=i+"";t(new Yf(s.statusText||`HTTP ${i} error`,i,o,r))})}else t(new HE(G0(e),e,r))},OU=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return J(J({},s),n);if(PU(r)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=ng(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return t!=null&&t.duplex&&(s.duplex=t.duplex),J(J({},s),n)};async function To(e,t,n,r,s,i,o){return new Promise((a,l)=>{e(n,OU(t,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>RU(c,l,r,o))})}function WE(e="storage"){return{get:async(t,n,r,s)=>To(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>To(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>To(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>To(t,"HEAD",n,J(J({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>To(t,"DELETE",n,s,i,r,e)}}const jU=WE("storage"),{get:Aa,post:en,put:Xf,head:NU,remove:rg}=jU,Tt=WE("vectors");var lo=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=kU(t),this.fetch=CU(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=ng(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(zu(n))return{data:null,error:n};throw n}}},LU=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(zu(t))return{data:null,error:t};throw t}}};let qE;qE=Symbol.toStringTag;var IU=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[qE]="BlobDownloadBuilder",this.promise=null}asStream(){return new LU(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(zu(t))return{data:null,error:t};throw t}}};const DU={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},J0={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var MU=class extends lo{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=J(J({},J0),r);let a=J(J({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[h,f]of Object.entries(r.headers))a=ng(a,h,f);const c=s._removeEmptyFolders(t),u=s._getFinalPath(c),d=await(e=="PUT"?Xf:en)(s.fetch,`${s.url}/object/${u}`,i,J({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const c=J(J({},J0),r),u=J(J({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",c.cacheControl)):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType),{path:i,fullPath:(await Xf(s.fetch,a.toString(),l,{headers:u})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=J({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await en(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new Bu("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await en(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
243stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await en(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await en(r.fetch,`${r.url}/object/sign/${s}`,J({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await en(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>J(J({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),a=()=>Aa(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new IU(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Qf(await Aa(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await NU(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(zu(s)){var r;const i=s instanceof Yf?s.status:s instanceof HE?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const s=r.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await rg(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=J(J(J({},DU),t),{},{prefix:e||""});return await en(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=J({},e);return await en(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const $U="2.104.0",Ja={"X-Client-Info":`storage-js/${$U}`};var UU=class extends lo{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=J(J({},Ja),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Aa(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Aa(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await en(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Xf(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await en(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await rg(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},VU=class extends lo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=J(J({},Ja),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await en(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Aa(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await rg(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!AU(e))throw new Bu("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 n=new _U({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
243),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},FU=class extends lo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=J(J({},Ja),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Tt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Tt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},BU=class extends lo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=J(J({},Ja),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},zU=class extends lo{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=J(J({},Ja),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Tt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},HU=class extends zU{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new WU(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},WU=class extends FU{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,J(J({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,J(J({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new qU(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
243,qU=class extends BU{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,J(J({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,J(J({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,J(J({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,J(J({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,J(J({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},KU=class extends UU{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new MU(this.url,this.headers,e,this.fetch)}get vectors(){return new HU(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new VU(this.url+"/iceberg",this.headers,this.fetch)}};const KE="2.104.0",Zs=30*1e3,Zf=3,Qd=Zf*Zs,GU="http://localhost:9999",JU="supabase.auth.token",YU={"X-Client-Info":`gotrue-js/${KE}`},ep="X-Supabase-Api-Version",GE={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},QU=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,XU=10*60*1e3;class Ra extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function B(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class ZU extends Ra{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function eV(e){return B(e)&&e.name==="AuthApiError"}class os extends Ra{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class er extends Ra{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class bt extends er{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function jl(e){return B(e)&&e.name==="AuthSessionMissingError"}class Ws extends er{constructor(){super("Auth session or user missing","AuthInvalidToken
243ResponseError",500,void 0)}}class Nl extends er{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ll extends er{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function tV(e){return B(e)&&e.name==="AuthImplicitGrantRedirectError"}class Y0 extends er{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class nV extends er{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 tp extends er{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Xd(e){return B(e)&&e.name==="AuthRetryableFetchError"}class Q0 extends er{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class np extends er{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const eu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),X0=` 244\r=`.split(""),rV=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<X0.length;t+=1)e[X0[t].charCodeAt(0)]=-2;for(let t=0;t<eu.length;t+=1)e[eu[t].charCodeAt(0)]=t;return e})();function Z0(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(eu[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(eu[r]),t.queuedBits-=6}}function JE(e,t,n){const r=rV[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function ew(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{oV(o,r,n)};for(let o=0;o<e.length;o+=1)JE(e.charCodeAt(o),s,i);return t.join("")}function sV(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function iV(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}sV(r,t)}}function oV(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function Ci(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)JE(e.charCodeAt(s),n,r);return new Uint8Array(t)}function aV(e){const t=[];return iV(e,n=>t.push(n)),new Uint8Array(t)}function fs(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Z0(s,n,r)),Z0(null,n,r),t.join("")}function lV(e){return Math.round(Date.now()/1e3)+e}function cV(){return Symbol("auth-callback")}const We=()=>typeof window<"u"&&typeof document<"u",es={tested:!1,writable:!1},YE=()=>{if(!We())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(es.tested)return es.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),es.tested=!0,es.writable=!0}catch{es.tested=!0,es.writable=!1}return es.writable};function uV(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
244h((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const QE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),dV=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ei=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},ts=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},He=async(e,t)=>{await e.removeItem(t)};class Hu{constructor(){this.promise=new Hu.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Hu.promiseConstructor=Promise;function Il(e){const t=e.split(".");if(t.length!==3)throw new np("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!QU.test(t[r]))throw new np("JWT not in base64url format");return{header:JSON.parse(ew(t[0])),payload:JSON.parse(ew(t[1])),signature:Ci(t[2]),raw:{header:t[0],payload:t[1]}}}async function hV(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function fV(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function pV(e){return("0"+e.toString(16)).substr(-2)}function mV(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,pV).join("")}async function gV(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function yV(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await gV(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function qs(e,t,n=!1){const r=mV();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await ei(e,`${t}-code-verifier`,s);const i=await yV(r);return[i,r===i?"plain":"s256"]}const vV=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function wV(e){const t=e.headers.get(ep);if(!t||!t.match(vV))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function xV(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function bV(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const _V=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ks(e){if(!_V.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Zd(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="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 "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function SV(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function tw(e){return JSON.parse(JSON.stringify(e))}const is=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),EV=[502,503,504,520,521,522,523,524,530];async function nw(e){var t;if(!dV(e))throw new tp(is(e),0);if(EV.includes(e.status))throw new tp(is(e),e.status);let n;try{n=await e.json()}catch(i){throw new os(is(i),i)}let r;const s=wV(e);if(s&&s.getTime()>=GE["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Q0(is(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new bt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>
244i&&typeof o=="string",!0))throw new Q0(is(n),e.status,n.weak_password.reasons);throw new ZU(is(n),e.status||500,r)}const TV=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function H(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[ep]||(i[ep]=GE["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await kV(e,t,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function kV(e,t,n,r,s,i){const o=TV(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new tp(is(l),0)}if(a.ok||await nw(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await nw(l)}}function Yt(e){var t;let n=null;AV(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=lV(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function rw(e){const t=Yt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function vr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function CV(e){return{data:e,error:null}}function PV(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=Fu(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function sw(e){return e}function AV(e){return e.access_token&&e.refresh_token&&e.expires_in}const eh=["global","local","others"];class RV{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=QE(r),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)}}async signOut(t,n=eh[0]){if(eh.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${eh.join(", ")}`);try{return await H(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(B(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await H(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:vr})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Fu(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await H(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:PV,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(B(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await H(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:vr})}catch(n){if(B(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await H(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:sw});if(u.error)throw u.error;const d=await u.json(),h=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(y.split(";")[1].split("=")[1]);c[`${x}Page`]=g}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(B(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){Ks(t);try{return await H(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:vr})}catch(n){if(B(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Ks(t);try{return await H(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:vr})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Ks(t);
244try{return await H(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:vr})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Ks(t.userId);try{const{data:n,error:r}=await H(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(B(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Ks(t.userId),Ks(t.id);try{return{data:await H(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(B(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await H(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:sw});if(u.error)throw u.error;const d=await u.json(),h=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(y.split(";")[1].split("=")[1]);c[`${x}Page`]=g}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(B(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await H(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await H(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await H(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(B(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await H(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(B(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await H(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await H(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(B(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await H(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await H(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await H(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(B(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await H(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(B(n))return{data:null,error:n};throw n}}}function iw(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const mn={debug:!!(globalThis&&YE()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
244class XE extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class ow extends XE{}async function OV(e,t,n){mn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),mn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),mn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{mn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw mn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new ow(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(mn.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(i){if(t>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&t>0){if(r.signal.aborted)return mn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}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(e,{mode:"exclusive",steal:!0},async o=>{if(o){mn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{mn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw mn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new ow(`Lock "${e}" was released because another request stole it`)}throw i}}function jV(){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 ZE(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function NV(e){return parseInt(e,16)}function LV(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function IV(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:d,version:h}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 245`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=ZE(e.address),y=u?`${u}://${r}
245`:r,g=e.statement?`${e.statement} 246`:"",x=`${y} wants you to sign in with your Ethereum account: 247${f} 248 249${g}`;let v=`URI: ${d} 250Version: ${h} 251Chain ID: ${n}${o?` 252Nonce: ${o}`:""} 253Issued At: ${i.toISOString()}`;if(s&&(v+=` 254Expiration Time: ${s.toISOString()}`),a&&(v+=` 255Not Before: ${a.toISOString()}`),l&&(v+=` 256Request ID: ${l}`),c){let m=` 257Resources:`;for(const w of c){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);m+=` 258- ${w}`}v+=m}return`${x} 259${v}`}class Ne extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class tu extends Ne{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function DV({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ne({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ne({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ne({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ne({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Ne({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ne({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ne({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ne({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(eT(o)){if(i.rp.id!==o)return new Ne({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ne({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Ne({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function MV({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ne({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ne({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(eT(r)){if(n.rpId!==r)return new Ne({message:`The RP ID "${n.rpId}
259" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ne({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class $V{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const UV=new $V;function VV(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Fu(e,["challenge","user","excludeCredentials"]),i=Ci(t).buffer,o=Object.assign(Object.assign({},n),{id:Ci(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Ci(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function FV(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Fu(e,["challenge","allowCredentials"]),s=Ci(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Ci(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function BV(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:fs(new Uint8Array(e.response.attestationObject)),clientDataJSON:fs(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function zV(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:fs(new Uint8Array(s.authenticatorData)),clientDataJSON:fs(new Uint8Array(s.clientDataJSON)),signature:fs(new Uint8Array(s.signature)),userHandle:s.userHandle?fs(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function eT(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function aw(){var e,t;return!!(We()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function HV(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new tu("Browser returned unexpected credential type",t)}:{data:null,error:new tu("Empty credential response",t)}}catch(t){return{data:null,error:DV({error:t,options:e})}}}async function WV(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new tu("Browser returned unexpected credential type",t)}:{data:null,error:new tu("Empty credential response",t)}}
259catch(t){return{data:null,error:MV({error:t,options:e})}}}const qV={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},KV={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function nu(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const a=r[i];t(a)?r[i]=nu(a,o):r[i]=nu(o)}else r[i]=o}return r}function GV(e,t){return nu(qV,e,t||{})}function JV(e,t){return nu(KV,e,t||{})}class YV{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:l};const c=s??UV.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const d=r;if(d)u.name=`${u.id}:${d}`;else{const f=(await this.client.getUser()).data.user,y=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${y}`}}u.displayName||(u.displayName=u.name)}switch(a.webauthn.type){case"create":{const u=GV(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:h}=await HV({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const u=JV(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:h}=await WV(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(a){return B(a)?{data:null,error:a}:{data:null,error:new os("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Ra("rpId is required for WebAuthn authentication")};try{if(!aw())return{data:null,error:new os("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return B(o)?{data:null,error:o}:{data:null,error:new os("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Ra("rpId is required for WebAuthn registration")};try{if(!aw())return{data:null,error:new os("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return B(o)?{data:null,error:o}:{data:null,error:new os("Unexpected error in register",o)}}}}jV();const QV={url:GU,storageKey:JU,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:YU,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};
259async function lw(e,t,n){return await n()}const Gs={};class Oa{get jwks(){var t,n;return(n=(t=Gs[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Gs[this.storageKey]=Object.assign(Object.assign({},Gs[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Gs[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Gs[this.storageKey]=Object.assign(Object.assign({},Gs[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},QV),t);if(this.storageKey=i.storageKey,this.instanceID=(n=Oa.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Oa.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&We()){const o=`${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(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new RV({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=QE(i.fetch),this.lock=i.lock||lw,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&We()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=OV:this.lock=lw,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 YV(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:YE()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=iw(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=iw(this.memoryStorage)),We()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${KE}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(We()&&(n=uV(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),We()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),tV(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return B(n)?this._returnResult({error:n}):this._returnResult({error:new os("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Yt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(B(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:u,password:d,options:h}=t;let f=null,y=null;this.flowType==="pkce"&&([f,y]=await qs(this.storage,this.storageKey)),i=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:u,password:d,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:f,code_challenge_method:y},xform:Yt})}else if("phone"in t){const{phone:u,password:d,options:h}=t;i=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(s=h==null?void 0:h.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Yt})}else throw new Nl("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await He(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),B(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:a}=t;n=await H(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:rw})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await H(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:rw})}else throw new Nl("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new Ws;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(B(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,a,l,c,u,d,h;let f,y;if("message"in t)f=t.message,y=t.signature;else{const{chain:g,wallet:x,statement:v,options:m}=t;let w;if(We())if(typeof x=="object")w=x;else{const P=window;if("ethereum"in P&&typeof P.ethereum=="object"&&"request"in P.ethereum&&typeof P.ethereum.request=="function")w=P.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 x!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=x}const _=new URL((n=m==null?void 0:m.url)!==null&&n!==void 0?n:window.location.href),S=await w.request({method:"eth_requestAccounts"}).then(P=>P).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const T=ZE(S[0]);let E=(r=m==null?void 0:m.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const P=await w.request({method:"eth_chainId"});E=NV(P)}const k={domain:_.host,address:T,statement:v,uri:_.href,version:"1",chainId:E,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=m==null?void 0:m.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=m==null?void 0:m.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=IV(k),y=await w.request({method:"personal_sign",params:[LV(f),T]})}try{const{data:g,error:x}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:y},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Yt});if(x)throw x;if(!g||!g.session||!g.user){const v=new Ws;return this._returnResult({data:{user:null,session:null},error:v})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:x})}catch(g){if(B(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var n,r,s,i,o,a,l,c,u,d,h,f;let y,g;if("message"in t)y=t.message,g=t.signature;else{const{chain:x,wallet:v,statement:m,options:w}=t;let _;if(We())if(typeof v=="object")_=v;else{const T=window;if("solana"in T&&typeof T.solana=="object"&&("signIn"in T.solana&&typeof T.solana.signIn=="function"||"signMessage"in T.solana&&typeof T.solana.signMessage=="function"))_=T.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 v!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=v}const S=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const T=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),m?{statement:m}:null));let E;if(Array.isArray(T)&&T[0]&&typeof T[0]=="object")E=T[0];else if(T&&typeof T=="object"&&"signedMessage"in T&&"signature"in T)E=T;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)y=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),g=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((d=(u=w==null?void 0:w.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...w.sign
259InWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 260`);const T=await _.signMessage(new TextEncoder().encode(y),"utf8");if(!T||!(T instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=T}}try{const{data:x,error:v}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:fs(g)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Yt});if(v)throw v;if(!x||!x.session||!x.user){const m=new Ws;return this._returnResult({data:{user:null,session:null},error:m})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:v})}catch(x){if(B(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const n=await ts(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new nV;const{data:i,error:o}=await H(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Yt});if(await He(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Ws;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),B(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=await H(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Yt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new Ws;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(B(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await qs(this.storage,this.storageKey));const{error:d}=await H(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:u}=await H(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new Nl("You must provide either an email or phone number.")}catch(a){if(await He(this.storage,`${this.storageKey}-code-verifier`),B(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await H(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Yt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(B(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await qs(this.storage,this.storageKey));const c=await H(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:CV});return!((i=c.data)===null||i===void 0)&&i.url&&We()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await He(this.storage,`${this.storageKey}-code-verifier`),B(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new bt;const{error:s}=await H(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(B(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await H(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:a}=await H(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new Nl("You must provide either an email or phone number and a type")}catch(n){if(B(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await ts(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
260id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Qd:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await ts(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Zd()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=SV(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await H(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:vr}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new bt}:await H(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:vr})})}catch(n){if(B(n))return jl(n)&&(await this._removeSession(),await He(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new bt;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await qs(this.storage,this.storageKey));const{data:c,error:u}=await H(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:vr});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await He(this.storage,`${this.storageKey}-code-verifier`),B(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new bt;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=Il(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(B(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new bt;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(B(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!We())throw new Ll("No browser detected.");
260if(t.error||t.error_description||t.error_code)throw new Ll(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Y0("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ll("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Y0("No code detected.");const{data:m,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:m.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new Ll("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(a);let h=u+d;l&&(h=parseInt(l));const f=h-u;f*1e3<=Zs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${d}s`);const y=h-d;u-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,h,u):u-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,h,u);const{data:g,error:x}=await this._getUser(i);if(x)throw x;const v={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:h,refresh_token:o,token_type:c,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(r){if(B(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await ts(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!jl(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(eV(a)&&(a.status===404||a.status===401||a.status===403)||jl(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await He(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=cV(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),jl(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await qs(this.storage,this.storageKey,!0));try{return await H(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),B(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:h}=i;if(h)throw h;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await H(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return We()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(B(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
260if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=t,d=await H(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Yt}),{data:h,error:f}=d;return f?this._returnResult({data:{user:null,session:null},error:f}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new Ws}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:f}))}catch(s){if(await He(this.storage,`${this.storageKey}-code-verifier`),B(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await H(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await fV(async s=>(s>
2600&&await hV(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await H(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Yt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Xd(i)&&Date.now()+o-r<Zs})}catch(r){if(this._debug(n,"error",r),B(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),We()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await ts(this.storage,this.storageKey);if(s&&this.userStorage){let o=await ts(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await ei(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Zd()}else if(s&&!s.user&&!s.user){const o=await ts(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await He(this.storage,this.storageKey+"-user"),await ei(this.storage,this.storageKey,s)):s.user=Zd()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Qd;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Qd}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Xd(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new bt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Hu;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new bt;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),B(i)){const o={data:null,error:i};return Xd(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await He(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await ei(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=tw(s);await ei(this.storage,this.storageKey,i)}else{const s=tw(n);await ei(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await He(this.storage,this.storageKey),await He(this.storage,this.storageKey+"-code-verifier"),await He(this.storage,this.storageKey+"-user"),this.userStorage&&await He(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&We()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
260catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Zs);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/Zs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Zs}ms, refresh threshold is ${Zf} ticks`),s<=Zf&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof XE)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!We()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await qs(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await H(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await H(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?BV(t.webauthn.credential_response):zV(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await H(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await H(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:VV(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:FV(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:f}=Il(t);let y=null;f.aal&&(y=f.aal);let g=y;const{data:{user:x},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((r=(n=x==null?void 0:x.factors)===null||n===void 0?void 0:n.filter(_=>_.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(g="aal2");const w=f.amr||[];return{data:{currentLevel:y,nextLevel:g,currentAuthenticationMethods:w},error:null}}catch(f){if(B(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
260=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Il(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const h=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await H(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new bt})})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new bt});const o=await H(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&We()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(B(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new bt});const o=await H(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&We()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(B(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await H(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new bt})})}catch(t){if(B(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await H(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new bt})})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+XU>s)return r;const{data:i,error:o}=await H(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:f,error:y}
260=await this.getSession();if(y||!f.session)return this._returnResult({data:null,error:y});r=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Il(r);n!=null&&n.allowExpired||xV(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const u=bV(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,aV(`${a}.${l}`)))throw new np("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(B(r))return this._returnResult({data:null,error:r});throw r}}}Oa.nextInstanceID={};const XV=Oa,ZV="2.104.0";let No="";typeof Deno<"u"?No="deno":typeof document<"u"?No="web":typeof navigator<"u"&&navigator.product==="ReactNative"?No="react-native":No="node";const eF={"X-Client-Info":`supabase-js-${No}/${ZV}`},tF={headers:eF},nF={schema:"public"},rF={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},sF={};function ja(e){"@babel/helpers - typeof";return ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ja(e)}function iF(e,t){if(ja(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ja(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oF(e){var t=iF(e,"string");return ja(t)=="symbol"?t:t+""}function aF(e,t,n){return(t=oF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cw(Object(n),!0).forEach(function(r){aF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const lF=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),cF=()=>Headers,uF=(e,t,n)=>{const r=lF(n),s=cF();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,Ce(Ce({},o),{},{headers:c}))}};function dF(e){return e.endsWith("/")?e:e+"/"}function hF(e,t){var n,r;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:c,realtime:u,global:d}=t,h={db:Ce(Ce({},l),s),auth:Ce(Ce({},c),i),realtime:Ce(Ce({},u),o),storage:{},global:Ce(Ce(Ce({},d),a),{},{headers:Ce(Ce({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function fF(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(dF(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var pF=class extends XV{constructor(e){super(e)}},mF=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=fF(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:nF,realtime:sF,auth:Ce(Ce({},rF),{},{storageKey:o}),global:tF},l=hF(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=uF(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Ce({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new D$(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new KU(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new k$(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
260channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c},u,d){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new pF({url:this.authUrl.href,headers:Ce(Ce({},h),u),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new gU(this.realtimeUrl.href,Ce(Ce({},e),{},{params:Ce(Ce({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const gF=(e,t,n)=>new mF(e,t,n);function yF(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}yF()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function vF(){var x,v;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(m=>e===m||e.endsWith("."+m)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((x=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((v=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:v[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",d=2e3,h=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(m,w,_)=>new Promise(S=>{const T=h();let E=!1,k;const P=N=>{E||(E=!0,clearTimeout(k),window.removeEventListener("message",C),S(N))},C=N=>{if(c.indexOf(N.origin)<0)return;const U=N.data;U&&U.type===u&&U.requestId===T&&P(U)};window.addEventListener("message",C);const I={type:m,requestId:T,projectId:s,key:w};_!==void 0&&(I.value=_);for(const N of c)window.parent.postMessage(I,N);k=setTimeout(()=>P(null),d)});let y=!0;const g=250;return{getItem:async m=>{let w=await f("lovable-preview-auth:get",m);return!w&&y&&(await new Promise(_=>setTimeout(_,g)),w=await f("lovable-preview-auth:get",m)),y=!1,w&&w.ok&&typeof w.value=="string"?w.value===""?(localStorage.removeItem(m),null):w.value:localStorage.getItem(m)},setItem:(m,w)=>(localStorage.setItem(m,w),f("lovable-preview-auth:set",m,w).then(_=>{_&&_.ok&&typeof _.value=="string"&&localStorage.getItem(m)===w&&(_.value===""?localStorage.removeItem(m):localStorage.setItem(m,_.value))})),removeItem:m=>(localStorage.removeItem(m),f("lovable-preview-auth:remove",m).then(()=>{}))}}const wF="https://dvpxfdkslakqqzcxzsfk.supabase.co",xF="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImR2cHhmZGtzbGFrcXF6Y3h6c2ZrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzI4NTkxMDQsImV4cCI6MjA4ODQzNTEwNH0.vnpXpYwmhQkpmmiHTjgDJCHdh2-C5mPJllINdzEZtRU",ue=gF(wF,xF,{auth:{storage:vF(),persistSession:!0,autoRefreshToken:!0}}),tT=b.createContext(null);function bF({children:e}){const[t,n]=b.useState(null),[r,s]=b.useState(null),[i,o]=b.useState(!0);b.useEffect(()=>{const{data:{subscription:f}}=ue.auth.onAuthStateChange((y,g)=>{n((g==null?void 0:g.user)??null),g!=null&&g.user||(s(null),o(!1))});return ue.auth.getSession().then(({data:{session:y}})=>{n((y==null?void 0:y.user)??null),y!=null&&y.user||o(!1)}),()=>f.unsubscribe()},[]);const a=b.useCallback(async f=>{await new Promise(g=>setTimeout(g,150));const{data:y}=await ue.from("profiles").select("id, user_id, display_name, avatar, xp, wins, losses, is_guest, created_at, vip_plan, vip_start_date, vip_expiration_date, vip_last_claim, coins, last_seen, state, preferred_variant, best_win_streak, current_win_streak, referral_title, gems").eq("user_id",f).single();if(s(y),o(!1),y&&!y.is_guest)try{const g=localStorage.getItem("pending_guest_merge");
260if(g){const x=JSON.parse(g);if(x!=null&&x.profile_id&&(x!=null&&x.token)&&x.profile_id!==y.id){const{data:v,error:m}=await ue.rpc("merge_guest_into_me",{p_guest_profile_id:x.profile_id,p_claim_token:x.token});if(localStorage.removeItem("pending_guest_merge"),!m&&(v!=null&&v.ok)){const{toast:w}=await $(async()=>{const{toast:k}=await Promise.resolve().then(()=>zR);return{toast:k}},void 0),_=v.coins_transferred??0,S=v.xp_transferred??0,T=v.wins_transferred??0;(_||S||T)&&w.success(`Progresso transferido! +${_} moedas, +${S} XP, ${T} vitórias ð`,{duration:6e3});const{data:E}=await ue.from("profiles").select("id, user_id, display_name, avatar, xp, wins, losses, is_guest, created_at, vip_plan, vip_start_date, vip_expiration_date, vip_last_claim, coins, last_seen, state, preferred_variant, best_win_streak, current_win_streak, referral_title, gems").eq("user_id",f).single();E&&s(E)}else m&&console.warn("[Merge] failed",m)}}}catch(g){console.warn("[Merge] error",g)}},[]);b.useEffect(()=>{t&&a(t.id)},[t,a]);const l=b.useCallback(async()=>{t&&await a(t.id)},[t,a]),c=b.useCallback(async(f,y,g,x)=>{const{data:v,error:m}=await ue.auth.signUp({email:f,password:y,options:{data:{display_name:g,phone:x||null}}});if(m)throw m;return v.user&&ue.functions.invoke("send-welcome-email",{body:{email:f,display_name:g,user_id:v.user.id}}).catch(w=>console.warn("[Welcome Email] Failed:",w)),v},[]),u=b.useCallback(async(f,y)=>{const{data:g,error:x}=await ue.auth.signInWithPassword({email:f,password:y});if(x)throw x;return g},[]),d=b.useCallback(async()=>{await ue.auth.signOut()},[]),h=b.useMemo(()=>({user:t,profile:r,loading:i,signUpWithEmail:c,signInWithEmail:u,signOut:d,refreshProfile:l}),[t,r,i,c,u,d,l]);return j.createElement(tT.Provider,{value:h},e)}function sg(){const e=b.useContext(tT);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e}const _F="BA1szWCPGpx_HsXYcdd36vI23xVJmRGXIqnvB6zAXX0xknJB-COYCF41NIE3kz3UyQ-IUyNYZnuRE1Y4CrhuoMA";function uw(e){return!e.success}function SF(){const{profile:e}=sg(),t=b.useCallback(async()=>{var n;if(!e)return{success:!1,reason:"no_profile",message:"Entre com sua conta antes de ativar as notificações."};if(EF()&&!TF())return console.warn("[Push] iPhone fora da Tela de InÃcio: push do sistema indisponÃvel"),{success:!1,reason:"ios_requires_home_screen",message:"No iPhone, a notificação da barra do sistema só funciona abrindo o app pela Tela de InÃcio (Safari â Compartilhar â Adicionar à Tela de InÃcio)."};if(!("serviceWorker"in navigator)||!("PushManager"in window))return console.warn("[Push] Not supported in this browser"),{success:!1,reason:"unsupported",message:"Este dispositivo não suporta push do sistema neste modo de uso."};try{const r=Notification.permission==="granted"?"granted":await Notification.requestPermission();if(console.log("[Push] Permission result:",r),r!=="granted")return{success:!1,reason:"permission_denied",message:"Permissão de notificações não concedida."};const s=await navigator.serviceWorker.ready;console.log("[Push] SW ready, scope:",s.scope);let i=await s.pushManager.getSubscription();if(i)console.log("[Push] Using existing subscription");else{console.log("[Push] No existing subscription, creating new one...");const l=kF(_F);i=await s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:l}),console.log("[Push] New subscription created")}const o=i.toJSON();console.log("[Push] Saving subscription for profile:",e.id,"endpoint:",(n=o.endpoint)==null?void 0:n.substring(0,60));const{error:a}=await ue.from("push_subscriptions").upsert({profile_id:e.id,endpoint:o.endpoint,p256dh:o.keys.p256dh,auth:o.keys.auth},{onConflict:"profile_id,endpoint"});return a?(console.error("[Push] Failed to save subscription:",a),{success:!1,reason:"save_failed",message:"Não foi possÃvel registrar este aparelho para receber notificações."}):(console.log("[Push] Subscription saved successfully!"),localStorage.setItem("push_registered","true"),{success:!0})}catch(r){return console.error("[Push] Registration error:",r),{success:!1,reason:"subscription_failed",message:"Falha ao ativar o push do sistema neste aparelho."}}},[e]);return b.useEffect(()=>{e&&localStorage.getItem("push_registered")==="true"&&"Notification"in window&&Notification.permission==="granted"&&t()},[e,t]),{registerPush:t}}function EF(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function TF(){return window.matchMedia("(display-mode: standalone)").matches||!!window.navigator.standalone}function kF(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=atob(n),s=new Uint8Array(r.length);for(let i=0;i<r.length;++i)s[i]=r.charCodeAt(i);return s}function CF(){const[e,t]=b.useState(!1),{registerPush:n}=SF();b.useEffect(()=>
260{if(localStorage.getItem("notif_prompt_dismissed")||"Notification"in window&&Notification.permission==="granted")return;const o=setTimeout(()=>t(!0),3e3);return()=>clearTimeout(o)},[]);const r=async()=>{const i=await n();if(i.success){localStorage.setItem("notif_enabled","true"),localStorage.setItem("notif_prompt_dismissed","true"),Ae.success("Notificações ativadas!"),t(!1);return}uw(i)&&i.reason==="ios_requires_home_screen"?Ae.info(i.message):(Ae.error(uw(i)?i.message:"Não foi possÃvel ativar as notificações."),localStorage.setItem("notif_prompt_dismissed","true"),t(!1))},s=()=>{localStorage.setItem("notif_prompt_dismissed","true"),t(!1)};return p.jsx(SE,{children:e&&p.jsxs(we.div,{initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},className:"fixed bottom-20 left-4 right-4 z-[100] bg-card border border-border rounded-2xl p-4 shadow-xl max-w-sm mx-auto",children:[p.jsx("button",{onClick:s,className:"absolute top-3 right-3 text-muted-foreground",children:p.jsx(z1,{size:16})}),p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx("div",{className:"w-10 h-10 rounded-full bg-gold/20 flex items-center justify-center shrink-0",children:p.jsx(bA,{size:20,className:"text-gold"})}),p.jsxs("div",{className:"flex-1",children:[p.jsx("h3",{className:"font-bold text-sm text-foreground",children:"Ativar notificações?"}),p.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Receba alertas de convites de amigos, torneios e promoções mesmo com o app fechado."}),p.jsxs("div",{className:"flex gap-2 mt-3",children:[p.jsx(Et,{onClick:r,size:"sm",className:"bg-gold-gradient text-xs font-bold flex-1",children:"Ativar"}),p.jsx(Et,{onClick:s,size:"sm",variant:"ghost",className:"text-xs flex-1",children:"Agora não"})]})]})]})]})})}class PF{constructor(){oe(this,"name","mock");oe(this,"rewardedReady",!1);oe(this,"interstitialReady",!1)}
260async init(){}isRewardedReady(){return this.rewardedReady}getLastRewardedError(){return null}async loadRewarded(){this.rewardedReady||(await new Promise(t=>setTimeout(t,200)),this.rewardedReady=!0)}async showRewarded(){return this.rewardedReady=!1,{completed:!1,errorCode:"web_not_supported",errorMessage:"Anúncios AdMob só funcionam no app instalado (Android/iOS). Baixe o app para ganhar moedas.",metadata:{native:!1,provider:"mock"}}}async loadInterstitial(){this.interstitialReady||(await new Promise(t=>setTimeout(t,200)),this.interstitialReady=!0)}async showInterstitial(){return await this.loadInterstitial(),await new Promise(t=>setTimeout(t,3e3)),this.interstitialReady=!1,this.loadInterstitial(),{shown:!1,closed:!0,metadata:{native:!1,provider:"mock"}}}}const AF=new PF;var dw;(function(e){e.General="General",e.ParentalGuidance="ParentalGuidance",e.Teen="Teen",e.MatureAudience="MatureAudience"})(dw||(dw={}));var hw;(function(e){e.SizeChanged="bannerAdSizeChanged",e.Loaded="bannerAdLoaded",e.FailedToLoad="bannerAdFailedToLoad",e.Opened="bannerAdOpened",e.Closed="bannerAdClosed",e.AdImpression="bannerAdImpression"})(hw||(hw={}));var fw;(function(e){e.TOP_CENTER="TOP_CENTER",e.CENTER="CENTER",e.BOTTOM_CENTER="BOTTOM_CENTER"})(fw||(fw={}));var pw;(function(e){e.BANNER="BANNER",e.FULL_BANNER="FULL_BANNER",e.LARGE_BANNER="LARGE_BANNER",e.MEDIUM_RECTANGLE="MEDIUM_RECTANGLE",e.LEADERBOARD="LEADERBOARD",e.ADAPTIVE_BANNER="ADAPTIVE_BANNER",e.SMART_BANNER="SMART_BANNER"})(pw||(pw={}));var vn;(function(e){e.Loaded="interstitialAdLoaded",e.FailedToLoad="interstitialAdFailedToLoad",e.Showed="interstitialAdShowed",e.FailedToShow="interstitialAdFailedToShow",e.Dismissed="interstitialAdDismissed"})(vn||(vn={}));var mw;(function(e){e.Loaded="onRewardedInterstitialAdLoaded",e.FailedToLoad="onRewardedInterstitialAdFailedToLoad",e.Showed="onRewardedInterstitialAdShowed",e.FailedToShow="onRewardedInterstitialAdFailedToShow",e.Dismissed="onRewardedInterstitialAdDismissed",e.Rewarded="onRewardedInterstitialAdReward"})(mw||(mw={}));var as;(function(e){e.Loaded="onRewardedVideoAdLoaded",e.FailedToLoad="onRewardedVideoAdFailedToLoad",e.Showed="onRewardedVideoAdShowed",e.FailedToShow="onRewardedVideoAdFailedToShow",e.Dismissed="onRewardedVideoAdDismissed",e.Rewarded="onRewardedVideoAdReward"})(as||(as={}));var gw;(function(e){e.NOT_REQUIRED="NOT_REQUIRED",e.OBTAINED="OBTAINED",e.REQUIRED="REQUIRED",e.UNKNOWN="UNKNOWN"})(gw||(gw={}));var yw;(function(e){e[e.DISABLED=0]="DISABLED",e[e.EEA=1]="EEA",e[e.NOT_EEA=2]="NOT_EEA",e[e.US=3]="US",e[e.OTHER=4]="OTHER"})(yw||(yw={}));const Fe=ao("AdMob",{web:()=>$(()=>import("./web-EtO10H3N.js"),[]).then(e=>new e.AdMobWeb)}),RF={rewarded:{android:"ca-app-pub-4382168596994518/1191324598",ios:"ca-app-pub-4382168596994518/1191324598"},interstitial:{android:"ca-app-pub-4382168596994518/8570773080",ios:"ca-app-pub-4382168596994518/8570773080"},banner:{android:"ca-app-pub-4382168596994518/3713501991",ios:"ca-app-pub-4382168596994518/3713501991"}},OF=!1,jF=RF,Nt=OF,NF="ca-app-pub-4382168596994518~5927206569";function Js(e,t){return jF[e][t]}function nT(){return typeof window>"u"?null:window}function vw(){var n,r,s,i,o,a,l,c;const e=nT();if(!e)return!1;const t=((r=(n=e.Capacitor)==null?void 0:n.getPlatform)==null?void 0:r.call(n))??Xn.getPlatform();return t!=="ios"&&t!=="android"?!1:!!((i=(s=e.Capacitor)==null?void 0:s.isNativePlatform)!=null&&i.call(s)||(a=(o=e.Capacitor)==null?void 0:o.isPluginAvailable)!=null&&a.call(o,"AdMob")||(c=(l=e.webkit)==null?void 0:l.messageHandlers)!=null&&c.bridge)}function rp(){try{const e=Xn.getPlatform();return(e==="ios"||e==="android")&&(Xn.isNativePlatform()||vw())}catch{return vw()}}function sp(){var r,s;const e=nT(),t=((s=(r=e==null?void 0:e.Capacitor)==null?void 0:r.getPlatform)==null?void 0:s.call(r))??Xn.getPlatform();if(t!=="web")return t;const n=typeof navigator>"u"?"":navigator.userAgent;return/iPad|iPhone|iPod/.test(n)?"ios":/Android/i.test(n)?"android":t}class LF{constructor(){oe(this,"name","admob");oe(this,"initialized",!1);oe(this,"rewardedReady",!1);oe(this,"rewardedLoading",null);oe(this,"rewardedShowing",!1);
260oe(this,"lastRewardedError",null);oe(this,"rewardedListenerHandles",[]);oe(this,"interstitialReady",!1);oe(this,"interstitialLoading",null);oe(this,"interstitialShowing",!1);oe(this,"interstitialRetryCount",0);oe(this,"maxRetries",3);oe(this,"metrics",{rewardedRequested:0,rewardedFilled:0,rewardedFailed:0,interstitialRequested:0,interstitialFilled:0,interstitialFailed:0})}get platform(){return sp()==="ios"?"ios":"android"}get isNative(){return rp()}getMetrics(){return{...this.metrics}}isRewardedReady(){return this.rewardedReady}getFillRate(t){const n=this.metrics[`${t}Requested`],r=this.metrics[`${t}Filled`];return n===0?0:r/n}getLastRewardedError(){return this.lastRewardedError}toRewardedError(t,n){const r=t;return{completed:!1,errorCode:(r==null?void 0:r.code)!==void 0?String(r.code):n,errorMessage:(r==null?void 0:r.message)??String(t),metadata:{name:r==null?void 0:r.name,platform:this.platform,testMode:Nt,adUnitId:Js("rewarded",this.platform)}}}async clearRewardedListeners(){const t=this.rewardedListenerHandles.splice(0);await Promise.allSettled(t.map(n=>n.remove()))}withTimeout(t,n,r){let s;const i=new Promise((o,a)=>{s=setTimeout(()=>a(new Error(r)),n)});return Promise.race([t,i]).finally(()=>{s&&clearTimeout(s)})}
260async init(){if(!(this.initialized||!this.isNative))try{console.log("[AdMob] AdMob initializing",{appId:NF,testMode:Nt,platform:this.platform,native:this.isNative}),await Fe.initialize({testingDevices:[],initializeForTesting:Nt}),this.attachListeners(),this.initialized=!0,console.log("[AdMob] AdMob initialized",{testMode:Nt,platform:this.platform})}catch(t){const n=this.toRewardedError(t,"initialize_failed");this.lastRewardedError=n,console.error("[AdMob] AdMob initialize failed",n)}}attachListeners(){Fe.addListener(vn.Loaded,()=>{this.interstitialReady=!0,this.interstitialRetryCount=0,this.metrics.interstitialFilled++}),Fe.addListener(vn.FailedToLoad,t=>{this.interstitialReady=!1,this.metrics.interstitialFailed++,console.warn("[AdMob] interstitial failed to load",t),this.scheduleInterstitialRetry()}),Fe.addListener(vn.Dismissed,()=>{this.interstitialReady=!1,this.loadInterstitial()})}scheduleInterstitialRetry(){if(this.interstitialRetryCount>=this.maxRetries)return;this.interstitialRetryCount++;const t=Math.min(3e4,2e3*Math.pow(2,this.interstitialRetryCount));setTimeout(()=>void this.loadInterstitial(),t)}async loadRewarded(){if(!(!this.isNative||this.rewardedReady))return this.initialized||await this.init(),this.rewardedLoading?this.rewardedLoading:(this.rewardedLoading=(async()=>{try{this.metrics.rewardedRequested++;const t=Js("rewarded",this.platform);console.log("[AdMob] rewarded loading",{adUnitId:t,testMode:Nt,platform:this.platform}),await this.clearRewardedListeners();let n,r;const s=new Promise((a,l)=>{n=a,r=l}),i=await Promise.all([Fe.addListener(as.Loaded,()=>n()),Fe.addListener(as.FailedToLoad,a=>r(a))]);this.rewardedListenerHandles.push(...i);const o=Fe.prepareRewardVideoAd({adId:t,isTesting:Nt,immersiveMode:!0}).then(()=>{});await this.withTimeout(Promise.race([s,o]),12e3,"rewarded_load_timeout"),this.rewardedReady=!0,this.lastRewardedError=null,this.metrics.rewardedFilled++}catch(t){this.rewardedReady=!1,this.lastRewardedError=this.toRewardedError(t,"prepare_failed"),this.metrics.rewardedFailed++,console.warn("[AdMob] prepareRewardVideoAd error",this.lastRewardedError)}finally{this.rewardedLoading=null}})(),this.rewardedLoading)}async showRewarded(){if(!this.isNative)return{completed:!1,skipped:!0};if(this.rewardedShowing)return{completed:!1,skipped:!0};if(this.initialized||await this.init(),!this.rewardedReady){await this.loadRewarded();const t=Date.now();for(;!this.rewardedReady&&Date.now()-t<8e3;)await new Promise(n=>setTimeout(n,200));if(!this.rewardedReady)return this.lastRewardedError??this.toRewardedError("Rewarded ad load timeout","load_timeout")}this.rewardedShowing=!0;try{await this.clearRewardedListeners();let t=!1,n,r;const s=new Promise((a,l)=>{n=a,r=l}),i=await Promise.all([Fe.addListener(as.Rewarded,a=>{t=!0,n(a)}),Fe.addListener(as.FailedToShow,a=>r(a)),Fe.addListener(as.Dismissed,()=>{setTimeout(()=>{t||n({skipped:!0})},250)})]);this.rewardedListenerHandles.push(...i);const o=await this.withTimeout(Promise.race([Fe.showRewardVideoAd(),s]),12e4,"rewarded_show_timeout");return o!=null&&o.skipped?{completed:!1,skipped:!0,errorMessage:"Anúncio não foi assistido até o fim"}:(console.log("[AdMob] rewarded completed",o),{completed:!0,metadata:{reward:o}})}catch(t){const n=this.toRewardedError(t,"show_failed");return this.lastRewardedError=n,this.metrics.rewardedFailed++,console.error("[AdMob] showRewardVideoAd error",n),n}finally{this.rewardedReady=!1,this.rewardedShowing=!1,this.clearRewardedListeners()}}async loadInterstitial(){if(!(!this.isNative||this.interstitialReady))return this.initialized||await this.init(),this.interstitialLoading?this.interstitialLoading:(this.interstitialLoading=(async()=>{try{this.metrics.interstitialRequested++;const t=Js("interstitial",this.platform);console.log("[AdMob] interstitial loading",{adUnitId:t,testMode:Nt,platform:this.platform});let n,r;const s=new Promise((o,a)=>{n=o,r=a}),i=await Promise.all([Fe.addListener(vn.Loaded,()=>n()),Fe.addListener(vn.FailedToLoad,o=>r(o))]);await Fe.prepareInterstitial({adId:t,isTesting:Nt}),await this.withTimeout(s,15e3,"interstitial_load_timeout"),await Promise.allSettled(i.map(o=>o.remove())),this.interstitialReady=!0,console.log("[AdMob] interstitial loaded",{adUnitId:t,testMode:Nt,platform:this.platform})}catch(t){this.interstitialReady=!1,this.metrics.interstitialFailed++,console.warn("[AdMob] prepareInterstitial error",t)}finally{this.interstitialLoading=null}})(),this.interstitialLoading)}async showInterstitial(){if(!this.isNative)return{shown:!1,errorCode:"native_only",errorMessage:"Interstitial AdMob só abre no app instalado"};if(this.interstitialShowing)return{shown:!1,errorCode:"interstitial_already_showing",errorMessage:"Intersticial já está abrindo"};if(!this.interstitialReady){await this.loadInterstitial();const t=Date.now();for(;!this.interstitialReady&&Date.now()-t<15e3;)await new Promise(n=>setTimeout(n,200));if(!this.interstitialReady)return{shown:!1,errorCode:"interstitial_not_ready",errorMessage:"Intersticial não carregou a tempo",metadata:{platform:this.platform,testMode:Nt,adUnitId:Js("interstitial",this.platform)}}}this.interstitialShowing=!0;try{let t,n;const r=new Promise((i,o)=>{t=i,n=o}),s=await Promise.all([Fe.addListener(vn.Showed,()=>t()),Fe.addListener(vn.FailedToShow,i=>n(i)),Fe.addListener(vn.Dismissed,()=>t())]);return await Fe.showInterstitial(),await this.withTimeout(r,5e3,"interstitial_show_timeout"),await Promise.allSettled(s.map(i=>i.remove())),this.interstitialReady=!1,this.loadInterstitial(),{shown:!0,metadata:{platform:this.platform,testMode:Nt,adUnitId:Js("interstitial",this.platform)}}}catch(t){console.error("[AdMob] showInterstitial error",t);const n=t;return{shown:!1,errorCode:(n==null?void 0:n.code)!==void 0?String(n.code):"interstitial_show_failed",errorMessage:(n==null?void 0:n.message)??String(t),metadata:{name:n==null?void 0:n.name,platform:this.platform,testMode:Nt,adUnitId:Js("interstitial",this.platform)}}}finally{this.interstitialShowing=!1}}}const IF=new LF;async function ko(e,t,n,r,s=0,i={}){try{await ue.rpc.bind(ue)("track_ad_event",{p_profile_id:e,p_event_type:t,p_ad_type:n,p_placement:r,p_revenue:s,p_ad_provider:i.adProvider??null,p_platform:i.platform??null,p_error_code:i.errorCode??null,p_error_message:i.errorMessage??null,p_metadata:i.metadata??{}})}catch(o){console.warn("[adAnalytics] track failed",o)}}const ww={ads_global_enabled:!0,rewarded_enabled:!0,interstitial_enabled:!0,banner_enabled:!0,rewarded_coin_amount:100,interstitial_frequency:3,interstitial_cooldown_seconds:300,daily_rewarded_limit:10},xw="ta_ads_state_v1";class DF{constructor(){oe(this,"provider");oe(this,"config",ww);oe(this,"state",{matchesSinceLastInterstitial:0,lastInterstitialAt:0});oe(this,"inited",!1);oe(this,"interstitialShowing",!1);const t=rp(),n=t;this.provider=n?IF:AF,console.log("[Ads] provider selected",{provider:this.provider.name,native:t,platform:sp(),override:"auto"}),this.loadState()}loadState(){try{const t=localStorage.getItem(xw);t&&(this.state={...this.state,...JSON.parse(t)})}catch{return}}saveState(){try{localStorage.setItem(xw,JSON.stringify(this.state))}catch{return}}
260async init(){if(this.inited)return this.config;this.inited=!0;try{await this.provider.init()}catch(t){console.warn("[AdManager] provider init failed",t)}try{const{data:t}=await ue.from("app_config").select("*").eq("id","default").maybeSingle();t&&(this.config={...ww,...t})}catch(t){console.warn("[AdManager] config fetch failed, using defaults",t)}return this.config}getConfig(){return this.config}getProviderName(){return this.provider.name}getPlatform(){return sp()}isNativePlatform(){return rp()}getLastRewardedError(){return this.provider.getLastRewardedError()}isRewardedReady(){return this.provider.isRewardedReady()}async preloadRewarded(){return this.provider.loadRewarded()}async showRewarded(){return this.provider.showRewarded()}async onMatchEnded(t=null,n={}){if(await this.init(),this.interstitialShowing||!this.config.ads_global_enabled||!this.config.interstitial_enabled)return!1;if(n.isVip)return console.log("[Ads] skip interstitial: VIP user"),!1;if(n.isTournament||n.isFriendMatch||n.isRanked)return console.log("[Ads] skip interstitial: protected context",n),!1;await ko(t,"partida_finalizada","interstitial","post_match"),this.state.matchesSinceLastInterstitial+=1,this.saveState(),console.log("[Ads] partida finalizada",{count:this.state.matchesSinceLastInterstitial,provider:this.provider.name,platform:this.getPlatform(),native:this.isNativePlatform()});const r=Math.max(1,this.config.interstitial_frequency||3);if(this.state.matchesSinceLastInterstitial>=1&&this.state.matchesSinceLastInterstitial<r)return this.provider.loadInterstitial().then(()=>ko(t,"interstitial_loaded","interstitial","post_match",0,{adProvider:this.provider.name,platform:this.getPlatform()})).catch(()=>{}),!1;const s=(this.config.interstitial_cooldown_seconds||0)*1e3;if(s>0&&Date.now()-this.state.lastInterstitialAt<s)return console.log("[Ads] skip interstitial: cooldown active",{sinceLast:Date.now()-this.state.lastInterstitialAt,cooldownMs:s}),!1;try{this.interstitialShowing=!0,console.log("[Ads] abrindo interstitial obrigatório após 3 partidas");const i=await this.provider.showInterstitial();return i.shown?(this.state.matchesSinceLastInterstitial=0,this.state.lastInterstitialAt=Date.now(),this.saveState(),await ko(t,"interstitial_shown","interstitial","post_match",.01,{adProvider:this.provider.name,platform:this.getPlatform(),metadata:i.metadata}),!0):(await ko(t,"interstitial_failed","interstitial","post_match",0,{adProvider:this.provider.name,platform:this.getPlatform(),errorCode:i.errorCode,errorMessage:i.errorMessage,metadata:i.metadata}),!1)}catch(i){return console.warn("[AdManager] interstitial failed",i),await ko(t,"interstitial_failed","interstitial","post_match",0,{adProvider:this.provider.name,platform:this.getPlatform(),errorMessage:i instanceof Error?i.message:String(i)}),!1}finally{this.interstitialShowing=!1}}}const bw=new DF,MF=b.createContext(null);function $F({children:e}){const[t,n]=b.useState(bw.getConfig()),[r,s]=b.useState(!1);b.useEffect(()=>{(a=>window.requestIdleCallback?window.requestIdleCallback(a,{timeout:2e3}):setTimeout(a,800))(async()=>{const a=await bw.init();n(a),s(!0)})},[]);const i=b.useMemo(()=>({config:t,ready:r}),[t,r]);return p.jsx(MF.Provider,{value:i,children:e})}function ae({className:e,...t}){return p.jsx("div",{className:Re("animate-pulse rounded-md bg-muted",e),...t})}function UF(){return p.jsxs("div",{className:"min-h-[100dvh] bg-[#071a14] flex flex-col relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top,_#0f2c23_0%,_#071a14_60%,_#050f0b_100%)]"}),p.jsxs("div",{className:"relative z-10 pt-8 pb-10 px-4 flex flex-col items-center",children:[p.jsx(ae,{className:"w-36 h-36 rounded-full bg-[#1a3d2e]"}),p.jsx(ae,{className:"w-48 h-8 mt-4 bg-[#1a3d2e]"}),p.jsx(ae,{className:"w-64 h-4 mt-2 bg-[#1a3d2e]"}),p.jsx("div",{className:"mt-5 w-full rounded-xl p-3 border border-[#1a3d2e]/60 bg-[#0f2c23]/80",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(ae,{className:"w-10 h-10 rounded-full bg-[#1a3d2e]"}),p.jsxs("div",{className:"space-y-1.5",children:[p.jsx(ae,{className:"w-24 h-4 bg-[#1a3d2e]"}),p.jsx(ae,{className:"w-16 h-3 bg-[#1a3d2e]"})]})]}),p.jsxs("div",{className:"flex gap-4",children:[p.jsx(ae,{className:"w-12 h-8 bg-[#1a3d2e]"}),p.jsx(ae,{className:"w-12 h-8 bg-[#1a3d2e]"})]})]})})]}),p.jsx("div",{className:"relative z-10 px-4",children:p.jsx(ae,{className:"w-full h-14 roun
260ded-2xl bg-[#1a3d2e]"})}),p.jsx("div",{className:"relative z-10 px-4 mt-6 grid grid-cols-2 gap-3",children:Array.from({length:6}).map((e,t)=>p.jsx(ae,{className:"h-20 rounded-xl bg-[#1a3d2e]"},t))})]})}function VF(){return p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsxs("div",{className:"bg-card border-b border-border p-4 flex items-center gap-3",children:[p.jsx(ae,{className:"w-6 h-6 rounded bg-muted"}),p.jsx(ae,{className:"w-32 h-7 bg-muted"})]}),p.jsx("div",{className:"px-4 py-4",children:p.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:Array.from({length:5}).map((e,t)=>p.jsx(ae,{className:"w-24 h-8 rounded-full bg-muted flex-shrink-0"},t))})}),p.jsx("div",{className:"px-4 space-y-2",children:Array.from({length:10}).map((e,t)=>p.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl bg-card border border-border",children:[p.jsx(ae,{className:"w-8 h-6 bg-muted"}),p.jsx(ae,{className:"w-10 h-10 rounded-full bg-muted"}),p.jsxs("div",{className:"flex-1 space-y-1.5",children:[p.jsx(ae,{className:"w-28 h-4 bg-muted"}),p.jsx(ae,{className:"w-20 h-3 bg-muted"})]}),p.jsx(ae,{className:"w-16 h-5 bg-muted"})]},t))})]})}function FF(){return p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsxs("div",{className:"bg-card border-b border-border p-4 flex items-center gap-3",children:[p.jsx(ae,{className:"w-6 h-6 rounded bg-muted"}),p.jsx(ae,{className:"w-24 h-7 bg-muted"})]}),p.jsxs("div",{className:"px-4 py-6 flex flex-col items-center",children:[p.jsx(ae,{className:"w-20 h-20 rounded-full bg-muted"}),p.jsx(ae,{className:"w-32 h-5 mt-3 bg-muted"}),p.jsx(ae,{className:"w-20 h-4 mt-2 bg-muted"}),p.jsx(ae,{className:"w-full h-3 mt-4 rounded-full bg-muted"}),p.jsx(ae,{className:"w-40 h-3 mt-1 bg-muted"})]}),p.jsx("div",{className:"px-4 grid grid-cols-3 gap-3",children:Array.from({length:3}).map((e,t)=>p.jsxs("div",{className:"bg-card border border-border rounded-xl p-3 flex flex-col items-center gap-1",children:[p.jsx(ae,{className:"w-10 h-6 bg-muted"}),p.jsx(ae,{className:"w-14 h-3 bg-muted"})]},t))}),p.jsxs("div",{className:"px-4 mt-6 space-y-2",children:[p.jsx(ae,{className:"w-36 h-5 bg-muted"}),Array.from({length:5}).map((e,t)=>p.jsx(ae,{className:"w-full h-14 rounded-xl bg-muted"},t))]})]})}const ip="https://trucoarena.com.br",_w=`${ip}/og-truco-arena.jpg`;function BF({title:e,description:t,path:n,schema:r}){const s=`${ip}${n}`,i=n==="/"?e:`${e} | Truco Arena`,o={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"InÃcio",item:ip},...n!=="/"?[{"@type":"ListItem",position:2,name:e,item:s}]:[]]},a=r?Array.isArray(r)?r:[r]:[];return p.jsxs(sm,{children:[p.jsx("title",{children:i}),p.jsx("meta",{name:"description",content:t}),p.jsx("link",{rel:"canonical",href:s}),p.jsx("meta",{property:"og:type",content:"website"}),p.jsx("meta",{property:"og:locale",content:"pt_BR"}),p.jsx("meta",{property:"og:site_name",content:"Truco Arena"}),p.jsx("meta",{property:"og:title",content:i}),p.jsx("meta",{property:"og:description",content:t}),p.jsx("meta",{property:"og:url",content:s}),p.jsx("meta",{property:"og:image",content:_w}),p.jsx("meta",{property:"og:image:width",content:"1200"}),p.jsx("meta",{property:"og:image:height",content:"630"}),p.jsx("meta",{property:"og:image:alt",content:"Truco Arena â Jogue Truco Online Grátis"}),p.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),p.jsx("meta",{name:"twitter:title",content:i}),p.jsx("meta",{name:"twitter:description",content:t}),p.jsx("meta",{name:"twitter:image",content:_w}),p.jsx("script",{type:"application/ld+json",children:JSON.stringify(o)}),a.map((l,c)=>p.jsx("script",{type:"application/ld+json",children:JSON.stringify(l)},c))]})}const op="https://apps.apple.com/au/app/truco-arena-oficial/id6765602173",ap="https://play.google.com/store/apps/details?id=co.median.android.qdozdka";function Sw({className:e,variant:t="default",label:n}){const r=t==="compact";return p.jsxs("div",{className:Re("flex flex-col items-center gap-3",e),children:[n&&p.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground font-semibold tracking-wide uppercase",children:n}),p.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-3",children:[p.jsxs("a",{href:op,target:"_blank",rel:"noopener noreferrer","aria-label":"Baixar Truco Arena na App Store",className:Re("group flex items-center gap-3 rounded-xl border border-border bg-card hover:bg-card/80 hover:border-gold/50 transition-all shadow-lg hover:shadow-gold/20 hover:scale-105",r?"px-3 py-2":"px-5 py-3"),children:[p.jsx(U1,{className:Re("text-foreground",r?"w-6 h-6":"w-8 h-8"),fill:"currentColor"}),p.jsxs("div",{className:"text-left leading-tight",children:[p.jsx("p",{className:Re("text-muted-foreground",r?"text-[9px]":"text-[10px]"),children:"Baixe na"}),p.jsx("p",{className:Re("font-bold text-foreground tracking-tight",r?"text-sm":"text-base"),children:"App Store"})]})]}),p.jsxs("a",{href:ap,target:"_blank",rel:"noopener noreferrer","aria-label":"Baixar Truco Arena no Google Play",className:Re("group flex items-center gap-3 rounded-xl border border-border bg-card hover:bg-card/80 hover:border-gold/50 transition-all shadow-lg hover:shadow-gold/20 hover:scale-105",r?"px-3 py-2":"px-5 py-3"),children:[p.jsx(F1,{className:Re("text-emerald-400",r?"w-6 h-6":"w-8 h-8"),fill:"currentColor"}),p.jsxs("div",{className:"text-left leading-tight",children:[p.jsx("p",{className:Re("text-muted-foreground",r?"text-[9px]":"text-[10px]"),children:"DisponÃvel no"}),p.jsx("p",{className:Re("font-bold text-foreground tracking-tight",r?"text-sm":"text-base"),children:"Google Play"})]})]})]})]})}function zF(){if(typeof navigator>"u")return"other";const e=navigator.userAgent||navigator.vendor||"";return/android/i.test(e)?"android":/iPad|iPhone|iPod/.test(e)&&!window.MSStream||/Macintosh/.test(e)&&navigator.maxTouchPoints>1?"ios":"other"}function HF({className:e,size:t="lg",fullWidth:n=!1}
260){const r=zF(),s=()=>{r==="ios"?window.open(op,"_blank","noopener,noreferrer"):r==="android"?window.open(ap,"_blank","noopener,noreferrer"):(window.open(ap,"_blank","noopener,noreferrer"),window.open(op,"_blank","noopener,noreferrer"))},i=r==="ios"?U1:r==="android"?F1:EA,o=r==="ios"?"Baixar na App Store":r==="android"?"Baixar no Google Play":"Baixar App Oficial";return p.jsxs(Et,{onClick:s,size:t,className:Re("bg-gold-gradient text-primary-foreground font-display tracking-wider shadow-gold hover:scale-105 transition-transform gap-2",n&&"w-full",e),children:[p.jsx(i,{size:20,fill:r!=="other"?"currentColor":"none"}),o]})}const Ew="/assets/pao-de-queijo-ncKAeXSW.png",WF=[{id:"mesa-limpa",name:"Mesa Limpa",borderColor:"border-emerald-800",decorEmojis:["",""],overlayGradient:"from-transparent via-transparent to-transparent"},{id:"bar-original",name:"Bar do Zé",borderColor:"border-wood",decorEmojis:["ðº","ð¥"],overlayGradient:"from-transparent via-transparent to-black/20"},{id:"boteco",name:"Boteco da Esquina",borderColor:"border-amber-900",decorEmojis:["ð»","ð«"],overlayGradient:"from-amber-900/10 via-trans
260parent to-black/30"},{id:"sinuca",name:"Salão de Sinuca",borderColor:"border-emerald-900",decorEmojis:["ð±","ð¥"],overlayGradient:"from-emerald-900/10 via-transparent to-black/20"},{id:"faculdade",name:"Mesinha da Facul",borderColor:"border-stone-600",decorEmojis:["ð","â"],overlayGradient:"from-stone-600/10 via-transparent to-black/20"},{id:"praia",name:"Quiosque na Praia",borderColor:"border-amber-700",decorEmojis:["ð¥¥","ð©´"],overlayGradient:"from-sky-400/10 via-transparent to-amber-900/20"},{id:"festajunina",name:"Festa Junina",borderColor:"border-red-800",decorEmojis:["ð½","ð"],overlayGradient:"from-orange-600/10 via-transparent to-red-900/20"},{id:"churrasco",name:"Churrasquinho",borderColor:"border-orange-800",decorEmojis:["ð¥©","ð¥"],overlayGradient:"from-orange-800/10 via-transparent to-black/30"},{id:"samba",name:"Roda de Samba",borderColor:"border-yellow-600",decorEmojis:["ð¶","ðª"],overlayGradient:"from-purple-600/10 via-transparent to-yellow-900/20"},{id:"estadio",name:"Estádio",borderColor:"border-green-700",decorEmojis:["â½","ð£"],overlayGradient:"from-green-700/10 via-trans
260parent to-black/30"},{id:"fazenda",name:"Fazendinha",borderColor:"border-amber-800",decorEmojis:["ð","ð¾"],overlayGradient:"from-amber-800/10 via-transparent to-green-900/20"}],qF={"mesa-limpa":{table:()=>$(()=>import("./table-limpa-1U7rev9s.js"),[]),bg:()=>$(()=>import("./bg-limpa-Ck13U1As.js"),[])},"bar-original":{table:()=>$(()=>import("./table-felt-BO2WjsMd.js"),[]),bg:()=>$(()=>import("./bar-bg-COWaH0o-.js"),[])},boteco:{table:()=>$(()=>import("./table-boteco-Dr4UpGrp.js"),[]),bg:()=>$(()=>import("./bg-boteco-KWLPJfjH.js"),[])},sinuca:{table:()=>$(()=>import("./table-sinuca-DCdtj6yo.js"),[]),bg:()=>$(()=>import("./bg-sinuca-Cc6RJNuc.js"),[])},faculdade:{table:()=>$(()=>import("./table-faculdade-Bp4D9dvS.js"),[]),bg:()=>$(()=>import("./bg-faculdade-BGHQg5z2.js"),[])},praia:{table:()=>$(()=>import("./table-praia-AYc2zCuR.js"),[]),bg:()=>$(()=>import("./bg-praia-C0-EKEsK.js"),[])},festajunina:{table:()=>$(()=>import("./table-festajunina-CNLZGCjM.js"),[]),bg:()=>$(()=>import("./bg-festajunina-3VS72qJK.js"),[])},churrasco:{table:()=>$(()=>import("./table-churrasco-DVJ-Nitq.js"),[]),bg:()=>$(()=>import("./bg-churrasco-CeZh80Se.js"),[])},samba:{table:()=>$(()=>import("./table-samba-DBIIp9E-.js"),[]),bg:()=>$(()=>import("./bg-samba-ukICrJSH.js"),[])},estadio:{table:()=>$(()=>import("./table-estadio-BRsOyEjy.js"),[]),bg:()=>$(()=>import("./bg-estadio-C5SZm-B2.js"),[])},fazenda:{table:()=>$(()=>import("./table-fazenda-DqI7wFGc.js"),[]),bg:()=>$(()=>import("./bg-fazenda-DlPxMuwf.js"),[])}},Tw=new Map,Ji=WF.map(e=>({...e,tableImg:"",bgImg:""}));async function rT(e){const t=Tw.get(e.id);if(t)return{...e,...t};const n=qF[e.id];if(!n)return e;const[r,s]=await Promise.all([n.table(),n.bg()]),i={tableImg:r.default,bgImg:s.default};return Tw.set(e.id,i),{...e,...i}}function e3(){return Ji[Math.floor(Math.random()*Ji.length)]}const KF=[{icon:Ic,title:"2 Modalidades",desc:"Truco Paulista e Truco Mineiro com regras autênticas, manilhas e toda a emoção do jogo."},{icon:B1,title:"Multiplayer Online",desc:"Jogue contra amigos ou encontre adversários online em partidas 1v1 ou 2v2 em tempo real."},{icon:um,title:"Ranking & Ligas",desc:"Suba no ranking, ganhe XP e conquiste seu lugar entre os melhores trucadores do Brasil."},{icon:CA,title:"Jogue contra Bots",desc:"Treine suas habilidades contra 3 nÃveis de dificuldade antes de encarar jogadores reais."},{icon:PA,title:"100% no Navegador",desc:"Sem precisar baixar nada. Jogue direto do celular ou computador, onde estiver."},{icon:AA,title:"Sinais & Estratégia",desc:"Use sinais secretos com seu parceiro, blefe e estratégia para vencer cada rodada."}],GF=[{name:"Truco Paulista",emoji:"ð",color:"from-blue-500/20 to-blue-600/10",borderColor:"border-blue-500/30",badgeColor:"bg-blue-500/20 text-blue-400",points:["Mão começa valendo 1 ponto","Truco (3) â Seis (6) â Nove (9) â Doze (12)","Mão de Onze ao atingir 11 pontos","Manilha definida pela vira","Hierarquia fixa de naipes nas manilhas"]},{name:"Truco Mineiro",emoji:"pao",color:"from-emerald-500/20 to-emerald-600/10",borderColor:"border-emerald-500/30",badgeColor:"bg-emerald-500/20 text-emerald-400",points:["Mão começa valendo 2 pontos","Truco (4) â Seis (6) â Nove (9) â Doze (12)","Mão de 10 ao atingir 10 pontos","Manilha dinâmica definida pela vira","Hierarquia de naipe configurável por sala"]}],JF=e=>{const t=e.getHours(),r=e.getDay()===0||e.getDay()===6?1.14:1;return t>=19||t<1?{onlineFloor:Math.round(260*r),onlineMultiplier:3.4,matchesFloor:Math.round(2200*r),matchesMultiplier:3.1,totalMultiplier:1.2,totalBonus:2800}:t>=12?{onlineFloor:Math.round(180*r),onlineMultiplier:2.8,matchesFloor:Math.round(1500*r),matchesMultiplier:2.5,totalMultiplier:1.16,totalBonus:2300}:t>=6?{onlineFloor:Math.round(120*r),onlineMultiplier:2.2,matchesFloor:Math.round(900*r),matchesMultiplier:2,totalMultiplier:1.12,totalBonus:1900}:{onlineFloor:Math.round(80*r),onlineMultiplier:1.8,matchesFloor:Math.round(500*r),matchesMultiplier:1.7,totalMultiplier:1.08,totalBonus:1500}},th=(e,t=.06)=>{const n=Math.max(1,Math.round(e*t));return Math.floor(Math.random()*(n*2+1))-n},YF=()=>{const e=ro(),[t,n]=b.useState(0),[r,s]=b.useState(0),[i,o]=b.useState(0),[a,l]=b.useState(Ji);return b.useEffect(()=>{ue.auth.getSession().then(({data:{session:c}})=>{c&&e("/home",{replace:!0})})},[e]),b.useEffect(()=>{Promise.all(Ji.map(c=>rT(c))).then(l)},[]),b.useEffect(()=>{const c=async()=>{const d=new Date;d.setHours(0,0,0,0);const[h,f,y]=await Promise.all([ue.from("active_sessions").select("id",{count:"exact",head:!0}).gte("last_heartbeat",new Date(Date.now()-2*60*1e3).toISOString()),ue.from("match_history").select("id",{count:"exact",head:!0}).gte("played_at",d.toISOString()),ue.from("profiles").select("id",{count:"exact",head:!0})]),g=h.count||0,x=f.count||0,v=y.count||0,m=JF(new Date),w=Math.max(Math.round(g*m.onlineMultiplier)+th(m.onlineFloor),m.onlineFloor),_=Math.max(Math.round(x*m.matchesMultiplier)+th(m.matchesFloor,.04),m.matchesFloor),S=Math.max(Math.round(v*m.totalMultiplier)+m.totalBonus+th(350,.28),m.totalBonus+1800);n(w),s(_),o(S)};c();const u=setInterval(c,6e4);return()=>clearInterval(u)},[]),p.jsxs("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[p.jsx(BF,{title:"Truco Online Grátis â Jogue Truco Paulista e Mineiro | Truco Arena",description:"Jogue Truco online grátis direto no navegador. Crie salas privadas com amigos e jogue Truco Paulista ou Mineiro em partidas 1x1 ou 2x2 no Truco Arena.",path:"/",schema:{"@context":"https://schema.org","@type":"WebApplication",name:"Truco Arena",url:"https://trucoarena.com.br",applicationCategory:"GameApplication",operatingSystem:"Web",offers:{"@type":"Offer",price:"0",priceCurrency:"BRL"},description:"Jogue Truco online grátis direto no navegador. Truco Paulista e Mineiro com amigos ou contra bots.",inLanguage:"pt-BR"}}),p.jsxs("section",{className:"relative min-h-[100dvh] flex flex-col items-center justify-center px-4 py-12",children:[p.jsx("div",{className:"absolute inset-0 bg-felt opacity-40"}),p.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-trans
260parent to-background"}),p.jsxs(we.div,{initial:{y:-40,opacity:0},animate:{y:0,opacity:1},transition:{duration:.8},className:"relative z-10 flex flex-col items-center text-center",children:[p.jsx("img",{src:$u,alt:"Truco Arena â Jogue Truco Online Grátis no Navegador",className:"w-36 h-36 md:w-48 md:h-48 drop-shadow-2xl mb-4"}),p.jsx("h1",{className:"font-display text-5xl md:text-7xl text-gold text-shadow-glow tracking-wider",children:"TRUCO ARENA"}),p.jsx("p",{className:"text-muted-foreground text-lg md:text-xl mt-2 max-w-lg",children:"O melhor Truco online do Brasil. Paulista e Mineiro â escolha sua modalidade, jogue com amigos e domine a mesa!"}),p.jsxs("div",{className:"flex items-center gap-3 mt-5",children:[p.jsx("span",{className:"flex items-center gap-1.5 text-sm font-bold px-3 py-1.5 rounded-full border border-blue-500/30 bg-blue-500/10 text-blue-400",children:"ð Paulista"}),p.jsx("span",{className:"text-muted-foreground text-xs",children:"+"}),p.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-bold px-3 py-1.5 rounded-full border border-emerald-500/30 bg-emerald-500/10 text-emerald-400",children:[p.jsx("img",{src:Ew,alt:"Ãcone Truco Mineiro",className:"w-5 h-5"})," Mineiro"]})]})]}),p.jsxs(we.div,{initial:{y:30,opacity:0},animate:{y:0,opacity:1},transition:{delay:.4,duration:.6},className:"relative z-10 flex flex-col sm:flex-row gap-3 mt-10",children:[p.jsxs(Et,{onClick:()=>e("/auth"),className:"bg-gold-gradient text-primary-foreground font-display text-xl px-10 py-6 rounded-xl shadow-gold hover:scale-105 transition-transform",children:[p.jsx(Uy,{size:22}),"JOGAR AGORA"]}),p.jsxs(Et,{variant:"outline",onClick:()=>e("/auth"),className:"border-border text-foreground font-display text-lg px-8 py-6 rounded-xl hover:bg-card transition-all",children:[p.jsx(Dy,{size:18}),"Criar Sala"]}),p.jsxs(Et,{variant:"outline",onClick:()=>e("/join"),className:"border-border text-foreground font-display text-lg px-8 py-6 rounded-xl hover:bg-card transition-all",children:[p.jsx(V1,{size:18}),"Entrar com Código"]})]}),p.jsx(we.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6,duration:.6},className:"relative z-10 mt-8",children:p.jsx(Sw,{label:"Também disponÃvel como app oficial"})}),p.jsxs(we.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.8,duration:.6},className:"relative z-10 flex flex-wrap items-center justify-center gap-4 sm:gap-8 mt-10",children:[p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 rounded-full bg-card/80 border border-border/50 backdrop-blur-sm",children:[p.jsxs("span",{className:"relative flex h-2.5 w-2.5",children:[p.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),p.jsx("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500"})]}),p.jsx("span",{className:"text-sm font-bold text-foreground",children:t>0?t:"â"}),p.jsx("span",{className:"text-xs text-muted-foreground",children:"online agora"})]}),p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 rounded-full bg-card/80 border border-border/50 backdrop-blur-sm",children:[p.jsx(Ic,{size:16,className:"text-gold"}),p.jsx("span",{className:"text-sm font-bold text-foreground",children:r.toLocaleString("pt-BR")}),p.jsx("span",{className:"text-xs text-muted-foreground",children:"partidas hoje"})]}),p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 rounded-full bg-card/80 border border-border/50 backdrop-blur-sm",children:[p.jsx(B1,{size:16,className:"text-primary"}),p.jsx("span",{className:"text-sm font-bold text-foreground",children:i.toLocaleString("pt-BR")}),p.jsx("span",{className:"text-xs text-muted-foreground",children:"jogadores"})]})]}),p.jsx(we.div,{initial:{opacity:0}
260,animate:{opacity:1},transition:{delay:1.2},className:"relative z-10 mt-12 animate-bounce",children:p.jsx(SA,{size:28,className:"text-muted-foreground"})})]}),p.jsx("section",{className:"relative py-16 px-4 bg-card/50",children:p.jsxs("div",{className:"max-w-4xl mx-auto",children:[p.jsxs(we.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},className:"text-center mb-12",children:[p.jsx("h2",{className:"font-display text-3xl md:text-4xl text-gold mb-3",children:"ESCOLHA SUA MODALIDADE"}),p.jsx("p",{className:"text-muted-foreground max-w-md mx-auto",children:"Duas formas de jogar truco, cada uma com seu tempero. Escolha a sua antes de cada partida!"})]}),p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:GF.map((c,u)=>p.jsxs(we.div,{initial:{y:30,opacity:0},whileInView:{y:0,opacity:1},viewport:{once:!0},transition:{delay:u*.15},className:`bg-gradient-to-br ${c.color} border ${c.borderColor} rounded-2xl p-6 space-y-4`,children:[p.jsxs("div",{className:"flex items-center gap-3",children:[c.emoji==="pao"?p.jsx("img",{src:Ew,alt:"Ãcone do Truco Mineiro â pão de queijo",className:"w-10 h-10"}):p.jsx("span",{className:"text-4xl",children:c.emoji}),p.jsxs("div",{children:[p.jsx("h3",{className:"font-display text-xl text-foreground",children:c.name}),p.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-full ${c.badgeColor}`,children:"DISPONÃVEL"})]})]}),p.jsx("ul",{className:"space-y-2",children:c.points.map((d,h)=>p.jsxs("li",{className:"flex items-start gap-2 text-sm text-foreground/80",children:[p.jsx("span",{className:"text-gold mt-0.5 flex-shrink-0",children:"â"}),d]},h))})]},c.name))})]})}),p.jsx("section",{className:"relative py-16 px-4",children:p.jsxs("div",{className:"max-w-5xl mx-auto",children:[p.jsxs(we.div,{initial:{opacity:0}
260,whileInView:{opacity:1},viewport:{once:!0},className:"text-center mb-12",children:[p.jsx("h2",{className:"font-display text-3xl md:text-4xl text-gold mb-3",children:"CENÃRIOS EXCLUSIVOS"}),p.jsx("p",{className:"text-muted-foreground max-w-md mx-auto",children:"Cada partida acontece em um cenário diferente. Sinta a vibe de cada mesa!"})]}),p.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:a.map((c,u)=>p.jsxs(we.div,{initial:{scale:.9,opacity:0},whileInView:{scale:1,opacity:1},viewport:{once:!0},transition:{delay:u*.08},className:"group relative rounded-2xl overflow-hidden border border-border hover:border-gold/40 transition-all cursor-default",children:[p.jsxs("div",{className:"aspect-[4/3] relative",children:[p.jsx("img",{src:c.bgImg,alt:`Cenário de truco online â ${c.name} no Truco Arena`,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"}),p.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent"})]}),p.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-3",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-lg",children:c.decorEmojis[0]}),p.jsxs("div",{children:[p.jsx("p",{className:"font-display text-sm text-white drop-shadow-lg",children:c.name}),p.jsxs("p",{className:"text-[10px] text-white/60",children:[c.decorEmojis[0]," ",c.decorEmojis[1]]})]})]})})]},c.id))})]})}),p.jsx("section",{className:"relative py-16 px-4 bg-card/50",children:p.jsxs("div",{className:"max-w-4xl mx-auto",children:[p.jsx(we.h2,{initial:{opacity:0}
260,whileInView:{opacity:1},viewport:{once:!0},className:"font-display text-3xl md:text-4xl text-gold text-center mb-12",children:"POR QUE JOGAR TRUCO ARENA?"}),p.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:KF.map((c,u)=>p.jsxs(we.div,{initial:{y:30,opacity:0},whileInView:{y:0,opacity:1},viewport:{once:!0},transition:{delay:u*.1},className:"bg-card border border-border rounded-2xl p-5 hover:border-gold/30 transition-colors",children:[p.jsx("div",{className:"w-10 h-10 rounded-lg bg-gold/10 flex items-center justify-center mb-3",children:p.jsx(c.icon,{size:20,className:"text-gold"})}),p.jsx("h3",{className:"font-display text-lg text-foreground mb-1",children:c.title}),p.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:c.desc})]},c.title))})]})}),p.jsx("section",{className:"relative py-16 px-4",children:p.jsxs("div",{className:"max-w-3xl mx-auto",children:[p.jsx(we.h2,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},className:"font-display text-3xl md:text-4xl text-gold text-center mb-12",children:"MODOS DE JOGO"}),p.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[p.jsxs(we.div,{initial:{scale:.9,opacity:0},whileInView:{scale:1,opacity:1},viewport:{once:!0},className:"bg-card border border-border rounded-2xl p-6 text-center",children:[p.jsx("span",{className:"text-5xl mb-3 block",children:"âï¸"}),p.jsx("h3",{className:"font-display text-2xl text-foreground mb-2",children:"1 vs 1"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Duelo mano a mano. Prove que você é o melhor trucador!"})]}),p.jsxs(we.div,{initial:{scale:.9,opacity:0},whileInView:{scale:1,opacity:1},viewport:{once:!0},transition:{delay:.1},className:"bg-card border border-border rounded-2xl p-6 text-center",children:[p.jsx("span",{className:"text-5xl mb-3 block",children:"ð¥"}),p.jsx("h3",{className:"font-display text-2xl text-foreground mb-2",children:"2 vs 2"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Duplas â o truco raiz! Use sinais com seu parceiro e dominem a mesa."})]})]})]})}),p.jsx("section",{className:"relative py-16 px-4 bg-card/50",children:p.jsx("div",{className:"max-w-4xl mx-auto",children:p.jsxs(we.div,{initial:{opacity:0}
260,whileInView:{opacity:1},viewport:{once:!0},className:"space-y-10",children:[p.jsxs("div",{className:"text-center mb-8",children:[p.jsx("h2",{className:"font-display text-3xl md:text-4xl text-gold mb-3",children:"TUDO SOBRE O TRUCO ONLINE"}),p.jsx("p",{className:"text-muted-foreground max-w-lg mx-auto",children:"Entenda o jogo, as modalidades e por que o Truco Arena é a melhor plataforma para jogar truco online grátis."})]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[p.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 space-y-3",children:[p.jsxs("h3",{className:"font-display text-xl text-gold flex items-center gap-2",children:[p.jsx(_A,{size:20})," O que é Truco?"]}),p.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"O Truco é o jogo de cartas mais popular do Brasil, jogado em mesas de bar, churrascos e encontros entre amigos. Com origens que remontam ao século XVIII, o truco combina estratégia, blefe e muita diversão. No Truco Arena, você joga truco online grátis direto do navegador, sem precisar baixar nada."})]}),p.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 space-y-3",children:[p.jsxs("h3",{className:"font-display text-xl text-gold flex items-center gap-2",children:[p.jsx(Ic,{size:20})," Como Jogar Truco Online"]}),p.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Jogar truco online nunca foi tão fácil. Crie sua conta gratuita no Truco Arena, escolha entre Truco Paulista ou Mineiro, e comece a jogar em segundos. Você pode criar salas privadas para jogar com amigos, entrar em partidas rápidas contra outros jogadores, ou treinar contra bots inteligentes. Tudo 100% no navegador!"}),p.jsx("a",{href:"/como-jogar-truco",onClick:c=>{c.preventDefault(),e("/como-jogar-truco")},className:"text-gold text-sm hover:underline inline-block mt-1",children:"â Aprenda a jogar truco passo a passo"})]}),p.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 space-y-3",children:[p.jsx("h3",{className:"font-display text-xl text-gold",children:"ð Truco Paulista vs Truco Mineiro"}),p.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed",children:["O ",p.jsx("strong",{className:"text-foreground",children:"Truco Paulista"})," começa valendo 1 ponto com escalada de 3, 6, 9 e 12, e possui a famosa Mão de Onze. Já o ",p.jsx("strong",{className:"text-foreground",children:"Truco Mineiro"})," inicia com 2 pontos (escalada de 4, 6, 9, 12) e tem a Mão de 10. As manilhas e hierarquias de naipe também diferem entre as modalidades, oferecendo experiências únicas de jogo."]}),p.jsxs("div",{className:"flex gap-3 mt-2",children:[p.jsx("a",{href:"/truco-paulista-online",onClick:c=>{c.preventDefault(),e("/truco-paulista-online")},className:"text-blue-400 text-sm hover:underline",children:"â Truco Paulista"}),p.jsx("a",{href:"/truco-mineiro-online",onClick:c=>{c.preventDefault(),e("/truco-mineiro-online")},className:"text-emerald-400 text-sm hover:underline",children:"â Truco Mineiro"})]})]}),p.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 space-y-3",children:[p.jsxs("h3",{className:"font-display text-xl text-gold flex items-center gap-2",children:[p.jsx(um,{size:20})," Por que jogar no Truco Arena?"]}),p.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"O Truco Arena é a plataforma mais completa para jogar truco online grátis. Oferecemos ranking competitivo, torneios, conquistas, cenários temáticos exclusivos e modos 1v1 e 2v2. Funciona em qualquer dispositivo â celular, tablet ou computador â sem download, sem instalação. A comunidade cresce todos os dias com jogadores de todo o Brasil!"}),p.jsx("a",{href:"/regras",onClick:c=>{c.preventDefault(),e("/regras")},className:"text-gold text-sm hover:underline inline-block mt-1",children:"â Veja as regras completas"})]})]})]})})}),p.jsxs("section",{className:"relative py-20 px-4",children:[p.jsx("div",{className:"absolute inset-0 bg-felt opacity-20"}),p.jsxs(we.div,{initial:{y:30,opacity:0}
260,whileInView:{y:0,opacity:1},viewport:{once:!0},className:"relative z-10 max-w-lg mx-auto text-center",children:[p.jsx("h2",{className:"font-display text-4xl md:text-5xl text-gold text-shadow-glow mb-4",children:"BORA TRUCAR?"}),p.jsx("p",{className:"text-muted-foreground mb-8",children:"Entre agora, é grátis! Crie sua conta e jogue truco online em segundos."}),p.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[p.jsxs(Et,{onClick:()=>e("/auth"),className:"bg-gold-gradient text-primary-foreground font-display text-2xl px-12 py-7 rounded-xl shadow-gold hover:scale-105 transition-transform",children:[p.jsx(Uy,{size:24}),"JOGAR AGORA"]}),p.jsxs(Et,{variant:"outline",onClick:()=>e("/auth"),className:"border-border text-foreground font-display text-lg px-8 py-6 rounded-xl hover:bg-card transition-all",children:[p.jsx(Dy,{size:20}),"Criar Sala"]})]})]})]}),p.jsx("section",{className:"py-12 px-4 border-t border-border bg-card/30",children:p.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[p.jsx("h2",{className:"font-display text-3xl md:text-4xl text-gold tracking-wider mb-3",children:"BAIXE O APP OFICIAL"}),p.jsx("p",{className:"text-muted-foreground mb-6 text-sm md:text-base",children:"Leve o Truco Arena no bolso. DisponÃvel na App Store e Google Play."}),p.jsxs("div",{className:"flex flex-col items-center gap-6",children:[p.jsx(HF,{}),p.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[p.jsx("span",{className:"h-px w-8 bg-border"}),"ou escolha sua loja",p.jsx("span",{className:"h-px w-8 bg-border"})]}),p.jsx(Sw,{})]})]})}),p.jsx("footer",{className:"border-t border-border py-8 px-4",children:p.jsxs("div",{className:"max-w-4xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-4",children:[p.jsx("p",{className:"text-xs text-muted-foreground",children:"Truco Arena © 2026 â Truco Paulista & Mineiro Online. Feito com ð e â no Brasil."}),p.jsx("nav",{className:"flex gap-4 flex-wrap justify-center",children:[{href:"/truco-online",label:"Truco Online"},{href:"/jogar-truco-online",label:"Jogar Truco Online"},{href:"/como-jogar-truco",label:"Como Jogar Truco"},{href:"/regras",label:"Regras do Truco"},{href:"/regras-do-truco",label:"Regras Completas"},{href:"/truco-paulista-online",label:"Truco Paulista"},{href:"/truco-paulista",label:"Paulista Online"},{href:"/truco-mineiro-online",label:"Truco Mineiro"},{href:"/truco-mineiro",label:"Mineiro Online"},{href:"/truco-com-amigos",label:"Com Amigos"},{href:"/ranking",label:"Ranking"},{href:"/privacy",label:"Privacidade"}].map(c=>p.jsx("a",{href:c.href,onClick:u=>{u.preventDefault(),e(c.href)},className:"text-xs text-muted-foreground hover:text-gold transition-colors",children:c.label},c.href))})]})})]})},QF=()=>{const e=ro(),{profile:t,loading:n,signUpWithEmail:r,signInWithEmail:s}=sg(),[i,o]=b.useState(Ji);b.useEffect(()=>{Promise.all(Ji.map(E=>rT(E))).then(E=>o(E.sort(()=>Math.random()-.5)))},[]),b.useEffect(()=>{!n&&t&&!t.is_guest&&e("/home")},[n,t,e]);const[a,l]=b.useState("guest"),[c,u]=b.useState(""),[d,h]=b.useState(""),[f,y]=b.useState(""),[g,x]=b.useState(""),[v,m]=b.useState(!1),w=async()=>{var E;if(!c.trim()){Ae.error("Digite seu nome!");return}m(!0);try{await ue.auth.signOut();const{data:k,error:P}=await ue.auth.signInAnonymously();if(P)throw console.error("Anonymous sign-in error:",P),P;const C=(E=k.user)==null?void 0:E.id;if(!C)throw new Error("Erro ao criar sessão");await new Promise(N=>setTimeout(N,800));const{error:I}=await ue.from("profiles").update({display_name:c.trim()}).eq("user_id",C);I&&(console.error("Profile update error:",I),await ue.from("profiles").insert({user_id:C,display_name:c.trim(),is_guest:!0})),await new Promise(N=>setTimeout(N,300)),e("/home",{replace:!0})}catch(k){console.error("Guest entry error:",k),Ae.error("Erro ao entrar. Tente novamente."),m(!1)}},_=async()=>{if(!d||!g){Ae.error("Preencha email e senha!");return}m(!0);try{await s(d,g)}catch(E){Ae.error(E.message),m(!1)}},S=async()=>{if(!d){Ae.error("Digite seu email primeiro");return}m(!0);try{const{error:E}=await ue.auth.resetPasswordForEmail(d,{redirectTo:`${window.location.origin}/reset-password`});if(E)throw E;Ae.success("Enviamos um link de recuperação para seu email ð§")}catch(E){Ae.error(E.message||"Erro ao enviar email")}finally{m(!1)}},T=async()=>
260{if(!c.trim()){Ae.error("Digite um apelido!");return}if(!d||!g){Ae.error("Preencha email e senha!");return}if(g.length<6){Ae.error("Senha deve ter no mÃnimo 6 caracteres!");return}m(!0);try{const E=await r(d,g,c.trim(),f.trim()||void 0);if(!(E!=null&&E.session))try{await s(d,g)}catch{}Ae.success("Conta criada! Bem-vindo ao Truco Arena ð"),(async()=>{try{const P=new URL(window.location.href).searchParams.get("ref")||localStorage.getItem("pending_invite_code");if(!P)return;await new Promise(U=>setTimeout(U,1200));const{data:{user:C}}=await ue.auth.getUser();if(!C)return;const{data:I}=await ue.from("profiles").select("id").eq("user_id",C.id).single();if(!I)return;const{getDeviceFingerprint:N}=await $(async()=>{const{getDeviceFingerprint:U}=await import("./deviceFingerprint-IJYhLo-L.js");return{getDeviceFingerprint:U}},[]);await ue.rpc("register_referral",{p_invited_id:I.id,p_invite_code:P,p_device_fp:N()}),localStorage.removeItem("pending_invite_code"),Ae.success(`Código ${P} aplicado! ð`)}catch(k){console.warn("[Referral] register failed",k)}})(),e("/home",{replace:!0})}catch(E){Ae.error(E.message),m(!1)}};return p.jsxs("div",{className:"min-h-screen bg-background flex flex-col items-center justify-center p-4 relative overflow-hidden",children:[p.jsxs(sm,{children:[p.jsx("title",{children:"Entrar - Truco Arena | Jogue Truco Online Grátis"}),p.jsx("meta",{name:"description",content:"Entre ou crie sua conta no Truco Arena para jogar truco online grátis com amigos."}),p.jsx("link",{rel:"canonical",href:"https://trucoarena.com.br/auth"})]}),p.jsx("div",{className:"absolute inset-0 grid grid-cols-3 gap-1 opacity-15",children:i.map((E,k)=>p.jsx("div",{className:"relative overflow-hidden",children:p.jsx("img",{src:E.tableImg,alt:"",className:"w-full h-full object-cover"})},k))}),p.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/60 via-background/80 to-background/90"}),p.jsxs(we.div,{initial:{y:-30,opacity:0},animate:{y:0,opacity:1},className:"relative z-10 flex flex-col items-center mb-8",children:[p.jsx("img",{src:$u,alt:"Truco Arena - Jogo de Truco Online",className:"w-28 h-28 drop-shadow-2xl"}),p.jsx("h1",{className:"font-display text-3xl text-gold text-shadow-glow tracking-wider mt-2",children:"TRUCO ARENA"}),p.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"O melhor truco online do Brasil"})]}),p.jsxs(we.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.2},className:"relative z-10 bg-card border border-border rounded-2xl p-6 w-full max-w-sm space-y-4",children:[p.jsx("div",{className:"flex gap-1 bg-secondary rounded-lg p-1",children:[{key:"guest",label:"Convidado",icon:of},{key:"login",label:"Entrar",icon:My},{key:"signup",label:"Criar Conta",icon:$y}].map(E=>p.jsxs("button",{onClick:()=>l(E.key),className:`flex-1 flex items-center justify-center gap-1.5 py-2.5 rounded-md text-xs font-bold transition-colors 261 ${a===E.key?"bg-gold-gradient text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:[p.jsx(E.icon,{size:14}),E.label]},E.key))}),a==="guest"&&p.jsxs("form",{onSubmit:E=>{E.preventDefault(),w()},className:"space-y-3",children:[p.jsx("p",{className:"text-sm text-center text-muted-foreground",children:"Jogue agora! Só digitar seu nome ð"}),p.jsx("input",{value:c,onChange:E=>u(E.target.value),placeholder:"Seu nome / apelido",maxLength:20,autoComplete:"nickname",className:"w-full bg-input border border-border rounded-lg px-4 py-3 text-foreground placeholder:text-muted-foreground text-center text-lg",autoFocus:!0}),p.jsx(Et,{type:"submit",disabled:v||!c.trim(),className:"w-full bg-gold-gradient font-bold text-base h-12",children:v?p.jsx(Dc,{className:"animate-spin",size:20}):p.jsxs(p.Fragment,{children:[p.jsx(of,{size:18}),"Jogar Agora"]})}),p.jsx("p",{className:"text-[11px] text-center text-muted-foreground",children:"Crie uma conta para salvar seu progresso e ranking"})]}),a==="login"&&p.jsxs("form",{onSubmit:E=>{E.preventDefault(),_()},className:"space-y-3",children:[p.jsx("input",{type:"email",value:d,onChange:E=>h(E.target.value),placeholder:"Email",autoComplete:"email",className:"w-full bg-input border border-border rounded-lg px-4 py-3 text-foreground placeholder:text-muted-foreground"}),p.jsx("input",{type:"password",value:g,onChange:E=>x(E.target.value),placeholder:"Senha",autoComplete:"current-password",className:"w-full bg-input border border-border rounded-lg px-4 py-3 text-foreground placeholder:text-muted-foreground"}),p.jsxs(Et,{type:"submit",disabled:v,className:"w-full bg-gold-gradient font-bold text-base",children:[p.jsx(My,{size:18}),"Entrar"]}),p.jsx("button",{type:"button",onClick:S,disabled:v,className:"w-full text-xs text-center text-gold hover:underline",children:"Esqueci minha senha"}),p.jsxs("p",{className:"text-xs text-center text-muted-foreground",children:["Não tem conta?"," ",p.jsx("button",{type:"button",onClick:()=>l("signup"),className:"text-gold underline font-semibold",children:"Cadastre-se"})]})]}),a==="signup"&&p.jsxs("form",{onSubmit:E=>{E.preventDefault(),T()},className:"space-y-3",children:[p.jsx("input",{value:c,onChange:E=>
261u(E.target.value),placeholder:"Apelido (nome de usuário)",maxLength:20,autoComplete:"nickname",className:"w-full bg-input border border-border rounded-lg px-4 py-3 text-foreground placeholder:text-muted-foreground"}),p.jsx("input",{type:"email",value:d,onChange:E=>h(E.target.value),placeholder:"Email",autoComplete:"email",className:"w-full bg-input border border-border rounded-lg px-4 py-3 text-foreground placeholder:text-muted-foreground"}),p.jsxs("div",{className:"relative",children:[p.jsx(kA,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground"}),p.jsx("input",{type:"tel",value:f,onChange:E=>y(E.target.value),placeholder:"Telefone (opcional)",maxLength:20,autoComplete:"tel",className:"w-full bg-input border border-border rounded-lg pl-10 pr-4 py-3 text-foreground placeholder:text-muted-foreground"})]}),p.jsx("input",{type:"password",value:g,onChange:E=>x(E.target.value),placeholder:"Senha (min. 6 caracteres)",autoComplete:"new-password",className:"w-full bg-input border border-border rounded-lg px-4 py-3 text-foreground placeholder:text-muted-foreground"}),p.jsxs(Et,{type:"submit",disabled:v,className:"w-full bg-gold-gradient font-bold text-base",children:[p.jsx($y,{size:18}),"Criar Conta"]}),p.jsxs("p",{className:"text-xs text-center text-muted-foreground",children:["Já tem conta?"," ",p.jsx("button",{type:"button",onClick:()=>l("login"),className:"text-gold underline font-semibold",children:"Entrar"})]})]}),p.jsxs("p",{className:"text-[11px] text-center text-muted-foreground pt-2",children:[p.jsx("a",{href:"/privacy",className:"underline hover:text-foreground",children:"PolÃtica de Privacidade"})," · ",p.jsx("a",{href:"/terms",className:"underline hover:text-foreground",children:"Termos de Uso"})," · ",p.jsx("a",{href:"https://trucoarena.com.br",className:"underline hover:text-foreground",children:"trucoarena.com.br"})]})]})]})},XF=()=>{const e=ro(),[t,n]=b.useState(!1),[r,s]=b.useState(""),[i,o]=b.useState(""),[a,l]=b.useState(!1);b.useEffect(()=>{const{data:{subscription:u}}=ue.auth.onAuthStateChange(d=>{(d==="PASSWORD_RECOVERY"||d==="SIGNED_IN")&&n(!0)});return ue.auth.getSession().then(({data:d})=>{d.session&&n(!0)}),()=>u.unsubscribe()},[]);const c=async u=>{if(u.preventDefault(),r.length<6)return Ae.error("Senha deve ter no mÃnimo 6 caracteres");if(r!==i)return Ae.error("As senhas não coincidem");l(!0);try{const{error:d}=await ue.auth.updateUser({password:r});if(d)throw d;Ae.success("Senha redefinida com sucesso! ð"),setTimeout(()=>e("/home",{replace:!0}),800)}catch(d){Ae.error(d.message||"Erro ao redefinir senha")}finally{l(!1)}};return p.jsxs("div",{className:"min-h-screen bg-background flex flex-col items-center justify-center p-4",children:[p.jsxs(sm,{children:[p.jsx("title",{children:"Redefinir senha - Truco Arena"}),p.jsx("meta",{name:"robots",content:"noindex"})]}),p.jsx("img",{src:$u,alt:"Truco Arena",className:"w-24 h-24 mb-4"}),p.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 w-full max-w-sm space-y-4",children:[p.jsxs("div",{className:"text-center",children:[p.jsx(V1,{className:"mx-auto text-gold",size:32}),p.jsx("h1",{className:"text-xl font-bold mt-2",children:"Redefinir senha"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Escolha uma nova senha para sua conta"})]}),t?p.jsxs("form",{onSubmit:c,className:"space-y-3",children:[p.jsx("input",{type:"password",value:r,onChange:u=>s(u.target.value),placeholder:"Nova senha (min. 6 caracteres)",autoComplete:"new-password",className:"w-full bg-input border border-border rounded-lg px-4 py-3"}),p.jsx("input",{type:"password",value:i,onChange:u=>o(u.target.value),placeholder:"Confirme a nova senha",autoComplete:"new-password",className:"w-full bg-input border border-border rounded-lg px-4 py-3"}),p.jsx(Et,{type:"submit",disabled:a,className:"w-full bg-gold-gradient font-bold",children:a?p.jsx(Dc,{className:"animate-spin",size:18}):"Salvar nova senha"})]}):p.jsxs("div",{className:"flex flex-col items-center gap-2 py-4 text-muted-foreground",children:[p.jsx(Dc,{className:"animate-spin"}),p.jsx("p",{className:"text-xs",children:"Validando link de recuperação..."})]})]})]})},ZF=b.lazy(()=>$(()=>import("./Home-DSmXdfuM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]))),e4=b.lazy(()=>$(()=>import("./Game-ByRmzuVX.js"),__vite__mapDeps([39,40,23,24,41,42,43,11,44,45,10,15,46,38,47,48,49,4,16,50,51,36,18,17,5,6,7,8,35]))),t4=b.lazy(()=>$(()=>import("./Ranking-Bxq5l63Y.js"),__vite__mapDeps([52,23,24,5,6,7,8,16,14]))),n4=b.lazy(()=>$(()=>import("./Profile-BgGBqg6o.js"),__vite__mapDeps([53,23,24,54,19,13,11,55,15,56,41,50,57,58,31,16,59,60,8,36]))),r4=b.lazy(()=>$(()=>import("./Shop-DbBiGkat.js"),__vite__mapDeps([61,12,13,62,30,15,26,38,28,16,6,63,64,65]))),s4=b.lazy(()=>$(()=>import("./Lobby-CzLLOkDy.js"),__vite__mapDeps([66,42,43,11,44,45,10,15,46,38,18,17,24,56,55,16,58,67,32,34,30]))),i4=b.lazy(()=>$(()=>import("./Achievements-B2zi5ckE.js"),__vite__mapDeps([68,49,16,38]))),o4=b.lazy(()=>$(()=>import("./Admin-DPLdPc87.js").then(e=>e.A),__vite__mapDeps([69,70,71,72,73,74,1,12,13,75,16,67,20,57,76,2,14,6,77,78,22,79,47]))),a4=b.lazy(()=>$(()=>import("./Tournaments-BilAhIKl.js"),__vite__mapDeps([80,71,1,72,70,16,78,14,38,58,22,6,79]))),l4=b.lazy(()=>$(()=>import("./CreateTournament-Kk_OBe7j.js"),__vite__mapDeps([81,71,72,75,73,21,27,43,11,70,24,16,38,22]))),c4=b.lazy(()=>$(()=>import("./TournamentDetail-CXUOTa6C.js"),__vite__mapDeps([82,71,1,12,13,74,45,10,11,72,75,83,73,54,19,55,15,70,30,16,34,67,58,22,6,36,84,8,60,32]))),u4=b.lazy(()=>$(()=>import("./Vip-Cx1QCMAw.js"),__vite__mapDeps([85,1,4,16,30,3,26,15]))),d4=b.lazy(()=>$(()=>import("./Join-ChohFR-X.js"),[])),kw=b.lazy(()=>$(()=>import("./Rules-Cw3IVUWK.js"),__vite__mapDeps([86,16]))),h4=b.lazy(()=>$(()=>import("./Privacy-Dpficsx_.js"),__vite__mapDeps([87,16]))),f4=b.lazy(()=>$(()=>import("./Terms-CAeFKbG_.js"),__vite__mapDeps([88,16]))),p4=b.lazy(()=>$(()=>import("./DeleteAccount-Bf97jtyH.js"),__vite__mapDeps([89,16,77]))),m4=b.lazy(()=>$(()=>import("./NotFound-Bq05N1kt.js"),[])),g4=b.lazy(()=>$(()=>import("./Clans-L5xPnInt.js"),__vite__mapDeps([90,9,72,73,12,13,45,10,11,16,78,58,15,34,30,59,17,14,32]))),Cw=b.lazy(()=>$(()=>import("./Support-DrJiYYU9.js"),__vite__mapDeps([91,71,72,73,75,13,54,19,11,55,15,16,2,18,17]))),y4=b.lazy(()=>$(()=>import("./Copa-BHz7O50J.js"),__vite__mapDeps([92,25,12,13,71,83,1,45,10,11,38,26,50,27,16,6,31,29,63,3]))),v4=b.lazy(()=>$(()=>import("./Referrals-9YK9L3WO.js"),__vite__mapDeps([93,12,13,32,34,94,36,6,16]))),w4=b.lazy(()=>$(()=>import("./InviteLanding-S1gnu1vx.js"),__vite__mapDeps([95,6,3]))),Pw=b.lazy(()=>$(()=>import("./BattlePass-D-nuYxvG.js"),__vite__mapDeps([96,71,83,1,16,30,26,15,3,38,28,6]))),x4=b.lazy(()=>$(()=>import("./Shouts-CDZsIKGL.js"),__vite__mapDeps([97,4,48,16,15,38,30]))),Aw=b.lazy(()=>$(()=>import("./EmotesCollection-Czq-9lQA.js"),__vite__mapDeps([98,1,71,54,19,13,11,55,15,45,10,62,4,44,16,6,28,26,7,77,65,64,67]))),b4=b.lazy(()=>$(()=>import("./TrucoOnline-pQhS1fCo.js"),__vite__mapDeps([99,36,27,94]))),_4=b.lazy(()=>$(()=>import("./JogarTrucoOnline-DcVTE81f.js"),__vite__mapDeps([100,76,63,58]))),Rw=b.lazy(()=>$(()=>
261import("./TrucoPaulistaOnline-aolsn5CH.js"),[])),Ow=b.lazy(()=>$(()=>import("./TrucoMineiroOnline-BLRgTgU2.js"),[])),S4=b.lazy(()=>$(()=>import("./TrucoComAmigos-Nj41U-J9.js"),__vite__mapDeps([101,38,34,18]))),E4=b.lazy(()=>$(()=>import("./ComoJogarTruco-JDmwPwJg.js"),__vite__mapDeps([102,76,63]))),T4=b.lazy(()=>$(()=>import("./RegrasTrucoPaulista-DVIHxntx.js"),[])),k4=b.lazy(()=>$(()=>import("./RegrasTrucoMineiro-G_Q-hFVX.js"),[])),jw=b.lazy(()=>$(()=>import("./AnotadorDeTruco-DfTaa6u6.js"),__vite__mapDeps([103,71,16,64]))),C4=b.lazy(()=>$(()=>import("./LiveArena-ChlqUJsB.js"),__vite__mapDeps([104,40,23,24,41,70,50,51,79,64,36,30,37,26]))),P4=b.lazy(()=>$(()=>import("./TrucoTV-CRYmqpK5.js"),__vite__mapDeps([105,40,23,24,41,50,79,36,30,26]))),A4=b.lazy(()=>$(()=>import("./Collection-D4LDSR4v.js"),__vite__mapDeps([106,62,1,16,29,26]))),R4=new oN;function O4(){return p.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:p.jsx(Dc,{className:"w-8 h-8 animate-spin text-gold"})})}function j4(){const e=Ls(),{profile:t,loading:n}=sg(),s=["/home","/lobby","/ranking","/profile","/achievements","/shop","/tournaments","/vip","/copa"].some(i=>e.pathname.startsWith(i));return n||!t||!s?null:p.jsxs(p.Fragment,{children:[p.jsx(b$,{}),!t.is_guest&&p.jsx(CF,{})]})}const nh=(e,t)=>p.jsx(b.Suspense,{fallback:t,children:e});function N4(){const e=t=>window.requestIdleCallback?window.requestIdleCallback(t,{timeout:2e3}):setTimeout(t,1200);e(()=>{$(()=>import("./Home-DSmXdfuM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])),$(()=>import("./Lobby-CzLLOkDy.js"),__vite__mapDeps([66,42,43,11,44,45,10,15,46,38,18,17,24,56,55,16,58,67,32,34,30])),$(()=>import("./Game-ByRmzuVX.js"),__vite__mapDeps([39,40,23,24,41,42,43,11,44,45,10,15,46,38,47,48,49,4,16,50,51,36,18,17,5,6,7,8,35]))}),e(()=>{$(()=>import("./Profile-BgGBqg6o.js"),__vite__mapDeps([53,23,24,54,19,13,11,55,15,56,41,50,57,58,31,16,59,60,8,36])),$(()=>import("./Ranking-Bxq5l63Y.js"),__vite__mapDeps([52,23,24,5,6,7,8,16,14])),$(()=>import("./Shop-DbBiGkat.js"),__vite__mapDeps([61,12,13,62,30,15,26,38,28,16,6,63,64,65])),$(()=>import("./Copa-BHz7O50J.js"),__vite__mapDeps([92,25,12,13,71,83,1,45,10,11,38,26,50,27,16,6,31,29,63,3]))})}const L4=()=>{const[e,t]=b.useState(!0);return b.useEffect(()=>{const n=setTimeout(()=>t(!1),900);return N4(),()=>clearTimeout(n)},[]),e?p.jsx(a$,{}):p.jsx(lN,{client:R4,children:p.jsx(bF,{children:p.jsx($F,{children:p.jsxs(Dj,{children:[p.jsx(hR,{}),p.jsx(HR,{}),p.jsx(l$,{}),p.jsxs(iL,{children:[p.jsx(b.Suspense,{fallback:p.jsx(O4,{}),children:p.jsxs(QN,{children:[p.jsx(G,{path:"/",element:p.jsx(YF,{})}),p.jsx(G,{path:"/auth",element:p.jsx(QF,{})}),p.jsx(G,{path:"/reset-password",element:p.jsx(XF,{})}),p.jsx(G,{path:"/home",element:nh(p.jsx(ZF,{}),p.jsx(UF,{}))}),p.jsx(G,{path:"/lobby",element:p.jsx(s4,{})}),p.jsx(G,{path:"/game",element:p.jsx(e4,{})}),p.jsx(G,{path:"/ranking",element:nh(p.jsx(t4,{}),p.jsx(VF,{}))}),p.jsx(G,{path:"/profile",element:nh(p.jsx(n4,{}),p.jsx(FF,{}))}),p.jsx(G,{path:"/shop",element:p.jsx(r4,{})}),p.jsx(G,{path:"/achievements",element:p.jsx(i4,{})}),p.jsx(G,{path:"/admin",element:p.jsx(o4,{})}),p.jsx(G,{path:"/tournaments",element:p.jsx(a4,{})}),p.jsx(G,{path:"/tournaments/create",element:p.jsx(l4,{})}),p.jsx(G,{path:"/tournaments/:id",element:p.jsx(c4,{})}),p.jsx(G,{path:"/vip",element:p.jsx(u4,{})}),p.jsx(G,{path:"/clans",element:p.jsx(g4,{})}),p.jsx(G,{path:"/join",element:p.jsx(d4,{})}),p.jsx(G,{path:"/regras",element:p.jsx(kw,{})}),p.jsx(G,{path:"/privacy",element:p.jsx(h4,{})}),p.jsx(G,{path:"/terms",element:p.jsx(f4,{})}),p.jsx(G,{path:"/delete-account",element:p.jsx(p4,{})}),p.jsx(G,{path:"/support",element:p.jsx(Cw,{})}),p.jsx(G,{path:"/suporte",element:p.jsx(Cw,{})}),p.jsx(G,{path:"/copa",element:p.jsx(y4,{})}),p.jsx(G,{path:"/indicacoes",element:p.jsx(v4,{})}),p.jsx(G,{path:"/invite/:code",element:p.jsx(w4,{})}),p.jsx(G,{path:"/passe",element:p.jsx(Pw,{})}),p.jsx(G,{path:"/battle-pass",element:p.jsx(Pw,{})}),p.jsx(G,{path:"/emotes",element:p.jsx(Aw,{})}),p.jsx(G,{path:"/gritos",element:p.jsx(x4,{})}),p.jsx(G,{path:"/colecao-emotes",element:p.jsx(Aw,{})}),p.jsx(G,{path:"/truco-online",element:p.jsx(b4,{})}),p.jsx(G,{path:"/jogar-truco-online",element:p.jsx(_4,{})}),p.jsx(G,{path:"/truco-paulista-online",element:p.jsx(Rw,{})}),p.jsx(G,{path:"/truco-paulista",element:p.jsx(Rw,{})}),p.jsx(G,{path:"/truco-mineiro-online",element:p.jsx(Ow,{})}),p.jsx(G,{path:"/truco-mineiro",element:p.jsx(Ow,{})}),p.jsx(G,{path:"/truco-com-amigos",element:p.jsx(S4,{})}),p.jsx(G,{path:"/como-jogar-truco",element:p.jsx(E4,{})}),p.jsx(G,{path:"/regras-do-truco",element:p.jsx(kw,{})}),p.jsx(G,{path:"/regras-truco-paulista",element:p.jsx(T4,{})}),p.jsx(G,{path:"/regras-truco-mineiro",element:p.jsx(k4,{})}),p.jsx(G,{path:"/anotador-de-truco-online",element:p.jsx(jw,{})}),p.jsx(G,{path:"/anotador-de-truco",element:p.jsx(jw,{})}),p.jsx(G,{path:"/live-arena",element:p.jsx(C4,{})}),p.jsx(G,{path:"/tv",element:p.jsx(P4,{})}),p.jsx(G,{path:"/collection",element:p.jsx(A4,{})}),p.jsx(G,{path:"*",element:p.jsx(m4,{})})]})}),p.jsx(j4,{})]})]})})})})},cc=ao("Preferences",{web:()=>$(()=>import("./web-DPxWz4M1.js"),[]).then(e=>new e.PreferencesWeb)}),I4="dvpxfdkslakqqzcxzsfk",Fn=`sb-${I4}-auth-token`,sT=()=>{try{return Xn.isNativePlatform()}catch{return!1}};
261async function D4(){if(!(!sT()||!Fn))try{if(localStorage.getItem(Fn))return;const{value:t}=await cc.get({key:Fn});t&&localStorage.setItem(Fn,t)}catch(e){console.warn("[sessionPersistence] restore failed",e)}}function M4(){if(!(!sT()||!Fn))try{const e=localStorage.setItem.bind(localStorage),t=localStorage.removeItem.bind(localStorage);localStorage.setItem=(r,s)=>{e(r,s),r===Fn&&cc.set({key:r,value:s}).catch(()=>{})},localStorage.removeItem=r=>{t(r),r===Fn&&cc.remove({key:r}).catch(()=>{})};const n=localStorage.getItem(Fn);n&&cc.set({key:Fn,value:n}).catch(()=>{})}catch(e){console.warn("[sessionPersistence] mirror install failed",e)}}(async()=>(await D4(),M4(),e1(document.getElementById("root")).render(p.jsx(a1,{children:p.jsx(L4,{})}))))();"serviceWorker"in navigator&&(navigator.serviceWorker.ready.then(e=>{var t,n,r;((t=e.active)==null?void 0:t.scriptURL)??((n=e.installing)==null?void 0:n.scriptURL)??((r=e.waiting)==null||r.scriptURL),e.addEventListener("updatefound",()=>{const s=e.installing;s&&s.addEventListener("statechange",()=>{s.state==="activated"&&window.location.reload()})})}).catch(()=>{}),setInterval(()=>{navigator.serviceWorker.getRegistration().then(e=>{var t,n,r;((t=e==null?void 0:e.active)==null?void 0:t.scriptURL)??((n=e==null?void 0:e.installing)==null?void 0:n.scriptURL)??((r=e==null?void 0:e.waiting)==null||r.scriptURL),e==null||e.update()}).catch(()=>{})},6e4));export{K4 as $,SE as A,bA as B,SA as C,PP as D,_$ as E,bw as F,Ic as G,UF as H,ko as I,e3 as J,rT as K,Dc as L,Ew as M,_A as N,jP as O,xt as P,m1 as Q,oj as R,SF as S,um as T,$y as U,FF as V,uw as W,z1 as X,Z4 as Y,Uy as Z,$ as _,ro as a,Ji as a0,$u as a1,My as a2,EA as a3,sm as a4,CA as a5,p_ as a6,pj as a7,im as a8,mj as a9,D1 as aA,zR as aB,gj as aa,fj as ab,KR as ac,p1 as ad,Lc as ae,q4 as af,H4 as ag,W4 as ah,Mj as ai,BF as aj,Ls as ak,j as al,AA as am,xA as an,RA as ao,V4 as ap,PA as aq,Fa as ar,YP as as,eg as at,Ta as au,Hf as av,gw as aw,ao as ax,U4 as ay,Ia as az,Re as b,be as c,M1 as d,B1 as e,xu as f,dn as g,om as h,Ue as i,p as j,Ur as k,Jn as l,we as m,sg as n,w$ as o,X4 as p,F1 as q,b as r,ue as s,Et as t,Ae as u,G4 as v,rp as w,Fe as x,Xn as y,Q4 as z};
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.