vendor: 4,221 bytes, lines 1-9
1var zv=e=>{throw TypeError(e)};var wN=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Mf=(e,t,n)=>t.has(e)||zv("Cannot "+n);var P=(e,t,n)=>(Mf(e,t,"read from private field"),n?n.call(e):t.get(e)),le=(e,t,n)=>t.has(e)?zv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),X=(e,t,n,r)=>(Mf(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),xe=(e,t,n)=>(Mf(e,t,"access private method"),n);var kc=(e,t,n,r)=>({set _(s){X(e,t,s,n)},get _(){return P(e,t,r)}});var MW=wN((ZW,wc)=>{function bN(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)}})();function f1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h1={exports:{}},Id={},p1={exports:{}},Se={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var nc=Symbol.for("react.element"),SN=Symbol.for("react.portal"),kN=Symbol.for("react.fragment"),_N=Symbol.for("react.strict_mode"),CN=Symbol.for("react.profiler"),EN=Symbol.for("react.provider"),TN=Symbol.for("react.context"),jN=Symbol.for("react.forward_ref"),PN=Symbol.for("react.suspense"),NN=Symbol.for("react.memo"),RN=Symbol.for("react.lazy"),Wv=Symbol.iterator;function AN(e){return e===null||typeof e!="object"?null:(e=Wv&&e[Wv]||e["@@iterator"],typeof e=="function"?e:null)}var m1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g1=Object.assign,y1={};function ua(e,t,n){this.props=e,this.context=t,this.refs=y1,this.updater=n||m1}ua.prototype.isReactComponent={};ua.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")};ua.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function v1(){}v1.prototype=ua.prototype;function hg(e,t,n){this.props=e,this.context=t,this.refs=y1,this.updater=n||m1}var pg=hg.prototype=new v1;pg.constructor=hg;g1(pg,ua.prototype);pg.isPureReactComponent=!0;var Hv=Array.isArray,x1=Object.prototype.hasOwnProperty,mg={current:null},w1={key:!0,ref:!0,__self:!0,__source:!0};function b1(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)x1.call(t,r)&&!w1.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),u=0;u<a;u++)l[u]=arguments[u+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:nc,type:e,key:i,ref:o,props:s,_owner:mg.current}}function ON(e,t){return{$$typeof:nc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gg(e){return typeof e=="object"&&e!==null&&e.$$typeof===nc}function DN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qv=/\/+/g;function Lf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?DN(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function mu(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 nc:case SN:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Lf(o,0):r,Hv(s)?(n="",e!=null&&(n=e.replace(qv,"$&/")+"/"),mu(s,t,n,"",function(u){return u})):s!=null&&(gg(s)&&(s=ON(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(qv,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Hv(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Lf(i,a);o+=mu(i,t,n,l,s)}else if(l=AN(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Lf(i,a++),o+=mu(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 _c(e,t,n){if(e==null)return e;var r=[],s=0;return mu(e,r,"","",function(i){return t.call(n,i,s++)}),r}function IN(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 Gt={current:null},gu={transition:null},MN={ReactCurrentDispatcher:Gt,ReactCurrentBatchConfig:gu,ReactCurrentOwner:mg};function S1(){throw Error("act(...) is not supported in production builds of React.")}Se.Children={map:_c,forEach:function(e,t,n){_c(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return _c(e,function(){t++}),t},toArray:function(e){return _c(e,function(t){return t})||[]},only:function(e){if(!gg(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Se.Component=ua;Se.Fragment=kN;Se.Profiler=CN;Se.PureComponent=hg;Se.StrictMode=_N;Se.Suspense=PN;Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MN;Se.act=S1;Se.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=g1({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=mg.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)x1.call(t,l)&&!w1.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 u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:nc,type:e.type,key:s,ref:i,props:r,_owner:o}};Se.createContext=function(e){return e={$$typeof:TN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:EN,_context:e},e.Consumer=e};Se.createElement=b1;Se.createFactory=function(e){var t=b1.bind(null,e);return t.type=e,t};Se.createRef=function(){return{current:null}};Se.forwardRef=function(e){return{$$typeof:jN,render:e}};Se.isValidElement=gg;Se.lazy=function(e){return{$$typeof:RN,_payload:{_status:-1,_result:e},_init:IN}};Se.memo=function(e,t){return{$$typeof:NN,type:e,compare:t===void 0?null:t}};Se.startTransition=function(e){var t=gu.transition;gu.transition={};try{e()}finally{gu.transition=t}};Se.unstable_act=S1;Se.useCallback=function(e,t){return Gt.current.useCallback(e,t)};Se.useContext=function(e){return Gt.current.useContext(e)};Se.useDebugValue=function(){};Se.useDeferredValue=function(e){return Gt.current.useDeferredValue(e)};Se.useEffect=function(e,t){return Gt.current.useEffect(e,t)};Se.useId=function(){return Gt.current.useId()};Se.useImperativeHandle=function(e,t,n){return Gt.current.useImperativeHandle(e,t,n)};Se.useInsertionEffect=function(e,t){return Gt.current.useInsertionEffect(e,t)};Se.useLayoutEffect=function(e,t){return Gt.current.useLayoutEffect(e,t)};Se.useMemo=function(e,t){return Gt.current.useMemo(e,t)};Se.useReducer=function(e,t,n){return Gt.current.useReducer(e,t,n)};Se.useRef=function(e){return Gt.current.useRef(e)};Se.useState=function(e){return Gt.current.useState(e)};Se.useSyncExternalStore=function(e,t,n){return Gt.current.useSyncExternalStore(e,t,n)};Se.useTransition=function(){return Gt.current.useTransition()};Se.version="18.3.1";p1.exports=Se;var m=p1.exports;const I=f1(m),yg=bN({__proto__:null,default:I},[m]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var LN=m,$N=Symbol.for("react.element"),FN=Symbol.for("react.fragment"),BN=Object.prototype.hasOwnProperty,UN=LN.__SECRET_INT
vendor: 11,388 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,VN={key:!0,ref:!0,__self:!0,__source:!0};function k1(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)BN.call(t,r)&&!VN.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:$N,type:e,key:i,ref:o,props:s,_owner:UN.current}}Id.Fragment=FN;Id.jsx=k1;Id.jsxs=k1;h1.exports=Id;var c=h1.exports,_1={exports:{}},yn={},C1={exports:{}},E1={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(N,O){var _=N.length;N.push(O);e:for(;0<_;){var C=_-1>>>1,M=N[C];if(0<s(M,O))N[C]=O,N[_]=M,_=C;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var O=N[0],_=N.pop();if(_!==O){N[0]=_;e:for(var C=0,M=N.length,B=M>>>1;C<B;){var z=2*(C+1)-1,Q=N[z],Z=z+1,L=N[Z];if(0>s(Q,_))Z<M&&0>s(L,Q)?(N[C]=L,N[Z]=_,C=Z):(N[C]=Q,N[z]=_,C=z);else if(Z<M&&0>s(L,_))N[C]=L,N[Z]=_,C=Z;else break e}}return O}function s(N,O){var _=N.sortIndex-O.sortIndex;return _!==0?_:N.id-O.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=[],u=[],d=1,f=null,h=3,p=!1,w=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(N){for(var O=n(u);O!==null;){if(O.callback===null)r(u);else if(O.startTime<=N)r(u),O.sortIndex=O.expirationTime,t(l,O);else break;O=n(u)}}function S(N){if(g=!1,b(N),!w)if(n(l)!==null)w=!0,U(k);else{var O=n(u);O!==null&&V(S,O.startTime-N)}}function k(N,O){w=!1,g&&(g=!1,y(j),j=-1),p=!0;var _=h;try{for(b(O),f=n(l);f!==null&&(!(f.expirationTime>O)||N&&!D());){var C=f.callback;if(typeof C=="function"){f.callback=null,h=f.priorityLevel;var M=C(f.expirationTime<=O);O=e.unstable_now(),typeof M=="function"?f.callback=M:f===n(l)&&r(l),b(O)}else r(l);f=n(l)}if(f!==null)var B=!0;else{var z=n(u);z!==null&&V(S,z.startTime-O),B=!1}return B}finally{f=null,h=_,p=!1}}var T=!1,E=null,j=-1,R=5,A=-1;function D(){return!(e.unstable_now()-A<R)}function $(){if(E!==null){var N=e.unstable_now();A=N;var O=!0;try{O=E(!0,N)}finally{O?W():(T=!1,E=null)}}else T=!1}var W;if(typeof v=="function")W=function(){v($)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,K=F.port2;F.port1.onmessage=$,W=function(){K.postMessage(null)}}else W=function(){x($,0)};function U(N){E=N,T||(T=!0,W())}function V(N,O){j=x(function(){N(e.unstable_now())},O)}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(N){N.callback=null},e.unstable_continueExecution=function(){w||p||(w=!0,U(k))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var _=h;h=O;try{return N()}finally{h=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,O){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var _=h;h=N;try{return O()}finally{h=_}},e.unstable_scheduleCallback=function(N,O,_){var C=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?C+_:C):_=C,N){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=_+M,N={id:d++,callback:O,priorityLevel:N,startTime:_,expirationTime:M,sortIndex:-1},_>C?(N.sortIndex=_,t(u,N),n(l)===null&&N===n(u)&&(g?(y(j),j=-1):g=!0,V(S,_-C))):(N.sortIndex=M,t(l,N),w||p||(w=!0,U(k))),N},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(N){var O=h;return function(){var _=h;h=O;try{return N.apply(this,arguments)}finally{h=_}}}})(E1);C1.exports=E1;var zN=C1.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var WN=m,mn=zN;function q(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 T1=new Set,hl={};function Ui(e,t){Qo(e,t),Qo(e+"Capture",t)}function Qo(e,t){for(hl[e]=t,e=0;e<t.length;e++)T1.add(t[e])}var $r=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rp=Object.prototype.hasOwnProperty,HN=/^[: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]*$/,Kv={},Gv={};function qN(e){return rp.call(Gv,e)?!0:rp.call(Kv,e)?!1:HN.test(e)?Gv[e]=!0:(Kv[e]=!0,!1)}function KN(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 GN(e,t,n,r){if(t===null||typeof t>"u"||KN(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 Yt(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 Pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pt[e]=new Yt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pt[t]=new Yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pt[e]=new Yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pt[e]=new Yt(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){Pt[e]=new Yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pt[e]=new Yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pt[e]=new Yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pt[e]=new Yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pt[e]=new Yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var vg=/[\-:]([a-z])/g;function xg(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(vg,xg);Pt[t]=new Yt(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(vg,xg);Pt[t]=new Yt(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(vg,xg);Pt[t]=new Yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pt[e]=new Yt(e,1,!1,e.toLowerCase(),null,!1,!1)});Pt.xlinkHref=new Yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pt[e]=new Yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function wg(e,t,n,r){var s=Pt.hasOwnProperty(t)?Pt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(GN(t,n,s,r)&&(n=null),r||s===null?qN(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 Hr=WN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Cc=Symbol.for("react.element"),io=Symbol.for("react.portal"),oo=Symbol.for("react.fragment"),bg=Symbol.for("react.strict_mode"),sp=Symbol.for("react.profiler"),j1=Symbol.for("react.provider"),P1=Symbol.for("react.context"),Sg=Symbol.for("react.forward_ref"),ip=Symbol.for("react.suspense"),op=Symbol.for("react.suspense_list"),kg=Symbol.for("react.memo"),as=Symbol.for("react.lazy"),N1=Symbol.for("react.offscreen"),Yv=Symbol.iterator;function ja(e){return e===null||typeof e!="object"?null:(e=Yv&&e[Yv]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,$f;function Va(e){if($f===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$f=t&&t[1]||""}return` 34`+$f+e}var Ff=!1;function Bf(e,t){if(!e||Ff)return"";Ff=!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(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 15,720 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),i=r.stack.split(` 36`),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=` 37`+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{Ff=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Va(e):""}function YN(e){switch(e.tag){case 5:return Va(e.type);case 16:return Va("Lazy");case 13:return Va("Suspense");case 19:return Va("SuspenseList");case 0:case 2:case 15:return e=Bf(e.type,!1),e;case 11:return e=Bf(e.type.render,!1),e;case 1:return e=Bf(e.type,!0),e;default:return""}}function ap(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 oo:return"Fragment";case io:return"Portal";case sp:return"Profiler";case bg:return"StrictMode";case ip:return"Suspense";case op:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case P1:return(e.displayName||"Context")+".Consumer";case j1:return(e._context.displayName||"Context")+".Provider";case Sg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kg:return t=e.displayName||null,t!==null?t:ap(e.type)||"Memo";case as:t=e._payload,e=e._init;try{return ap(e(t))}catch{}}return null}function QN(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 ap(t);case 8:return t===bg?"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 Ls(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function R1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function XN(e){var t=R1(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 Ec(e){e._valueTracker||(e._valueTracker=XN(e))}function A1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=R1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bu(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 lp(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Qv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ls(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 O1(e,t){t=t.checked,t!=null&&wg(e,"checked",t,!1)}function cp(e,t){O1(e,t);var n=Ls(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")?up(e,t.type,n):t.hasOwnProperty("defaultValue")&&up(e,t.type,Ls(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xv(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 up(e,t,n){(t!=="number"||Bu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var za=Array.isArray;function _o(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=""+Ls(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 dp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(q(92));if(za(n)){if(1<n.length)throw Error(q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ls(n)}}function D1(e,t){var n=Ls(t.value),r=Ls(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 Zv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function I1(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 fp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?I1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tc,M1=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(Tc=Tc||document.createElement("div"),Tc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function pl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ya={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},JN=["Webkit","ms","Moz","O"];Object.keys(Ya).forEach(function(e){JN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ya[t]=Ya[e]})});function L1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ya.hasOwnProperty(e)&&Ya[e]?(""+t).trim():t+"px"}function $1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=L1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var ZN=Ge({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 hp(e,t){if(t){if(ZN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function pp(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 mp=null;function _g(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gp=null,Co=null,Eo=null;function e0(e){if(e=ic(e)){if(typeof gp!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Bd(t),gp(e.stateNode,e.type,t))}}function F1(e){Co?Eo?Eo.push(e):Eo=[e]:Co=e}function B1(){if(Co){var e=Co,t=Eo;if(Eo=Co=null,e0(e),t)for(e=0;e<t.length;e++)e0(t[e])}}function U1(e,t){return e(t)}function V1(){}var Uf=!1;function z1(e,t,n){if(Uf)return e(t,n);Uf=!0;try{return U1(e,t,n)}finally{Uf=!1,(Co!==null||Eo!==null)&&(V1(),B1())}}function ml(e,t){var n=e.stateNode;if(n===null)return null;var r=Bd(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(q(231,t,typeof n));return n}var yp=!1;if($r)try{var Pa={};Object.defineProperty(Pa,"passive",{get:function(){yp=!0}}),window.addEventListener("test",Pa,Pa),window.removeEventListener("test",Pa,Pa)}catch{yp=!1}function eR(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Qa=!1,Uu=null,Vu=!1,vp=null,tR={onError:function(e){Qa=!0,Uu=e}};function nR(e,t,n,r,s,i,o,a,l){Qa=!1,Uu=null,eR.apply(tR,arguments)}function rR(e,t,n,r,s,i,o,a,l){if(nR.apply(this,arguments),Qa){if(Qa){var u=Uu;Qa=!1,Uu=null}else throw Error(q(198));Vu||(Vu=!0,vp=u)}}function Vi(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 W1(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 t0(e){if(Vi(e)!==e)throw Error(q(188))}function sR(e){var t=e.alternate;if(!t){if(t=Vi(e),t===null)throw Error(q(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 t0(s),e;if(i===r)return t0(s),t;i=i.sibling}throw Error(q(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(q(189))}}if(n.alternate!==r)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?e:t}function H1(e){return e=sR(e),e!==null?q1(e):null}function q1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=q1(e);if(t!==null)return t;e=e.sibling}return null}var K1=mn.unstable_scheduleCallback,n0=mn.unstable_cancelCallback,iR=mn.unstable_shouldYield,oR=mn.unstable_requestPaint,tt=mn.unstable_now,aR=mn.unstable_getCurrentPriorityLevel,Cg=mn.unstable_ImmediatePriority,G1=mn.unstable_UserBlockingPriority,zu=mn.unstable_NormalPriority,lR=mn.unstable_LowPriority,Y1=mn.unstable_IdlePriority,Md=null,pr=null;function cR(e){if(pr&&typeof pr.onCommitFiberRoot=="function")try{pr.onCommitFiberRoot(Md,e,void 0,(e.current.flags&128)===128)}catch{}}var Qn=Math.clz32?Math.clz32:fR,uR=Math.log,dR=Math.LN2;function fR(e){return e>>>=0,e===0?32:31-(uR(e)/dR|0)|0}var jc=64,Pc=4194304;function Wa(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 Wu(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=Wa(a):(i&=o,i!==0&&(r=Wa(i)))}else o=n&~s,o!==0?r=Wa(o):i!==0&&(r=Wa(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-Qn(t),s=1<<n,r|=e[n],t&=~s;return r}function hR(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 pR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Qn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=hR(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function xp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Q1(){var e=jc;return jc<<=1,!(jc&4194240)&&(jc=64),e}function Vf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qn(t),e[t]=n}function mR(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-Qn(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Eg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Re=0;function X1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var J1,Tg,Z1,eS,tS,wp=!1,Nc=[],Ts=null,js=null,Ps=null,gl=new Map,yl=new Map,us=[],gR="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 r0(e,t){switch(e){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":js=null;break;case"mouseover":case"mouseout":Ps=null;break;case"pointerover":case"pointerout":gl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yl.delete(t.pointerId)}}function Na(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=ic(t),t!==null&&Tg(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function yR(e,t,n,r,s){switch(t){case"focusin":return Ts=Na(Ts,e,t,n,r,s),!0;case"dragenter":return js=Na(js,e,t,n,r,s),!0;
vendor: 9,863 bytes, line 37
37case"mouseover":return Ps=Na(Ps,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return gl.set(i,Na(gl.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,yl.set(i,Na(yl.get(i)||null,e,t,n,r,s)),!0}return!1}function nS(e){var t=di(e.target);if(t!==null){var n=Vi(t);if(n!==null){if(t=n.tag,t===13){if(t=W1(n),t!==null){e.blockedOn=t,tS(e.priority,function(){Z1(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 yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mp=r,n.target.dispatchEvent(r),mp=null}else return t=ic(n),t!==null&&Tg(t),e.blockedOn=n,!1;t.shift()}return!0}function s0(e,t,n){yu(e)&&n.delete(t)}function vR(){wp=!1,Ts!==null&&yu(Ts)&&(Ts=null),js!==null&&yu(js)&&(js=null),Ps!==null&&yu(Ps)&&(Ps=null),gl.forEach(s0),yl.forEach(s0)}function Ra(e,t){e.blockedOn===t&&(e.blockedOn=null,wp||(wp=!0,mn.unstable_scheduleCallback(mn.unstable_NormalPriority,vR)))}function vl(e){function t(s){return Ra(s,e)}if(0<Nc.length){Ra(Nc[0],e);for(var n=1;n<Nc.length;n++){var r=Nc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ts!==null&&Ra(Ts,e),js!==null&&Ra(js,e),Ps!==null&&Ra(Ps,e),gl.forEach(t),yl.forEach(t),n=0;n<us.length;n++)r=us[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<us.length&&(n=us[0],n.blockedOn===null);)nS(n),n.blockedOn===null&&us.shift()}var To=Hr.ReactCurrentBatchConfig,Hu=!0;function xR(e,t,n,r){var s=Re,i=To.transition;To.transition=null;try{Re=1,jg(e,t,n,r)}finally{Re=s,To.transition=i}}function wR(e,t,n,r){var s=Re,i=To.transition;To.transition=null;try{Re=4,jg(e,t,n,r)}finally{Re=s,To.transition=i}}function jg(e,t,n,r){if(Hu){var s=bp(e,t,n,r);if(s===null)Jf(e,t,r,qu,n),r0(e,r);else if(yR(s,e,t,n,r))r.stopPropagation();else if(r0(e,r),t&4&&-1<gR.indexOf(e)){for(;s!==null;){var i=ic(s);if(i!==null&&J1(i),i=bp(e,t,n,r),i===null&&Jf(e,t,r,qu,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Jf(e,t,r,null,n)}}var qu=null;function bp(e,t,n,r){if(qu=null,e=_g(r),e=di(e),e!==null)if(t=Vi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=W1(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 qu=e,null}function rS(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(aR()){case Cg:return 1;case G1:return 4;case zu:case lR:return 16;case Y1:return 536870912;default:return 16}default:return 16}}var ks=null,Pg=null,vu=null;function sS(){if(vu)return vu;var e,t=Pg,n=t.length,r,s="value"in ks?ks.value:ks.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 vu=s.slice(e,1<r?1-r:void 0)}function xu(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 Rc(){return!0}function i0(){return!1}function vn(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)?Rc:i0,this.isPropagationStopped=i0,this}return Ge(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=Rc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Rc)},persist:function(){},isPersistent:Rc}),t}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ng=vn(da),sc=Ge({},da,{view:0,detail:0}),bR=vn(sc),zf,Wf,Aa,Ld=Ge({},sc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rg,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!==Aa&&(Aa&&e.type==="mousemove"?(zf=e.screenX-Aa.screenX,Wf=e.screenY-Aa.screenY):Wf=zf=0,Aa=e),zf)},movementY:function(e){return"movementY"in e?e.movementY:Wf}}),o0=vn(Ld),SR=Ge({},Ld,{dataTransfer:0}),kR=vn(SR),_R=Ge({},sc,{relatedTarget:0}),Hf=vn(_R),CR=Ge({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),ER=vn(CR),TR=Ge({},da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jR=vn(TR),PR=Ge({},da,{data:0}),a0=vn(PR),NR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},RR={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"},AR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function OR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=AR[e])?!!t[e]:!1}function Rg(){return OR}var DR=Ge({},sc,{key:function(e){if(e.key){var t=NR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?RR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rg,charCode:function(e){return e.type==="keypress"?xu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),IR=vn(DR),MR=Ge({},Ld,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),l0=vn(MR),LR=Ge({},sc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rg}),$R=vn(LR),FR=Ge({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),BR=vn(FR),UR=Ge({},Ld,{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}),VR=vn(UR),zR=[9,13,27,32],Ag=$r&&"CompositionEvent"in window,Xa=null;$r&&"documentMode"in document&&(Xa=document.documentMode);var WR=$r&&"TextEvent"in window&&!Xa,iS=$r&&(!Ag||Xa&&8<Xa&&11>=Xa),c0=" ",u0=!1;function oS(e,t){switch(e){case"keyup":return zR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ao=!1;function HR(e,t){switch(e){case"compositionend":return aS(t);case"keypress":return t.which!==32?null:(u0=!0,c0);case"textInput":return e=t.data,e===c0&&u0?null:e;default:return null}}function qR(e,t){if(ao)return e==="compositionend"||!Ag&&oS(e,t)?(e=sS(),vu=Pg=ks=null,ao=!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 iS&&t.locale!=="ko"?null:t.data;default:return null}}var KR={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 d0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!KR[e.type]:t==="textarea"}function lS(e,t,n,r){F1(r),t=Ku(t,"onChange"),0<t.length&&(n=new Ng("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ja=null,xl=null;function GR(e){xS(e,0)}function $d(e){var t=uo(e);if(A1(t))return e}function YR(e,t){if(e==="change")return t}var cS=!1;if($r){var qf;if($r){var Kf="oninput"in document;if(!Kf){var f0=document.createElement("div");f0.setAttribute("oninput","return;"),Kf=typeof f0.oninput=="function"}qf=Kf}else qf=!1;cS=qf&&(!document.documentMode||9<document.documentMode)}function h0(){Ja&&(Ja.detachEvent("onpropertychange",uS),xl=Ja=null)}function uS(e){if(e.propertyName==="value"&&$d(xl)){var t=[];lS(t,xl,e,_g(e)),z1(GR,t)}}
vendor: 5,253 bytes, line 37
37function QR(e,t,n){e==="focusin"?(h0(),Ja=t,xl=n,Ja.attachEvent("onpropertychange",uS)):e==="focusout"&&h0()}function XR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $d(xl)}function JR(e,t){if(e==="click")return $d(t)}function ZR(e,t){if(e==="input"||e==="change")return $d(t)}function e2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zn=typeof Object.is=="function"?Object.is:e2;function wl(e,t){if(Zn(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(!rp.call(t,s)||!Zn(e[s],t[s]))return!1}return!0}function p0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function m0(e,t){var n=p0(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=p0(n)}}function dS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?dS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fS(){for(var e=window,t=Bu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bu(e.document)}return t}function Og(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 t2(e){var t=fS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dS(n.ownerDocument.documentElement,n)){if(r!==null&&Og(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=m0(n,i);var o=m0(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 n2=$r&&"documentMode"in document&&11>=document.documentMode,lo=null,Sp=null,Za=null,kp=!1;function g0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kp||lo==null||lo!==Bu(r)||(r=lo,"selectionStart"in r&&Og(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Za&&wl(Za,r)||(Za=r,r=Ku(Sp,"onSelect"),0<r.length&&(t=new Ng("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=lo)))}function Ac(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var co={animationend:Ac("Animation","AnimationEnd"),animationiteration:Ac("Animation","AnimationIteration"),animationstart:Ac("Animation","AnimationStart"),transitionend:Ac("Transition","TransitionEnd")},Gf={},hS={};$r&&(hS=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);function Fd(e){if(Gf[e])return Gf[e];if(!co[e])return e;var t=co[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in hS)return Gf[e]=t[n];return e}var pS=Fd("animationend"),mS=Fd("animationiteration"),gS=Fd("animationstart"),yS=Fd("transitionend"),vS=new Map,y0="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 Hs(e,t){vS.set(e,t),Ui(t,[e])}for(var Yf=0;Yf<y0.length;Yf++){var Qf=y0[Yf],r2=Qf.toLowerCase(),s2=Qf[0].toUpperCase()+Qf.slice(1);Hs(r2,"on"+s2)}Hs(pS,"onAnimationEnd");Hs(mS,"onAnimationIteration");Hs(gS,"onAnimationStart");Hs("dblclick","onDoubleClick");Hs("focusin","onFocus");Hs("focusout","onBlur");Hs(yS,"onTransitionEnd");Qo("onMouseEnter",["mouseout","mouseover"]);Qo("onMouseLeave",["mouseout","mouseover"]);Qo("onPointerEnter",["pointerout","pointerover"]);Qo("onPointerLeave",["pointerout","pointerover"]);Ui("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,442 bytes, line 37
37Ui("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ui("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ui("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ui("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ui("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ha="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(" "),i2=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ha));function v0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,rR(r,t,void 0,e),e.currentTarget=null}function xS(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,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;v0(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;v0(s,a,u),i=l}}}if(Vu)throw e=vp,Vu=!1,vp=null,e}function Be(e,t){var n=t[jp];n===void 0&&(n=t[jp]=new Set);var r=e+"__bubble";n.has(r)||(wS(t,e,2,!1),n.add(r))}function Xf(e,t,n){var r=0;t&&(r|=4),wS(n,e,r,t)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function bl(e){if(!e[Oc]){e[Oc]=!0,T1.forEach(function(n){n!=="selectionchange"&&(i2.has(n)||Xf(n,!1,e),Xf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oc]||(t[Oc]=!0,Xf("selectionchange",!1,t))}}function wS(e,t,n,r){switch(rS(t)){case 1:var s=xR;break;case 4:s=wR;break;default:s=jg}n=s.bind(null,t,n,e),s=void 0,!yp||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)}function Jf(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=di(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}z1(function(){var u=i,d=_g(n),f=[];e:{var h=vS.get(e);if(h!==void 0){var p=Ng,w=e;switch(e){case"keypress":if(xu(n)===0)break e;case"keydown":case"keyup":p=IR;break;case"focusin":w="focus",p=Hf;break;case"focusout":w="blur",p=Hf;break;case"beforeblur":case"afterblur":p=Hf;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":p=o0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=kR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=$R;break;case pS:case mS:case gS:p=ER;break;case yS:p=BR;break;case"scroll":p=bR;break;case"wheel":p=VR;break;case"copy":case"cut":case"paste":p=jR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=l0}var g=(t&4)!==0,x=!g&&e==="scroll",y=g?h!==null?h+"Capture":null:h;g=[];for(var v=u,b;v!==null;){b=v;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,y!==null&&(S=ml(v,y),S!=null&&g.push(Sl(v,S,b)))),x)break;v=v.return}0<g.length&&(h=new p(h,w,null,n,d),f.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==mp&&(w=n.relatedTarget||n.fromElement)&&(di(w)||w[Fr]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(w=n.relatedTarget||n.toElement,p=u,w=w?di(w):null,w!==null&&(x=Vi(w),w!==x||w.tag!==5&&w.tag!==6)&&(w=null)):(p=null,w=u),p!==w)){if(g=o0,S="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(g=l0,S="onPointerLeave",y="onPointerEnter",v="pointer"),x=p==null?h:uo(p),b=w==null?h:uo(w),h=new g(S,v+"leave",p,n,d),h.target=x,h.relatedTarget=b,S=null,di(d)===u&&(g=ne
vendor: 6,133 bytes, lines 37-38
37w g(y,v+"enter",w,n,d),g.target=b,g.relatedTarget=x,S=g),x=S,p&&w)t:{for(g=p,y=w,v=0,b=g;b;b=zi(b))v++;for(b=0,S=y;S;S=zi(S))b++;for(;0<v-b;)g=zi(g),v--;for(;0<b-v;)y=zi(y),b--;for(;v--;){if(g===y||y!==null&&g===y.alternate)break t;g=zi(g),y=zi(y)}g=null}else g=null;p!==null&&x0(f,h,p,g,!1),w!==null&&x!==null&&x0(f,x,w,g,!0)}}e:{if(h=u?uo(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var k=YR;else if(d0(h))if(cS)k=ZR;else{k=XR;var T=QR}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=JR);if(k&&(k=k(e,u))){lS(f,k,n,d);break e}T&&T(e,h,u),e==="focusout"&&(T=h._wrapperState)&&T.controlled&&h.type==="number"&&up(h,"number",h.value)}switch(T=u?uo(u):window,e){case"focusin":(d0(T)||T.contentEditable==="true")&&(lo=T,Sp=u,Za=null);break;case"focusout":Za=Sp=lo=null;break;case"mousedown":kp=!0;break;case"contextmenu":case"mouseup":case"dragend":kp=!1,g0(f,n,d);break;case"selectionchange":if(n2)break;case"keydown":case"keyup":g0(f,n,d)}var E;if(Ag)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else ao?oS(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(iS&&n.locale!=="ko"&&(ao||j!=="onCompositionStart"?j==="onCompositionEnd"&&ao&&(E=sS()):(ks=d,Pg="value"in ks?ks.value:ks.textContent,ao=!0)),T=Ku(u,j),0<T.length&&(j=new a0(j,e,null,n,d),f.push({event:j,listeners:T}),E?j.data=E:(E=aS(n),E!==null&&(j.data=E)))),(E=WR?HR(e,n):qR(e,n))&&(u=Ku(u,"onBeforeInput"),0<u.length&&(d=new a0("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=E))}xS(f,t)})}function Sl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ku(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ml(e,n),i!=null&&r.unshift(Sl(e,i,s)),i=ml(e,t),i!=null&&r.push(Sl(e,i,s))),e=e.return}return r}function zi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function x0(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=ml(n,i),l!=null&&o.unshift(Sl(n,l,a))):s||(l=ml(n,i),l!=null&&o.push(Sl(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var o2=/\r\n?/g,a2=/\u0000|\uFFFD/g;function w0(e){return(typeof e=="string"?e:""+e).replace(o2,` 38`).replace(a2,"")}function Dc(e,t,n){if(t=w0(t),w0(e)!==t&&n)throw Error(q(425))}function Gu(){}var _p=null,Cp=null;function Ep(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 Tp=typeof setTimeout=="function"?setTimeout:void 0,l2=typeof clearTimeout=="function"?clearTimeout:void 0,b0=typeof Promise=="function"?Promise:void 0,c2=typeof queueMicrotask=="function"?queueMicrotask:typeof b0<"u"?function(e){return b0.resolve(null).then(e).catch(u2)}:Tp;function u2(e){setTimeout(function(){throw e})}function Zf(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),vl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);vl(t)}function Ns(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 S0(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 fa=Math.random().toString(36).slice(2),fr="__reactFiber$"+fa,kl="__reactProps$"+fa,Fr="__reactContainer$"+fa,jp="__reactEvents$"+fa,d2="__reactListeners$"+fa,f2="__reactHandles$"+fa;function di(e){var t=e[fr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Fr]||n[fr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=S0(e);e!==null;){if(n=e[fr])return n;e=S0(e)}return t}e=n,n=e.parentNode}return null}function ic(e){return e=e[fr]||e[Fr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function uo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function Bd(e){return e[kl]||null}var Pp=[],fo=-1;function qs(e){return{current:e}}function Ue(e){0>fo||(e.current=Pp[fo],Pp[fo]=null,fo--)}function Le(e,t){fo++,Pp[fo]=e.current,e.current=t}var $s={},Bt=qs($s),tn=qs(!1),Ni=$s;function Xo(e,t){var n=e.type.contextTypes;if(!n)return $s;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 nn(e){return e=e.childContextTypes,e!=null}function Yu(){Ue(tn),Ue(Bt)}function k0(e,t,n){if(Bt.current!==$s)throw Error(q(168));Le(Bt,t),Le(tn,n)}function bS(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(q(108,QN(e)||"Unknown",s));return Ge({},n,r)}function Qu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$s,Ni=Bt.current,Le(Bt,e),Le(tn,tn.current),!0}function _0(e,t,n){var r=e.stateNode;if(!r)throw Error(q(169));n?(e=bS(e,t,Ni),r.__reactInternalMemoizedMergedChildContext=e,Ue(tn),Ue(Bt),Le(Bt,e)):Ue(tn),Le(tn,n)}var Nr=null,Ud=!1,eh=!1;function SS(e){Nr===null?Nr=[e]:Nr.push(e)}function h2(e){Ud=!0,SS(e)}function Ks(){if(!eh&&Nr!==null){eh=!0;var e=0,t=Re;try{var n=Nr;for(Re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Nr=null,Ud=!1}catch(s){throw Nr!==null&&(Nr=Nr.slice(e+1)),K1(Cg,Ks),s}finally{Re=t,eh=!1}}return null}var ho=[],po=0,Xu=null,Ju=0,kn=[],_n=0,Ri=null,Or=1,Dr="";function ii(e,t){ho[po++]=Ju,ho[po++]=Xu,Xu=e,Ju=t}function kS(e,t,n){kn[_n++]=Or,kn[_n++]=Dr,kn[_n++]=Ri,Ri=e;var r=Or;e=Dr;var s=32-Qn(r)-1;r&=~(1<<s),n+=1;var i=32-Qn(t)+s;
vendor: 14,994 bytes, line 38
38if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Or=1<<32-Qn(t)+s|n<<s|r,Dr=i+e}else Or=1<<i|n<<s|r,Dr=e}function Dg(e){e.return!==null&&(ii(e,1),kS(e,1,0))}function Ig(e){for(;e===Xu;)Xu=ho[--po],ho[po]=null,Ju=ho[--po],ho[po]=null;for(;e===Ri;)Ri=kn[--_n],kn[_n]=null,Dr=kn[--_n],kn[_n]=null,Or=kn[--_n],kn[_n]=null}var hn=null,fn=null,Ve=!1,Yn=null;function _S(e,t){var n=En(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 C0(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,hn=e,fn=Ns(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,hn=e,fn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ri!==null?{id:Or,overflow:Dr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=En(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,hn=e,fn=null,!0):!1;default:return!1}}function Np(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Rp(e){if(Ve){var t=fn;if(t){var n=t;if(!C0(e,t)){if(Np(e))throw Error(q(418));t=Ns(n.nextSibling);var r=hn;t&&C0(e,t)?_S(r,n):(e.flags=e.flags&-4097|2,Ve=!1,hn=e)}}else{if(Np(e))throw Error(q(418));e.flags=e.flags&-4097|2,Ve=!1,hn=e}}}function E0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;hn=e}function Ic(e){if(e!==hn)return!1;if(!Ve)return E0(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ep(e.type,e.memoizedProps)),t&&(t=fn)){if(Np(e))throw CS(),Error(q(418));for(;t;)_S(e,t),t=Ns(t.nextSibling)}if(E0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){fn=Ns(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}fn=null}}else fn=hn?Ns(e.stateNode.nextSibling):null;return!0}function CS(){for(var e=fn;e;)e=Ns(e.nextSibling)}function Jo(){fn=hn=null,Ve=!1}function Mg(e){Yn===null?Yn=[e]:Yn.push(e)}var p2=Hr.ReactCurrentBatchConfig;function Oa(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(q(309));var r=n.stateNode}if(!r)throw Error(q(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(q(284));if(!n._owner)throw Error(q(290,e))}return e}function Mc(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function T0(e){var t=e._init;return t(e._payload)}function ES(e){function t(y,v){if(e){var b=y.deletions;b===null?(y.deletions=[v],y.flags|=16):b.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function s(y,v){return y=Ds(y,v),y.index=0,y.sibling=null,y}function i(y,v,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<v?(y.flags|=2,v):b):(y.flags|=2,v)):(y.flags|=1048576,v)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,v,b,S){return v===null||v.tag!==6?(v=ah(b,y.mode,S),v.return=y,v):(v=s(v,b),v.return=y,v)}function l(y,v,b,S){var k=b.type;return k===oo?d(y,v,b.props.children,S,b.key):v!==null&&(v.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===as&&T0(k)===v.type)?(S=s(v,b.props),S.ref=Oa(y,v,b),S.return=y,S):(S=Eu(b.type,b.key,b.props,null,y.mode,S),S.ref=Oa(y,v,b),S.return=y,S)}function u(y,v,b,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=lh(b,y.mode,S),v.return=y,v):(v=s(v,b.children||[]),v.return=y,v)}function d(y,v,b,S,k){return v===null||v.tag!==7?(v=ji(b,y.mode,S,k),v.return=y,v):(v=s(v,b),v.return=y,v)}function f(y,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=ah(""+v,y.mode,b),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Cc:return b=Eu(v.type,v.key,v.props,null,y.mode,b),b.ref=Oa(y,null,v),b.return=y,b;case io:return v=lh(v,y.mode,b),v.return=y,v;case as:var S=v._init;return f(y,S(v._payload),b)}if(za(v)||ja(v))return v=ji(v,y.mode,b,null),v.return=y,v;Mc(y,v)}return null}function h(y,v,b,S){var k=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return k!==null?null:a(y,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Cc:return b.key===k?l(y,v,b,S):null;case io:return b.key===k?u(y,v,b,S):null;case as:return k=b._init,h(y,v,k(b._payload),S)}if(za(b)||ja(b))return k!==null?null:d(y,v,b,S,null);Mc(y,b)}return null}function p(y,v,b,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(b)||null,a(v,y,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Cc:return y=y.get(S.key===null?b:S.key)||null,l(v,y,S,k);case io:return y=y.get(S.key===null?b:S.key)||null,u(v,y,S,k);case as:var T=S._init;return p(y,v,b,T(S._payload),k)}if(za(S)||ja(S))return y=y.get(b)||null,d(v,y,S,k,null);Mc(v,S)}return null}function w(y,v,b,S){for(var k=null,T=null,E=v,j=v=0,R=null;E!==null&&j<b.length;j++){E.index>j?(R=E,E=null):R=E.sibling;var A=h(y,E,b[j],S);if(A===null){E===null&&(E=R);break}e&&E&&A.alternate===null&&t(y,E),v=i(A,v,j),T===null?k=A:T.sibling=A,T=A,E=R}if(j===b.length)return n(y,E),Ve&&ii(y,j),k;if(E===null){for(;j<b.length;j++)E=f(y,b[j],S),E!==null&&(v=i(E,v,j),T===null?k=E:T.sibling=E,T=E);return Ve&&ii(y,j),k}for(E=r(y,E);j<b.length;j++)R=p(E,y,j,b[j],S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?j:R.key),v=i(R,v,j),T===null?k=R:T.sibling=R,T=R);return e&&E.forEach(function(D){return t(y,D)}),Ve&&ii(y,j),k}function g(y,v,b,S){var k=ja(b);if(typeof k!="function")throw Error(q(150));if(b=k.call(b),b==null)throw Error(q(151));for(var T=k=null,E=v,j=v=0,R=null,A=b.next();E!==null&&!A.done;j++,A=b.next()){E.index>j?(R=E,E=null):R=E.sibling;var D=h(y,E,A.value,S);if(D===null){E===null&&(E=R);break}e&&E&&D.alternate===null&&t(y,E),v=i(D,v,j),T===null?k=D:T.sibling=D,T=D,E=R}if(A.done)return n(y,E),Ve&&ii(y,j),k;if(E===null){for(;!A.done;j++,A=b.next())A=f(y,A.value,S),A!==null&&(v=i(A,v,j),T===null?k=A:T.sibling=A,T=A);return Ve&&ii(y,j),k}for(E=r(y,E);!A.done;j++,A=b.next())A=p(E,y,j,A.value,S),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?j:A.key),v=i(A,v,j),T===null?k=A:T.sibling=A,T=A);return e&&E.forEach(function($){return t(y,$)}),Ve&&ii(y,j),k}function x(y,v,b,S){if(typeof b=="object"&&b!==null&&b.type===oo&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Cc:e:{for(var k=b.key,T=v;T!==null;){if(T.key===k){if(k=b.type,k===oo){if(T.tag===7){n(y,T.sibling),v=s(T,b.props.children),v.return=y,y=v;break e}}else if(T.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===as&&T0(k)===T.type){n(y,T.sibling),v=s(T,b.props),v.ref=Oa(y,T,b),v.return=y,y=v;break e}n(y,T);break}else t(y,T);T=T.sibling}b.type===oo?(v=ji(b.props.children,y.mode,S,b.key),v.return=y,y=v):(S=Eu(b.type,b.key,b.props,null,y.mode,S),S.ref=Oa(y,v,b),S.return=y,y=S)}return o(y);case io:e:{for(T=b.key;v!==null;){if(v.key===T)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(y,v.sibling),v=s(v,b.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=lh(b,y.mode,S),v.return=y,y=v}return o(y);case as:return T=b._init,x(y,v,T(b._payload),S)}if(za(b))return w(y,v,b,S);if(ja(b))return g(y,v,b,S);Mc(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(y,v.sibling),v=s(v,b),v.return=y,y=v):(n(y,v),v=ah(b,y.mode,S),v.return=y,y=v),o(y)):n(y,v)}return x}var Zo=ES(!0),TS=ES(!1),Zu=qs(null),ed=null,mo=null,Lg=null;function $g(){Lg=mo=ed=null}function Fg(e){var t=Zu.current;Ue(Zu),e._currentValue=t}function Ap(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 jo(e,t){ed=e,Lg=mo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(en=!0),e.firstContext=null)}function Rn(e){var t=e._currentValue;if(Lg!==e)if(e={context:e,memoizedValue:t,next:null},mo===null){if(ed===null)throw Error(q(308));mo=e,ed.dependencies={lanes:0,firstContext:e}}else mo=mo.next=e;return t}var fi=null;function Bg(e){fi===null?fi=[e]:fi.push(e)}function jS(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Bg(t)):(n.next=s.next,s.next=n),t.interleaved=n,Br(e,r)}function Br(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 ls=!1;function Ug(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function PS(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 Ir(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rs(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,_e&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Br(e,n)}return s=r.interleaved,s===null?(t.next=t,Bg(r)):(t.next=s.next,s.next=t),r.interleaved=t,Br(e,n)}function wu(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,Eg(e,n)}}function j0(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 td(e,t,n,r){var s=e.updateQueue;ls=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,d=u=l=null,a=i;do{var h=a.lane,p=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,g=a;switch(h=t,p=n,g.tag){case 1:if(w=g.payload,typeof w=="function"){f=w.call(p,f,h);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=g.payload,h=typeof w=="function"?w.call(p,f,h):w,h==null)break e;f=Ge({},f,h);break e;case 2:ls=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=f):d=d.next=p,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(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,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);Oi|=o,e.lanes=o,e.memoizedState=f}}function P0(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(q(191,s));s.call(r)}}}var oc={},mr=qs(oc),_l=qs(oc),Cl=qs(oc);function hi(e){if(e===oc)throw Error(q(174));return e}function Vg(e,t){switch(Le(Cl,t),Le(_l,e),Le(mr,oc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fp(t,e)}Ue(mr),Le(mr,t)}function ea(){Ue(mr),Ue(_l),Ue(Cl)}function NS(e){hi(Cl.current);var t=hi(mr.current),n=fp(t,e.type);t!==n&&(Le(_l,e),Le(mr,n))}function zg(e){_l.current===e&&(Ue(mr),Ue(_l))}var He=qs(0);function nd(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 th=[];function Wg(){for(var e=0;e<th.length;e++)th[e]._workInProgressVersionPrimary=null;th.length=0}var bu=Hr.ReactCurrentDispatcher,nh=Hr.ReactCurrentBatchConfig,Ai=0,Ke=null,pt=null,vt=null,rd=!1,el=!1,El=0,m2=0;function At(){throw Error(q(321))}function Hg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zn(e[n],t[n]))return!1;return!0}function qg(e,t,n,r,s,i){if(Ai=i,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bu.current=e===null||e.memoizedState===null?x2:w2,e=n(r,s),el){i=0;do{if(el=!1,El=0,25<=i)throw Error(q(301));i+=1,vt=pt=null,t.updateQueue=null,bu.current=b2,e=n(r,s)}while(el)}if(bu.current=sd,t=pt!==null&&pt.next!==null,Ai=0,vt=pt=Ke=null,rd=!1,t)throw Error(q(300));return e}function Kg(){var e=El!==0;return El=0,e}function ar(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?Ke.memoizedState=vt=e:vt=vt.next=e,vt}function An(){if(pt===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=pt.next;var t=vt===null?Ke.memoizedState:vt.next;if(t!==null)vt=t,pt=e;else{if(e===null)throw Error(q(310));pt=e,e={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},vt===null?Ke.memoizedState=vt=e:vt=vt.next=e}return vt}function Tl(e,t){return typeof t=="function"?t(e):t}function rh(e){var t=An(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=pt,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,u=i;do{var d=u.lane;if((Ai&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,Ke.lanes|=d,Oi|=d}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,Zn(r,t.memoizedState)||(en=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;
vendor: 4,979 bytes, line 38
38do i=s.lane,Ke.lanes|=i,Oi|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function sh(e){var t=An(),n=t.queue;if(n===null)throw Error(q(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);Zn(i,t.memoizedState)||(en=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function RS(){}function AS(e,t){var n=Ke,r=An(),s=t(),i=!Zn(r.memoizedState,s);if(i&&(r.memoizedState=s,en=!0),r=r.queue,Gg(IS.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||vt!==null&&vt.memoizedState.tag&1){if(n.flags|=2048,jl(9,DS.bind(null,n,r,s,t),void 0,null),xt===null)throw Error(q(349));Ai&30||OS(n,t,s)}return s}function OS(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function DS(e,t,n,r){t.value=n,t.getSnapshot=r,MS(t)&&LS(e)}function IS(e,t,n){return n(function(){MS(t)&&LS(e)})}function MS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zn(e,n)}catch{return!0}}function LS(e){var t=Br(e,1);t!==null&&Xn(t,e,1,-1)}function N0(e){var t=ar();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Tl,lastRenderedState:e},t.queue=e,e=e.dispatch=v2.bind(null,Ke,e),[t.memoizedState,e]}function jl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.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 $S(){return An().memoizedState}function Su(e,t,n,r){var s=ar();Ke.flags|=e,s.memoizedState=jl(1|t,n,void 0,r===void 0?null:r)}function Vd(e,t,n,r){var s=An();r=r===void 0?null:r;var i=void 0;if(pt!==null){var o=pt.memoizedState;if(i=o.destroy,r!==null&&Hg(r,o.deps)){s.memoizedState=jl(t,n,i,r);return}}Ke.flags|=e,s.memoizedState=jl(1|t,n,i,r)}function R0(e,t){return Su(8390656,8,e,t)}function Gg(e,t){return Vd(2048,8,e,t)}function FS(e,t){return Vd(4,2,e,t)}function BS(e,t){return Vd(4,4,e,t)}function US(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 VS(e,t,n){return n=n!=null?n.concat([e]):null,Vd(4,4,US.bind(null,t,e),n)}function Yg(){}function zS(e,t){var n=An();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function WS(e,t){var n=An();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Hg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function HS(e,t,n){return Ai&21?(Zn(n,t)||(n=Q1(),Ke.lanes|=n,Oi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,en=!0),e.memoizedState=n)}function g2(e,t){var n=Re;Re=n!==0&&4>n?n:4,e(!0);var r=nh.transition;nh.transition={};try{e(!1),t()}finally{Re=n,nh.transition=r}}function qS(){return An().memoizedState}function y2(e,t,n){var r=Os(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},KS(e))GS(t,n);else if(n=jS(e,t,n,r),n!==null){var s=Kt();Xn(n,e,r,s),YS(n,t,r)}}function v2(e,t,n){var r=Os(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(KS(e))GS(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,Zn(a,o)){var l=t.interleaved;l===null?(s.next=s,Bg(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=jS(e,t,s,r),n!==null&&(s=Kt(),Xn(n,e,r,s),YS(n,t,r))}}function KS(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function GS(e,t){el=rd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function YS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Eg(e,n)}}var sd={readContext:Rn,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useInsertionEffect:At,useLayoutEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useMutableSource:At,useSyncExternalStore:At,useId:At,unstable_isNewReconciler:!1},x2={readContext:Rn,useCallback:function(e,t){return ar().memoizedState=[e,t===void 0?null:t],e},useContext:Rn,useEffect:R0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Su(4194308,4,US.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Su(4194308,4,e,t)},useInsertionEffect:function(e,t){return Su(4,2,e,t)},useMemo:function(e,t){var n=ar();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ar();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=y2.bind(null,Ke,e),[r.memoizedState,e]}
vendor: 4,424 bytes, lines 38-40
38,useRef:function(e){var t=ar();return e={current:e},t.memoizedState=e},useState:N0,useDebugValue:Yg,useDeferredValue:function(e){return ar().memoizedState=e},useTransition:function(){var e=N0(!1),t=e[0];return e=g2.bind(null,e[1]),ar().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,s=ar();if(Ve){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),xt===null)throw Error(q(349));Ai&30||OS(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,R0(IS.bind(null,r,i,e),[e]),r.flags|=2048,jl(9,DS.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ar(),t=xt.identifierPrefix;if(Ve){var n=Dr,r=Or;n=(r&~(1<<32-Qn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=El++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=m2++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},w2={readContext:Rn,useCallback:zS,useContext:Rn,useEffect:Gg,useImperativeHandle:VS,useInsertionEffect:FS,useLayoutEffect:BS,useMemo:WS,useReducer:rh,useRef:$S,useState:function(){return rh(Tl)},useDebugValue:Yg,useDeferredValue:function(e){var t=An();return HS(t,pt.memoizedState,e)},useTransition:function(){var e=rh(Tl)[0],t=An().memoizedState;return[e,t]},useMutableSource:RS,useSyncExternalStore:AS,useId:qS,unstable_isNewReconciler:!1},b2={readContext:Rn,useCallback:zS,useContext:Rn,useEffect:Gg,useImperativeHandle:VS,useInsertionEffect:FS,useLayoutEffect:BS,useMemo:WS,useReducer:sh,useRef:$S,useState:function(){return sh(Tl)},useDebugValue:Yg,useDeferredValue:function(e){var t=An();return pt===null?t.memoizedState=e:HS(t,pt.memoizedState,e)},useTransition:function(){var e=sh(Tl)[0],t=An().memoizedState;return[e,t]},useMutableSource:RS,useSyncExternalStore:AS,useId:qS,unstable_isNewReconciler:!1};function zn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Op(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zd={isMounted:function(e){return(e=e._reactInternals)?Vi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Kt(),s=Os(e),i=Ir(r,s);i.payload=t,n!=null&&(i.callback=n),t=Rs(e,i,s),t!==null&&(Xn(t,e,s,r),wu(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Kt(),s=Os(e),i=Ir(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Rs(e,i,s),t!==null&&(Xn(t,e,s,r),wu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Kt(),r=Os(e),s=Ir(n,r);s.tag=2,t!=null&&(s.callback=t),t=Rs(e,s,r),t!==null&&(Xn(t,e,r,n),wu(t,e,r))}};function A0(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?!wl(n,r)||!wl(s,i):!0}function QS(e,t,n){var r=!1,s=$s,i=t.contextType;return typeof i=="object"&&i!==null?i=Rn(i):(s=nn(t)?Ni:Bt.current,r=t.contextTypes,i=(r=r!=null)?Xo(e,s):$s),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=zd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function O0(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&&zd.enqueueReplaceState(t,t.state,null)}function Dp(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Ug(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Rn(i):(i=nn(t)?Ni:Bt.current,s.context=Xo(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Op(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&&zd.enqueueReplaceState(s,s.state,null),td(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ta(e,t){try{var n="",r=t;do n+=YN(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:s,digest:null}}
vendor: 11,572 bytes, line 40
40function ih(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ip(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var S2=typeof WeakMap=="function"?WeakMap:Map;function XS(e,t,n){n=Ir(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){od||(od=!0,Hp=r),Ip(e,t)},n}function JS(e,t,n){n=Ir(-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(){Ip(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Ip(e,t),typeof r!="function"&&(As===null?As=new Set([this]):As.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function D0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new S2;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=M2.bind(null,e,t,n),t.then(e,e))}function I0(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function M0(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=Ir(-1,1),t.tag=2,Rs(n,t,1))),n.lanes|=1),e)}var k2=Hr.ReactCurrentOwner,en=!1;function zt(e,t,n,r){t.child=e===null?TS(t,null,n,r):Zo(t,e.child,n,r)}function L0(e,t,n,r,s){n=n.render;var i=t.ref;return jo(t,s),r=qg(e,t,n,r,i,s),n=Kg(),e!==null&&!en?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ur(e,t,s)):(Ve&&n&&Dg(t),t.flags|=1,zt(e,t,r,s),t.child)}function $0(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!ry(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,ZS(e,t,i,r,s)):(e=Eu(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:wl,n(o,r)&&e.ref===t.ref)return Ur(e,t,s)}return t.flags|=1,e=Ds(i,r),e.ref=t.ref,e.return=t,t.child=e}function ZS(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(wl(i,r)&&e.ref===t.ref)if(en=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(en=!0);else return t.lanes=e.lanes,Ur(e,t,s)}return Mp(e,t,n,r,s)}function ek(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},Le(yo,cn),cn|=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,Le(yo,cn),cn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Le(yo,cn),cn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Le(yo,cn),cn|=r;return zt(e,t,s,n),t.child}function tk(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mp(e,t,n,r,s){var i=nn(n)?Ni:Bt.current;return i=Xo(t,i),jo(t,s),n=qg(e,t,n,r,i,s),r=Kg(),e!==null&&!en?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ur(e,t,s)):(Ve&&r&&Dg(t),t.flags|=1,zt(e,t,n,s),t.child)}function F0(e,t,n,r,s){if(nn(n)){var i=!0;Qu(t)}else i=!1;if(jo(t,s),t.stateNode===null)ku(e,t),QS(t,n,r),Dp(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Rn(u):(u=nn(n)?Ni:Bt.current,u=Xo(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&O0(t,o,r,u),ls=!1;var h=t.memoizedState;o.state=h,td(t,r,o,s),l=t.memoizedState,a!==r||h!==l||tn.current||ls?(typeof d=="function"&&(Op(t,n,d,r),l=t.memoizedState),(a=ls||A0(t,n,a,r,h,l,u))?(f||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=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,PS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:zn(t.type,a),o.props=u,f=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Rn(l):(l=nn(n)?Ni:Bt.current,l=Xo(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&O0(t,o,r,l),ls=!1,h=t.memoizedState,o.state=h,td(t,r,o,s);var w=t.memoizedState;a!==f||h!==w||tn.current||ls?(typeof p=="function"&&(Op(t,n,p,r),w=t.memoizedState),(u=ls||A0(t,n,u,r,h,w,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,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=w),o.props=r,o.state=w,o.context=l,r=u):(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 Lp(e,t,n,r,i,s)}function Lp(e,t,n,r,s,i){tk(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&_0(t,n,!1),Ur(e,t,i);r=t.stateNode,k2.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Zo(t,e.child,null,i),t.child=Zo(t,null,a,i)):zt(e,t,a,i),t.memoizedState=r.state,s&&_0(t,n,!0),t.child}function nk(e){var t=e.stateNode;t.pendingContext?k0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&k0(e,t.context,!1),Vg(e,t.containerInfo)}function B0(e,t,n,r,s){return Jo(),Mg(s),t.flags|=256,zt(e,t,n,r),t.child}var $p={dehydrated:null,treeContext:null,retryLane:0};function Fp(e){return{baseLanes:e,cachePool:null,transitions:null}}function rk(e,t,n){var r=t.pendingProps,s=He.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),Le(He,s&1),e===null)return Rp(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=qd(o,r,0,null),e=ji(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Fp(n),t.memoizedState=$p,e):Qg(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return _2(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=Ds(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Ds(a,i):(i=ji(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?Fp(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=$p,r}return i=e.child,e=i.sibling,r=Ds(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 Qg(e,t){return t=qd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lc(e,t,n,r){return r!==null&&Mg(r),Zo(t,e.child,null,n),e=Qg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _2(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=ih(Error(q(422))),Lc(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=qd({mode:"visible",children:r.children},s,0,null),i=ji(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Zo(t,e.child,null,o),t.child.memoizedState=Fp(o),t.memoizedState=$p,i);if(!(t.mode&1))return Lc(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(q(419)),r=ih(i,r,void 0),Lc(e,t,o,r)}if(a=(o&e.childLanes)!==0,en||a){if(r=xt,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,Br(e,s),Xn(r,e,s,-1))}return ny(),r=ih(Error(q(421))),Lc(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=L2.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,fn=Ns(s.nextSibling),hn=t,Ve=!0,Yn=null,e!==null&&(kn[_n++]=Or,kn[_n++]=Dr,kn[_n++]=Ri,Or=e.id,Dr=e.overflow,Ri=t),t=Qg(t,r.children),t.flags|=4096,t)}function U0(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ap(e.return,t,n)}function oh(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 sk(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(zt(e,t,r.children,n),r=He.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&&U0(e,n,t);else if(e.tag===19)U0(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(Le(He,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&&nd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),oh(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&&nd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}oh(t,!0,n,null,i);break;case"together":oh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ku(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ur(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Oi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,n=Ds(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ds(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function C2(e,t,n){switch(t.tag){case 3:nk(t),Jo();break;case 5:NS(t);break;case 1:nn(t.type)&&Qu(t);break;case 4:Vg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;
vendor: 4,359 bytes, line 40
40Le(Zu,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Le(He,He.current&1),t.flags|=128,null):n&t.child.childLanes?rk(e,t,n):(Le(He,He.current&1),e=Ur(e,t,n),e!==null?e.sibling:null);Le(He,He.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return sk(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Le(He,He.current),r)break;return null;case 22:case 23:return t.lanes=0,ek(e,t,n)}return Ur(e,t,n)}var ik,Bp,ok,ak;ik=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}};Bp=function(){};ok=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,hi(mr.current);var i=null;switch(n){case"input":s=lp(e,s),r=lp(e,r),i=[];break;case"select":s=Ge({},s,{value:void 0}),r=Ge({},r,{value:void 0}),i=[];break;case"textarea":s=dp(e,s),r=dp(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gu)}hp(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(hl.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="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(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(hl.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Be("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};ak=function(e,t,n,r){n!==r&&(t.flags|=4)};function Da(e,t){if(!Ve)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 Ot(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 E2(e,t,n){var r=t.pendingProps;switch(Ig(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ot(t),null;case 1:return nn(t.type)&&Yu(),Ot(t),null;case 3:return r=t.stateNode,ea(),Ue(tn),Ue(Bt),Wg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ic(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yn!==null&&(Gp(Yn),Yn=null))),Bp(e,t),Ot(t),null;case 5:zg(t);var s=hi(Cl.current);if(n=t.type,e!==null&&t.stateNode!=null)ok(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(q(166));return Ot(t),null}if(e=hi(mr.current),Ic(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[fr]=t,r[kl]=i,e=(t.mode&1)!==0,n){case"dialog":Be("cancel",r),Be("close",r);break;case"iframe":case"object":case"embed":Be("load",r);break;case"video":case"audio":for(s=0;s<Ha.length;s++)Be(Ha[s],r);break;case"source":Be("error",r);break;case"img":case"image":case"link":Be("error",r),Be("load",r);break;case"details":Be("toggle",r);break;case"input":Qv(r,i),Be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Be("invalid",r);break;case"textarea":Jv(r,i),Be("invalid",r)}hp(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 32,436 bytes, line 40
40o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Dc(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Dc(r.textContent,a,e),s=["children",""+a]):hl.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Be("scroll",r)}switch(n){case"input":Ec(r),Xv(r,i,!0);break;case"textarea":Ec(r),Zv(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Gu)}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=I1(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[fr]=t,e[kl]=r,ik(e,t,!1,!1),t.stateNode=e;e:{switch(o=pp(n,r),n){case"dialog":Be("cancel",e),Be("close",e),s=r;break;case"iframe":case"object":case"embed":Be("load",e),s=r;break;case"video":case"audio":for(s=0;s<Ha.length;s++)Be(Ha[s],e);s=r;break;case"source":Be("error",e),s=r;break;case"img":case"image":case"link":Be("error",e),Be("load",e),s=r;break;case"details":Be("toggle",e),s=r;break;case"input":Qv(e,r),s=lp(e,r),Be("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Ge({},r,{value:void 0}),Be("invalid",e);break;case"textarea":Jv(e,r),s=dp(e,r),Be("invalid",e);break;default:s=r}hp(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?$1(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&M1(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&pl(e,l):typeof l=="number"&&pl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(hl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Be("scroll",e):l!=null&&wg(e,i,l,o))}switch(n){case"input":Ec(e),Xv(e,r,!1);break;case"textarea":Ec(e),Zv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ls(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?_o(e,!!r.multiple,i,!1):r.defaultValue!=null&&_o(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Gu)}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 Ot(t),null;case 6:if(e&&t.stateNode!=null)ak(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(n=hi(Cl.current),hi(mr.current),Ic(t)){if(r=t.stateNode,n=t.memoizedProps,r[fr]=t,(i=r.nodeValue!==n)&&(e=hn,e!==null))switch(e.tag){case 3:Dc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Dc(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[fr]=t,t.stateNode=r}return Ot(t),null;case 13:if(Ue(He),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&fn!==null&&t.mode&1&&!(t.flags&128))CS(),Jo(),t.flags|=98560,i=!1;else if(i=Ic(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(q(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(q(317));i[fr]=t}else Jo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ot(t),i=!1}else Yn!==null&&(Gp(Yn),Yn=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||He.current&1?yt===0&&(yt=3):ny())),t.updateQueue!==null&&(t.flags|=4),Ot(t),null);case 4:return ea(),Bp(e,t),e===null&&bl(t.stateNode.containerInfo),Ot(t),null;case 10:return Fg(t.type._context),Ot(t),null;case 17:return nn(t.type)&&Yu(),Ot(t),null;case 19:if(Ue(He),i=t.memoizedState,i===null)return Ot(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Da(i,!1);else{if(yt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=nd(e),o!==null){for(t.flags|=128,Da(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 Le(He,He.current&1|2),t.child}e=e.sibling}i.tail!==null&&tt()>na&&(t.flags|=128,r=!0,Da(i,!1),t.lanes=4194304)}else{if(!r)if(e=nd(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Da(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ve)return Ot(t),null}else 2*tt()-i.renderingStartTime>na&&n!==1073741824&&(t.flags|=128,r=!0,Da(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=tt(),t.sibling=null,n=He.current,Le(He,r?n&1|2:n&1),t):(Ot(t),null);case 22:case 23:return ty(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?cn&1073741824&&(Ot(t),t.subtreeFlags&6&&(t.flags|=8192)):Ot(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function T2(e,t){switch(Ig(t),t.tag){case 1:return nn(t.type)&&Yu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(),Ue(tn),Ue(Bt),Wg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zg(t),null;case 13:if(Ue(He),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Jo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(He),null;case 4:return ea(),null;case 10:return Fg(t.type._context),null;case 22:case 23:return ty(),null;case 24:return null;default:return null}}var $c=!1,It=!1,j2=typeof WeakSet=="function"?WeakSet:Set,J=null;function go(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ze(e,t,r)}else n.current=null}function Up(e,t,n){try{n()}catch(r){Ze(e,t,r)}}var V0=!1;function P2(e,t){if(_p=Hu,e=fS(),Og(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,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===s&&(a=o),h===i&&++d===r&&(l=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Cp={focusedElem:e,selectionRange:n},Hu=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var g=w.memoizedProps,x=w.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:zn(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(S){Ze(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return w=V0,V0=!1,w}function tl(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&&Up(t,n,i)}s=s.next}while(s!==r)}}function Wd(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 Vp(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 lk(e){var t=e.alternate;t!==null&&(e.alternate=null,lk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fr],delete t[kl],delete t[jp],delete t[d2],delete t[f2])),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 ck(e){return e.tag===5||e.tag===3||e.tag===4}function z0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ck(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 zp(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=Gu));else if(r!==4&&(e=e.child,e!==null))for(zp(e,t,n),e=e.sibling;e!==null;)zp(e,t,n),e=e.sibling}function Wp(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(Wp(e,t,n),e=e.sibling;e!==null;)Wp(e,t,n),e=e.sibling}var _t=null,Kn=!1;function es(e,t,n){for(n=n.child;n!==null;)uk(e,t,n),n=n.sibling}function uk(e,t,n){if(pr&&typeof pr.onCommitFiberUnmount=="function")try{pr.onCommitFiberUnmount(Md,n)}catch{}switch(n.tag){case 5:It||go(n,t);case 6:var r=_t,s=Kn;_t=null,es(e,t,n),_t=r,Kn=s,_t!==null&&(Kn?(e=_t,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_t.removeChild(n.stateNode));break;case 18:_t!==null&&(Kn?(e=_t,n=n.stateNode,e.nodeType===8?Zf(e.parentNode,n):e.nodeType===1&&Zf(e,n),vl(e)):Zf(_t,n.stateNode));break;case 4:r=_t,s=Kn,_t=n.stateNode.containerInfo,Kn=!0,es(e,t,n),_t=r,Kn=s;break;case 0:case 11:case 14:case 15:if(!It&&(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)&&Up(n,t,o),s=s.next}while(s!==r)}es(e,t,n);break;case 1:if(!It&&(go(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ze(n,t,a)}es(e,t,n);break;case 21:es(e,t,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,es(e,t,n),It=r):es(e,t,n);break;default:es(e,t,n)}}function W0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new j2),t.forEach(function(r){var s=$2.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function $n(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:_t=a.stateNode,Kn=!1;break e;case 3:_t=a.stateNode.containerInfo,Kn=!0;break e;case 4:_t=a.stateNode.containerInfo,Kn=!0;break e}a=a.return}if(_t===null)throw Error(q(160));uk(i,o,s),_t=null,Kn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Ze(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)dk(t,e),t=t.sibling}function dk(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if($n(t,e),or(e),r&4){try{tl(3,e,e.return),Wd(3,e)}catch(g){Ze(e,e.return,g)}try{tl(5,e,e.return)}catch(g){Ze(e,e.return,g)}}break;case 1:$n(t,e),or(e),r&512&&n!==null&&go(n,n.return);break;case 5:if($n(t,e),or(e),r&512&&n!==null&&go(n,n.return),e.flags&32){var s=e.stateNode;try{pl(s,"")}catch(g){Ze(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&&O1(s,i),pp(a,o);var u=pp(a,i);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?$1(s,f):d==="dangerouslySetInnerHTML"?M1(s,f):d==="children"?pl(s,f):wg(s,d,f,u)}switch(a){case"input":cp(s,i);break;case"textarea":D1(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?_o(s,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?_o(s,!!i.multiple,i.defaultValue,!0):_o(s,!!i.multiple,i.multiple?[]:"",!1))}s[kl]=i}catch(g){Ze(e,e.return,g)}}break;case 6:if($n(t,e),or(e),r&4){if(e.stateNode===null)throw Error(q(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){Ze(e,e.return,g)}}break;case 3:if($n(t,e),or(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{vl(t.containerInfo)}catch(g){Ze(e,e.return,g)}break;case 4:$n(t,e),or(e);break;case 13:$n(t,e),or(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Zg=tt())),r&4&&W0(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(It=(u=It)||d,$n(t,e),It=u):$n(t,e),or(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(J=e,d=e.child;d!==null;){for(f=J=d;J!==null;){switch(h=J,p=h.child,h.tag){case 0:case 11:case 14:case 15:tl(4,h,h.return);break;case 1:go(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(g){Ze(r,n,g)}}break;case 5:go(h,h.return);break;case 22:if(h.memoizedState!==null){q0(f);continue}}p!==null?(p.return=h,J=p):q0(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=L1("display",o))}catch(g){Ze(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Ze(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:$n(t,e),or(e),r&4&&W0(e);break;case 21:break;default:$n(t,e),or(e)}}function or(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ck(n)){var r=n;break e}n=n.return}throw Error(q(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(pl(s,""),r.flags&=-33);var i=z0(e);Wp(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=z0(e);zp(e,a,o);break;default:throw Error(q(161))}}catch(l){Ze(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function N2(e,t,n){J=e,fk(e)}function fk(e,t,n){for(var r=(e.mode&1)!==0;J!==null;){var s=J,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||$c;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||It;a=$c;var u=It;if($c=o,(It=l)&&!u)for(J=s;J!==null;)o=J,l=o.child,o.tag===22&&o.memoizedState!==null?K0(s):l!==null?(l.return=o,J=l):K0(s);for(;i!==null;)J=i,fk(i),i=i.sibling;J=s,$c=a,It=u}H0(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,J=i):H0(e)}}function H0(e){for(;J!==null;){var t=J;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:It||Wd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!It)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:zn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&P0(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}P0(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 u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&vl(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}It||t.flags&512&&Vp(t)}catch(h){Ze(t,t.return,h)}}if(t===e){J=null;break}if(n=t.sibling,n!==null){n.return=t.return,J=n;break}J=t.return}}function q0(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var n=t.sibling;if(n!==null){n.return=t.return,J=n;break}J=t.return}}function K0(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Wd(4,t)}catch(l){Ze(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Ze(t,s,l)}}var i=t.return;try{Vp(t)}catch(l){Ze(t,i,l)}break;case 5:var o=t.return;try{Vp(t)}catch(l){Ze(t,o,l)}}}catch(l){Ze(t,t.return,l)}if(t===e){J=null;break}var a=t.sibling;if(a!==null){a.return=t.return,J=a;break}J=t.return}}var R2=Math.ceil,id=Hr.ReactCurrentDispatcher,Xg=Hr.ReactCurrentOwner,jn=Hr.ReactCurrentBatchConfig,_e=0,xt=null,lt=null,jt=0,cn=0,yo=qs(0),yt=0,Pl=null,Oi=0,Hd=0,Jg=0,nl=null,Zt=null,Zg=0,na=1/0,jr=null,od=!1,Hp=null,As=null,Fc=!1,_s=null,ad=0,rl=0,qp=null,_u=-1,Cu=0;function Kt(){return _e&6?tt():_u!==-1?_u:_u=tt()}function Os(e){return e.mode&1?_e&2&&jt!==0?jt&-jt:p2.transition!==null?(Cu===0&&(Cu=Q1()),Cu):(e=Re,e!==0||(e=window.event,e=e===void 0?16:rS(e.type)),e):1}function Xn(e,t,n,r){if(50<rl)throw rl=0,qp=null,Error(q(185));rc(e,n,r),(!(_e&2)||e!==xt)&&(e===xt&&(!(_e&2)&&(Hd|=n),yt===4&&ds(e,jt)),rn(e,r),n===1&&_e===0&&!(t.mode&1)&&(na=tt()+500,Ud&&Ks()))}function rn(e,t){var n=e.callbackNode;pR(e,t);var r=Wu(e,e===xt?jt:0);if(r===0)n!==null&&n0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&n0(n),t===1)e.tag===0?h2(G0.bind(null,e)):SS(G0.bind(null,e)),c2(function(){!(_e&6)&&Ks()}),n=null;else{switch(X1(r)){case 1:n=Cg;break;case 4:n=G1;break;case 16:n=zu;break;case 536870912:n=Y1;break;default:n=zu}n=wk(n,hk.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function hk(e,t){if(_u=-1,Cu=0,_e&6)throw Error(q(327));var n=e.callbackNode;if(Po()&&e.callbackNode!==n)return null;var r=Wu(e,e===xt?jt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ld(e,r);else{t=r;var s=_e;_e|=2;var i=mk();(xt!==e||jt!==t)&&(jr=null,na=tt()+500,Ti(e,t));do try{D2();break}catch(a){pk(e,a)}while(!0);$g(),id.current=i,_e=s,lt!==null?t=0:(xt=null,jt=0,t=yt)}if(t!==0){if(t===2&&(s=xp(e),s!==0&&(r=s,t=Kp(e,s))),t===1)throw n=Pl,Ti(e,0),ds(e,r),rn(e,tt()),n;if(t===6)ds(e,r);else{if(s=e.current.alternate,!(r&30)&&!A2(s)&&(t=ld(e,r),t===2&&(i=xp(e),i!==0&&(r=i,t=Kp(e,i))),t===1))throw n=Pl,Ti(e,0),ds(e,r),rn(e,tt()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(q(345));case 2:oi(e,Zt,jr);break;case 3:if(ds(e,r),(r&130023424)===r&&(t=Zg+500-tt(),10<t)){if(Wu(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Kt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Tp(oi.bind(null,e,Zt,jr),t);break}oi(e,Zt,jr);break;case 4:if(ds(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Qn(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=tt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*R2(r/1960))-r,10<r){e.timeoutHandle=Tp(oi.bind(null,e,Zt,jr),r);break}oi(e,Zt,jr);break;case 5:oi(e,Zt,jr);break;default:throw Error(q(329))}}}return rn(e,tt()),e.callbackNode===n?hk.bind(null,e):null}function Kp(e,t){var n=nl;return e.current.memoizedState.isDehydrated&&(Ti(e,t).flags|=256),e=ld(e,t),e!==2&&(t=Zt,Zt=n,t!==null&&Gp(t)),e}function Gp(e){Zt===null?Zt=e:Zt.push.apply(Zt,e)}function A2(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(!Zn(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 ds(e,t){for(t&=~Jg,t&=~Hd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qn(t),r=1<<n;e[n]=-1,t&=~r}}function G0(e){if(_e&6)throw Error(q(327));Po();var t=Wu(e,0);if(!(t&1))return rn(e,tt()),null;var n=ld(e,t);if(e.tag!==0&&n===2){var r=xp(e);r!==0&&(t=r,n=Kp(e,r))}if(n===1)throw n=Pl,Ti(e,0),ds(e,t),rn(e,tt()),n;if(n===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,oi(e,Zt,jr),rn(e,tt()),null}function ey(e,t){var n=_e;_e|=1;try{return e(t)}finally{_e=n,_e===0&&(na=tt()+500,Ud&&Ks())}}function Di(e){_s!==null&&_s.tag===0&&!(_e&6)&&Po();var t=_e;_e|=1;var n=jn.transition,r=Re;try{if(jn.transition=null,Re=1,e)return e()}finally{Re=r,jn.transition=n,_e=t,!(_e&6)&&Ks()}}function ty(){cn=yo.current,Ue(yo)}function Ti(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,l2(n)),lt!==null)for(n=lt.return;n!==null;){var r=n;switch(Ig(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yu();break;case 3:ea(),Ue(tn),Ue(Bt),Wg();break;case 5:zg(r);break;case 4:ea();break;case 13:Ue(He);break;case 19:Ue(He);break;case 10:Fg(r.type._context);break;case 22:case 23:ty()}n=n.return}if(xt=e,lt=e=Ds(e.current,null),jt=cn=t,yt=0,Pl=null,Jg=Hd=Oi=0,Zt=nl=null,fi!==null){for(t=0;t<fi.length;t++)if(n=fi[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}fi=null}return e}function pk(e,t){do{var n=lt;try{if($g(),bu.current=sd,rd){for(var r=Ke.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}rd=!1}if(Ai=0,vt=pt=Ke=null,el=!1,El=0,Xg.current=null,n===null||n.return===null){yt=1,Pl=t,lt=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=jt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=I0(o);if(p!==null){p.flags&=-257,M0(p,o,a,i,t),p.mode&1&&D0(i,u,t),t=p,l=u;var w=t.updateQueue;if(w===null){var g=new Set;g.add(l),t.updateQueue=g}else w.add(l);break e}else{if(!(t&1)){D0(i,u,t),ny();break e}l=Error(q(426))}}else if(Ve&&a.mode&1){var x=I0(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),M0(x,o,a,i,t),Mg(ta(l,a));break e}}i=l=ta(l,a),yt!==4&&(yt=2),nl===null?nl=[i]:nl.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=XS(i,l,t);j0(i,y);break e;case 1:a=l;var v=i.type,b=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(As===null||!As.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=JS(i,a,t);j0(i,S);break e}}i=i.return}while(i!==null)}yk(n)}catch(k){t=k,lt===n&&n!==null&&(lt=n=n.return);continue}break}while(!0)}function mk(){var e=id.current;return id.current=sd,e===null?sd:e}function ny(){(yt===0||yt===3||yt===2)&&(yt=4),xt===null||!(Oi&268435455)&&!(Hd&268435455)||ds(xt,jt)}function ld(e,t){var n=_e;_e|=2;var r=mk();(xt!==e||jt!==t)&&(jr=null,Ti(e,t));do try{O2();break}catch(s){pk(e,s)}while(!0);if($g(),_e=n,id.current=r,lt!==null)throw Error(q(261));return xt=null,jt=0,yt}function O2(){for(;lt!==null;)gk(lt)}function D2(){for(;lt!==null&&!iR();)gk(lt)}function gk(e){var t=xk(e.alternate,e,cn);e.memoizedProps=e.pendingProps,t===null?yk(e):lt=t,Xg.current=null}function yk(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=T2(n,t),n!==null){n.flags&=32767,lt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{yt=6,lt=null;return}}else if(n=E2(n,t,cn),n!==null){lt=n;return}if(t=t.sibling,t!==null){lt=t;return}lt=t=e}while(t!==null);yt===0&&(yt=5)}function oi(e,t,n){var r=Re,s=jn.transition;try{jn.transition=null,Re=1,I2(e,t,n,r)}finally{jn.transition=s,Re=r}return null}function I2(e,t,n,r){do Po();while(_s!==null);if(_e&6)throw Error(q(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(q(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(mR(e,i),e===xt&&(lt=xt=null,jt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Fc||(Fc=!0,wk(zu,function(){return Po(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=jn.transition,jn.transition=null;var o=Re;Re=1;var a=_e;_e|=4,Xg.current=null,P2(e,n),dk(n,e),t2(Cp),Hu=!!_p,Cp=_p=null,e.current=n,N2(n),oR(),_e=a,Re=o,jn.transition=i}else e.current=n;if(Fc&&(Fc=!1,_s=e,ad=s),i=e.pendingLanes,i===0&&(As=null),cR(n.stateNode),rn(e,tt()),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(od)throw od=!1,e=Hp,Hp=null,e;return ad&1&&e.tag!==0&&Po(),i=e.pendingLanes,i&1?e===qp?rl++:(rl=0,qp=e):rl=0,Ks(),null}function Po(){if(_s!==null){var e=X1(ad),t=jn.transition,n=Re;try{if(jn.transition=null,Re=16>e?16:e,_s===null)var r=!1;else{if(e=_s,_s=null,ad=0,_e&6)throw Error(q(331));var s=_e;for(_e|=4,J=e.current;J!==null;){var i=J,o=i.child;if(J.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(J=u;J!==null;){var d=J;switch(d.tag){case 0:case 11:case 15:tl(8,d,i)}var f=d.child;if(f!==null)f.return=d,J=f;else for(;J!==null;){d=J;var h=d.sibling,p=d.return;if(lk(d),d===u){J=null;break}if(h!==null){h.return=p,J=h;break}J=p}}}var w=i.alternate;if(w!==null){var g=w.child;if(g!==null){w.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}J=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,J=o;else e:for(;J!==null;){if(i=J,i.flags&2048)switch(i.tag){case 0:case 11:case 15:tl(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,J=y;break e}J=i.return}}var v=e.current;for(J=v;J!==null;){o=J;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,J=b;else e:for(o=v;J!==null;){if(a=J,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Wd(9,a)}}catch(k){Ze(a,a.return,k)}if(a===o){J=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,J=S;break e}J=a.return}}if(_e=s,Ks(),pr&&typeof pr.onPostCommitFiberRoot=="function")try{pr.onPostCommitFiberRoot(Md,e)}catch{}r=!0}return r}finally{Re=n,jn.transition=t}}return!1}function Y0(e,t,n){t=ta(n,t),t=XS(e,t,1),e=Rs(e,t,1),t=Kt(),e!==null&&(rc(e,1,t),rn(e,t))}function Ze(e,t,n){if(e.tag===3)Y0(e,e,n);else for(;t!==null;){if(t.tag===3){Y0(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(As===null||!As.has(r))){e=ta(n,e),e=JS(t,e,1),t=Rs(t,e,1),e=Kt(),t!==null&&(rc(t,1,e),rn(t,e));break}}t=t.return}}function M2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Kt(),e.pingedLanes|=e.suspendedLanes&n,xt===e&&(jt&n)===n&&(yt===4||yt===3&&(jt&130023424)===jt&&500>tt()-Zg?Ti(e,0):Jg|=n),rn(e,t)}function vk(e,t){t===0&&(e.mode&1?(t=Pc,Pc<<=1,!(Pc&130023424)&&(Pc=4194304)):t=1);var n=Kt();e=Br(e,t),e!==null&&(rc(e,t,n),rn(e,n))}function L2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vk(e,n)}function $2(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(q(314))}r!==null&&r.delete(t),vk(e,n)}var xk;xk=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||tn.current)en=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return en=!1,C2(e,t,n);en=!!(e.flags&131072)}else en=!1,Ve&&t.flags&1048576&&kS(t,Ju,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ku(e,t),e=t.pendingProps;var s=Xo(t,Bt.current);jo(t,n),s=qg(null,t,r,e,s,n);var i=Kg();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,nn(r)?(i=!0,Qu(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ug(t),s.updater=zd,t.stateNode=s,s._reactInternals=t,Dp(t,r,e,n),t=Lp(null,t,r,!0,i,n)):(t.tag=0,Ve&&i&&Dg(t),zt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ku(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=B2(r),e=zn(r,e),s){case 0:t=Mp(null,t,r,e,n);break e;case 1:t=F0(null,t,r,e,n);break e;case 11:t=L0(null,t,r,e,n);break e;case 14:t=$0(null,t,r,zn(r.type,e),n);break e}throw Error(q(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:zn(r,s),Mp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:zn(r,s),F0(e,t,r,s,n);case 3:e:{if(nk(t),e===null)throw Error(q(387));r=t.pendingProps,i=t.memoizedState,s=i.element,PS(e,t),td(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=ta(Error(q(423)),t),t=B0(e,t,r,n,s);break e}else if(r!==s){s=ta(Error(q(424)),t),t=B0(e,t,r,n,s);break e}else for(fn=Ns(t.stateNode.containerInfo.firstChild),hn=t,Ve=!0,Yn=null,n=TS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Jo(),r===s){t=Ur(e,t,n);break e}zt(e,t,r,n)}t=t.child}return t;case 5:return NS(t),e===null&&Rp(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Ep(r,s)?o=null:i!==null&&Ep(r,i)&&(t.flags|=32),tk(e,t),zt(e,t,o,n),t.child;case 6:return e===null&&Rp(t),null;case 13:return rk(e,t,n);case 4:return Vg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zo(t,null,r,n):zt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:zn(r,s),L0(e,t,r,s,n);case 7:return zt(e,t,t.pendingProps,n),t.child;case 8:return zt(e,t,t.pendingProps.children,n),t.child;case 12:return zt(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,Le(Zu,r._currentValue),r._currentValue=o,i!==null)if(Zn(i.value,o)){if(i.children===s.children&&!tn.current){t=Ur(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=Ir(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Ap(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(q(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ap(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}zt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,jo(t,n),s=Rn(s),r=r(s),t.flags|=1,zt(e,t,r,n),t.child;case 14:return r=t.type,s=zn(r,t.pendingProps),s=zn(r.type,s),$0(e,t,r,s,n);case 15:return ZS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:zn(r,s),ku(e,t),t.tag=1,nn(r)?(e=!0,Qu(t)):e=!1,jo(t,n),QS(t,r,s),Dp(t,r,s,n),Lp(null,t,r,!0,e,n);case 19:return sk(e,t,n);case 22:return ek(e,t,n)}throw Error(q(156,t.tag))};function wk(e,t){return K1(e,t)}function F2(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 En(e,t,n,r){return new F2(e,t,n,r)}function ry(e){return e=e.prototype,!(!e||!e.isReactComponent)}function B2(e){if(typeof e=="function")return ry(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Sg)return 11;if(e===kg)return 14}return 2}function Ds(e,t){var n=e.alternate;return n===null?(n=En(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.deleti
vendor: 4,322 bytes, line 40
40ons=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 Eu(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")ry(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case oo:return ji(n.children,s,i,t);case bg:o=8,s|=8;break;case sp:return e=En(12,n,t,s|2),e.elementType=sp,e.lanes=i,e;case ip:return e=En(13,n,t,s),e.elementType=ip,e.lanes=i,e;case op:return e=En(19,n,t,s),e.elementType=op,e.lanes=i,e;case N1:return qd(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j1:o=10;break e;case P1:o=9;break e;case Sg:o=11;break e;case kg:o=14;break e;case as:o=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=En(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ji(e,t,n,r){return e=En(7,e,r,t),e.lanes=n,e}function qd(e,t,n,r){return e=En(22,e,r,t),e.elementType=N1,e.lanes=n,e.stateNode={isHidden:!1},e}function ah(e,t,n){return e=En(6,e,null,t),e.lanes=n,e}function lh(e,t,n){return t=En(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function U2(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=Vf(0),this.expirationTimes=Vf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vf(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function sy(e,t,n,r,s,i,o,a,l){return e=new U2(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=En(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ug(i),e}function V2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:io,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function bk(e){if(!e)return $s;e=e._reactInternals;e:{if(Vi(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(nn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var n=e.type;if(nn(n))return bS(e,n,t)}return t}function Sk(e,t,n,r,s,i,o,a,l){return e=sy(n,r,!0,e,s,i,o,a,l),e.context=bk(null),n=e.current,r=Kt(),s=Os(n),i=Ir(r,s),i.callback=t??null,Rs(n,i,s),e.current.lanes=s,rc(e,s,r),rn(e,r),e}function Kd(e,t,n,r){var s=t.current,i=Kt(),o=Os(s);return n=bk(n),t.context===null?t.context=n:t.pendingContext=n,t=Ir(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Rs(s,t,o),e!==null&&(Xn(e,s,o,i),wu(e,s,o)),o}function cd(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 Q0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function iy(e,t){Q0(e,t),(e=e.alternate)&&Q0(e,t)}function z2(){return null}var kk=typeof reportError=="function"?reportError:function(e){console.error(e)};function oy(e){this._internalRoot=e}Gd.prototype.render=oy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));Kd(e,t,null,null)};Gd.prototype.unmount=oy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Di(function(){Kd(null,e,null,null)}),t[Fr]=null}};function Gd(e){this._internalRoot=e}Gd.prototype.unstable_scheduleHydration=function(e){if(e){var t=eS();e={blockedOn:null,target:e,priority:t};for(var n=0;n<us.length&&t!==0&&t<us[n].priority;n++);us.splice(n,0,e),n===0&&nS(e)}};function ay(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Yd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function X0(){}
vendor: 5,155 bytes, line 40
40function W2(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=cd(o);i.call(u)}}var o=Sk(t,r,e,0,null,!1,!1,"",X0);return e._reactRootContainer=o,e[Fr]=o.current,bl(e.nodeType===8?e.parentNode:e),Di(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=cd(l);a.call(u)}}var l=sy(e,0,!1,null,null,!1,!1,"",X0);return e._reactRootContainer=l,e[Fr]=l.current,bl(e.nodeType===8?e.parentNode:e),Di(function(){Kd(t,l,n,r)}),l}function Qd(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=cd(o);a.call(l)}}Kd(t,o,e,s)}else o=W2(n,t,e,s,r);return cd(o)}J1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Wa(t.pendingLanes);n!==0&&(Eg(t,n|1),rn(t,tt()),!(_e&6)&&(na=tt()+500,Ks()))}break;case 13:Di(function(){var r=Br(e,1);if(r!==null){var s=Kt();Xn(r,e,1,s)}}),iy(e,1)}};Tg=function(e){if(e.tag===13){var t=Br(e,134217728);if(t!==null){var n=Kt();Xn(t,e,134217728,n)}iy(e,134217728)}};Z1=function(e){if(e.tag===13){var t=Os(e),n=Br(e,t);if(n!==null){var r=Kt();Xn(n,e,t,r)}iy(e,t)}};eS=function(){return Re};tS=function(e,t){var n=Re;try{return Re=e,t()}finally{Re=n}};gp=function(e,t,n){switch(t){case"input":if(cp(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=Bd(r);if(!s)throw Error(q(90));A1(r),cp(r,s)}}}break;case"textarea":D1(e,n);break;case"select":t=n.value,t!=null&&_o(e,!!n.multiple,t,!1)}};U1=ey;V1=Di;var H2={usingClientEntryPoint:!1,Events:[ic,uo,Bd,F1,B1,ey]},Ia={findFiberByHostInstance:di,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},q2={bundleType:Ia.bundleType,version:Ia.version,rendererPackageName:Ia.rendererPackageName,rendererConfig:Ia.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=H1(e),e===null?null:e.stateNode},findFiberByHostInstance:Ia.findFiberByHostInstance||z2,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 Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bc.isDisabled&&Bc.supportsFiber)try{Md=Bc.inject(q2),pr=Bc}catch{}}yn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H2;yn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ay(t))throw Error(q(200));return V2(e,t,null,n)};yn.createRoot=function(e,t){if(!ay(e))throw Error(q(299));var n=!1,r="",s=kk;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=sy(e,1,!1,null,null,n,!1,r,s),e[Fr]=t.current,bl(e.nodeType===8?e.parentNode:e),new oy(t)};yn.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(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=H1(t),e=e===null?null:e.stateNode,e};yn.flushSync=function(e){return Di(e)};yn.hydrate=function(e,t,n){if(!Yd(t))throw Error(q(200));return Qd(null,e,t,!0,n)};yn.hydrateRoot=function(e,t,n){if(!ay(e))throw Error(q(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=kk;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Sk(t,null,e,1,n??null,s,!1,i,o),e[Fr]=t.current,bl(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 Gd(t)};yn.render=function(e,t,n){if(!Yd(t))throw Error(q(200));return Qd(null,e,t,!1,n)};yn.unmountComponentAtNode=function(e){if(!Yd(e))throw Error(q(40));return e._reactRootContainer?(Di(function(){Qd(null,null,e,!1,function(){e._reactRootContainer=null,e[Fr]=null})}),!0):!1};yn.unstable_batchedUpdates=ey;yn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Yd(n))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return Qd(e,t,n,!1,r)};yn.version="18.3.1-next-f1338f8080-20240426";function _k(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_k)}catch(e){console.error(e)}}_k(),_1.exports=yn;var ac=_1.exports;const Ck=f1(ac);var Ek,J0=ac;Ek=J0.createRoot,J0.hydrateRoot;const K2=1,G2=1e6;let ch=0;function Y2(){return ch=(ch+1)%Number.MAX_SAFE_INTEGER,ch.toString()}const uh=new Map,Z0=e=>{if(uh.has(e))return;const t=setTimeout(()=>{uh.delete(e),sl({type:"REMOVE_TOAST",toastId:e})},G2);uh.set(e,t)},Q2=(e,t)=>
40{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,K2)};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?Z0(n):e.toasts.forEach(r=>{Z0(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)}}},Tu=[];let ju={toasts:[]};function sl(e){ju=Q2(ju,e),Tu.forEach(t=>{t(ju)})}function X2({...e}){const t=Y2(),n=s=>sl({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>sl({type:"DISMISS_TOAST",toastId:t});return sl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function J2(){const[e,t]=m.useState(ju);return m.useEffect(()=>(Tu.push(t),()=>{const n=Tu.indexOf(t);n>-1&&Tu.splice(n,1)}),[e]),{...e,toast:X2,dismiss:n=>sl({type:"DISMISS_TOAST",toastId:n})}}function he(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 ex(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tk(...e){return t=>{let n=!1;const r=e.map(s=>{const i=ex(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():ex(e[s],null)}}}}function Ne(...e){return m.useCallback(Tk(...e),e)}function Z2(e,t){const n=m.createContext(t),r=i=>{const{children:o,...a}=i,l=m.useMemo(()=>a,Object.values(a));return c.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function s(i){const o=m.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 On(e,t=[]){let n=[];function r(i,o){const a=m.createContext(o),l=n.length;n=[...n,o];const u=f=>{var y;const{scope:h,children:p,...w}=f,g=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,x=m.useMemo(()=>w,Object.values(w));return c.jsx(g.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(f,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,w=m.useContext(p);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return m.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,eA(s,...t)]}function eA(...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:u})=>{const f=l(i)[`__scope${u}`];return{...a,...f}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Nl(e){const t=nA(e),n=m.forwardRef((r,s)=>{const{children:i,...o}=r,a=m.Children.toArray(i),l=a.find(rA);if(l){const u=l.props.children,d=a.map(f=>f===l?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:f);return c.jsx(t,{...o,ref:s,children:m.isValidElement(u)?m.cloneElement(u,void 0,d):null})}return c.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var tA=Nl("Slot");function nA(e){const t=m.forwardRef((n,r)=>{const{children:s,...i}=n;if(m.isValidElement(s)){const o=iA(s),a=sA(i,s.props);return s.type!==m.Fragment&&(a.ref=r?Tk(r,o):o),m.cloneElement(s,a)}return m.Children.count(s)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jk=Symbol("radix.slottable");function Pk(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=jk,t}function rA(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jk}function sA(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 iA(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 ly(e){const t=e+"CollectionProvider",[n,r]=On(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:x,children:y}=g,v=I.useRef(null),b=I.useRef(new Map).current;return c.jsx(s,{scope:x,itemMap:b,collectionRef:v,children:y})};o.displayName=t;const a=e+"CollectionSlot",l=Nl(a),u=I.forwardRef((g,x)=>{const{scope:y,children:v}=g,b=i(a,y),S=Ne(x,b.collectionRef);return c.jsx(l,{ref:S,children:v})});u.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=Nl(d),p=I.forwardRef((g,x)=>{const{scope:y,children:v,...b}
vendor: 8,360 bytes, line 40
40=g,S=I.useRef(null),k=Ne(x,S),T=i(d,y);return I.useEffect(()=>(T.itemMap.set(S,{ref:S,...b}),()=>void T.itemMap.delete(S))),c.jsx(h,{[f]:"",ref:k,children:v})});p.displayName=d;function w(g){const x=i(e+"CollectionConsumer",g);return I.useCallback(()=>{const v=x.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((T,E)=>b.indexOf(T.ref.current)-b.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},w,r]}var oA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],me=oA.reduce((e,t)=>{const n=Nl(`Primitive.${t}`),r=m.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nk(e,t){e&&ac.flushSync(()=>e.dispatchEvent(t))}function gt(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function aA(e,t=globalThis==null?void 0:globalThis.document){const n=gt(e);m.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 lA="DismissableLayer",Yp="dismissableLayer.update",cA="dismissableLayer.pointerDownOutside",uA="dismissableLayer.focusOutside",tx,Rk=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xd=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=m.useContext(Rk),[d,f]=m.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=m.useState({}),w=Ne(t,E=>f(E)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(x),v=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,k=fA(E=>{const j=E.target,R=[...u.branches].some(A=>A.contains(j));!S||R||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},h),T=hA(E=>{const j=E.target;[...u.branches].some(A=>A.contains(j))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},h);return aA(E=>{v===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(tx=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),nx(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=tx)}},[d,h,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),nx())},[d,u]),m.useEffect(()=>{const E=()=>p({});return document.addEventListener(Yp,E),()=>document.removeEventListener(Yp,E)},[]),c.jsx(me.div,{...l,ref:w,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,T.onFocusCapture),onBlurCapture:he(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,k.onPointerDownCapture)})});Xd.displayName=lA;var dA="DismissableLayerBranch",Ak=m.forwardRef((e,t)=>{const n=m.useContext(Rk),r=m.useRef(null),s=Ne(t,r);return m.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),c.jsx(me.div,{...e,ref:s})});Ak.displayName=dA;function fA(e,t=globalThis==null?void 0:globalThis.document){const n=gt(e),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Ok(cA,n,u,{discrete:!0})};const u={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 hA(e,t=globalThis==null?void 0:globalThis.document){const n=gt(e),r=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!r.current&&Ok(uA,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 nx(){const e=new CustomEvent(Yp);document.dispatchEvent(e)}function Ok(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?Nk(s,i):s.dispatchEvent(i)}var pA=Xd,mA=Ak,gn=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},gA="Portal",cy=m.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=m.useState(!1);gn(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Ck.createPortal(c.jsx(me.div,{...r,ref:t}),o):null});cy.displayName=gA;function yA(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var nr=e=>{const{present:t,children:n}=e,r=vA(t),s=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),i=Ne(r.ref,xA(s));return typeof n=="function"||r.isPresent?m.cloneElement(s,{ref:i}):null};nr.displayName="Presence";function vA(e){const[t,n]=m.useState(),r=m.useRef(null),s=m.useRef(e),i=m.useRef("none"),o=e?"mounted":"unmounted",[a,l]=yA(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=Uc(r.current);i.current=a==="mounted"?u:"none"},[a]),gn(()=>{const u=r.current,d=s.current;if(d!==e){const h=i.current,p=Uc(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),gn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const g=Uc(r.current).includes(p.animationName);if(p.target===t&&g&&(l("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=p=>{p.target===t&&(i.current=Uc(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Uc(e){return(e==null?void 0:e.animationName)||"none"}function xA(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 wA=yg[" useInsertionEffect ".trim().toString()]||gn;function lc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=bA({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:s;{const d=m.useRef(e!==void 0);m.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=m.useCallback(d=>{var f;if(a){const h=SA(d)?d(e):d;h!==e&&((f=o.current)==null||f.call(o,h))}else i(d)},[a,e,i,o]);return[l,u]}function bA({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),s=m.useRef(n),i=m.useRef(t);return wA(()=>{i.current=t},[t]),m.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function SA(e){return typeof e=="function"}var kA=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"}),_A="VisuallyHidden",Jd=m.forwardRef((e,t)=>
40c.jsx(me.span,{...e,ref:t,style:{...kA,...e.style}}));Jd.displayName=_A;var CA=Jd,uy="ToastProvider",[dy,EA,TA]=ly("Toast"),[Dk,$W]=On("Toast",[TA]),[jA,Zd]=Dk(uy),Ik=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=m.useState(null),[u,d]=m.useState(0),f=m.useRef(!1),h=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${uy}\`. Expected non-empty \`string\`.`),c.jsx(dy.Provider,{scope:t,children:c.jsx(jA,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:m.useCallback(()=>d(p=>p+1),[]),onToastRemove:m.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};Ik.displayName=uy;var Mk="ToastViewport",PA=["F8"],Qp="toast.viewportPause",Xp="toast.viewportResume",Lk=m.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=PA,label:s="Notifications ({hotkey})",...i}=e,o=Zd(Mk,n),a=EA(n),l=m.useRef(null),u=m.useRef(null),d=m.useRef(null),f=m.useRef(null),h=Ne(t,f,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;m.useEffect(()=>{const x=y=>{var b;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),m.useEffect(()=>{const x=l.current,y=f.current;if(w&&x&&y){const v=()=>{if(!o.isClosePausedRef.current){const T=new CustomEvent(Qp);y.dispatchEvent(T),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const T=new CustomEvent(Xp);y.dispatchEvent(T),o.isClosePausedRef.current=!1}},S=T=>{!x.contains(T.relatedTarget)&&b()},k=()=>{x.contains(document.activeElement)||b()};return x.addEventListener("focusin",v),x.addEventListener("focusout",S),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",k),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",S),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",k),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[w,o.isClosePausedRef]);const g=m.useCallback(({tabbingDirection:x})=>{const v=a().map(b=>{const S=b.ref.current,k=[S,...VA(S)];return x==="forwards"?k:k.reverse()});return(x==="forwards"?v.reverse():v).flat()},[a]);return m.useEffect(()=>{const x=f.current;if(x){const y=v=>{var k,T,E;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const j=document.activeElement,R=v.shiftKey;if(v.target===x&&R){(k=u.current)==null||k.focus();return}const $=g({tabbingDirection:R?"backwards":"forwards"}),W=$.findIndex(F=>F===j);dh($.slice(W+1))?v.preventDefault():R?(T=u.current)==null||T.focus():(E=d.current)==null||E.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[a,g]),c.jsxs(mA,{ref:l,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&c.jsx(Jp,{ref:u,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"forwards"});dh(x)}}),c.jsx(dy.Slot,{scope:n,children:c.jsx(me.ol,{tabIndex:-1,...i,ref:h})}),w&&c.jsx(Jp,{ref:d,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"backwards"});dh(x)}})]})});Lk.displayName=Mk;var $k="ToastFocusProxy",Jp=m.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=Zd($k,n);return c.jsx(Jd,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});Jp.displayName=$k;var cc="Toast",NA="toast.swipeStart",RA="toast.swipeMove",AA="toast.swipeCancel",OA="toast.swipeEnd",Fk=m.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=lc({prop:r,defaultProp:s??!0,onChange:i,caller:cc});return c.jsx(nr,{present:n||a,children:c.jsx(MA,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:gt(e.onPause),onResume:gt(e.onResume),onSwipeStart:he(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:he(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:he(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:he(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});Fk.displayName=cc;var[DA,IA]=Dk(cc,{onClose(){}}),MA=m.forwardRef((e,t)=>
40{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:p,...w}=e,g=Zd(cc,n),[x,y]=m.useState(null),v=Ne(t,F=>y(F)),b=m.useRef(null),S=m.useRef(null),k=s||g.duration,T=m.useRef(0),E=m.useRef(k),j=m.useRef(0),{onToastAdd:R,onToastRemove:A}=g,D=gt(()=>{var K;(x==null?void 0:x.contains(document.activeElement))&&((K=g.viewport)==null||K.focus()),o()}),$=m.useCallback(F=>{!F||F===1/0||(window.clearTimeout(j.current),T.current=new Date().getTime(),j.current=window.setTimeout(D,F))},[D]);m.useEffect(()=>{const F=g.viewport;if(F){const K=()=>{$(E.current),u==null||u()},U=()=>{const V=new Date().getTime()-T.current;E.current=E.current-V,window.clearTimeout(j.current),l==null||l()};return F.addEventListener(Qp,U),F.addEventListener(Xp,K),()=>{F.removeEventListener(Qp,U),F.removeEventListener(Xp,K)}}},[g.viewport,k,l,u,$]),m.useEffect(()=>{i&&!g.isClosePausedRef.current&&$(k)},[i,k,g.isClosePausedRef,$]),m.useEffect(()=>(R(),()=>A()),[R,A]);const W=m.useMemo(()=>x?qk(x):null,[x]);return g.viewport?c.jsxs(c.Fragment,{children:[W&&c.jsx(LA,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),c.jsx(DA,{scope:n,onClose:D,children:ac.createPortal(c.jsx(dy.ItemSlot,{scope:n,children:c.jsx(pA,{asChild:!0,onEscapeKeyDown:he(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||D(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(me.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...w,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:he(e.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:he(e.onPointerDown,F=>{F.button===0&&(b.current={x:F.clientX,y:F.clientY})}),onPointerMove:he(e.onPointerMove,F=>{if(!b.current)return;const K=F.clientX-b.current.x,U=F.clientY-b.current.y,V=!!S.current,N=["left","right"].includes(g.swipeDirection),O=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,_=N?O(0,K):0,C=N?0:O(0,U),M=F.pointerType==="touch"?10:2,B={x:_,y:C},z={originalEvent:F,delta:B};V?(S.current=B,Vc(RA,f,z,{discrete:!1})):rx(B,g.swipeDirection,M)?(S.current=B,Vc(NA,d,z,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(K)>M||Math.abs(U)>M)&&(b.current=null)}),onPointerUp:he(e.onPointerUp,F=>{const K=S.current,U=F.target;if(U.hasPointerCapture(F.pointerId)&&U.releasePointerCapture(F.pointerId),S.current=null,b.current=null,K){const V=F.currentTarget,N={originalEvent:F,delta:K};rx(K,g.swipeDirection,g.swipeThreshold)?Vc(OA,p,N,{discrete:!0}):Vc(AA,h,N,{discrete:!0}),V.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),LA=e=>{const{__scopeToast:t,children:n,...r}=e,s=Zd(cc,t),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return BA(()=>o(!0)),m.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(cy,{asChild:!0,children:c.jsx(Jd,{...r,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",n]})})})},$A="ToastTitle",Bk=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(me.div,{...r,ref:t})});Bk.displayName=$A;var FA="ToastDescription",Uk=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(me.div,{...r,ref:t})});Uk.displayName=FA;var Vk="ToastAction",zk=m.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsx(Hk,{altText:n,asChild:!0,children:c.jsx(fy,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Vk}\`. Expected non-empty \`string\`.`),null)});zk.displayName=Vk;var Wk="ToastClose",fy=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=IA(Wk,n);return c.jsx(Hk,{asChild:!0,children:c.jsx(me.button,{type:"button",...r,ref:t,onClick:he(e.onClick,s.onClose)})})});fy.displayName=Wk;var Hk=m.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return c.jsx(me.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function qk(e){const t=[];
vendor: 8,128 bytes, lines 40-125
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),UA(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(...qk(r))}}),t}function Vc(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?Nk(s,i):s.dispatchEvent(i)}var rx=(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 BA(e=()=>{}){const t=gt(e);gn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function UA(e){return e.nodeType===e.ELEMENT_NODE}function VA(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 dh(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var zA=Ik,Kk=Lk,Gk=Fk,Yk=Bk,Qk=Uk,Xk=zk,Jk=fy;function Zk(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=Zk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function e_(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Zk(e))&&(r&&(r+=" "),r+=t);return r}const sx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ix=e_,ef=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ix(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],f=i==null?void 0:i[u];if(d===null)return null;const h=sx(d)||sx(f);return s[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(w=>{let[g,x]=w;return Array.isArray(x)?x.includes({...i,...a}[g]):{...i,...a}[g]===x})?[...u,f,h]:u},[]);return ix(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const WA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),t_=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var HA={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"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const qA=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>m.createElement("svg",{ref:l,...HA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:t_("lucide",s),...a},[...o.map(([u,d])=>m.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const ce=(e,t)=>{const n=m.forwardRef(({className:r,...s},i)=>m.createElement(qA,{ref:i,iconNode:t,className:t_(`lucide-${WA(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const KA=ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const GA=ce("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const YA=ce("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"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const hy=ce("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"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const QA=ce("CalendarCheck",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const n_=ce("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const ud=ce("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const XA=ce("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const Zi=ce("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const JA=ce("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const il=ce("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const r_=ce("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const ZA=ce("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
125y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const fh=ce("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const eO=ce("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const ox=ce("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const s_=ce("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const tO=ce("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const tf=ce("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const Fs=ce("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const py=ce("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"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const nO=ce("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const No=ce("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree.
180 */const rO=ce("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const sO=ce("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const gr=ce("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const iO=ce("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const i_=ce("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const my=ce("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const oO=ce("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const aO=ce("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const o_=ce("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]);/** 221 * @license lucide-react v0.462.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const lO=ce("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** 226 * @license lucide-react v0.462.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const Ii=ce("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/** 231 * @license lucide-react v0.462.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const cO=ce("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 236 * @license lucide-react v0.462.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const a_=ce("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 241 * @license lucide-react v0.462.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const Zp=ce("Radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}
245],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]);/** 246 * @license lucide-react v0.462.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const em=ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 251 * @license lucide-react v0.462.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const uO=ce("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"}]]);/** 256 * @license lucide-react v0.462.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const ax=ce("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/** 261 * @license lucide-react v0.462.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const dO=ce("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 266 * @license lucide-react v0.462.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const l_=ce("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** 271 * @license lucide-react v0.462.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const fO=ce("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"}]]);/** 276 * @license lucide-react v0.462.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const gy=ce("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 281 * @license lucide-react v0.462.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const c_=ce("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 286 * @license lucide-react v0.462.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const ra=ce("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"}]]);/** 291 * @license lucide-react v0.462.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const hO=ce("UserCheck",[["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"}
vendor: 9,384 bytes, lines 295-320
295],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** 296 * @license lucide-react v0.462.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const nf=ce("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"}]]);/** 301 * @license lucide-react v0.462.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const u_=ce("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"}]]);/** 306 * @license lucide-react v0.462.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const d_=ce("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/** 311 * @license lucide-react v0.462.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const Ro=ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 316 * @license lucide-react v0.462.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const pO=ce("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"}]]),yy="-",mO=e=>{const t=yO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(yy);return a[0]===""&&a.length!==1&&a.shift(),f_(a,t)||gO(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},f_=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?f_(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(yy);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},lx=/^\[(.+)\]$/,gO=e=>{if(lx.test(e)){const t=lx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},yO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return xO(Object.entries(e.classGroups),n).forEach(([i,o])=>{tm(o,r,i,t)}),r},tm=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:cx(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(vO(s)){tm(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{tm(o,cx(t,i),n,r)})})},cx=(e,t)=>{let n=e;return t.split(yy).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},vO=e=>e.isThemeGetter,xO=(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,wO=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)}}},h_="!",bO=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,d=0,f;for(let x=0;x<a.length;x++){let y=a[x];if(u===0){if(y===s&&(r||a.slice(x,x+i)===t)){l.push(a.slice(d,x)),d=x+i;continue}if(y==="/"){f=x;continue}}y==="["?u++:y==="]"&&u--}const h=l.length===0?a:a.substring(d),p=h.startsWith(h_),w=p?h.substring(1):h,g=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:o}):o},SO=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},kO=e=>({cache:wO(e.cacheSize),parseClassName:bO(e),...mO(e)}),_O=/\s+/,CO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(_O);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let w=!!p,g=r(w?h.substring(0,p):h);if(!g){if(!w){a=u+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=u+(a.length>0?" "+a:a);continue}w=!1}const x=SO(d).join(":"),y=f?x+h_:x,v=y+g;if(i.includes(v))continue;i.push(v);const b=s(g,w);for(let S=0;S<b.length;++S){const k=b[S];i.push(y+k)}a=u+(a.length>0?" "+a:a)}return a};function EO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=p_(t))&&(r&&(r+=" "),r+=n);return r}const p_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=p_(e[r]))&&(n&&(n+=" "),n+=t);return n};function TO(e,...t){let n,r,s,i=o;function o(l){const u=t.reduce((d,f)=>f(d),e());return n=kO(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=CO(l,n);return s(l,d),d}return function(){return i(EO.apply(null,arguments))}}const Fe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},m_=/^\[(?:([a-z-]+):)?(.+)\]$/i,jO=/^\d+\/\d+$/,PO=new Set(["px","full","screen"]),NO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RO=/\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$/,AO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,OO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,DO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cr=e=>Ao(e)||PO.has(e)||jO.test(e),ts=e=>ha(e,"length",VO),Ao=e=>!!e&&!Number.isNaN(Number(e)),hh=e=>ha(e,"number",Ao),Ma=e=>!!e&&Number.isInteger(Number(e)),IO=e=>e.endsWith("%")&&Ao(e.slice(0,-1)),ye=e=>m_.test(e),ns=e=>NO.test(e),MO=new Set(["length","size","percentage"]),LO=e=>ha(e,MO,g_),$O=e=>ha(e,"position",g_),FO=new Set(["image","url"]),BO=e=>ha(e,FO,WO),UO=e=>ha(e,"",zO),La=()=>!0,ha=(e,t,n)=>{const r=m_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},VO=e=>RO.test(e)&&!AO.test(e),g_=()=>!1,zO=e=>OO.test(e),WO=e=>DO.test(e),HO=()=>{const e=Fe("colors"),t=Fe("spacing"),n=Fe("blur"),r=Fe("brightness"),s=Fe("borderColor"),i=Fe("borderRadius"),o=Fe("borderSpacing"),a=Fe("borderWidth"),l=Fe("contrast"),u=Fe("grayscale"),d=Fe("hueRotate"),f=Fe("invert"),h=Fe("gap"),p=Fe("gradientColorStops"),w=Fe("gradientColorStopPositions"),g=Fe("inset"),x=Fe("margin"),y=Fe("opacity"),v=Fe("padding"),b=Fe("saturate"),S=Fe("scale"),k=Fe("sepia"),T=Fe("skew"),E=Fe("space"),j=Fe("translate"),R=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",ye,t],$=()=>[ye,t],W=()=>["",Cr,ts],F=()=>["auto",Ao,ye],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",ye],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[Ao,ye];return{cacheSize:500,separator:":",theme:{colors:[La],spacing:[Cr,ts],blur:["none","",ns,ye],brightness:C(),borderColor:[e],borderRadius:["none","","full",ns,ye],borderSpacing:$(),borderWidth:W(),contrast:C(),grayscale:O(),hueRotate:C(),invert:O(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[IO,ts],inset:D(),margin:D(),opacity:C(),padding:$(),saturate:C(),scale:C(),sepia:O(),skew:C(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[ns]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:[...K(),ye]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],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]}
vendor: 4,767 bytes, line 320
320],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ma,ye]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ye]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Ma,ye]}],"grid-cols":[{"grid-cols":[La]}],"col-start-end":[{col:["auto",{span:["full",Ma,ye]},ye]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[La]}],"row-start-end":[{row:["auto",{span:[Ma,ye]},ye]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[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",ye,t]}],"min-w":[{"min-w":[ye,t,"min","max","fit"]}],"max-w":[{"max-w":[ye,t,"none","full","min","max","fit","prose",{screen:[ns]},ns]}],h:[{h:[ye,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ns,ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",hh]}],"font-family":[{font:[La]}],"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",ye]}],"line-clamp":[{"line-clamp":["none",Ao,hh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Cr,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Cr,ts]}],"underline-offset":[{"underline-offset":["auto",Cr,ye]}],"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:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],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",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),$O]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",LO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},BO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}
320],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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":[y]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}
vendor: 4,467 bytes, line 320
320],"divide-style":[{divide:U()}],"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:["",...U()]}],"outline-offset":[{"outline-offset":[Cr,ye]}],"outline-w":[{outline:[Cr,ts]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Cr,ts]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ns,UO]}],"shadow-color":[{shadow:[La]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ns,ye]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"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",ye]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Ma,ye]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"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",ye]}],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",ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Cr,ts,hh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
320none"]}]},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"]}}},qO=TO(HO);function oe(...e){return qO(e_(e))}const KO=zA,y_=m.forwardRef(({className:e,...t},n)=>c.jsx(Kk,{ref:n,className:oe("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}));y_.displayName=Kk.displayName;const GO=ef("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"}}),v_=m.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(Gk,{ref:r,className:oe(GO({variant:t}),e),...n}));v_.displayName=Gk.displayName;const YO=m.forwardRef(({className:e,...t},n)=>c.jsx(Xk,{ref:n,className:oe("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}));YO.displayName=Xk.displayName;const x_=m.forwardRef(({className:e,...t},n)=>c.jsx(Jk,{ref:n,className:oe("absolute right-2 top-2 rounded-md p-1 text-foreground
320/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:c.jsx(Ro,{className:"h-4 w-4"})}));x_.displayName=Jk.displayName;const w_=m.forwardRef(({className:e,...t},n)=>c.jsx(Yk,{ref:n,className:oe("text-sm font-semibold",e),...t}));w_.displayName=Yk.displayName;const b_=m.forwardRef(({className:e,...t},n)=>c.jsx(Qk,{ref:n,className:oe("text-sm opacity-90",e),...t}));b_.displayName=Qk.displayName;function QO(){const{toasts:e}=J2();return c.jsxs(KO,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return c.jsxs(v_,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[n&&c.jsx(w_,{children:n}),r&&c.jsx(b_,{children:r})]}),s,c.jsx(x_,{})]},t)}),c.jsx(y_,{})]})}var ux=["light","dark"],XO="(prefers-color-scheme: dark)",JO=m.createContext(void 0),ZO={setTheme:e=>{},themes:[]},eD=()=>{var e;return(e=m.useContext(JO))!=null?e:ZO};m.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=s?ux.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(w,g=!1,x=!0)=>{let y=o?o[w]:w,v=g?w+"|| ''":`'${y}'`,b="";return s&&x&&!g&&ux.includes(w)&&(b+=`d.style.colorScheme = '${w}';`),n==="class"?g||y?b+=`c.add(${v})`:b+="null":y&&(b+=`d[s](n,${v})`),b},p=e?`!function(){${d}${h(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${XO}',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)}}${u?"":"else{"+h(i,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${f}}catch(t){}}();`;return m.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var tD=e=>{switch(e){case"success":return sD;case"info":return oD;case"warning":return iD;case"error":return aD;default:return null}},nD=Array(12).fill(0),rD=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},nD.map((n,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sD=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),iD=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.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"})),oD=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),aD=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.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"})),lD=I.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"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),cD=()=>
320{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},nm=1,uD=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:nm++,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)=>
320this.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],I.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(fD(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));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)||nm++;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}},Jt=new uD,dD=(e,t)=>{let n=(t==null?void 0:t.id)||nm++;return Jt.addToast({title:e,...t,id:n}),n},fD=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",hD=dD,pD=()=>Jt.toasts,mD=()=>Jt.getActiveToasts(),$t=Object.assign(hD,{success:Jt.success,info:Jt.info,warning:Jt.warning,error:Jt.error,custom:Jt.custom,message:Jt.message,promise:Jt.promise,dismiss:Jt.dismiss,loading:Jt.loading},{getHistory:pD,getToasts:mD});function gD(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))}gD(`: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;
320left: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}
320: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%);
320--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%)} 321`);function zc(e){return e.label!==void 0}
321var yD=3,vD="32px",xD="16px",dx=4e3,wD=356,bD=14,SD=20,kD=200;function Fn(...e){return e.filter(Boolean).join(" ")}function _D(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var CD=e=>{var t,n,r,s,i,o,a,l,u,d,f;let{invert:h,toast:p,unstyled:w,interacting:g,setHeights:x,visibleToasts:y,heights:v,index:b,toasts:S,expanded:k,removeToast:T,defaultRichColors:E,closeButton:j,style:R,cancelButtonStyle:A,actionButtonStyle:D,className:$="",descriptionClassName:W="",duration:F,position:K,gap:U,loadingIcon:V,expandByDefault:N,classNames:O,icons:_,closeButtonAriaLabel:C="Close toast",pauseWhenPageIsHidden:M}=e,[B,z]=I.useState(null),[Q,Z]=I.useState(null),[L,G]=I.useState(!1),[Y,pe]=I.useState(!1),[ae,ge]=I.useState(!1),[H,re]=I.useState(!1),[be,we]=I.useState(!1),[De,je]=I.useState(0),[Ye,st]=I.useState(0),wn=I.useRef(p.duration||F||dx),Rt=I.useRef(null),In=I.useRef(null),Xs=b===0,Ea=b+1<=y,wt=p.type,sn=p.dismissible!==!1,Ta=p.className||"",Js=p.descriptionClassName||"",_r=I.useMemo(()=>v.findIndex(se=>se.toastId===p.id)||0,[v,p.id]),Mn=I.useMemo(()=>{var se;return(se=p.closeButton)!=null?se:j},[p.closeButton,j]),Zs=I.useMemo(()=>p.duration||F||dx,[p.duration,F]),ei=I.useRef(0),Xr=I.useRef(0),Sc=I.useRef(0),Jr=I.useRef(null),[If,fe]=K.split("-"),Te=I.useMemo(()=>v.reduce((se,ve,Ee)=>Ee>=_r?se:se+ve.height,0),[v,_r]),Ae=cD(),Ie=p.invert||h,Ce=wt==="loading";Xr.current=I.useMemo(()=>_r*U+Te,[_r,Te]),I.useEffect(()=>{wn.current=Zs},[Zs]),I.useEffect(()=>{G(!0)},[]),I.useEffect(()=>{let se=In.current;if(se){let ve=se.getBoundingClientRect().height;return st(ve),x(Ee=>[{toastId:p.id,height:ve,position:p.position},...Ee]),()=>x(Ee=>Ee.filter(it=>it.toastId!==p.id))}},[x,p.id]),I.useLayoutEffect(()=>{if(!L)return;let se=In.current,ve=se.style.height;se.style.height="auto";let Ee=se.getBoundingClientRect().height;se.style.height=ve,st(Ee),x(it=>it.find(Qe=>Qe.toastId===p.id)?it.map(Qe=>Qe.toastId===p.id?{...Qe,height:Ee}:Qe):[{toastId:p.id,height:Ee,position:p.position},...it])},[L,p.title,p.description,x,p.id]);let et=I.useCallback(()=>{pe(!0),je(Xr.current),x(se=>se.filter(ve=>ve.toastId!==p.id)),setTimeout(()=>{T(p)},kD)},[p,T,x,Xr]);I.useEffect(()=>{if(p.promise&&wt==="loading"||p.duration===1/0||p.type==="loading")return;let se;return k||g||M&&Ae?(()=>{if(Sc.current<ei.current){let ve=new Date().getTime()-ei.current;wn.current=wn.current-ve}Sc.current=new Date().getTime()})():wn.current!==1/0&&(ei.current=new Date().getTime(),se=setTimeout(()=>{var ve;(ve=p.onAutoClose)==null||ve.call(p,p),et()},wn.current)),()=>clearTimeout(se)},[k,g,p,wt,M,Ae,et]),I.useEffect(()=>{p.delete&&et()},[et,p.delete]);function bt(){var se,ve,Ee;return _!=null&&_.loading?I.createElement("div",{className:Fn(O==null?void 0:O.loader,(se=p==null?void 0:p.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":wt==="loading"},_.loading):V?I.createElement("div",{className:Fn(O==null?void 0:O.loader,(ve=p==null?void 0:p.classNames)==null?void 0:ve.loader,"sonner-loader"),"data-visible":wt==="loading"},V):I.createElement(rD,{className:Fn(O==null?void 0:O.loader,(Ee=p==null?void 0:p.classNames)==null?void 0:Ee.loader),visible:wt==="loading"})}return I.createElement("li",{tabIndex:0,ref:In,className:Fn($,Ta,O==null?void 0:O.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[wt],(n=p==null?void 0:p.classNames)==null?void 0:n[wt]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":L,"data-promise":!!p.promise,"data-swiped":be,"data-removed":Y,"data-visible":Ea,"data-y-position":If,"data-x-position":fe,"data-index":b,"data-front":Xs,"data-swiping":ae,"data-dismissible":sn,"data-type":wt,"data-invert":Ie,"data-swipe-out":H,"data-swipe-direction":Q,"data-expanded":!!(k||N&&L),style:{"--index":b,"--toasts-before":b,"--z-index":S.length-b,"--offset":`${Y?De:Xr.current}px`,"--initial-height":N?"auto":`${Ye}px`,...R,...p.style},onDragEnd:()=>{ge(!1),z(null),Jr.current=null},onPointerDown:se=>{Ce||!sn||(Rt.current=new Date,je(Xr.current),se.target.setPointerCapture(se.pointerId),se.target.tagName!=="BUTTON"&&(ge(!0),Jr.current={x:se.clientX,y:se.clientY}))},onPointerUp:()=>{var se,ve,Ee,it;if(H||!sn)return;Jr.current=null;let Qe=Number(((se=In.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),on=Number(((ve=In.current)==null?void 0:ve.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ir=new Date().getTime()-((Ee=Rt.current)==null?void 0:Ee.getTime()),Ln=B==="x"?Qe:on,Zr=Math.abs(Ln)/ir;if(Math.abs(Ln)>=SD||Zr>.11){je(Xr.current),(it=p.onDismiss)==null||it.call(p,p),Z(B==="x"?Qe>0?"right":"left":on>0?"down":"up"),et(),re(!0),we(!1);return}ge(!1),z(null)},onPointerMove:se=>{var ve,Ee,it,Qe;if(!Jr.current||!sn||((ve=window.getSelection())==null?void 0:ve.toString().length)>0)return;let on=se.clientY-Jr.current.y,ir=se.clientX-Jr.current.x,Ln=(Ee=e.swipeDirections)!=null?Ee:_D(K);!B&&(Math.abs(ir)>1||Math.abs(on)>1)&&z(Math.abs(ir)>Math.abs(on)?"x":"y");let Zr={x:0,y:0};B==="y"?(Ln.includes("top")||Ln.includes("bottom"))&&(Ln.includes("top")&&on<0||Ln.includes("bottom")&&on>0)&&(Zr.y=on):B==="x"&&(Ln.includes("left")||Ln.includes("right"))&&(Ln.includes("left")&&ir<0||Ln.includes("right")&&ir>0)&&(Zr.x=ir),(Math.abs(Zr.x)>0||Math.abs(Zr.y)>0)&&we(!0),(it=In.current)==null||it.style.setProperty("--swipe-amount-x",`${Zr.x}px`),(Qe=In.current)==null||Qe.style.setProperty("--swipe-amount-y",`${Zr.y}px`)}},Mn&&!p.jsx?I.createElement("button",{"aria-label":C,"data-disabled":Ce,"data-close-button":!0,onClick:Ce||!sn?()=>{}:()=>{var se;et(),(se=p.onDismiss)==null||se.call(p,p)},className:Fn(O==null?void 0:O.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=_==null?void 0:_.close)!=null?i:lD):null,p.jsx||m.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:I.createElement(I.Fragment,null,wt||p.icon||p.promise?I.createElement("div",{"data-icon":"",className:Fn(O==null?void 0:O.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)}
vendor: 5,570 bytes, line 321
321,p.promise||p.type==="loading"&&!p.icon?p.icon||bt():null,p.type!=="loading"?p.icon||(_==null?void 0:_[wt])||tD(wt):null):null,I.createElement("div",{"data-content":"",className:Fn(O==null?void 0:O.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:Fn(O==null?void 0:O.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?I.createElement("div",{"data-description":"",className:Fn(W,Js,O==null?void 0:O.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),m.isValidElement(p.cancel)?p.cancel:p.cancel&&zc(p.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||A,onClick:se=>{var ve,Ee;zc(p.cancel)&&sn&&((Ee=(ve=p.cancel).onClick)==null||Ee.call(ve,se),et())},className:Fn(O==null?void 0:O.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,m.isValidElement(p.action)?p.action:p.action&&zc(p.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||D,onClick:se=>{var ve,Ee;zc(p.action)&&((Ee=(ve=p.action).onClick)==null||Ee.call(ve,se),!se.defaultPrevented&&et())},className:Fn(O==null?void 0:O.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function fx(){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 ED(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?xD:vD;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var TD=m.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:d="light",richColors:f,duration:h,style:p,visibleToasts:w=yD,toastOptions:g,dir:x=fx(),gap:y=bD,loadingIcon:v,icons:b,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:k}=e,[T,E]=I.useState([]),j=I.useMemo(()=>Array.from(new Set([r].concat(T.filter(M=>M.position).map(M=>M.position)))),[T,r]),[R,A]=I.useState([]),[D,$]=I.useState(!1),[W,F]=I.useState(!1),[K,U]=I.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=I.useRef(null),N=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=I.useRef(null),_=I.useRef(!1),C=I.useCallback(M=>{E(B=>{var z;return(z=B.find(Q=>Q.id===M.id))!=null&&z.delete||Jt.dismiss(M.id),B.filter(({id:Q})=>Q!==M.id)})},[]);return I.useEffect(()=>Jt.subscribe(M=>{if(M.dismiss){E(B=>B.map(z=>z.id===M.id?{...z,delete:!0}:z));return}setTimeout(()=>{Ck.flushSync(()=>{E(B=>{let z=B.findIndex(Q=>Q.id===M.id);return z!==-1?[...B.slice(0,z),{...B[z],...M},...B.slice(z+1)]:[M,...B]})})})}),[]),I.useEffect(()=>{if(d!=="system"){U(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:B})=>{U(B?"dark":"light")})}catch{M.addListener(({matches:z})=>{try{U(z?"dark":"light")}catch(Q){console.error(Q)}})}},[d]),I.useEffect(()=>{T.length<=1&&$(!1)},[T]),I.useEffect(()=>{let M=B=>{var z,Q;s.every(Z=>B[Z]||B.code===Z)&&($(!0),(z=V.current)==null||z.focus()),B.code==="Escape"&&(document.activeElement===V.current||(Q=V.current)!=null&&Q.contains(document.activeElement))&&$(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[s]),I.useEffect(()=>{if(V.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,_.current=!1)}},[V.current]),I.createElement("section",{ref:t,"aria-label":`${S} ${N}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((M,B)=>{var z;let[Q,Z]=M.split("-");return T.length?I.createElement("ol",{key:M,dir:x==="auto"?fx():x,tabIndex:-1,ref:V,className:a,"data-sonner-toaster":!0,"data-theme":K,"data-y-position":Q,"data-lifted":D&&T.length>1&&!i,"data-x-position":Z,style:{"--front-toast-height":`${((z=R[0])==null?void 0:z.height)||0}px`,"--width":`${wD}px`,"--gap":`${y}px`,...p,...ED(l,u)},onBlur:L=>{_.current&&!L.currentTarget.contains(L.relatedTarget)&&(_.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:L=>{L.target instanceof HTMLElement&&L.target.dataset.dismissible==="false"||_.current||(_.current=!0,O.current=L.relatedTarget)},onMouseEnter:()=>$(!0),onMouseMove:()=>$(!0),onMouseLeave:()=>{W||$(!1)},onDragEnd:()=>$(!1),onPointerDown:L=>{L.target instanceof HTMLElement&&L.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},T.filter(L=>!L.position&&B===0||L.position===M).map((L,G)=>{var Y,pe;return I.createElement(CD,{key:L.id,icons:b,index:G,toast:L,defaultRichColors:f,duration:(Y=g==null?void 0:g.duration)!=null?Y:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:w,closeButton:(pe=g==null?void 0:g.closeButton)!=null?pe
321:o,interacting:W,position:M,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:C,toasts:T.filter(ae=>ae.position==L.position),heights:R.filter(ae=>ae.position==L.position),setHeights:A,expandByDefault:i,gap:y,loadingIcon:v,expanded:D,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const jD=({...e})=>{const{theme:t="system"}=eD();return c.jsx(TD,{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 PD=yg[" useId ".trim().toString()]||(()=>{}),ND=0;function ol(e){const[t,n]=m.useState(PD());return gn(()=>{e||n(r=>r??String(ND++))},[e]),e||(t?`radix-${t}`:"")}const RD=["top","right","bottom","left"],Bs=Math.min,un=Math.max,dd=Math.round,Wc=Math.floor,Us=e=>({x:e,y:e}),AD={left:"right",right:"left",bottom:"top",top:"bottom"},OD={start:"end",end:"start"};function rm(e,t,n){return un(e,Bs(t,n))}function Vr(e,t){return typeof e=="function"?e(t):e}function zr(e){return e.split("-")[0]}function pa(e){return e.split("-")[1]}function vy(e){return e==="x"?"y":"x"}function xy(e){return e==="y"?"height":"width"}function Vs(e){return["top","bottom"].includes(zr(e))?"y":"x"}function wy(e){return vy(Vs(e))}
vendor: 4,984 bytes, line 321
321function DD(e,t,n){n===void 0&&(n=!1);const r=pa(e),s=wy(e),i=xy(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=fd(o)),[o,fd(o)]}function ID(e){const t=fd(e);return[sm(e),t,sm(t)]}function sm(e){return e.replace(/start|end/g,t=>OD[t])}function MD(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function LD(e,t,n,r){const s=pa(e);let i=MD(zr(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(sm)))),i}function fd(e){return e.replace(/left|right|bottom|top/g,t=>AD[t])}function $D(e){return{top:0,right:0,bottom:0,left:0,...e}}function S_(e){return typeof e!="number"?$D(e):{top:e,right:e,bottom:e,left:e}}function hd(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 hx(e,t,n){let{reference:r,floating:s}=e;const i=Vs(t),o=wy(t),a=xy(o),l=zr(t),u=i==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-s.width,y:f};break;default:p={x:r.x,y:r.y}}switch(pa(t)){case"start":p[o]-=h*(n&&u?-1:1);break;case"end":p[o]+=h*(n&&u?-1:1);break}return p}const FD=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 u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=hx(u,r,l),h=r,p={},w=0;for(let g=0;g<a.length;g++){const{name:x,fn:y}=a[g],{x:v,y:b,data:S,reset:k}=await y({x:d,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=v??d,f=b??f,p={...p,[x]:{...p[x],...S}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:d,y:f}=hx(u,h,l)),g=-1)}return{x:d,y:f,placement:h,strategy:s,middlewareData:p}};async function Rl(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Vr(t,e),w=S_(p),x=a[h?f==="floating"?"reference":"floating":f],y=hd(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:u,rootBoundary:d,strategy:l})),v=f==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},k=hd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-k.top+w.top)/S.y,bottom:(k.bottom-y.bottom+w.bottom)/S.y,left:(y.left-k.left+w.left)/S.x,right:(k.right-y.right+w.right)/S.x}}const BD=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:u,padding:d=0}=Vr(e,t)||{};if(u==null)return{};const f=S_(d),h={x:n,y:r},p=wy(s),w=xy(p),g=await o.getDimensions(u),x=p==="y",y=x?"top":"left",v=x?"bottom":"right",b=x?"clientHeight":"clientWidth",S=i.reference[w]+i.reference[p]-h[p]-i.floating[w],k=h[p]-i.reference[p],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=T?T[b]:0;(!E||!await(o.isElement==null?void 0:o.isElement(T)))&&(E=a.floating[b]||i.floating[w]);const j=S/2-k/2,R=E/2-g[w]/2-1,A=Bs(f[y],R),D=Bs(f[v],R),$=A,W=E-g[w]-D,F=E/2-g[w]/2+j,K=rm($,F,W),U=!l.arrow&&pa(s)!=null&&F!==K&&i.reference[w]/2-(F<$?A:D)-g[w]/2<0,V=U?F<$?F-$:F-W:0;return{[p]:h[p]+V,data:{[p]:K,centerOffset:F-K-V,...U&&{alignmentOffset:V}},reset:U}}}),UD=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:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:g=!0,...x}=Vr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=zr(s),v=Vs(a),b=zr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),k=h||(b||!g?[fd(a)]:ID(a)),T=w!=="none";!h&&T&&k.push(...LD(a,g,w,S));const E=[a,...k],j=await Rl(t,x),R=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&R.push(j[y]),f){const F=DD(s,o,S);R.push(j[F[0]],j[F[1]])}if(A=[...A,{placement:s,overflows:R}],!R.every(F=>F<=0)){var D,$;const F=(((D=i.flip)==null?void 0:D.index)||0)+1,K=E[F];if(K)return{data:{index:F,overflows:A},reset:{placement:K}
vendor: 4,781 bytes, line 321
321};let U=($=A.filter(V=>V.overflows[0]<=0).sort((V,N)=>V.overflows[1]-N.overflows[1])[0])==null?void 0:$.placement;if(!U)switch(p){case"bestFit":{var W;const V=(W=A.filter(N=>{if(T){const O=Vs(N.placement);return O===v||O==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(O=>O>0).reduce((O,_)=>O+_,0)]).sort((N,O)=>N[1]-O[1])[0])==null?void 0:W[0];V&&(U=V);break}case"initialPlacement":U=a;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function px(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mx(e){return RD.some(t=>e[t]>=0)}const VD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Vr(e,t);switch(r){case"referenceHidden":{const i=await Rl(t,{...s,elementContext:"reference"}),o=px(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:mx(o)}}}case"escaped":{const i=await Rl(t,{...s,altBoundary:!0}),o=px(i,n.floating);return{data:{escapedOffsets:o,escaped:mx(o)}}}default:return{}}}}};async function zD(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=zr(n),a=pa(n),l=Vs(n)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,f=Vr(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(p=a==="end"?w*-1:w),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const WD=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 zD(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}}}}},HD=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:y,y:v}=x;return{x:y,y:v}}},...l}=Vr(e,t),u={x:n,y:r},d=await Rl(t,l),f=Vs(zr(s)),h=vy(f);let p=u[h],w=u[f];if(i){const x=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=p+d[x],b=p-d[y];p=rm(v,p,b)}if(o){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=w+d[x],b=w-d[y];w=rm(v,w,b)}const g=a.fn({...t,[h]:p,[f]:w});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:i,[f]:o}}}}}},qD=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:u=!0}=Vr(e,t),d={x:n,y:r},f=Vs(s),h=vy(f);let p=d[h],w=d[f];const g=Vr(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const b=h==="y"?"height":"width",S=i.reference[h]-i.floating[b]+x.mainAxis,k=i.reference[h]+i.reference[b]-x.mainAxis;p<S?p=S:p>k&&(p=k)}if(u){var y,v;const b=h==="y"?"width":"height",S=["top","left"].includes(zr(s)),k=i.reference[f]-i.floating[b]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:x.crossAxis),T=i.reference[f]+i.reference[b]+(S?0:((v=o.offset)==null?void 0:v[f])||0)-(S?x.crossAxis:0);w<k?w=k:w>T&&(w=T)}return{[h]:p,[f]:w}}}},KD=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=()=>{},...u}=Vr(e,t),d=await Rl(t,u),f=zr(s),h=pa(s),p=Vs(s)==="y",{width:w,height:g}=i.floating;let x,y;f==="top"||f==="bottom"?(x=f,y=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,x=h==="end"?"top":"bottom");const v=g-d.top-d.bottom,b=w-d.left-d.right,S=Bs(g-d[x],v),k=Bs(w-d[y],b),T=!t.middlewareData.shift;let E=S,j=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=v),T&&!h){const A=un(d.left,0),D=un(d.right,0),$=un(d.top,0),W=un(d.bottom,0);p?j=w-2*(A!==0||D!==0?A+D:un(d.left,d.right)):E=g-2*($!==0||W!==0?$+W:un(d.top,d.bottom))}await l({...t,availableWidth:j,availableHeight:E});const R=await o.getDimensions(a.floating);return w!==R.width||g!==R.height?{reset:{rects:!0}}:{}}}};function rf(){return typeof window<"u"}function ma(e){return k_(e)?(e.nodeName||"").toLowerCase():"#document"}function pn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Sr(e){var t;return(t=(k_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function k_(e){return rf()?e instanceof Node||e instanceof pn(e).Node:!1}function er(e){return rf()?e instanceof Element||e instanceof pn(e).Element:!1}function wr(e){return rf()?e instanceof HTMLElement||e instanceof pn(e).HTMLElement:!1}function gx(e){return!rf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pn(e).ShadowRoot}function uc(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=tr(e);
vendor: 5,090 bytes, line 321
321return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function GD(e){return["table","td","th"].includes(ma(e))}function sf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function by(e){const t=Sy(),n=er(e)?tr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function YD(e){let t=zs(e);for(;wr(t)&&!sa(t);){if(by(t))return t;if(sf(t))return null;t=zs(t)}return null}function Sy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sa(e){return["html","body","#document"].includes(ma(e))}function tr(e){return pn(e).getComputedStyle(e)}function of(e){return er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zs(e){if(ma(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gx(e)&&e.host||Sr(e);return gx(t)?t.host:t}function __(e){const t=zs(e);return sa(t)?e.ownerDocument?e.ownerDocument.body:e.body:wr(t)&&uc(t)?t:__(t)}function Al(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=__(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=pn(s);if(i){const a=im(o);return t.concat(o,o.visualViewport||[],uc(s)?s:[],a&&n?Al(a):[])}return t.concat(s,Al(s,[],n))}function im(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function C_(e){const t=tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=wr(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=dd(n)!==i||dd(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function ky(e){return er(e)?e:e.contextElement}function Oo(e){const t=ky(e);if(!wr(t))return Us(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=C_(t);let o=(i?dd(n.width):n.width)/r,a=(i?dd(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const QD=Us(0);function E_(e){const t=pn(e);return!Sy()||!t.visualViewport?QD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function XD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pn(e)?!1:t}function Mi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=ky(e);let o=Us(1);t&&(r?er(r)&&(o=Oo(r)):o=Oo(e));const a=XD(i,n,r)?E_(i):Us(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,f=s.height/o.y;if(i){const h=pn(i),p=r&&er(r)?pn(r):r;let w=h,g=im(w);for(;g&&r&&p!==w;){const x=Oo(g),y=g.getBoundingClientRect(),v=tr(g),b=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*x.x,S=y.top+(g.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,f*=x.y,l+=b,u+=S,w=pn(g),g=im(w)}}return hd({width:d,height:f,x:l,y:u})}function JD(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=Sr(r),a=t?sf(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Us(1);const d=Us(0),f=wr(r);if((f||!f&&!i)&&((ma(r)!=="body"||uc(o))&&(l=of(r)),wr(r))){const h=Mi(r);u=Oo(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function ZD(e){return Array.from(e.getClientRects())}function om(e,t){const n=of(e).scrollLeft;return t?t.left+n:Mi(Sr(e)).left+n}function eI(e){const t=Sr(e),n=of(e),r=e.ownerDocument.body,s=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+om(e);const a=-n.scrollTop;return tr(r).direction==="rtl"&&(o+=un(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function tI(e,t){const n=pn(e),r=Sr(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Sy();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function nI(e,t){const n=Mi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=wr(e)?Oo(e):Us(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function yx(e,t,n){let r;if(t==="viewport")r=tI(e,n);else if(t==="document")r=eI(Sr(e));else if(er(t))r=nI(t,n);else{const s=E_(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return hd(r)}function T_(e,t){const n=zs(e);return n===t||!er(n)||sa(n)?!1:tr(n).position==="fixed"||T_(n,t)}function rI(e,t){const n=t.get(e);if(n)return n;let r=Al(e,[],!1).filter(a=>er(a)&&ma(a)!=="body"),s=null;const i=tr(e).position==="fixed";let o=i?zs(e):e;for(;er(o)&&!sa(o);){const a=tr(o),l=by(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||uc(o)&&!l&&T_(e,o))?r=r.filter(d=>d!==o):s=a,o=zs(o)}return t.set(e,r),r}function sI(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?sf(t)?[]:rI(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,d)=>{const f=yx(t,d,s);
vendor: 9,836 bytes, line 321
321return u.top=un(f.top,u.top),u.right=Bs(f.right,u.right),u.bottom=Bs(f.bottom,u.bottom),u.left=un(f.left,u.left),u},yx(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function iI(e){const{width:t,height:n}=C_(e);return{width:t,height:n}}function oI(e,t,n){const r=wr(t),s=Sr(t),i=n==="fixed",o=Mi(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Us(0);if(r||!r&&!i)if((ma(t)!=="body"||uc(s))&&(a=of(t)),r){const p=Mi(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else s&&(l.x=om(s));let u=0,d=0;if(s&&!r&&!i){const p=s.getBoundingClientRect();d=p.top+a.scrollTop,u=p.left+a.scrollLeft-om(s,p)}const f=o.left+a.scrollLeft-l.x-u,h=o.top+a.scrollTop-l.y-d;return{x:f,y:h,width:o.width,height:o.height}}function ph(e){return tr(e).position==="static"}function vx(e,t){if(!wr(e)||tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Sr(e)===n&&(n=n.ownerDocument.body),n}function j_(e,t){const n=pn(e);if(sf(e))return n;if(!wr(e)){let s=zs(e);for(;s&&!sa(s);){if(er(s)&&!ph(s))return s;s=zs(s)}return n}let r=vx(e,t);for(;r&&GD(r)&&ph(r);)r=vx(r,t);return r&&sa(r)&&ph(r)&&!by(r)?n:r||YD(e)||n}const aI=async function(e){const t=this.getOffsetParent||j_,n=this.getDimensions,r=await n(e.floating);return{reference:oI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lI(e){return tr(e).direction==="rtl"}const cI={convertOffsetParentRelativeRectToViewportRelativeRect:JD,getDocumentElement:Sr,getClippingRect:sI,getOffsetParent:j_,getElementRects:aI,getClientRects:ZD,getDimensions:iI,getScale:Oo,isElement:er,isRTL:lI};function uI(e,t){let n=null,r;const s=Sr(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{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const p=Wc(d),w=Wc(s.clientWidth-(u+f)),g=Wc(s.clientHeight-(d+h)),x=Wc(u),v={rootMargin:-p+"px "+-w+"px "+-g+"px "+-x+"px",threshold:un(0,Bs(1,l))||1};let b=!0;function S(k){const T=k[0].intersectionRatio;if(T!==l){if(!b)return o();T?o(!1,T):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return o(!0),i}function dI(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,u=ky(e),d=s||i?[...u?Al(u):[],...Al(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=u&&a?uI(u,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let w,g=l?Mi(e):null;l&&x();function x(){const y=Mi(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,w=requestAnimationFrame(x)}return n(),()=>{var y;d.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(w)}}const fI=WD,hI=HD,pI=UD,mI=KD,gI=VD,xx=BD,yI=qD,vI=(e,t,n)=>{const r=new Map,s={platform:cI,...n},i={...s.platform,_c:r};return FD(e,t,{...s,platform:i})};var Pu=typeof document<"u"?m.useLayoutEffect:m.useEffect;function pd(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(!pd(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)&&!pd(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function P_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wx(e,t){const n=P_(e);return Math.round(t*n)/n}function mh(e){const t=m.useRef(e);return Pu(()=>{t.current=e}),t}function xI(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:u}=e,[d,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=m.useState(r);pd(h,r)||p(r);const[w,g]=m.useState(null),[x,y]=m.useState(null),v=m.useCallback(N=>{N!==T.current&&(T.current=N,g(N))},[]),b=m.useCallback(N=>{N!==E.current&&(E.current=N,y(N))},[]),S=i||w,k=o||x,T=m.useRef(null),E=m.useRef(null),j=m.useRef(d),R=l!=null,A=mh(l),D=mh(s),$=mh(u),W=m.useCallback(()=>{if(!T.current||!E.current)return;const N={placement:t,strategy:n,middleware:h};D.current&&(N.platform=D.current),vI(T.current,E.current,N).then(O=>{const _={...O,isPositioned:$.current!==!1};F.current&&!pd(j.current,_)&&(j.current=_,ac.flushSync(()=>{f(_)}))})},[h,t,n,D,$]);Pu(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[u]);const F=m.useRef(!1);Pu(()=>(F.current=!0,()=>{F.current=!1}),[]),Pu(()=>{if(S&&(T.current=S),k&&(E.current=k),S&&k){if(A.current)return A.current(S,k,W);W()}},[S,k,W,A,R]);const K=m.useMemo(()=>({reference:T,floating:E,setReference:v,setFloating:b}),[v,b]),U=m.useMemo(()=>({reference:S,floating:k}),[S,k]),V=m.useMemo(()=>{const N={position:n,left:0,top:0};if(!U.floating)return N;const O=wx(U.floating,d.x),_=wx(U.floating,d.y);return a?{...N,transform:"translate("+O+"px, "+_+"px)",...P_(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:_}},[n,a,U.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:W,refs:K,elements:U,floatingStyles:V}),[d,W,K,U,V])}const wI=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?xx({element:r.current,padding:s}).fn(n):{}:r?xx({element:r,padding:s}).fn(n):{}}}},bI=(e,t)=>({...fI(e),options:[e,t]}),SI=(e,t)=>({...hI(e),options:[e,t]}),kI=(e,t)=>({...yI(e),options:[e,t]}),_I=(e,t)=>({...pI(e),options:[e,t]}),CI=(e,t)=>({...mI(e),options:[e,t]}),EI=(e,t)=>({...gI(e),options:[e,t]}),TI=(e,t)=>({...wI(e),options:[e,t]});var jI="Arrow",N_=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return c.jsx(me.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});N_.displayName=jI;var PI=N_;function R_(e){const[t,n]=m.useState(void 0);return gn(()=>{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,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.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 A_="Popper",[O_,D_]=On(A_),[FW,I_]=O_(A_),M_="PopperAnchor",L_=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=I_(M_,n),o=m.useRef(null),a=Ne(t,o);return m.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:c.jsx(me.div,{...s,ref:a})});L_.displayName=M_;var _y="PopperContent",[NI,RI]=O_(_y),$_=m.forwardRef((e,t)=>{var L,G,Y,pe,ae,ge;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:w,...g}=e,x=I_(_y,n),[y,v]=m.useState(null),b=Ne(t,H=>v(H)),[S,k]=m.useState(null),T=R_(S),E=(T==null?void 0:T.width)??0,j=(T==null?void 0:T.height)??0,R=r+(i!=="center"?"-"+i:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],$=D.length>0,W={padding:A,boundary:D.filter(OI),altBoundary:$},{refs:F,floatingStyles:K,placement:U,isPositioned:V,middlewareData:N}=xI({strategy:"fixed",placement:R,whileElementsMounted:(...H)=>dI(...H,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[bI({mainAxis:s+j,alignmentAxis:o}),l&&SI({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?kI():void 0,...W}),l&&_I({...W}),CI({...W,apply:({elements:H,rects:re,availableWidth:be,availableHeight:we})=>{const{width:De,height:je}=re.reference,Ye=H.floating.style;Ye.setProperty("--radix-popper-available-width",`${be}px`),Ye.setProperty("--radix-popper-available-height",`${we}px`),Ye.setProperty("--radix-popper-anchor-width",`${De}px`),Ye.setProperty("--radix-popper-anchor-height",`${je}px`)}}),S&&TI({element:S,padding:a}),DI({arrowWidth:E,arrowHeight:j}),h&&EI({strategy:"referenceHidden",...W})]}),[O,_]=U_(U),C=gt(w);gn(()=>{V&&(C==null||C())},[V,C]);const M=(L=N.arrow)==null?void 0:L.x,B=(G=N.arrow)==null?void 0:G.y,z=((Y=N.arrow)==null?void 0:Y.centerOffset)!==0,[Q,Z]=m.useState();return gn(()=>{y&&Z(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:V?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(pe=N.transformOrigin)==null?void 0:pe.x,(ae=N.transformOrigin)==null?void 0:ae.y].join(" "),...((ge=N.hide)==null?void 0:ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(NI,{scope:n,placedSide:O,onArrowChange:k,arrowX:M,arrowY:B,shouldHideArrow:z,children:c.jsx(me.div,{"data-side":O,"data-align":_,...g,ref:b,style:{...g.style,animation:V?void 0:"none"}})})})});$_.displayName=_y;var F_="PopperArrow",AI={top:"bottom",right:"left",bottom:"top",left:"r
321ight"},B_=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=RI(F_,r),o=AI[i.placedSide];return c.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:c.jsx(PI,{...s,ref:n,style:{...s.style,display:"block"}})})});B_.displayName=F_;function OI(e){return e!==null}var DI=e=>({name:"transformOrigin",options:e,fn(t){var x,y,v;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,[u,d]=U_(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,p=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let w="",g="";return u==="bottom"?(w=o?f:`${h}px`,g=`${-l}px`):u==="top"?(w=o?f:`${h}px`,g=`${r.floating.height+l}px`):u==="right"?(w=`${-l}px`,g=o?f:`${p}px`):u==="left"&&(w=`${r.floating.width+l}px`,g=o?f:`${p}px`),{data:{x:w,y:g}}}});function U_(e){const[t,n="center"]=e.split("-");return[t,n]}var II=L_,MI=$_,LI=B_,[af,BW]=On("Tooltip",[D_]),Cy=D_(),V_="TooltipProvider",$I=700,bx="tooltip.open",[FI,z_]=af(V_),W_=e=>{const{__scopeTooltip:t,delayDuration:n=$I,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=m.useRef(!0),a=m.useRef(!1),l=m.useRef(0);return m.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),c.jsx(FI,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:m.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};W_.displayName=V_;var H_="Tooltip",[UW,lf]=af(H_),am="TooltipTrigger",BI=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=lf(am,n),i=z_(am,n),o=Cy(n),a=m.useRef(null),l=Ne(t,a,s.onTriggerChange),u=m.useRef(!1),d=m.useRef(!1),f=m.useCallback(()=>u.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(II,{asChild:!0,...o,children:c.jsx(me.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:he(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:he(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:he(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:he(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:he(e.onBlur,s.onClose),onClick:he(e.onClick,s.onClose)})})});BI.displayName=am;var UI="TooltipPortal",[VW,VI]=af(UI,{forceMount:void 0}),ia="TooltipContent",q_=m.forwardRef((e,t)=>{const n=VI(ia,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=lf(ia,e.__scopeTooltip);return c.jsx(nr,{present:r||o.open,children:o.disableHoverableContent?c.jsx(K_,{side:s,...i,ref:t}):c.jsx(zI,{side:s,...i,ref:t})})}),zI=m.forwardRef((e,t)=>{const n=lf(ia,e.__scopeTooltip),r=z_(ia,e.__scopeTooltip),s=m.useRef(null),i=Ne(t,s),[o,a]=m.useState(null),{trigger:l,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=m.useCallback(()=>{a(null),f(!1)},[f]),p=m.useCallback((w,g)=>{const x=w.currentTarget,y={x:w.clientX,y:w.clientY},v=GI(y,x.getBoundingClientRect()),b=YI(y,v),S=QI(g.getBoundingClientRect()),k=JI([...b,...S]);a(k),f(!0)},[f]);return m.useEffect(()=>()=>h(),[h]),m.useEffect(()=>{if(l&&d){const w=x=>p(x,d),g=x=>p(x,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",g)}}},[l,d,p,h]),m.useEffect(()=>{if(o){const w=g=>{const x=g.target,y={x:g.clientX,y:g.clientY},v=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),b=!XI(y,o);v?h():b&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,o,u,h]),c.jsx(K_,{...e,ref:i})}),[WI,HI]=af(H_,{isInside:!1}),qI=Pk("TooltipContent"),K_=m.forwardRef((e,t)=>
vendor: 4,976 bytes, line 321
321{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=lf(ia,n),u=Cy(n),{onClose:d}=l;return m.useEffect(()=>(document.addEventListener(bx,d),()=>document.removeEventListener(bx,d)),[d]),m.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),c.jsx(Xd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:c.jsxs(MI,{"data-state":l.stateAttribute,...u,...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:[c.jsx(qI,{children:r}),c.jsx(WI,{scope:n,isInside:!0,children:c.jsx(CA,{id:l.contentId,role:"tooltip",children:s||r})})]})})});q_.displayName=ia;var G_="TooltipArrow",KI=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Cy(n);return HI(G_,n).isInside?null:c.jsx(LI,{...s,...r,ref:t})});KI.displayName=G_;function GI(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 YI(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 QI(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 XI(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],u=a.x,d=a.y,f=l.x,h=l.y;d>r!=h>r&&n<(f-u)*(r-d)/(h-d)+u&&(s=!s)}return s}function JI(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),ZI(t)}function ZI(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 eM=W_,Y_=q_;const tM=eM,nM=m.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(Y_,{ref:r,sideOffset:t,className:oe("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}));nM.displayName=Y_.displayName;var ga=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(){}},Li=typeof window>"u"||"Deno"in globalThis;function Wt(){}function rM(e,t){return typeof e=="function"?e(t):e}function lm(e){return typeof e=="number"&&e>=0&&e!==1/0}function Q_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Is(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function Sx(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Ey(o,t.options))return!1}else if(!Ol(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 kx(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if($i(t.options.mutationKey)!==$i(i))return!1}else if(!Ol(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Ey(e,t){return((t==null?void 0:t.queryKeyHashFn)||$i)(e)}function $i(e){return JSON.stringify(e,(t,n)=>cm(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ol(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ol(e[n],t[n])):!1}function X_(e,t){if(e===t)return e;const n=_x(e)&&_x(t);
vendor: 14,758 bytes, line 321
321if(n||cm(e)&&cm(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 u=0;for(let d=0;d<o;d++){const f=n?d:i[d];(!n&&l.has(f)||n)&&e[f]===void 0&&t[f]===void 0?(a[f]=void 0,u++):(a[f]=X_(e[f],t[f]),a[f]===e[f]&&e[f]!==void 0&&u++)}return s===o&&u===s?e:a}return t}function md(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function _x(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function cm(e){if(!Cx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Cx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Cx(e){return Object.prototype.toString.call(e)==="[object Object]"}function sM(e){return new Promise(t=>{setTimeout(t,e)})}function um(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?X_(e,t):t}function iM(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function oM(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ty=Symbol();function J_(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ty?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Z_(e,t){return typeof e=="function"?e(...t):!!e}var vi,hs,$o,n1,aM=(n1=class extends ga{constructor(){super();le(this,vi);le(this,hs);le(this,$o);X(this,$o,t=>{if(!Li&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,hs)||this.setEventListener(P(this,$o))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,hs))==null||t.call(this),X(this,hs,void 0))}setEventListener(t){var n;X(this,$o,t),(n=P(this,hs))==null||n.call(this),X(this,hs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,vi)!==t&&(X(this,vi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,vi)=="boolean"?P(this,vi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},vi=new WeakMap,hs=new WeakMap,$o=new WeakMap,n1),jy=new aM,Fo,ps,Bo,r1,lM=(r1=class extends ga{constructor(){super();le(this,Fo,!0);le(this,ps);le(this,Bo);X(this,Bo,t=>{if(!Li&&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(){P(this,ps)||this.setEventListener(P(this,Bo))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,ps))==null||t.call(this),X(this,ps,void 0))}setEventListener(t){var n;X(this,Bo,t),(n=P(this,ps))==null||n.call(this),X(this,ps,t(this.setOnline.bind(this)))}setOnline(t){P(this,Fo)!==t&&(X(this,Fo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,Fo)}},Fo=new WeakMap,ps=new WeakMap,Bo=new WeakMap,r1),gd=new lM;function dm(){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 cM(e){return Math.min(1e3*2**e,3e4)}function eC(e){return(e??"online")==="online"?gd.isOnline():!0}var tC=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function gh(e){return e instanceof tC}function nC(e){let t=!1,n=0,r=!1,s;const i=dm(),o=g=>{var x;r||(h(new tC(g)),(x=e.abort)==null||x.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>jy.isFocused()&&(e.networkMode==="always"||gd.isOnline())&&e.canRun(),d=()=>eC(e.networkMode)&&e.canRun(),f=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))},p=()=>new Promise(g=>{var x;s=y=>{(r||u())&&g(y)},(x=e.onPause)==null||x.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),w=()=>{if(r)return;let g;const x=n===0?e.initialPromise:void 0;try{g=x??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(f).catch(y=>{var T;if(r)return;const v=e.retry??(Li?0:3),b=e.retryDelay??cM,S=typeof b=="function"?b(n,y):b,k=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,y);if(t||!k){h(y);return}n++,(T=e.onFail)==null||T.call(e,n,y),sM(S).then(()=>u()?void 0:p()).then(()=>{t?h(y):w()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?w():p().then(w),i)}}var uM=e=>setTimeout(e,0);function dM(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=uM;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 mt=dM(),xi,s1,rC=(s1=class{constructor(){le(this,xi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lm(this.gcTime)&&X(this,xi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Li?1/0:5*60*1e3))}clearGcTimeout(){P(this,xi)&&(clearTimeout(P(this,xi)),X(this,xi,void 0))}},xi=new WeakMap,s1),Uo,wi,bn,bi,Dt,Jl,Si,Hn,Tr,i1,fM=(i1=class extends rC{constructor(t){super();le(this,Hn);le(this,Uo);le(this,wi);le(this,bn);le(this,bi);le(this,Dt);le(this,Jl);le(this,Si);X(this,Si,!1),X(this,Jl,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,bi,t.client),X(this,bn,P(this,bi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Uo,hM(this.options)),this.state=t.state??P(this,Uo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,Dt))==null?void 0:t.promise}setOptions(t){this.options={...P(this,Jl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,bn).remove(this)}setData(t,n){const r=um(this.state.data,t,this.options);return xe(this,Hn,Tr).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,Hn,Tr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=P(this,Dt))==null?void 0:r.promise;return(s=P(this,Dt))==null||s.cancel(t),n?n.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,Uo))}isActive(){return this.observers.some(t=>Sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ty||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Is(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:!Q_(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Dt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Dt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,bn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,Dt)&&(P(this,Si)?P(this,Dt).cancel({revert:!0}):P(this,Dt).cancelRetry()),this.scheduleGc()),P(this,bn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xe(this,Hn,Tr).call(this,{type:"invalidate"})}fetch(t,n){var u,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,Dt))return P(this,Dt).continueRetry(),P(this,Dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(X(this,Si,!0),r.signal)})},i=()=>{const h=J_(this.options,n),w=(()=>{const g={client:P(this,bi),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return X(this,Si,!1),this.options.persister?this.options.persister(h,w,this):h(w)},a=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:P(this,bi),state:this.state,fetchFn:i};return s(h),h})();(u=this.options.behavior)==null||u.onFetch(a,this),X(this,wi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&xe(this,Hn,Tr).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const l=h=>{var p,w,g,x;gh(h)&&h.silent||xe(this,Hn,Tr).call(this,{type:"error",error:h}),gh(h)||((w=(p=P(this,bn).config).onError)==null||w.call(p,h,this),(x=(g=P(this,bn).config).onSettled)==null||x.call(g,this.state.data,h,this)),this.scheduleGc()};return X(this,Dt,nC({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var p,w,g,x;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(y){l(y);return}(w=(p=P(this,bn).config).onSuccess)==null||w.call(p,h,this),(x=(g=P(this,bn).config).onSettled)==null||x.call(g,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,p)=>{xe(this,Hn,Tr).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{xe(this,Hn,Tr).call(this,{type:"pause"})},onContinue:()=>{xe(this,Hn,Tr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),P(this,Dt).start()}},Uo=new WeakMap,wi=new WeakMap,bn=new WeakMap,bi=new WeakMap,Dt=new WeakMap,Jl=new WeakMap,Si=new WeakMap,Hn=new WeakSet,Tr=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,...sC(r.data,this.options),fetchMeta:t.meta??null};case"success":return X(this,wi,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 gh(s)&&s.revert&&P(this,wi)?{...P(this,wi),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),mt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,bn).notify({query:this,type:"updated",action:t})})},i1);function sC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:eC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hM(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 cr,o1,pM=(o1=class extends ga{constructor(t={}){super();le(this,cr);this.config=t,X(this,cr,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Ey(s,n);let o=this.get(i);return o||(o=new fM({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){P(this,cr).has(t.queryHash)||(P(this,cr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,cr).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,cr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){mt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,cr).get(t)}getAll(){return[...P(this,cr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Sx(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Sx(t,r)):n}notify(t){mt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){mt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){mt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},cr=new WeakMap,o1),ur,Ut,ki,dr,rs,a1,mM=(a1=class extends rC{constructor(t){super();le(this,dr);le(this,ur);le(this,Ut);le(this,ki);this.mutationId=t.mutationId,X(this,Ut,t.mutationCache),X(this,ur,[]),this.state=t.state||iC(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,ur).includes(t)||(P(this,ur).push(t),this.clearGcTimeout(),P(this,Ut).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,ur,P(this,ur).filter(n=>n!==t)),this.scheduleGc(),P(this,Ut).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,ur).length||(this.state.status==="pending"?this.scheduleGc():P(this,Ut).remove(this))}continue(){var t;return((t=P(this,ki))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,u,d,f,h,p,w,g,x,y,v,b,S,k,T,E,j;const n=()=>{xe(this,dr,rs).call(this,{type:"continue"})};X(this,ki,nC({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,A)=>{xe(this,dr,rs).call(this,{type:"failed",failureCount:R,error:A})},onPause:()=>{xe(this,dr,rs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Ut).canRun(this)}));const r=this.state.status==="pending",s=!P(this,ki).canStart();try{if(r)n();else{xe(this,dr,rs).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=P(this,Ut).config).onMutate)==null?void 0:o.call(i,t,this));
321const A=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));A!==this.state.context&&xe(this,dr,rs).call(this,{type:"pending",context:A,variables:t,isPaused:s})}const R=await P(this,ki).start();return await((d=(u=P(this,Ut).config).onSuccess)==null?void 0:d.call(u,R,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,R,t,this.state.context)),await((w=(p=P(this,Ut).config).onSettled)==null?void 0:w.call(p,R,null,this.state.variables,this.state.context,this)),await((x=(g=this.options).onSettled)==null?void 0:x.call(g,R,null,t,this.state.context)),xe(this,dr,rs).call(this,{type:"success",data:R}),R}catch(R){try{throw await((v=(y=P(this,Ut).config).onError)==null?void 0:v.call(y,R,t,this.state.context,this)),await((S=(b=this.options).onError)==null?void 0:S.call(b,R,t,this.state.context)),await((T=(k=P(this,Ut).config).onSettled)==null?void 0:T.call(k,void 0,R,this.state.variables,this.state.context,this)),await((j=(E=this.options).onSettled)==null?void 0:j.call(E,void 0,R,t,this.state.context)),R}finally{xe(this,dr,rs).call(this,{type:"error",error:R})}}finally{P(this,Ut).runNext(this)}}},ur=new WeakMap,Ut=new WeakMap,ki=new WeakMap,dr=new WeakSet,rs=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),mt.batch(()=>{P(this,ur).forEach(r=>{r.onMutationUpdate(t)}),P(this,Ut).notify({mutation:this,type:"updated",action:t})})},a1);function iC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Rr,qn,Zl,l1,gM=(l1=class extends ga{constructor(t={}){super();le(this,Rr);le(this,qn);le(this,Zl);this.config=t,X(this,Rr,new Set),X(this,qn,new Map),X(this,Zl,0)}build(t,n,r){const s=new mM({mutationCache:this,mutationId:++kc(this,Zl)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){P(this,Rr).add(t);const n=Hc(t);if(typeof n=="string"){const r=P(this,qn).get(n);r?r.push(t):P(this,qn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,Rr).delete(t)){const n=Hc(t);if(typeof n=="string"){const r=P(this,qn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&P(this,qn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Hc(t);if(typeof n=="string"){const r=P(this,qn).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=Hc(t);if(typeof n=="string"){const s=(r=P(this,qn).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){mt.batch(()=>{P(this,Rr).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,Rr).clear(),P(this,qn).clear()})}getAll(){return Array.from(P(this,Rr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>kx(n,r))}findAll(t={}){return this.getAll().filter(n=>kx(t,n))}notify(t){mt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return mt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Wt))))}},Rr=new WeakMap,qn=new WeakMap,Zl=new WeakMap,l1);function Hc(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ex(e){return{onFetch:(t,n)=>{var d,f,h,p,w;const r=t.options,s=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)}
vendor: 12,913 bytes, line 321
321)},y=J_(t.options,t.fetchOptions),v=async(b,S,k)=>{if(g)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:S,direction:k?"backward":"forward",meta:t.options.meta};return x(D),D})(),j=await y(E),{maxPages:R}=t.options,A=k?oM:iM;return{pages:A(b.pages,j,R),pageParams:A(b.pageParams,S,R)}};if(s&&i.length){const b=s==="backward",S=b?yM:Tx,k={pages:i,pageParams:o},T=S(r,k);a=await v(k,T,b)}else{const b=e??i.length;do{const S=l===0?o[0]??r.initialPageParam:Tx(r,a);if(l>0&&S==null)break;a=await v(a,S),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var g,x;return(x=(g=t.options).persister)==null?void 0:x.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Tx(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 yM(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 Xe,ms,gs,Vo,zo,ys,Wo,Ho,c1,vM=(c1=class{constructor(e={}){le(this,Xe);le(this,ms);le(this,gs);le(this,Vo);le(this,zo);le(this,ys);le(this,Wo);le(this,Ho);X(this,Xe,e.queryCache||new pM),X(this,ms,e.mutationCache||new gM),X(this,gs,e.defaultOptions||{}),X(this,Vo,new Map),X(this,zo,new Map),X(this,ys,0)}mount(){kc(this,ys)._++,P(this,ys)===1&&(X(this,Wo,jy.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,Xe).onFocus())})),X(this,Ho,gd.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,Xe).onOnline())})))}unmount(){var e,t;kc(this,ys)._--,P(this,ys)===0&&((e=P(this,Wo))==null||e.call(this),X(this,Wo,void 0),(t=P(this,Ho))==null||t.call(this),X(this,Ho,void 0))}isFetching(e){return P(this,Xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,ms).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,Xe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=P(this,Xe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Is(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return P(this,Xe).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=P(this,Xe).get(r.queryHash),i=s==null?void 0:s.state.data,o=rM(t,i);if(o!==void 0)return P(this,Xe).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return mt.batch(()=>P(this,Xe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,Xe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,Xe);mt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,Xe);return mt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=mt.batch(()=>P(this,Xe).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return mt.batch(()=>(P(this,Xe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=mt.batch(()=>P(this,Xe).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Wt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,Xe).build(this,t);return n.isStaleByTime(Is(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=Ex(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=Ex(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gd.isOnline()?P(this,ms).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,Xe)}getMutationCache(){return P(this,ms)}getDefaultOptions(){return P(this,gs)}setDefaultOptions(e){X(this,gs,e)}setQueryDefaults(e,t){P(this,Vo).set($i(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,Vo).values()],n={};return t.forEach(r=>{Ol(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){P(this,zo).set($i(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,zo).values()],n={};return t.forEach(r=>{Ol(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,gs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ey(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===Ty&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,gs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,Xe).clear(),P(this,ms).clear()}},Xe=new WeakMap,ms=new WeakMap,gs=new WeakMap,Vo=new WeakMap,zo=new WeakMap,ys=new WeakMap,Wo=new WeakMap,Ho=new WeakMap,c1),Qt,ke,ec,Vt,_i,qo,vs,xs,tc,Ko,Go,Ci,Ei,ws,Yo,Pe,qa,fm,hm,pm,mm,gm,ym,vm,oC,u1,xM=(u1=class extends ga{constructor(t,n){super();le(this,Pe);le(this,Qt);le(this,ke);le(this,ec);le(this,Vt);le(this,_i);le(this,qo);le(this,vs);le(this,xs);le(this,tc);le(this,Ko);le(this,Go);le(this,Ci);le(this,Ei);le(this,ws);le(this,Yo,new Set);this.options=n,X(this,Qt,t),X(this,xs,null),X(this,vs,dm()),this.options.experimental_prefetchInRender||P(this,vs).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,ke).addObserver(this),jx(P(this,ke),this.options)?xe(this,Pe,qa).call(this):this.updateResult(),xe(this,Pe,mm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xm(P(this,ke),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xm(P(this,ke),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,Pe,gm).call(this),xe(this,Pe,ym).call(this),P(this,ke).removeObserver(this)}setOptions(t){const n=this.options,r=P(this,ke);if(this.options=P(this,Qt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sn(this.options.enabled,P(this,ke))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xe(this,Pe,vm).call(this),P(this,ke).setOptions(this.options),n._defaulted&&!md(this.options,n)&&P(this,Qt).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,ke),observer:this});const s=this.hasListeners();s&&Px(P(this,ke),r,this.options,n)&&xe(this,Pe,qa).call(this),this.updateResult(),s&&(P(this,ke)!==r||Sn(this.options.enabled,P(this,ke))!==Sn(n.enabled,P(this,ke))||Is(this.options.staleTime,P(this,ke))!==Is(n.staleTime,P(this,ke)))&&xe(this,Pe,fm).call(this);const i=xe(this,Pe,hm).call(this);s&&(P(this,ke)!==r||Sn(this.options.enabled,P(this,ke))!==Sn(n.enabled,P(this,ke))||i!==P(this,ws))&&xe(this,Pe,pm).call(this,i)}getOptimisticResult(t){const n=P(this,Qt).getQueryCache().build(P(this,Qt),t),r=this.createResult(n,t);return bM(this,r)&&(X(this,Vt,r),X(this,qo,this.options),X(this,_i,P(this,ke).state)),r}getCurrentResult(){return P(this,Vt)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){P(this,Yo).add(t)}getCurrentQuery(){return P(this,ke)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,Qt).defaultQueryOptions(t),r=P(this,Qt).getQueryCache().build(P(this,Qt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return xe(this,Pe,qa).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Vt)))}createResult(t,n){var R;const r=P(this,ke),s=this.options,i=P(this,Vt),o=P(this,_i),a=P(this,qo),u=t!==r?t.state:P(this,ec),{state:d}=t;let f={...d},h=!1,p;if(n._optimisticResults){const A=this.hasListeners(),D=!A&&jx(t,n),$=A&&Px(t,r,n,s);(D||$)&&(f={...f,...sC(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:w,errorUpdatedAt:g,status:x}=f;p=f.data;let y=!1;if(n.placeholderData!==void 0&&p===void 0&&x==="pending"){let A;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(A=i.data,y=!0):A=typeof n.placeholderData=="function"?n.placeholderData((R=P(this,Go))==null?void 0:R.state.data,P(this,Go)):n.placeholderData,A!==void 0&&(x="success",p=um(i==null?void 0:i.data,A,n),h=!0)}if(n.select&&p!==void 0&&!y)if(i&&p===(o==null?void 0:o.data)&&n.select===P(this,tc))p=P(this,Ko);else try{X(this,tc,n.select),p=n.select(p),p=um(i==null?void 0:i.data,p,n),X(this,Ko,p),X(this,xs,null)}catch(A){X(this,xs,A)}P(this,xs)&&(w=P(this,xs),p=P(this,Ko),g=Date.now(),x="error");const v=f.fetchStatus==="fetching",b=x==="pending",S=x==="error",k=b&&v,T=p!==void 0,j={status:x,fetchStatus:f.fetchStatus,isPending:b,isSuccess:x==="success",isError:S,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:f.dataUpdatedAt,error:w,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!b,isLoadingError:S&&!T,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&T,isStale:Py(t,n),refetch:this.refetch,promise:P(this,vs),isEnabled:Sn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=W=>{j.status==="error"?W.reject(j.error):j.data!==void 0&&W.resolve(j.data)},D=()=>{const W=X(this,vs,j.promise=dm());A(W)},$=P(this,vs);switch($.status){case"pending":t.queryHash===r.queryHash&&A($);break;case"fulfilled":(j.status==="error"||j.data!==$.value)&&D();break;case"rejected":(j.status!=="error"||j.error!==$.reason)&&D();break}}return j}updateResult(){const t=P(this,Vt),n=this.createResult(P(this,ke),this.options);if(X(this,_i,P(this,ke).state),X(this,qo,this.options),P(this,_i).data!==void 0&&X(this,Go,P(this,ke)),md(n,t))return;X(this,Vt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!P(this,Yo).size)return!0;const o=new Set(i??P(this,Yo));return this.options.throwOnError&&o.add("error"),Object.keys(P(this,Vt)).some(a=>{const l=a;return P(this,Vt)[l]!==t[l]&&o.has(l)})};xe(this,Pe,oC).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,Pe,mm).call(this)}},Qt=new WeakMap,ke=new WeakMap,ec=new WeakMap,Vt=new WeakMap,_i=new WeakMap,qo=new WeakMap,vs=new WeakMap,xs=new WeakMap,tc=new WeakMap,Ko=new WeakMap,Go=new WeakMap,Ci=new WeakMap,Ei=new WeakMap,ws=new WeakMap,Yo=new WeakMap,Pe=new WeakSet,qa=function(t){xe(this,Pe,vm).call(this);let n=P(this,ke).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Wt)),n},fm=function(){xe(this,Pe,gm).call(this);const t=Is(this.options.staleTime,P(this,ke));if(Li||P(this,Vt).isStale||!lm(t))return;const r=Q_(P(this,Vt).dataUpdatedAt,t)+1;X(this,Ci,setTimeout(()=>{P(this,Vt).isStale||this.updateResult()},r))},hm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,ke)):this.options.refetchInterval)??!1},pm=function(t){xe(this,Pe,ym).call(this),X(this,ws,t),!(Li||Sn(this.options.enabled,P(this,ke))===!1||!lm(P(this,ws))||P(this,ws)===0)&&X(this,Ei,setInterval(()=>{(this.options.refetchIntervalInBackground||jy.isFocused())&&xe(this,Pe,qa).call(this)},P(this,ws)))},mm=function(){xe(this,Pe,fm).call(this),xe(this,Pe,pm).call(this,xe(this,Pe,hm).call(this))},gm=function(){P(this,Ci)&&(clearTimeout(P(this,Ci)),X(this,Ci,void 0))},ym=function(){P(this,Ei)&&(clearInterval(P(this,Ei)),X(this,Ei,void 0))},vm=function(){const t=P(this,Qt).getQueryCache().build(P(this,Qt),this.options);if(t===P(this,ke))return;const n=P(this,ke);X(this,ke,t),X(this,ec,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},oC=function(t){mt.batch(()=>
321{t.listeners&&this.listeners.forEach(n=>{n(P(this,Vt))}),P(this,Qt).getQueryCache().notify({query:P(this,ke),type:"observerResultsUpdated"})})},u1);function wM(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function jx(e,t){return wM(e,t)||e.state.data!==void 0&&xm(e,t,t.refetchOnMount)}function xm(e,t,n){if(Sn(t.enabled,e)!==!1&&Is(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Py(e,t)}return!1}function Px(e,t,n,r){return(e!==t||Sn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Py(e,n)}function Py(e,t){return Sn(t.enabled,e)!==!1&&e.isStaleByTime(Is(t.staleTime,e))}function bM(e,t){return!md(e.getCurrentResult(),t)}var bs,Ss,Xt,Ar,Lr,Nu,wm,d1,SM=(d1=class extends ga{constructor(n,r){super();le(this,Lr);le(this,bs);le(this,Ss);le(this,Xt);le(this,Ar);X(this,bs,n),this.setOptions(r),this.bindMethods(),xe(this,Lr,Nu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=P(this,bs).defaultMutationOptions(n),md(this.options,r)||P(this,bs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:P(this,Xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&$i(r.mutationKey)!==$i(this.options.mutationKey)?this.reset():((s=P(this,Xt))==null?void 0:s.state.status)==="pending"&&P(this,Xt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=P(this,Xt))==null||n.removeObserver(this)}onMutationUpdate(n){xe(this,Lr,Nu).call(this),xe(this,Lr,wm).call(this,n)}getCurrentResult(){return P(this,Ss)}reset(){var n;(n=P(this,Xt))==null||n.removeObserver(this),X(this,Xt,void 0),xe(this,Lr,Nu).call(this),xe(this,Lr,wm).call(this)}mutate(n,r){var s;return X(this,Ar,r),(s=P(this,Xt))==null||s.removeObserver(this),X(this,Xt,P(this,bs).getMutationCache().build(P(this,bs),this.options)),P(this,Xt).addObserver(this),P(this,Xt).execute(n)}},bs=new WeakMap,Ss=new WeakMap,Xt=new WeakMap,Ar=new WeakMap,Lr=new WeakSet,Nu=function(){var r;const n=((r=P(this,Xt))==null?void 0:r.state)??iC();X(this,Ss,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},wm=function(n){mt.batch(()=>{var r,s,i,o,a,l,u,d;if(P(this,Ar)&&this.hasListeners()){const f=P(this,Ss).variables,h=P(this,Ss).context;(n==null?void 0:n.type)==="success"?((s=(r=P(this,Ar)).onSuccess)==null||s.call(r,n.data,f,h),(o=(i=P(this,Ar)).onSettled)==null||o.call(i,n.data,null,f,h)):(n==null?void 0:n.type)==="error"&&((l=(a=P(this,Ar)).onError)==null||l.call(a,n.error,f,h),(d=(u=P(this,Ar)).onSettled)==null||d.call(u,void 0,n.error,f,h))}this.listeners.forEach(f=>{f(P(this,Ss))})})},d1),aC=m.createContext(void 0),Nt=e=>{const t=m.useContext(aC);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kM=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(aC.Provider,{value:e,children:t})),lC=m.createContext(!1),_M=()=>m.useContext(lC);lC.Provider;function CM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var EM=m.createContext(CM()),TM=()=>m.useContext(EM),jM=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},PM=e=>{m.useEffect(()=>{e.clearReset()},[e])},NM=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Z_(n,[e.error,r])),RM=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},AM=(e,t)=>e.isLoading&&e.isFetching&&!t,OM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Nx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function DM(e,t,n){var f,h,p,w,g;const r=_M(),s=TM(),i=Nt(),o=i.defaultQueryOptions(e);(h=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,o),o._optimisticResults=r?"isRestoring":"optimistic",RM(o),jM(o,s),PM(s);const a=!i.getQueryCache().get(o.queryHash),[l]=m.useState(()=>new t(i,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(x=>{const y=d?l.subscribe(mt.batchCalls(x)):Wt;return l.updateResult(),y},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),OM(o,u))throw Nx(o,l,s);if(NM({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((w=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||w.call(p,o,u),o.experimental_prefetchInRender&&!Li&&AM(u,r)){const x=a?Nx(o,l,s):(g=i.getQueryCache().get(o.queryHash))==null?void 0:g.promise;x==null||x.catch(Wt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function xn(e,t){return DM(e,xM)}function ya(e,t){const n=Nt(),[r]=m.useState(()=>new SM(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);const s=m.useSyncExternalStore(m.useCallback(o=>r.subscribe(mt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=m.useCallback((o,a)=>{r.mutate(o,a).catch(Wt)},[r]);if(s.error&&Z_(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}/** 322 * @remix-run/router v1.23.0 323 * 324 * Copyright (c) Remix Software Inc. 325 * 326 * This source code is licensed under the MIT license found in the 327 * LICENSE.md file in the root directory of this source tree. 328 * 329 * @license MIT 330 */function Dl(){return Dl=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},Dl.apply(this,arguments)}var Cs;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Cs||(Cs={}));const Rx="popstate";function IM(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return bm("",{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:yd(s)}return LM(t,n,null,e)}function nt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cC(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function MM(){return Math.random().toString(36).substr(2,8)}function Ax(e,t){return{usr:e.state,key:e.key,idx:t}}function bm(e,t,n,r){return n===void 0&&(n=null),Dl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?va(t):t,{state:n,key:t&&t.key||r||MM()})}function yd(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 va(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 LM(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Cs.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(Dl({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=Cs.Pop;let x=d(),y=x==null?null:x-u;u=x,l&&l({action:a,location:g.location,delta:y})}function h(x,y){a=Cs.Push;let v=bm(g.location,x,y);u=d()+1;let b=Ax(v,u),S=g.createHref(v);try{o.pushState(b,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(S)}i&&l&&l({action:a,location:g.location,delta:1})}function p(x,y){a=Cs.Replace;let v=bm(g.location,x,y);u=d();let b=Ax(v,u),S=g.createHref(v);o.replaceState(b,"",S),i&&l&&l({action:a,location:g.location,delta:0})}function w(x){let y=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof x=="str
330ing"?x:yd(x);return v=v.replace(/ $/,"%20"),nt(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let g={get action(){return a},get location(){return e(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Rx,f),l=x,()=>{s.removeEventListener(Rx,f),l=null}},createHref(x){return t(s,x)},createURL:w,encodeLocation(x){let y=w(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(x){return o.go(x)}};return g}var Ox;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ox||(Ox={}));function $M(e,t,n){return n===void 0&&(n="/"),FM(e,t,n,!1)}function FM(e,t,n,r){let s=typeof t=="string"?va(t):t,i=Ny(s.pathname||"/",n);if(i==null)return null;let o=uC(e);BM(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=XM(i);a=YM(o[l],u,r)}return a}function uC(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("/")&&(nt(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 u=Ms([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(nt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),uC(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:KM(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of dC(i.path))s(i,o,l)}),t}function dC(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=dC(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 BM(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:GM(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const UM=/^:[\w-]+$/,VM=3,zM=2,WM=1,HM=10,qM=-2,Dx=e=>e==="*";function KM(e,t){let n=e.split("/"),r=n.length;return n.some(Dx)&&(r+=qM),t&&(r+=zM),n.filter(s=>!Dx(s)).reduce((s,i)=>s+(UM.test(i)?VM:i===""?WM:HM),r)}function GM(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 YM(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=Ix({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),h=l.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=Ix({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;
vendor: 6,961 bytes, lines 330-339
330Object.assign(s,f.params),o.push({params:s,pathname:Ms([i,f.pathname]),pathnameBase:tL(Ms([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Ms([i,f.pathnameBase]))}return o}function Ix(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=QM(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((u,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let g=a[f]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const w=a[f];return p&&!w?u[h]=void 0:u[h]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function QM(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),cC(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 XM(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return cC(!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 Ny(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 JM(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?va(e):e;return{pathname:n?n.startsWith("/")?n:ZM(n,t):t,search:nL(r),hash:rL(s)}}function ZM(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 yh(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 eL(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ry(e,t){let n=eL(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ay(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=va(e):(s=Dl({},e),nt(!s.pathname||!s.pathname.includes("?"),yh("?","pathname","search",s)),nt(!s.pathname||!s.pathname.includes("#"),yh("#","pathname","hash",s)),nt(!s.search||!s.search.includes("#"),yh("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=JM(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Ms=e=>e.join("/").replace(/\/\/+/g,"/"),tL=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nL=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rL=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function sL(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const fC=["post","put","patch","delete"];new Set(fC);const iL=["get",...fC];new Set(iL);/** 331 * React Router v6.30.1 332 * 333 * Copyright (c) Remix Software Inc. 334 * 335 * This source code is licensed under the MIT license found in the 336 * LICENSE.md file in the root directory of this source tree. 337 * 338 * @license MIT 339 */function Il(){return Il=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},Il.apply(this,arguments)}const Oy=m.createContext(null),oL=m.createContext(null),Gs=m.createContext(null),cf=m.createContext(null),qr=m.createContext({outlet:null,matches:[],isDataRoute:!1}),hC=m.createContext(null);function aL(e,t){let{relative:n}=t===void 0?{}:t;xa()||nt(!1);let{basename:r,navigator:s}=m.useContext(Gs),{hash:i,pathname:o,search:a}=mC(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Ms([r,o])),s.createHref({pathname:l,search:a,hash:i})}function xa(){return m.useContext(cf)!=null}function Ys(){return xa()||nt(!1),m.useContext(cf).location}function pC(e){m.useContext(Gs).static||m.useLayoutEffect(e)}function rr(){let{isDataRoute:e}=m.useContext(qr);return e?SL():lL()}function lL(){xa()||nt(!1);let e=m.useContext(Oy),{basename:t,future:n,navigator:r}=m.useContext(Gs),{matches:s}=m.useContext(qr),{pathname:i}=Ys(),o=JSON.stringify(Ry(s,n.v7_relativeSplatPath)),a=m.useRef(!1);return pC(()=>{a.current=!0}),m.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=Ay(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ms([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}const cL=m.createContext(null);function uL(e){let t=m.useContext(qr).outlet;return t&&m.createElement(cL.Provider,{value:e},t)}function mC(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=m.useContext(Gs),{matches:s}=m.useContext(qr),{pathname:i}=Ys(),o=JSON.stringify(Ry(s,r.v7_relativeSplatPath));return m.useMemo(()=>Ay(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function dL(e,t){return fL(e,t)}function fL(e,t,n,r){xa()||nt(!1);let{navigator:s}=m.useContext(Gs),{matches:i}=m.useContext(qr),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Ys(),d;if(t){var f;let x=typeof t=="string"?va(t):t;l==="/"||(f=x.pathname)!=null&&f.startsWith(l)||nt(!1),d=x}else d=u;let h=d.pathname||"/",p=h;if(l!=="/"){let x=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=$M(e,{pathname:p}),g=yL(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Ms([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Ms([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&g?m.createElement(cf.Provider,{value:{location:Il({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Cs.Pop}},g):g}function hL(){let e=bL(),t=sL(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 m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application
339Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:s},n):null,null)}const pL=m.createElement(hL,null);class mL extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,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?m.createElement(qr.Provider,{value:this.props.routeContext},m.createElement(hC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gL(e){let{routeContext:t,match:n,children:r}=e,s=m.useContext(Oy);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(qr.Provider,{value:t},r)}function yL(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 d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||nt(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:p}=n,w=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||w){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let p,w=!1,g=null,x=null;n&&(p=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||pL,l&&(u<0&&h===0?(w=!0,x=null):u===h&&(w=!0,x=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,h+1)),v=()=>{let b;return p?b=g:w?b=x:f.route.Component?b=m.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,m.createElement(gL,{match:f,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?m.createElement(mL,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var gC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(gC||{}),vd=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}(vd||{});function vL(e){let t=m.useContext(Oy);return t||nt(!1),t}function xL(e){let t=m.useContext(oL);return t||nt(!1),t}function wL(e){let t=m.useContext(qr);return t||nt(!1),t}function yC(e){let t=wL(),n=t.matches[t.matches.length-1];return n.route.id||nt(!1),n.route.id}function bL(){var e;let t=m.useContext(hC),n=xL(vd.UseRouteError),r=yC(vd.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function SL(){let{router:e}=vL(gC.UseNavigateStable),t=yC(vd.UseNavigateStable),n=m.useRef(!1);return pC(()=>{n.current=!0}),m.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Il({fromRouteId:t},i)))},[e,t])}function kL(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Dy(e){let{to:t,replace:n,state:r,relative:s}=e;xa()||nt(!1);let{future:i,static:o}=m.useContext(Gs),{matches:a}=m.useContext(qr),{pathname:l}=Ys(),u=rr(),d=Ay(t,Ry(a,i.v7_relativeSplatPath),l,s==="path"),f=JSON.stringify(d);return m.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function vC(e){return uL(e.context)}function an(e){nt(!1)}function _L(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Cs.Pop,navigator:i,static:o=!1,future:a}=e;xa()&&nt(!1);let l=t.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:l,navigator:i,static:o,future:Il({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=va(r));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:w="default"}=r,g=m.useMemo(()=>{let x=Ny(d,l);return x==null?null:{location:{pathname:x,search:f,hash:h,state:p,key:w},navigationType:s}},[l,d,f,h,p,w,s]);return g==null?null:m.createElement(Gs.Provider,{value:u},m.createElement(cf.Provider,{children:n,value:g}))}function CL(e){let{children:t,location:n}=e;return dL(Sm(t),n)}new Promise(()=>{});function Sm(e,t){t===void 0&&(t=[]);let n=[];
339return m.Children.forEach(e,(r,s)=>{if(!m.isValidElement(r))return;let i=[...t,s];if(r.type===m.Fragment){n.push.apply(n,Sm(r.props.children,i));return}r.type!==an&&nt(!1),!r.props.index||!r.props.children||nt(!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=Sm(r.props.children,i)),n.push(o)}),n}/** 340 * React Router DOM v6.30.1 341 * 342 * Copyright (c) Remix Software Inc. 343 * 344 * This source code is licensed under the MIT license found in the 345 * LICENSE.md file in the root directory of this source tree. 346 * 347 * @license MIT 348 */function km(){return km=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},km.apply(this,arguments)}function EL(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 TL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jL(e,t){return e.button===0&&(!t||t==="_self")&&!TL(e)}function _m(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 PL(e,t){let n=_m(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 AL="startTransition",Mx=yg[AL];function OL(e){let{basename:t,children:n,future:r,window:s}=e,i=m.useRef();i.current==null&&(i.current=IM({window:s,v5Compat:!0}));let o=i.current,[a,l]=m.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=m.useCallback(f=>{u&&Mx?Mx(()=>l(f)):l(f)},[l,u]);return m.useLayoutEffect(()=>o.listen(d),[o,d]),m.useEffect(()=>kL(r),[r]),m.createElement(_L,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const DL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eo=m.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:f}=t,h=EL(t,NL),{basename:p}=m.useContext(Gs),w,g=!1;if(typeof u=="string"&&IL.test(u)&&(w=u,DL))try{let b=new URL(window.location.href),S=u.startsWith("//")?new URL(b.protocol+u):new URL(u),k=Ny(S.pathname,p);S.origin===b.origin&&k!=null?u=k+S.search+S.hash:g=!0}catch{}let x=aL(u,{relative:s}),y=ML(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:f});function v(b){r&&r(b),b.defaultPrevented||y(b)}return m.createElement("a",km({},h,{href:w||x,onClick:g||i?r:v,ref:n,target:l}))});var Lx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Lx||(Lx={}));var $x;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})($x||($x={}));function ML(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=rr(),u=Ys(),d=mC(e,{relative:o});return m.useCallback(f=>{if(jL(f,n)){f.preventDefault();let h=r!==void 0?r:yd(u)===yd(d);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,d,r,s,n,e,i,o,a])}function xC(e){let t=m.useRef(_m(e)),n=m.useRef(!1),r=Ys(),s=m.useMemo(()=>PL(r.search,n.current?null:t.current),[r.search]),i=rr(),o=m.useCallback((a,l)=>{const u=_m(typeof a=="function"?a(s):a);n.current=!0,i("?"+u,l)},[i,s]);return[s,o]}function LL(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
348return new(n||(n=Promise))(function(i,o){function a(d){try{u(r.next(d))}catch(f){o(f)}}function l(d){try{u(r.throw(d))}catch(f){o(f)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}const $L=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Iy extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class FL extends Iy{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Fx extends Iy{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Bx extends Iy{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Cm;(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"})(Cm||(Cm={}));class BL{constructor(t,{headers:n={},customFetch:r,region:s=Cm.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=$L(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return LL(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:d,timeout:f}=r;let h={},{region:p}=r;p||(p=this.region);const w=new URL(`${this.url}/${n}`);p&&p!=="any"&&(h["x-region"]=p,w.searchParams.set("forceFunctionRegion",p));let g;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",g=u):typeof u=="string"?(h["Content-Type"]="text/plain",g=u):typeof FormData<"u"&&u instanceof FormData?g=u:(h["Content-Type"]="application/json",g=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?g=JSON.stringify(u):g=u;let x=d;f&&(o=new AbortController,i=setTimeout(()=>o.abort(),f),d?(x=o.signal,d.addEventListener("abort",()=>o.abort())):x=o.signal);const y=yield this.fetch(w.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),a),body:g,signal:x}).catch(k=>{throw new FL(k)}),v=y.headers.get("x-relay-error");if(v&&v==="true")throw new Fx(y);if(!y.ok)throw new Bx(y);let b=((s=y.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return b==="application/json"?S=yield y.json():b==="application/octet-stream"||b==="application/pdf"?S=yield y.blob():b==="text/event-stream"?S=y:b==="multipart/form-data"?S=yield y.formData():S=yield y.text(),{data:S,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof Bx||a instanceof Fx?a.context:void 0}}finally{i&&clearTimeout(i)}})}}var UL=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
348de=e.code}},VL=class{constructor(e){var t,n,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(r=e.urlLengthLimit)!==null&&r!==void 0?r:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,a=null,l=null,u=i.status,d=i.statusText;if(i.ok){var f,h;if(n.method!=="HEAD"){var p;const y=await i.text();y===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((p=n.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?a=y:a=JSON.parse(y))}const g=(f=n.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),x=(h=i.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");g&&x&&x.length>1&&(l=parseInt(x[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,u=406,d="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var w;const g=await i.text();try{o=JSON.parse(g),Array.isArray(o)&&i.status===404&&(a=[],o=null,u=200,d="OK")}catch{i.status===404&&g===""?(u=204,d="No Content"):o={message:g}}if(o&&n.isMaybeSingle&&(!(o==null||(w=o.details)===null||w===void 0)&&w.includes("0 rows"))&&(o=null,u=200,d="OK"),o&&n.shouldThrowOnError)throw new UL(o)}return{error:o,data:a,count:l,status:u,statusText:d}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="",l="",u="";const d=i==null?void 0:i.cause;if(d){var f,h,p,w;const y=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",v=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";a=`${(p=i==null?void 0:i.name)!==null&&p!==void 0?p:"FetchError"}: ${i==null?void 0:i.message}`,a+=` 349 350Caused by: ${(w=d==null?void 0:d.name)!==null&&w!==void 0?w:"Error"}: ${y}`,v&&(a+=` (${v})`),d!=null&&d.stack&&(a+=` 351${d.stack}`)}else{var g;a=(g=i==null?void 0:i.stack)!==null&&g!==void 0?g:""}const x=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(u="",l="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${x} 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="",l="HTTP headers exceeded server limits (typically 16KB)",x>this.urlLengthLimit&&(l+=`. Your request URL is ${x} 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.`)),{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:l,code:u},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},zL=class extends VL{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.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
351explain({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 Ux=new RegExp("[,()]");var to=class extends zL{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"&&Ux.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"&&Ux.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).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}},WL=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s}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(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new to({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}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,u)=>l.concat(Object.keys(u)),[]);if(a.length>
3510){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new to({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}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 u=e.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(u.length>0){const d=[...new Set(u)].map(f=>`"${f}"`);a.searchParams.set("columns",d.join(","))}}return new to({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new to({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new to({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function Ml(e){"@babel/helpers - typeof";return Ml=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},Ml(e)}function HL(e,t){if(Ml(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ml(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qL(e){var t=HL(e,"string");return Ml(t)=="symbol"?t:t+""}function KL(e,t,n){return(t=qL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vx(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 qc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vx(Object(n),!0).forEach(function(r){KL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var GL=class wC{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const a=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(l,u)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),i),h=u==null?void 0:u.signal;if(h){if(h.aborted)return clearTimeout(f),a(l,u);const p=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",p,{once:!0}),a(l,qc(qc({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",p)})}return a(l,qc(qc({},u),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=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 WL(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new wC(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),f=r&&Object.values(n).some(d);f?(a="POST",u=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([p,w])=>w!==void 0).map(([p,w])=>[p,Array.isArray(w)?`{${w.join(",")}}`:`${w}
351`]).forEach(([p,w])=>{l.searchParams.append(p,w)})):(a="POST",u=n);const h=new Headers(this.headers);return f?h.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&h.set("Prefer",`count=${i}`),new to({method:a,url:l,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class YL{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: 352import ws from "ws" 353new 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+=` 354 355Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const QL="2.98.0",XL=`realtime-js/${QL}`,JL="1.0.0",bC="2.0.0",zx=bC,Em=1e4,ZL=1e3,e5=100;var cs;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(cs||(cs={}));var ct;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(ct||(ct={}));var Gn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Gn||(Gn={}));var Tm;(function(e){e.websocket="websocket"})(Tm||(Tm={}));var ci;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(ci||(ci={}));class t5{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:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},f=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+f.length,p=new ArrayBuffer(this.HEADER_LENGTH+h);let w=new DataView(p),g=0;w.setUint8(g++,this.KINDS.userBroadcastPush),w.setUint8(g++,l.length),w.setUint8(g++,a.length),w.setUint8(g++,o.length),w.setUint8(g++,u.length),w.setUint8(g++,f.length),w.setUint8(g++,n),Array.from(l,y=>
355w.setUint8(g++,y.charCodeAt(0))),Array.from(a,y=>w.setUint8(g++,y.charCodeAt(0))),Array.from(o,y=>w.setUint8(g++,y.charCodeAt(0))),Array.from(u,y=>w.setUint8(g++,y.charCodeAt(0))),Array.from(f,y=>w.setUint8(g++,y.charCodeAt(0)));var x=new Uint8Array(p.byteLength+r.byteLength);return x.set(new Uint8Array(p),0),x.set(new Uint8Array(r),p.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;return 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 u=r.decode(t.slice(l,l+s));l=l+s;const d=r.decode(t.slice(l,l+i));l=l+i;const f=r.decode(t.slice(l,l+o));l=l+o;const h=t.slice(l,t.byteLength),p=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,w={type:this.BROADCAST_EVENT,event:d,payload:p};return o>0&&(w.meta=JSON.parse(f)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:w}}_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)))}}class SC{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Me;(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"})(Me||(Me={}));const Wx=(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]=n5(o,e,t,s),i),{}):{}},n5=(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)?kC(i,o):jm(o)},kC=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return o5(t,n)}switch(e){case Me.bool:return r5(t);case Me.float4:case Me.float8:case Me.int2:case Me.int4:case Me.int8:case Me.numeric:case Me.oid:return s5(t);case Me.json:case Me.jsonb:return i5(t);case Me.timestamp:return a5(t);case Me.abstime:case Me.date:case Me.daterange:case Me.int4range:case Me.int8range:case Me.money:case Me.reltime:case Me.text:case Me.time:case Me.timestamptz:case Me.timetz:case Me.tsrange:case Me.tstzrange:return jm(t);default:return jm(t)}},jm=e=>e,r5=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},s5=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},i5=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},o5=(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=>kC(t,a))}return e},a5=e=>typeof e=="string"?e.replace(" ","T"):e,_C=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class vh{constructor(t,n,r={},s=Em){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,j
355oin_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Hx;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Hx||(Hx={}));class al{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=al.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=al.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=al.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const i=this.cloneDeep(t),o=this.transformState(n),a={},l={};return this.map(i,(u,d)=>{o[u]||(l[u]=d)}),this.map(o,(u,d)=>{const f=i[u];if(f){const h=d.map(x=>x.presence_ref),p=f.map(x=>x.presence_ref),w=d.filter(x=>p.indexOf(x.presence_ref)<0),g=f.filter(x=>h.indexOf(x.presence_ref)<0);w.length>0&&(a[u]=w),g.length>0&&(l[u]=g)}else a[u]=d}),this.syncDiff(i,{joins:a,leaves:l},r,s)}static syncDiff(t,n,r,s){const{joins:i,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var u;const d=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(l),d.length>0){const f=t[a].map(p=>p.presence_ref),h=d.filter(p=>f.indexOf(p.presence_ref)<0);t[a].unshift(...h)}r(a,d,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;const d=l.map(f=>f.presence_ref);u=u.filter(f=>d.indexOf(f.presence_ref)<0),t[a]=u,s(a,u,l),u.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var qx;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(qx||(qx={}));var ll;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ll||(ll={}));var Pr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Pr||(Pr={}));class vo{constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=ct.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new vh(this,Gn.join,this.params,this.timeout),this.rejoinTimer=new SC(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=ct.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=ct.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=ct.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=ct.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=ct.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Gn.reply,{},(o,a)=>{this._trigger(this._replyEventName(a),o)}),this.presence=new al(this),this.broadcastEndpointURL=_C(this.socket.endPoint),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`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.state==ct.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[ll.PRESENCE]&&this.bindings[ll.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,f={},h={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(p=>t==null?void 0:t(Pr.CHANNEL_ERROR,p)),this._onClose(()=>t==null?void 0:t(Pr.CLOSED)),this.updateJoinPayload(Object.assign({config:h},f)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:p})=>{var w;if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(Pr.SUBSCRIBED);return}else{const g=this.bindings.postgres_changes,x=(w=g==null?void 0:g.length)!==null&&w!==void 0?w:0,y=[];for(let v=0;v<x;v++){const b=g[v],{filter:{event:S,schema:k,table:T,filter:E}}=b,j=p&&p[v];if(j&&j.event===S&&vo.isFilterValueEqual(j.schema,k)&&vo.isFilterValueEqual(j.table,T)&&vo.isFilterValueEqual(j.filter,E))y.push(Object.assign(Object.assign({},b),{id:j.id}));else{this.unsubscribe(),this.state=ct.errored,t==null||t(Pr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,t&&t(Pr.SUBSCRIBED);return}}).receive("error",p=>{this.state=ct.errored,t==null||t(Pr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Pr.TIMED_OUT)})}return this}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){return this.state===ct.joined&&t===ll.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject("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;
355try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event: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 u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this._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"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=ct.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Gn.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new vh(this,Gn.leave,{},t),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ct.closed,this.bindings={}}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}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new vh(this,t,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>e5){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,i;const o=t.toLocaleLowerCase(),{close:a,error:l,leave:u,join:d}=Gn;if(r&&[a,l,u,d].indexOf(o)>=0&&r!==this._joinRef())return;let h=this._onMessage(o,n,r);if(n&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(p=>{var w,g,x;return((w=p.filter)===null||w===void 0?void 0:w.event)==="*"||((x=(g=p.filter)===null||g===void 0?void 0:g.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===o}).map(p=>p.callback(h,r)):(i=this.bindings[o])===null||i===void 0||i.filter(p=>{var w,g,x,y,v,b;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in p){const S=p.id,k=(w=p.filter)===null||w===void 0?void 0:w.event;return S&&((g=n.ids)===null||g===void 0?void 0:g.includes(S))&&(k==="*"||(k==null?void 0:k.toLocaleLowerCase())===((x=n.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))}else{const S=(v=(y=p==null?void 0:p.filter)===null||y===void 0?void 0:y.event)===null||v===void 0?void 0:v.toLocaleLowerCase();return S==="*"||S===((b=n==null?void 0:n.event)===null||b===void 0?void 0:b.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===o}).map(p=>{if(typeof h=="object"&&"ids"in h){const w=h.data,{schema:g,table:x,commit_timestamp:y,type:v,errors:b}=w;h=Object.assign(Object.assign({},{schema:g,table:x,commit_timestamp:y,eventType:v,new:{},old:{},errors:b}),this._getPayloadRecords(w))}p.callback(h,r)})}_isClosed(){return this.state===ct.closed}_isJoined(){return this.state===ct.joined}_isJoining(){return this.state===ct.joining}_isLeaving(){return this.state===ct.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),i={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&vo.isEqual(s.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Gn.close,{},t)}_onError(t){this._on(Gn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=ct.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Wx(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Wx(t.columns,t.old_record)),n}}const xh=()=>{},Kc={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},l5=[1e3,2e3,5e3,1e4],c5=1e4,u5=` 356 addEventListener("message", (e) => { 357 if (e.data.event === "start") { 358 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 359 } 360 });`;class d5{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Em,this.transport=null,this.heartbeatIntervalMs=Kc.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=xh,this.ref=0,this.reconnectTimer=null,this.vsn=zx,this.logger=xh,this.conn=null,this.sendBuffer=[],this.serializer
360=new t5,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...i)=>s(...i):(...i)=>fetch(...i),!(!((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,this.endPoint=`${t}/${Tm.websocket}`,this.httpEndpoint=_C(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=YL.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n} 361 362To use Realtime in Node.js, you need to provide a WebSocket implementation: 363 364Option 1: Use Node.js 22+ which has native WebSocket support 365Option 2: Install and provide the "ws" package: 366 367 npm install ws 368 369 import ws from "ws" 370 const client = new RealtimeClient(url, { 371 ...options, 372 transport: ws 373 })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case cs.connecting:return ci.Connecting;case cs.open:return ci.Open;case cs.closing:return ci.Closing;default:return ci.Closed}}isConnected(){return this.connectionState()===ci.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new vo(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){const{topic:n,event:r,payload:s,ref:i}=t,o=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(ZL,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},Kc.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>
373{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",u)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:s,payload:i,ref:o}=n,a=o?`(${o})`:"",l=i.status||"";this.log("receive",`${l} ${r} ${s} ${a}`.trim(),i),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(s,i,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===cs.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===cs.open||this.conn.readyState===cs.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.accessTokenValue&&(this.channels.forEach(n=>{n.updateJoinPayload({access_token:this.accessTokenValue})}),this.sendBuffer=[],this.channels.forEach(n=>{n._isJoining()&&(n.joinPush.sent=!1,n.joinPush.send())})),this.flushSendBuffer()}).catch(n=>{this.log("error","error waiting for auth on connect",n),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker()},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)}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t);try{this.heartbeatCallback("error")}catch(n){this.log("error","error in heartbeat callback",n)}}_triggerChanError(){this.channels.forEach(t=>t._trigger(Gn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([u5],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}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.forEac
373h(s=>{const i={access_token:n,version:XL};n&&s.updateJoinPayload(i),s.joinedOnce&&s._isJoined()&&s._push(Gn.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)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new SC(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Kc.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,s,i,o,a,l,u,d,f,h,p;switch(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:Em,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Kc.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:xh,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:zx,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:w=>l5[w-1]||c5,this.vsn){case JL:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(w,g)=>g(JSON.stringify(w)),this.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:(w,g)=>g(JSON.parse(w));break;case bC:this.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h:this.serializer.encode.bind(this.serializer),this.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Ll=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 f5(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 h5(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 p5(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=f5(e.baseUrl,r,s),l=await h5(e.auth),u=await t(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),d=await u.text(),f=(u.headers.get("content-type")||"").includes("application/json"),h=f&&d?JSON.parse(d):d;if(!u.ok){const p=f?h:void 0,w=p==null?void 0:p.error;throw new Ll((w==null?void 0:w.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:p})}return{status:u.status,headers:u.headers,data:h}}}}function Gc(e){return e.join("�")}var m5=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Gc(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/${Gc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Gc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Gc(e.namespace)}`}),!0}catch(t){if(t instanceof Ll&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Ll&&n.status===409)return;throw n}}};function Wi(e){return e.join("�")}var g5=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/${Wi(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/${Wi(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/${Wi(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/${Wi(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/${Wi(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/${Wi(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Ll&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Ll&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},y5=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=p5({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new m5(this.client,t),this.tableOps=new g5(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)}
373async 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)}},uf=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}};function df(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Yc=class extends uf{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{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},CC=class extends uf{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const v5=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),x5=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)},Pm=e=>{if(Array.isArray(e))return e.map(n=>Pm(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]=Pm(r)}),t},w5=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function $l(e){"@babel/helpers - typeof";return $l=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},$l(e)}function b5(e,t){if($l(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if($l(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S5(e){var t=b5(e,"string");return $l(t)=="symbol"?t:t+""}function k5(e,t,n){return(t=S5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kx(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 ue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kx(Object(n),!0).forEach(function(r){k5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const Gx=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)},_5=async(e,t,n,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const s=e,i=s.status||500;if(typeof s.json=="function")s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Yc(Gx(o),i,a,r))}).catch(()=>{if(r==="vectors"){const o=i+"";t(new Yc(s.statusText||`HTTP ${i} error`,i,o,r))}else{const o=i+"";t(new Yc(s.statusText||`HTTP ${i} error`,i,o,r))}});else{const o=i+"";t(new Yc(s.statusText||`HTTP ${i} error`,i,o,r))}}else t(new CC(Gx(e),e,r))},C5=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?ue(ue({},s),n):(x5(r)?(s.headers=ue({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),ue(ue({},s),n))};async function $a(e,t,n,r,s,i,o){return new Promise((a,l)=>{e(n,C5(t,r,s,i)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>_5(u,l,r,o))})}function EC(e="storage"){return{get:async(t,n,r,s)=>$a(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>$a(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>$a(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>$a(t,"HEAD",n,ue(ue({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>$a(t,"DELETE",n,s,i,r,e)}}const E5=EC("storage"),{get:Fl,post:Wn,put:Nm,head:T5,remove:My}=E5,dn=EC("vectors");var wa=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=v5(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=ue(ue({},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(df(n))return{data:null,error:n};throw n}}},j5=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(df(t))return{data:null,error:t};throw t}}};let TC;TC=Symbol.toStringTag;var P5=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[TC]="BlobDownloadBuilder",this.promise=null}asStream(){return new j5(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(df(t))return{data:null,error:t};throw t}}};const N5={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Yx={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var R5=class extends wa{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=ue(ue({},Yx),r);let a=ue(ue({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;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&&(a=ue(ue({},a),r.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),f=await(e=="PUT"?Nm:Wn)(s.fetch,`${s.url}/object/${d}`,i,ue({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:f.Id,fullPath:f.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 u=ue({upsert:Yx.upsert},r),d=ue(ue({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",u.cacheControl)):(l=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:i,fullPath:(await Nm(s.fetch,a.toString(),l,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);
373const s=ue({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Wn(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 uf("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 Wn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Wn(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),i=await Wn(r.fetch,`${r.url}/object/sign/${s}`,ue({expiresIn:t},n!=null&&n.transform?{transform:n.transform}:{}),{headers:r.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{signedUrl:encodeURI(`${r.url}${i.signedURL}${o}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await Wn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s.map(o=>ue(ue({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${i}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=s?`?${s}`:"",o=this._getFinalPath(e),a=()=>Fl(this.fetch,`${this.url}/${r}/${o}${i}`,{headers:this.headers,noResolveJson:!0},n);return new P5(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Pm(await Fl(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await T5(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(df(r)&&r instanceof CC){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&r.push(o);let a=r.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await My(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=ue(ue(ue({},N5),t),{},{prefix:e||""});return await Wn(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=ue({},e);return await Wn(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,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const A5="2.98.0",dc={"X-Client-Info":`storage-js/${A5}`};var O5=class extends wa{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=ue(ue({},dc),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Fl(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Fl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Wn(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 Nm(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 Wn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await My(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():""}},D5=class extends wa{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=ue(ue({},dc),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Wn(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 Fl(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await My(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!w5(e))throw new uf("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 y5({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
373),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}}}}})}},I5=class extends wa{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=ue(ue({},dc),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await dn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await dn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},M5=class extends wa{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=ue(ue({},dc),{},{"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 dn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await dn.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 dn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await dn.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 dn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},L5=class extends wa{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=ue(ue({},dc),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await dn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},$5=class extends L5{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new F5(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)}},F5=class extends I5{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,ue(ue({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,ue(ue({},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 B5(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
373,B5=class extends M5{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,ue(ue({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,ue(ue({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,ue(ue({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,ue(ue({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,ue(ue({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},U5=class extends O5{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new R5(this.url,this.headers,e,this.fetch)}get vectors(){return new $5(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new D5(this.url+"/iceberg",this.headers,this.fetch)}};function ff(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}const jC="2.98.0",no=30*1e3,Rm=3,wh=Rm*no,V5="http://localhost:9999",z5="supabase.auth.token",W5={"X-Client-Info":`gotrue-js/${jC}`},Am="X-Supabase-Api-Version",PC={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},H5=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,q5=10*60*1e3;class Bl extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function te(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class K5 extends Bl{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function G5(e){return te(e)&&e.name==="AuthApiError"}class ui extends Bl{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Kr extends Bl{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class ln extends Kr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function bh(e){return te(e)&&e.name==="AuthSessionMissingError"}class Hi extends Kr{constructor(){super("Auth session or user missing","AuthInvalidToken
373ResponseError",500,void 0)}}class Qc extends Kr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Xc extends Kr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function Y5(e){return te(e)&&e.name==="AuthImplicitGrantRedirectError"}class Qx extends Kr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Q5 extends Kr{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 Om extends Kr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Sh(e){return te(e)&&e.name==="AuthRetryableFetchError"}class Xx extends Kr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Dm extends Kr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const xd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Jx=` 374\r=`.split(""),X5=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Jx.length;t+=1)e[Jx[t].charCodeAt(0)]=-2;for(let t=0;t<xd.length;t+=1)e[xd[t].charCodeAt(0)]=t;return e})();function Zx(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(xd[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(xd[r]),t.queuedBits-=6}}function NC(e,t,n){const r=X5[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=>{e4(o,r,n)};for(let o=0;o<e.length;o+=1)NC(e.charCodeAt(o),s,i);return t.join("")}function J5(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 Z5(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}J5(r,t)}}function e4(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 Do(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)NC(e.charCodeAt(s),n,r);return new Uint8Array(t)}function t4(e){const t=[];return Z5(e,n=>t.push(n)),new Uint8Array(t)}function pi(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Zx(s,n,r)),Zx(null,n,r),t.join("")}function n4(e){return Math.round(Date.now()/1e3)+e}function r4(){return Symbol("auth-callback")}const kt=()=>typeof window<"u"&&typeof document<"u",ti={tested:!1,writable:!1},RC=()=>{if(!kt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ti.tested)return ti.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ti.tested=!0,ti.writable=!0}catch{ti.tested=!0,ti.writable=!1}return ti.writable};function s4(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
374h((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const AC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),i4=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ro=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},ni=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},St=async(e,t)=>{await e.removeItem(t)};class hf{constructor(){this.promise=new hf.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}hf.promiseConstructor=Promise;function Jc(e){const t=e.split(".");if(t.length!==3)throw new Dm("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!H5.test(t[r]))throw new Dm("JWT not in base64url format");return{header:JSON.parse(ew(t[0])),payload:JSON.parse(ew(t[1])),signature:Do(t[2]),raw:{header:t[0],payload:t[1]}}}async function o4(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function a4(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 l4(e){return("0"+e.toString(16)).substr(-2)}function c4(){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,l4).join("")}async function u4(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 d4(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 u4(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function qi(e,t,n=!1){const r=c4();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await ro(e,`${t}-code-verifier`,s);const i=await d4(r);return[i,r===i?"plain":"s256"]}const f4=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function h4(e){const t=e.headers.get(Am);if(!t||!t.match(f4))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function p4(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 m4(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 g4=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ki(e){if(!g4.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function kh(){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 y4(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 ai=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),v4=[502,503,504];async function nw(e){var t;if(!i4(e))throw new Om(ai(e),0);if(v4.includes(e.status))throw new Om(ai(e),e.status);let n;try{n=await e.json()}catch(i){throw new ui(ai(i),i)}let r;const s=h4(e);if(s&&s.getTime()>=PC["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 Xx(ai(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new ln}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)=>
374i&&typeof o=="string",!0))throw new Xx(ai(n),e.status,n.weak_password.reasons);throw new K5(ai(n),e.status||500,r)}const x4=(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 de(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Am]||(i[Am]=PC["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 w4(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 w4(e,t,n,r,s,i){const o=x4(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new Om(ai(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 Un(e){var t;let n=null;k4(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=n4(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=Un(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 fs(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function b4(e){return{data:e,error:null}}function S4(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=ff(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 k4(e){return e.access_token&&e.refresh_token&&e.expires_in}const _h=["global","local","others"];class _4{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=AC(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)}}async signOut(t,n=_h[0]){if(_h.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${_h.join(", ")}`);try{return await de(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(te(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await de(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:fs})}catch(r){if(te(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=ff(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 de(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:S4,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(te(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await de(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:fs})}catch(n){if(te(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await de(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(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>
3740&&(p.forEach(w=>{const g=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);u[`${x}Page`]=g}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(te(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Ki(t);try{return await de(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:fs})}catch(n){if(te(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Ki(t);try{return await de(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:fs})}catch(r){if(te(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Ki(t);try{return await de(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:fs})}catch(r){if(te(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Ki(t.userId);try{const{data:n,error:r}=await de(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(te(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Ki(t.userId),Ki(t.id);try{return{data:await de(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(te(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await de(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(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(w=>{const g=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);u[`${x}Page`]=g}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(te(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await de(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(te(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await de(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(te(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await de(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(te(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await de(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(te(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await de(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(te(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 Er={debug:!!(globalThis&&RC()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class OC extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class C4 extends OC{}async function E4(e,t,n){Er.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;t>0&&setTimeout(()=>{r.abort(),Er.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 s=>{if(s){Er.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{Er.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw Er.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new C4(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Er.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}})}catch(s){if((s==null?void 0:s.name)==="AbortError"&&t>0)return Er.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@
374supabase/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 i=>{if(i){Er.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,i.name);try{return await n()}finally{Er.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,i.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw s}}function T4(){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 DC(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function j4(e){return parseInt(e,16)}function P4(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function N4(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:d,uri:f,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(!f)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(` 375`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=DC(e.address),w=d?`${d}://${r}
375`:r,g=e.statement?`${e.statement} 376`:"",x=`${w} wants you to sign in with your Ethereum account: 377${p} 378 379${g}`;let y=`URI: ${f} 380Version: ${h} 381Chain ID: ${n}${o?` 382Nonce: ${o}`:""} 383Issued At: ${i.toISOString()}`;if(s&&(y+=` 384Expiration Time: ${s.toISOString()}`),a&&(y+=` 385Not Before: ${a.toISOString()}`),l&&(y+=` 386Request ID: ${l}`),u){let v=` 387Resources:`;for(const b of u){if(!b||typeof b!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b}`);v+=` 388- ${b}`}y+=v}return`${x} 389${y}`}class ot 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 wd extends ot{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function R4({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 ot({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 ot({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 ot({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 ot({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 ot({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new ot({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 ot({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new ot({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(IC(o)){if(i.rp.id!==o)return new ot({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ot({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 ot({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 ot({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 ot({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function A4({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 ot({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new ot({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(IC(r)){if(n.rpId!==r)return new ot({message:`The RP ID "${n.rpId}
389" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new ot({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new ot({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 ot({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class O4{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 D4=new O4;function I4(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=ff(e,["challenge","user","excludeCredentials"]),i=Do(t).buffer,o=Object.assign(Object.assign({},n),{id:Do(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 u=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Do(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function M4(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=ff(e,["challenge","allowCredentials"]),s=Do(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:Do(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function L4(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:pi(new Uint8Array(e.response.attestationObject)),clientDataJSON:pi(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function $4(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:pi(new Uint8Array(s.authenticatorData)),clientDataJSON:pi(new Uint8Array(s.clientDataJSON)),signature:pi(new Uint8Array(s.signature)),userHandle:s.userHandle?pi(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function IC(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function ow(){var e,t;return!!(kt()&&"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 F4(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new wd("Browser returned unexpected credential type",t)}:{data:null,error:new wd("Empty credential response",t)}}catch(t){return{data:null,error:R4({error:t,options:e})}}}async function B4(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new wd("Browser returned unexpected credential type",t)}:{data:null,error:new wd("Empty credential response",t)}}
389catch(t){return{data:null,error:A4({error:t,options:e})}}}const U4={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},V4={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function bd(...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]=bd(a,o):r[i]=bd(o)}else r[i]=o}return r}function z4(e,t){return bd(U4,e,t||{})}function W4(e,t){return bd(V4,e,t||{})}class H4{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 u=s??D4.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:d}=a.webauthn.credential_options.publicKey;if(!d.name){const f=r;if(f)d.name=`${d.id}:${f}`;else{const p=(await this.client.getUser()).data.user,w=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";d.name=`${d.id}:${w}`}}d.displayName||(d.displayName=d.name)}switch(a.webauthn.type){case"create":{const d=z4(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:f,error:h}=await F4({publicKey:d,signal:u});return f?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:f}},error:null}:{data:null,error:h}}case"request":{const d=W4(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:f,error:h}=await B4(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d,signal:u}));return f?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:f}},error:null}:{data:null,error:h}}}}catch(a){return te(a)?{data:null,error:a}:{data:null,error:new ui("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 Bl("rpId is required for WebAuthn authentication")};try{if(!ow())return{data:null,error:new ui("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 te(o)?{data:null,error:o}:{data:null,error:new ui("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 Bl("rpId is required for WebAuthn registration")};try{if(!ow())return{data:null,error:new ui("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(d=>{var f;return(f=d.data)===null||f===void 0?void 0:f.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:l,error:u}=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:u}}catch(o){return te(o)?{data:null,error:o}:{data:null,error:new ui("Unexpected error in register",o)}}}}T4();const q4={url:V5,storageKey:z5,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:W5,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function aw(e,t,n){return await n()}const Gi={};class Ul{get jwks(){var t,n;return(n=(t=Gi[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Gi[this.storageKey]=Object.assign(Object.assign({},Gi[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Gi[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Gi[this.storageKey]=Object.assign(Object.assign({},Gi[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({},q4),t);if(this.storageKey=i.storageKey,this.instanceID=(n=Ul.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Ul.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&kt()){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 _4({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=AC(i.fetch),this.lock=i.lock||aw,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&&kt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=E4:this.lock=aw,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 H4(this)}
389,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:RC()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=iw(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=iw(this.memoryStorage)),kt()&&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} (${jC}) ${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(kt()&&(n=s4(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),kt()&&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),Y5(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 te(n)?this._returnResult({error:n}):this._returnResult({error:new ui("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await de(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:Un}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(te(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:d,password:f,options:h}=t;let p=null,w=null;this.flowType==="pkce"&&([p,w]=await qi(this.storage,this.storageKey)),i=await de(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:d,password:f,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:p,code_challenge_method:w},xform:Un})}else if("phone"in t){const{phone:d,password:f,options:h}=t;i=await de(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,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:Un})}else throw new Qc("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await St(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await St(this.storage,`${this.storageKey}-code-verifier`),te(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 de(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 de(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 Qc("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 Hi;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(te(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,u,d,f,h;let p,w;if("message"in t)p=t.message,w=t.signature;else{const{chain:g,wallet:x,statement:y,options:v}=t;let b;if(kt())if(typeof x=="object")b=x;else{const R=window;if("ethereum"in R&&typeof R.ethereum=="object"&&"request"in R.ethereum&&typeof R.ethereum.request=="function")b=R.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"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=x}const S=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href),k=await b.request({method:"eth_requestAccounts"}).then(R=>R).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const T=DC(k[0]);let E=(r=v==null?void 0:v.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const R=await b.request({method:"eth_chainId"});E=j4(R)}const j={domain:S.host,address:T,statement:y,uri:S.href,version:"1",chainId:E,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=v==null?void 0:v.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=v==null?void 0:v.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=N4(j),w=await b.request({method:"personal_sign",params:[P4(p),T]})}try{const{data:g,error:x}=await de(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:w},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Un});if(x)throw x;if(!g||!g.session||!g.user){const y=new Hi;return this._returnResult({data:{user:null,session:null},error:y})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:x})}catch(g){if(te(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var n,r,s,i,o,a,l,u,d,f,h,p;let w,g;if("message"in t)w=t.message,g=t.signature;else{const{chain:x,wallet:y,statement:v,options:b}=t;let S;if(kt())if(typeof y=="object")S=y;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"))S=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 y!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=y}const k=new URL((n=b==null?void 0:b.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const T=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),v?{statement:v}: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)w=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 S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${k.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(r=b==null?void 0:b.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=b==null?void 0:b.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((o=b==null?void 0:b.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((a=b==null?void 0:b.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((l=b==null?void 0:b.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((u=b==null?void 0:b.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((f=(d=b==null?void 0:b.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...b.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 390`);const T=await S.signMessage(new TextEncoder().encode(w),"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:y}=await de(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:pi(g)}
390,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Un});if(y)throw y;if(!x||!x.session||!x.user){const v=new Hi;return this._returnResult({data:{user:null,session:null},error:v})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:y})}catch(x){if(te(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const n=await ni(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new Q5;const{data:i,error:o}=await de(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Un});if(await St(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Hi;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 St(this.storage,`${this.storageKey}-code-verifier`),te(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 de(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:Un}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new Hi;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(n){if(te(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 u=null,d=null;this.flowType==="pkce"&&([u,d]=await qi(this.storage,this.storageKey));const{error:f}=await de(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:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:d}=await de(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:u==null?void 0:u.message_id},error:d})}throw new Qc("You must provide either an email or phone number.")}catch(a){if(await St(this.storage,`${this.storageKey}-code-verifier`),te(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 de(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Un});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=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:u,session:l},error:null})}catch(s){if(te(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 qi(this.storage,this.storageKey));const u=await de(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:b4});return!((i=u.data)===null||i===void 0)&&i.url&&kt()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await St(this.storage,`${this.storageKey}-code-verifier`),te(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 ln;const{error:s}=await de(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(te(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 de(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 de(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 Qc("You must provide either an email or phone number and a type")}catch(n){if(te(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 ni(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
390id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<wh:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await ni(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=kh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=y4(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 de(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:fs}):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 ln}:await de(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:fs})})}catch(n){if(te(n))return bh(n)&&(await this._removeSession(),await St(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 ln;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await qi(this.storage,this.storageKey));const{data:u,error:d}=await de(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:fs});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await St(this.storage,`${this.storageKey}-code-verifier`),te(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 ln;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=Jc(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(te(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 ln;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(te(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!kt())throw new Xc("No browser detected.");
390if(t.error||t.error_description||t.error_code)throw new Xc(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 Qx("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Xc("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 Qx("No code detected.");const{data:v,error:b}=await this._exchangeCodeForSession(t.code);if(b)throw b;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:v.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:u}=t;if(!i||!a||!o||!u)throw new Xc("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(a);let h=d+f;l&&(h=parseInt(l));const p=h-d;p*1e3<=no&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${f}s`);const w=h-f;d-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,h,d):d-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,h,d);const{data:g,error:x}=await this._getUser(i);if(x)throw x;const y={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:f,expires_at:h,refresh_token:o,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(r){if(te(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 ni(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&&!bh(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&&!(G5(a)&&(a.status===404||a.status===401||a.status===403)||bh(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await St(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=r4(),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),console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await qi(this.storage,this.storageKey,!0));try{return await de(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 St(this.storage,`${this.storageKey}-code-verifier`),te(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(te(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,u,d;const{data:f,error:h}=i;if(h)throw h;const p=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 de(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=f.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return kt()&&!(!((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(te(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;
390if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:d}=t,f=await de(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:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Un}),{data:h,error:p}=f;return p?this._returnResult({data:{user:null,session:null},error:p}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new Hi}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:p}))}catch(s){if(await St(this.storage,`${this.storageKey}-code-verifier`),te(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 de(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(te(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 a4(async s=>(s>
3900&&await o4(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await de(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Un})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Sh(i)&&Date.now()+o-r<no})}catch(r){if(this._debug(n,"error",r),te(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),kt()&&!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 ni(this.storage,this.storageKey);if(s&&this.userStorage){let o=await ni(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await ro(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:kh()}else if(s&&!s.user&&!s.user){const o=await ni(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await St(this.storage,this.storageKey+"-user"),await ro(this.storage,this.storageKey,s)):s.user=kh()}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()<wh;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${wh}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Sh(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 ln;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new hf;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new ln;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),te(i)){const o={data:null,error:i};return Sh(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 St(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 ro(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=tw(s);await ro(this.storage,this.storageKey,i)}else{const s=tw(n);await ro(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await St(this.storage,this.storageKey),await St(this.storage,this.storageKey+"-code-verifier"),await St(this.storage,this.storageKey+"-user"),this.userStorage&&await St(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&kt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
390catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),no);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)/no);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${no}ms, refresh threshold is ${Rm} ticks`),s<=Rm&&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 OC)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!kt()||!(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 qi(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 de(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(te(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;
390if(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:u}=await de(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 u?this._returnResult({data:null,error:u}):(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(te(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"?L4(t.webauthn.credential_response):$4(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await de(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(te(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 de(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:I4(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:M4(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(te(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:p}=Jc(t);let w=null;p.aal&&(w=p.aal);let g=w;const{data:{user:x},error:y}=await this.getUser(t);if(y)return this._returnResult({data:null,error:y});((r=(n=x==null?void 0:x.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(g="aal2");const b=p.amr||[];return{data:{currentLevel:w,nextLevel:g,currentAuthenticationMethods:b},error:null}}catch(p){if(te(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:a}
390=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}=Jc(o.access_token);let u=null;l.aal&&(u=l.aal);let d=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(p=>p.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const h=l.amr||[];return{data:{currentLevel:u,nextLevel:d,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 de(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 ln})})}catch(n){if(te(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 ln});const o=await de(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&&kt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(te(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 ln});const o=await de(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&&kt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(te(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 de(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 ln})})}catch(t){if(te(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 de(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 ln})})}catch(n){if(te(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+q5>s)return r;const{data:i,error:o}=await de(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:p,error:w}
390=await this.getSession();if(w||!p.session)return this._returnResult({data:null,error:w});r=p.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Jc(r);n!=null&&n.allowExpired||p4(i.exp);const u=!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(!u){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:i,header:s,signature:o},error:null}}const d=m4(s.alg),f=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,o,t4(`${a}.${l}`)))throw new Dm("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(te(r))return this._returnResult({data:null,error:r});throw r}}}Ul.nextInstanceID={};const K4=Ul,G4="2.98.0";let Ka="";typeof Deno<"u"?Ka="deno":typeof document<"u"?Ka="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ka="react-native":Ka="node";const Y4={"X-Client-Info":`supabase-js-${Ka}/${G4}`},Q4={headers:Y4},X4={schema:"public"},J4={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Z4={};function Vl(e){"@babel/helpers - typeof";return Vl=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},Vl(e)}function e$(e,t){if(Vl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Vl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t$(e){var t=e$(e,"string");return Vl(t)=="symbol"?t:t+""}function n$(e,t,n){return(t=t$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lw(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 Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lw(Object(n),!0).forEach(function(r){n$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const r$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),s$=()=>Headers,i$=(e,t,n)=>{const r=r$(n),s=s$();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(i,Je(Je({},o),{},{headers:u}))}};function o$(e){return e.endsWith("/")?e:e+"/"}function a$(e,t){var n,r;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:u,realtime:d,global:f}=t,h={db:Je(Je({},l),s),auth:Je(Je({},u),i),realtime:Je(Je({},d),o),storage:{},global:Je(Je(Je({},f),a),{},{headers:Je(Je({},(n=f==null?void 0:f.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 l$(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(o$(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var c$=class extends K4{constructor(e){super(e)}},u$=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=l$(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:X4,realtime:Z4,auth:Je(Je({},J4),{},{storageKey:o}),global:Q4},l=a$(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:(d,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=i$(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Je({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new GL(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 U5(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new BL(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)}
390channel(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:u},d,f){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new c$({url:this.authUrl.href,headers:Je(Je({},h),d),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new d5(this.realtimeUrl.href,Je(Je({},e),{}
390,{params:Je(Je({},{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 d$=(e,t,n)=>new u$(e,t,n);function f$(){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}f$()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const h$="https://vyxpqbrblszdonsqifwk.supabase.co",p$="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZ5eHBxYnJibHN6ZG9uc3FpZndrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE4OTY0NDksImV4cCI6MjA4NzQ3MjQ0OX0.9cMUCFjc8gtU_YU748pe6EqmaXc4JEAQiIjvs7caP0g",ie=d$(h$,p$,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),MC=m.createContext(void 0);function m$({children:e}){const[t,n]=m.useState(null),[r,s]=m.useState(!0);m.useEffect(()=>{const{data:{subscription:a}}=ie.auth.onAuthStateChange((l,u)=>{n(u),s(!1)});return ie.auth.getSession().then(({data:{session:l}})=>{n(l),s(!1)}),()=>a.unsubscribe()},[]);const i=async()=>{await ie.auth.signInWithOAuth({provider:"google",options:{redirectTo:window.location.origin}})},o=async()=>{await ie.auth.signOut()};return c.jsx(MC.Provider,{value:{session:t,user:(t==null?void 0:t.user)??null,loading:r,signInWithGoogle:i,signOut:o},children:e})}function Oe(){const e=m.useContext(MC);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}const LC={es:{nav:{today:"Hoy",explore:"Explorar",history:"Historial",ranking:"Ranking",profile:"Perfil"},explore:{searchPlaceholder:"Buscar negocios o lugares...",nearbyTitle:"Cerca de ti",open:"Abierto",closed:"Cerrado",go:"Ir",back:"Volver",driving:"Auto",walking:"Caminando",bicycling:"Bicicleta",distance:"Distancia",duration:"Duracion",noResults:"No se encontraron lugares.",loading:"Buscando lugares...",noBaseCamp:"Configura tu Base Camp para explorar.",configure:"Configurar",errorPlaces:"Error al buscar lugares.",errorRoute:"Error al calcular la ruta.",vocabulary:"Vocabulario",openInMaps:"Abrir en Google Maps",favorites:"Favoritos",nearby:"Cerca",addFavorite:"Agregar a favoritos",removeFavorite:"Quitar de favoritos",noFavorites:"No tienes lugares favoritos aun.",radiusFilter:"Radio",resetRadius:"Limpiar"},placeDetail:{title:"Detalle del lugar",commonPhrases:"Frases comunes",loadingPhrases:"Parece que hay un poco de trafico de internet.",errorPhrases:"Error al generar frases.",back:"Volver",openInMaps:"Abrir en Google Maps",toSay:"Para decir",responses:"Posibles respuestas",orAlso:"O tambien...",youCanReply:"Puedes responder:",completeMission:"Completar Mision",missionCompleted:"Mision completada!",alreadyCompleted:"Mision ya completada"},paywall:{title:"Yaku necesita un cafe",message:"Invitale un Tim Hortons a Yaku y sigue practicando sin limites.",audioTitle:"Yaku se quedo sin voz",audioMessage:"Invitale un cafe a Yaku para que siga hablando por ti.",orWait:"O espera hasta manana. Tienes 2 vocabularios y 5 audios gratis por dia.",cta24h:"24 Horas",cta7d:"7 Dias",cta30d:"30 Dias",cta1y:"1 Año",price24h:"$1 CAD",price7d:"$5 CAD",price30d:"$10 CAD",price1y:"$100 CAD",price1yOffer:"$25 CAD",offerBadge:"75% OFF",todayOnly:"Solo por hoy",buy:"Comprar",promoTitle:"Oferta limitada",promoSubtitle:"Solo por hoy - Primeras 10 personas"},today:{title:"Hoy",greeting:"Hola",yakuProud:"Yaku esta orgulloso de ti!",subtitle:"Completa tus retos diarios",dailyProgress:"Progreso diario",challengeOf
390:"Reto del Dia",mission:"Mision",place:"Lugar",phrasesToSay:"Top 10 frases para decir",possibleResponses:"Top 10 posibles respuestas",toSay:"Para decir",responses:"Posibles respuestas",orAlso:"O tambien...",youCanReply:"Puedes responder:",completeChallenge:"Completar Reto",getCloser:"Acercate a menos de 1KM del local",youAreAway:"Estas a",away:"de distancia",howDidItGo:"Como te fue?",froze:"Me congele un poco",survived:"Sobrevivi",pieceOfCake:"Pan comido",save:"Guardar",completed:"Reto completado",generating:"Generando tu reto...",loadingChallenge:"Cargando tu reto...",noBaseCamp:"Configura tu Base Camp para recibir retos",errorGenerating:"Error al generar el reto",retry:"Reintentar",pronunciation:"Pronunciacion",reducedReward:"Acercate al lugar para ganar todos los puntos (+1 CP sin GPS)"},profile:{level:"Nivel",totalCp:"CP Totales",streak:"Racha",missions:"Misiones",days:"dias",comingSoon:"Proximamente",practiceLang:"Elige que idioma quieres practicar",openToTalk:"Perfil Open to Talk",chatWithYaku:"Conversa con Yaku",practiceGroups:"Grupos de Practica",alertsRewards:"Alertas & Recompensas",logout:"Cerrar sesion",baseCamp:"Base Camp",baseCampNotSet:"No has configurado tu Base Camp aun.",configure:"Configurar",edit:"Editar",language:"Idioma",searchRadius:"Radio de busqueda",legalPrivacy:"Legal y Privacidad",termsOfService:"Terminos y Condiciones",privacyPolicy:"Politica de Privacidad",dangerZone:"Zona de Peligro",deleteAccount:"Eliminar cuenta permanentemente",deleteWarning:"Esta accion es irreversible. Se eliminaran permanentemente tus Confidence Points (CP), tu racha, tu historial de misiones y tu informacion de perfil de nuestros servidores en cumplimiento con las leyes de privacidad de Canada.",typeDelete:"Escribe DELETE para confirmar",deleting:"Eliminando...",deleted:"Cuenta eliminada exitosamente",deleteError:"Error al eliminar la cuenta",voice:"Voz",voiceSelect:"Elegir voz",voicePreview:"Elegir",editProfile:"Editar perfil",displayName:"Nombre",changePhoto:"Cambiar foto",save:"Guardar",free:"Free",activePass:"Pase activo",remaining:"restantes",founder:"Founder",unlimited:"Ilimitado"},consent:{message:"Yaku utiliza tu ubicacion (GPS) unicamente en el momento de uso para sugerirte misiones cercanas. No rastreamos tus rutas en segundo plano.",accept:"Aceptar y Continuar",readPolicies:"Leer Politicas"},radius:{title:"Radio de busqueda",description:"Define que tan lejos pueden estar los retos de tu Base Camp",save:"Guardar",saved:"Radio guardado",errorSaving:"Error al guardar el radio"},history:{title:"Historial",missions:"Misiones",places:"Lugares",phrases:"Frases Favoritas",noVisits:"Aun no has visitado lugares.",noPhrases:"Aun no tienes frases favoritas.",noMissions:"Aun no has completado misiones.",cpEarned:"CP ganados"},ranking:{title:"Ranking",subtitle:"Top 10 cerca de ti",radius:"Radio",noResults:"No hay resultados en este radio.",noBaseCamp:"Configura tu Base Camp para ver el ranking.",anonymous:"Anonimo",you:"Tu",all:"Todos",yourPosition:"Tu posicion",countryPending:"Pais pendiente..."},location:{needed:"Activar ubicacion",denied:"Ubicacion requerida",deniedDesc:"Yaku necesita tu ubicacion para mostrarte lugares cercanos y verificar tus retos.",retry:"Reintentar",enableHint:"Si bloqueaste el permiso, ve a la configuracion de tu navegador y habilita la ubicacion para este sitio."},baseCamp:{dialogTitle:"Configurar Base Camp",welcomeTitle:"Bienvenido a YAKU",welcomeDesc:"Antes de empezar, necesitamos configurar tu",welcomeDescSuffix:"â el punto desde donde exploraras tu nueva ciudad.",configureCta:"Configurar Base Camp",chooseTitle:"Elige como ubicarte",chooseDesc:"Puedes usar tu GPS o escribir tu direccion manualmente.",useGps:"Usar mi ubicacion (GPS)",searching:"Buscando...",writeAddress:"Escribir direccion",searchTitle:"Busca tu direccion",searchDesc:"Escribe tu direccion, ciudad o codigo postal.",searchPlaceholder:"Ej: 123 Main St, Toronto",noResults:"No se encontraron resultados. Intenta con otra direccion.",back:"Volver",confirmTitle:"Confirma tu Base Camp",confirmDesc:"Esta sera tu zona de inicio.",confirmCta:"Confirmar Base Camp",chooseAnother:"Elegir otra ubicacion",doneTitle:"Base Camp listo",doneDesc:"Ya puedes empezar a completar retos y ganar puntos de confianza.",skip:"Saltar por ahora",skipTitle:"Saltar c
390onfiguracion?",skipDesc:"Si te saltas este paso, no podras acceder a los retos hasta que configures tu Base Camp.",skipConfirm:"Si, saltar",skipCancel:"Volver",errorSearch:"Error al buscar la direccion.",errorOutsideRegion:"Solo disponible en Canada. Usa la busqueda manual para elegir una direccion canadiense.",errorLocation:"No pudimos obtener tu ubicacion. Revisa los permisos de tu navegador.",errorSave:"Error al guardar tu Base Camp."},login:{tagline:"Gana confianza en tu nuevo hogar con retos diarios en el mundo real",continueGoogle:"Continuar con Google",legal:"Al continuar, aceptas nuestros",terms:"Terminos de Uso",and:"y",privacy:"Politica de Privacidad"},landing:{heroTitlePrefix:"Gana confianza real en tu ",heroTitleHighlight:"nuevo hogar",heroTitleSuffix:"",heroSub:"Retos diarios en el mundo real que ayudan a los recien llegados en Canada a practicar ingles a traves de interacciones cotidianas.",cta:"VER PRESENTACION",loginCta:"INGRESAR",langLabel:"EN",section1Title:"PRACTICA EN EL MUNDO REAL",section1Desc:"Sin aulas ni libros. Supera retos diarios en cafeterÃas, farmacias o el transporte público de tu ciudad.",section2Title:"HECHO PARA RECIÃN LLEGADOS",section2Desc:"Contexto 100% local. Aprende el inglés cotidiano y los modismos canadienses que nadie te enseña.",section3Title:"GANA PUNTOS DE CONFIANZA",section3Desc:"Cada interacción suma. Completa misiones reales, mantén tu racha y sube de nivel tu confianza (CP).",section4Title:"PERSONALIZADO A TU BARRIO",section4Desc:'Retos basados en tu ubicación. Descubre lugares cercanos a tu "Base Camp" en tu rutina diaria.',section5Title:"PRIVACIDAD PRIMERO",section5Desc:"Sin rastreo oculto. Solo usamos tu GPS cuando abres la app, cumpliendo con las estrictas leyes de Canadá.",section6Title:"FRASES QUE IMPORTAN",section6Desc:'"Cheat sheets" al instante. Obtén los guiones exactos que necesitas justo antes de entrar al banco o al súper.',footerTag:"Disponible exclusivamente en Canada",footerLegal:"Terminos y Condiciones",footerPrivacy:"Politica de Privacidad"},onboarding:{profileTitle:"Tu perfil",profileDesc:"Confirma tu nombre y foto",languageTitle:"Elige tu idioma",languageDesc:"Selecciona el idioma en el que quieres usar Yaku.",voiceTitle:"Elige tu voz",voiceDesc:"Selecciona la voz que te acompanara en tus retos.",continue:"Continuar"},langSwitch:{congratsTitle:"Yaku esta orgulloso de ti!",congratsMsg:"Usar la app en ingles te ayudara a practicar cada dia.",letsGo:"Let's go!",areYouSure:"Wait... are you sure?",yakuSad:"Using the app in English helps you practice every day!",stayEnglish:"Stay in English",switchSpanish:"Switch to Spanish",disappointment:`Has hecho llorar a Yaku. 391Espero que estes contento.`},pitch:{intro:{slogan:"Gana confianza real en tu nuevo hogar",desc:"Retos diarios en el mundo real para practicar ingles a traves de interacciones cotidianas en Canada."},problem:{title:"El Problema",needItems:["Saben inglés básico, pero se **congelan** en la vida real.","La teorÃa no es lo mismo que la confianza práctica.","Miedo a las interacciones cotidianas."],whoItems:["Recién llegados hispanohablantes en Canadá.","Muy dependientes de traductores para tareas básicas.","Sintiéndose aislados por la barrera del idioma."],needLabel:"La necesidad",whoLabel:"A quien afecta"},solution:{title:"La Solución",desc:"Un mapa gamificado que convierte tu ciudad en un gimnasio de idiomas. Practica con frases reales en lugares reales.",f1:"Frases contextuales",f1d:"Guiones instantáneos basados en tu ubicación exacta.",f2:"Respuestas comunes",f2d:"Anticipa lo que te van a decir.",f3:"Zonas de confianza",f3d:"Progresa en tu vecindario real.",f4:"Rachas y puntos",f4d:"Gamificación que te motiva todos los dÃas."},beneficiaries:{title:"¿A quién beneficia?",subtitle:"Recién llegados latinos en Canadá que buscan romper la barrera del idioma en su vida diaria.",c1t:"Independencia Real",c1d:"Reduce la dependencia de traductores para tareas básicas.",c2t:"Victorias Diarias",c2d:"Convierte situaciones aterradoras en triunfos seguros.",c3t:"Integración Rápida",c3d:"Acelera la integración socioeconómica en tu nueva ciudad."},team:{title:"Team",rosmel:"CEO & Product",natalia:"Marketing & Growth",milagros:"Operations",arturo:"Technology"},app:{title:"Descubre Yaku",cta:"INGRESAR",caption:"Disponible en Canada"},nav:{prev:"Anterior",next:"Siguiente"}}},en:{nav:{today:"Today",explore:"Explore",history:"History",ranking:"Ranking",profile:"Profile"},explore:{searchPlaceholder:"Search businesses or places...",nearbyTitle:"Near you",open:"Open",closed:"Closed",go:"Go",back:"Back",driving:"Driving",walking:"Walking",bicycling:"Bicycling",distance:"Distance",duration:"Duration",no
391Results:"No places found.",loading:"Searching places...",noBaseCamp:"Set up your Base Camp to explore.",configure:"Set up",errorPlaces:"Error searching places.",errorRoute:"Error calculating route.",vocabulary:"Vocabulary",openInMaps:"Open in Google Maps",favorites:"Favorites",nearby:"Nearby",addFavorite:"Add to favorites",removeFavorite:"Remove from favorites",noFavorites:"You don't have favorite places yet.",radiusFilter:"Radius",resetRadius:"Reset"},placeDetail:{title:"Place detail",commonPhrases:"Common phrases",loadingPhrases:"Looks like there's a bit of internet traffic.",errorPhrases:"Error generating phrases.",back:"Back",openInMaps:"Open in Google Maps",toSay:"To Say",responses:"Possible Responses",orAlso:"Or also...",youCanReply:"You can reply:",completeMission:"Complete Mission",missionCompleted:"Mission completed!",alreadyCompleted:"Mission already completed"},paywall:{title:"Yaku needs a coffee",message:"Buy Yaku a Tim Hortons and keep practicing without limits.",audioTitle:"Yaku lost his voice",audioMessage:"Buy Yaku a coffee so he can keep speaking for you.",orWait:"Or wait until tomorrow. You get 2 free vocabularies and 5 free audios per day.",cta24h:"24 Hours",cta7d:"7 Days",cta30d:"30 Days",cta1y:"1 Year",price24h:"$1 CAD",price7d:"$5 CAD",price30d:"$10 CAD",price1y:"$100 CAD",price1yOffer:"$25 CAD",offerBadge:"75% OFF",todayOnly:"Today only",buy:"Buy",promoTitle:"Limited offer",promoSubtitle:"Today only - First 10 people"},today:{title:"Today",greeting:"Hi",yakuProud:"Yaku is proud of you!",subtitle:"Complete your daily challenges",dailyProgress:"Daily progress",challengeOf
391:"Challenge of the Day",mission:"Mission",place:"Place",phrasesToSay:"Top 10 phrases to say",possibleResponses:"Top 10 possible responses",toSay:"To Say",responses:"Possible Responses",orAlso:"Or also...",youCanReply:"You can reply:",completeChallenge:"Complete Challenge",getCloser:"Get closer than 1KM",youAreAway:"You are",away:"away",howDidItGo:"How did it go?",froze:"I froze a little",survived:"I survived",pieceOfCake:"Piece of cake",save:"Save",completed:"Challenge completed",generating:"Generating your challenge...",loadingChallenge:"Loading your challenge...",noBaseCamp:"Set up your Base Camp to get challenges",errorGenerating:"Error generating challenge",retry:"Retry",pronunciation:"Pronunciation",reducedReward:"Get closer to earn full points (+1 CP without GPS)"},profile:{level:"Level",totalCp:"Total CP",streak:"Streak",missions:"Missions",days:"days",comingSoon:"Coming soon",practiceLang:"Choose which language you want to practice",openToTalk:"Open to Talk Profile",chatWithYaku:"Chat with Yaku",practiceGroups:"Practice Groups",alertsRewards:"Alerts & Rewards",logout:"Log out",baseCamp:"Base Camp",baseCampNotSet:"You haven't set up your Base Camp yet.",configure:"Set up",edit:"Edit",language:"Language",searchRadius:"Search radius",legalPrivacy:"Legal & Privacy",termsOfService:"Terms of Service",privacyPolicy:"Privacy Policy",dangerZone:"Danger Zone",deleteAccount:"Delete account permanently",deleteWarning:"This action is irreversible. Your Confidence Points (CP), streak, mission history, and profile information will be permanently deleted from our servers in compliance with Canadian privacy laws.",typeDelete:"Type DELETE to confirm",deleting:"Deleting...",deleted:"Account deleted successfully",deleteError:"Error deleting account",voice:"Voice",voiceSelect:"Select voice",voicePreview:"Select",editProfile:"Edit profile",displayName:"Name",changePhoto:"Change photo",save:"Save",free:"Free",activePass:"Active pass",remaining:"remaining",founder:"Founder",unlimited:"Unlimited"},consent:{message:"Yaku uses your location (GPS) only at the moment of use to suggest nearby missions. We do not track your routes in the background.",accept:"Accept and Continue",readPolicies:"Read Policies"},radius:{title:"Search radius",description:"Define how far challenges can be from your Base Camp",save:"Save",saved:"Radius saved",errorSaving:"Error saving radius"},history:{title:"History",missions:"Missions",places:"Places",phrases:"Favorite Phrases",noVisits:"You haven't visited any places yet.",noPhrases:"You don't have favorite phrases yet.",noMissions:"You haven't completed any missions yet.",cpEarned:"CP earned"},ranking:{title:"Ranking",subtitle:"Top 10 near you",radius:"Radius",noResults:"No results in this radius.",noBaseCamp:"Set up your Base Camp to see the ranking.",anonymous:"Anonymous",you:"You",all:"All",yourPosition:"Your position",countryPending:"Country pending..."},location:{needed:"Enable location",denied:"Location required",deniedDesc:"Yaku needs your location to show nearby places and verify your challenges.",retry:"Retry",enableHint:"If you blocked the permission, go to your browser settings and enable location for this site."},baseCamp:{dialogTitle:"Set up Base Camp",welcomeTitle:"Welcome to YAKU",welcomeDesc:"Before we start, we need to set up your",welcomeDescSuffix:"â the starting point from which you'll explore your new city.",configureCta:"Set up Base Camp",chooseTitle:"Choose how to locate yourself",chooseDesc:"You can use your GPS or type your address manually.",useGps:"Use my location (GPS)",searching:"Searching...",writeAddress:"Type address",searchTitle:"Search your address",searchDesc:"Type your address, city, or postal code.",searchPlaceholder:"E.g.: 123 Main St, Toronto",noResults:"No results found. Try a different address.",back:"Back",confirmTitle:"Confirm your Base Camp",confirmDesc:"This will be your starting zone.",confirmCta:"Confirm Base Camp",chooseAnother:"Choose another location",doneTitle:"Base Camp ready",doneDesc:"You can now start completing challenges and earning confidence points.",skip:"Skip for now",
391skipTitle:"Skip setup?",skipDesc:"If you skip this step, you won't be able to access challenges until you set up your Base Camp.",skipConfirm:"Yes, skip",skipCancel:"Go back",errorSearch:"Error searching address.",errorOutsideRegion:"Only available in Canada. Use manual search to choose a Canadian address.",errorLocation:"We couldn't get your location. Check your browser permissions.",errorSave:"Error saving your Base Camp."},login:{tagline:"Build confidence in your new home with real-world daily challenges",continueGoogle:"Continue with Google",legal:"By continuing, you accept our",terms:"Terms of Use",and:"and",privacy:"Privacy Policy"},landing:{heroTitlePrefix:"Build real confidence in your ",heroTitleHighlight:"new home",heroTitleSuffix:"",heroSub:"Daily real-world challenges that help newcomers in Canada practice English through everyday interactions.",cta:"WATCH PITCH",loginCta:"LOG IN",langLabel:"ES",section1Title:"REAL-WORLD PRACTICE",section1Desc:"No classrooms or textbooks. Overcome daily challenges in cafes, pharmacies, or your city's public transit.",section2Title:"BUILT FOR NEWCOMERS",section2Desc:"100% local context. Learn the everyday English and Canadian idioms that traditional courses don't teach.",section3Title:"EARN CONFIDENCE POINTS",section3Desc:"Every interaction counts. Complete real missions, maintain your streak, and level up your confidence (CP).",section4Title:"LOCALIZED TO YOUR ROUTINE",section4Desc:'Location-based challenges. Discover relevant places near your "Base Camp" as part of your daily routine.',section5Title:"PRIVACY FIRST",section5Desc:"No hidden tracking. We only use your GPS while the app is open, fully complying with Canada's strict privacy laws.",section6Title:"PHRASES THAT MATTER",section6Desc:'Instant "cheat sheets." Get the exact scripts you need just before entering a bank or the grocery store.',footerTag:"Available exclusively in Canada",footerLegal:"Terms of Service",footerPrivacy:"Privacy Policy"},onboarding:{profileTitle:"Your profile",profileDesc:"Confirm your name and photo",languageTitle:"Choose your language",languageDesc:"Select the language you want to use Yaku in.",voiceTitle:"Choose your voice",voiceDesc:"Select the voice that will accompany you on your challenges.",continue:"Continue"},langSwitch:{congratsTitle:"Yaku is proud of you!",congratsMsg:"Using the app in English will help you practice every day.",letsGo:"Let's go!",areYouSure:"Wait... are you sure?",yakuSad:"Using the app in English helps you practice every day!",stayEnglish:"Stay in English",switchSpanish:"Switch to Spanish",disappointment:`You made Yaku cry. 392I hope you're happy.`},pitch:{intro:{slogan:"Build real confidence in your new home",desc:"Daily real-world challenges to practice English through everyday interactions in Canada."},problem:{title:"The Problem",needItems:["Know basic English, but **freeze** in real life.","Theory doesn't equal practical confidence.","Fear of everyday interactions."],whoItems:["Spanish-speaking newcomers in Canada.","Highly dependent on translators for basic tasks.","Feeling isolated by the language barrier."],needLabel:"The need",whoLabel:"Who it affects"},solution:{title:"The Solution",desc:"A gamified map that turns your city into a language gym. Practice with real phrases in real places.",f1:"Contextual phrases",f1d:"Instant scripts based on your exact location.",f2:"Common responses",f2d:"Anticipate what they'll say.",f3:"Confidence zones",f3d:"Progress in your real neighborhood.",f4:"Streaks & points",f4d:"Gamification that motivates every day."},beneficiaries:{title:"Who benefits",subtitle:"Latino newcomers in Canada looking to break the language barrier in daily life.",c1t:"True Independence",c1d:"Reduces dependency on translators for basic daily tasks.",c2t:"Repeatable Wins",c2d:"Turns scary urban interactions into safe, daily victories.",c3t:"Faster Integration",c3d:"Accelerates socio-economic integration in your new city."},team:{title:"Team",rosmel:"CEO & Product",natalia:"Marketing & Growth",milagros:"Operations",arturo:"Technology"},app:{title:"Discover Yaku",cta:"LOG IN",caption:"Available in Canada"},nav:{prev:"Previous",next:"Next"}}}},$C=m.createContext(void 0);function g$(){try{const e=localStorage.getItem("yaku-lang");if(e==="en"||e==="es")return e}catch{}return"es"}function y$({children:e}){const[t,n]=m.useState(g$),r=m.useCallback(s=>{n(s);try{localStorage.setItem("yaku-lang",s)}catch{}},[]);return c.jsx($C.Provider,{value:{locale:t,setLocale:r,t:LC[t]},children:e})}function rt(){const e=m.useContext($C);return e||{locale:"es",setLocale:()=>{},t:LC.es}}function v$(){const e=Ys(),t=rr(),{t:n}=rt(),r=sv(),s=[{path:"/today",label:n.nav.today,icon:QA},{path:"/explore",label:n.nav.explore,icon:iO},{path:"/history",label:n.nav.history,icon:r_},{path:"/ranking",label:n.nav.ranking,icon:ra},{path:"/profile",label:n.nav.profile,icon:nf}];return c.jsx("nav",{className:oe("bottom-0 left-0 right-0 z-50 border-t border-border bg-background",r?"absolute":"fixed safe-bottom"),children:c.jsx("div",{className:oe("mx-auto flex items-center justify-around",!r&&"max-w-lg"),children:s.map(({path:i,label:o,icon:a})=>{const l=e.pathname===i;return c.jsxs("button",{onClick:()=>t(i),className:oe("flex flex-1 flex-col items-center gap-0.5 py-2 text-xs font-bold transition-colors",l?"text-primary":"text-gray-400 hover:text-foreground"),children:[c.jsx(a,{className:oe("h-6 w-6 transition-transform",l&&"scale-110"),strokeWidth:l?2.5:2}),c.jsx("span",{className:"hidden sm:inline",children:o}),l&&c.jsx("div",{className:"mt-0.5 h-1 w-6 rounded-full bg-primary"})]},i)})})})}const Ly=ef("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"}}),ne=m.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?tA:"button";return c.jsx(o,{className:oe(Ly({variant:t,size:n,className:e})),ref:i,...s})});
vendor: 5,066 bytes, line 392
392ne.displayName="Button";function x$({active:e,onToggle:t}){return c.jsx(ne,{variant:"outline",size:"icon",onClick:t,className:"fixed top-4 right-4 z-[60] hidden md:flex h-10 w-10 rounded-full shadow-lg bg-background border-border",title:e?"Desktop view":"Mobile preview",children:e?c.jsx(lO,{className:"h-4 w-4"}):c.jsx(dO,{className:"h-4 w-4"})})}function Gr(){const{user:e}=Oe();return xn({queryKey:["profile",e==null?void 0:e.id],queryFn:async()=>{if(!e)return null;const{data:t,error:n}=await ie.from("profiles").select("*").eq("id",e.id).single();if(n)throw n;return t},enabled:!!e})}const Ch=768;function pf(){const[e,t]=m.useState(void 0);return m.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Ch-1}px)`),r=()=>{t(window.innerWidth<Ch)};return n.addEventListener("change",r),t(window.innerWidth<Ch),()=>n.removeEventListener("change",r)},[]),!!e}const Fi=m.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{type:t,className:oe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Fi.displayName="Input";var Eh="focusScope.autoFocusOnMount",Th="focusScope.autoFocusOnUnmount",cw={bubbles:!1,cancelable:!0},w$="FocusScope",FC=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=m.useState(null),u=gt(s),d=gt(i),f=m.useRef(null),h=Ne(t,g=>l(g)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let g=function(b){if(p.paused||!a)return;const S=b.target;a.contains(S)?f.current=S:ss(f.current,{select:!0})},x=function(b){if(p.paused||!a)return;const S=b.relatedTarget;S!==null&&(a.contains(S)||ss(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const k of b)k.removedNodes.length>0&&ss(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),v.disconnect()}}},[r,a,p.paused]),m.useEffect(()=>{if(a){dw.add(p);const g=document.activeElement;if(!a.contains(g)){const y=new CustomEvent(Eh,cw);a.addEventListener(Eh,u),a.dispatchEvent(y),y.defaultPrevented||(b$(E$(BC(a)),{select:!0}),document.activeElement===g&&ss(a))}return()=>{a.removeEventListener(Eh,u),setTimeout(()=>{const y=new CustomEvent(Th,cw);a.addEventListener(Th,d),a.dispatchEvent(y),y.defaultPrevented||ss(g??document.body,{select:!0}),a.removeEventListener(Th,d),dw.remove(p)},0)}}},[a,u,d,p]);const w=m.useCallback(g=>{if(!n&&!r||p.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(x&&y){const v=g.currentTarget,[b,S]=S$(v);b&&S?!g.shiftKey&&y===S?(g.preventDefault(),n&&ss(b,{select:!0})):g.shiftKey&&y===b&&(g.preventDefault(),n&&ss(S,{select:!0})):y===v&&g.preventDefault()}},[n,r,p.paused]);return c.jsx(me.div,{tabIndex:-1,...o,ref:h,onKeyDown:w})});FC.displayName=w$;function b$(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ss(r,{select:t}),document.activeElement!==n)return}function S$(e){const t=BC(e),n=uw(t,e),r=uw(t.reverse(),e);return[n,r]}function BC(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 uw(e,t){for(const n of e)if(!k$(n,{upTo:t}))return n}function k$(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function _$(e){return e instanceof HTMLInputElement&&"select"in e}function ss(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_$(e)&&t&&e.select()}}var dw=C$();function C$(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fw(e,t),e.unshift(t)},remove(t){var n;e=fw(e,t),(n=e[0])==null||n.resume()}}}function fw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function E$(e){return e.filter(t=>t.tagName!=="A")}var jh=0;function T$(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hw()),document.body.insertAdjacentElement("beforeend",e[1]??hw()),jh++,()=>{jh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jh--}},[])}function hw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,651 bytes, lines 392-407
392style.position="fixed",e.style.pointerEvents="none",e}var hr=function(){return hr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},hr.apply(this,arguments)};function UC(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 j$(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Ru="right-scroll-bar-position",Au="width-before-scroll-bar",P$="with-scroll-bars-hidden",N$="--removed-body-scroll-bar-size";function Ph(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function R$(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var A$=typeof window<"u"?m.useLayoutEffect:m.useEffect,pw=new WeakMap;function O$(e,t){var n=R$(null,function(r){return e.forEach(function(s){return Ph(s,r)})});return A$(function(){var r=pw.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;s.forEach(function(a){i.has(a)||Ph(a,null)}),i.forEach(function(a){s.has(a)||Ph(a,o)})}pw.set(n,e)},[e]),n}function D$(e){return e}function I$(e,t){t===void 0&&(t=D$);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function M$(e){e===void 0&&(e={});var t=I$(null);return t.options=hr({async:!0,ssr:!1},e),t}var VC=function(e){var t=e.sideCar,n=UC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,hr({},n))};VC.isSideCarExport=!0;function L$(e,t){return e.useMedium(t),VC}var zC=M$(),Nh=function(){},mf=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Nh,onWheelCapture:Nh,onTouchMoveCapture:Nh}),s=r[0],i=r[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,w=e.noIsolation,g=e.inert,x=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,b=e.gapMode,S=UC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=h,T=O$([n,t]),E=hr(hr({},S),s);return m.createElement(m.Fragment,null,d&&m.createElement(k,{sideCar:zC,removeScrollBar:u,shards:f,noRelative:p,noIsolation:w,inert:g,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(a),hr(hr({},E),{ref:T})):m.createElement(v,hr({},E,{className:l,ref:T}),a))});mf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mf.classNames={fullWidth:Au,zeroRight:Ru};var $$=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function F$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$$();return t&&e.setAttribute("nonce",t),e}function B$(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function U$(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var V$=function(){var e=0,t=null;return{add:function(n){e==0&&(t=F$())&&(B$(t,n),U$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},z$=function(){var e=V$();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},WC=function(){var e=z$(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},W$={left:0,top:0,right:0,gap:0},Rh=function(e){return parseInt(e||"",10)||0},H$=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Rh(n),Rh(r),Rh(s)]},q$=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return W$;var t=H$(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},K$=WC(),Io="data-scroll-locked",G$=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),` 393 .`.concat(P$,` { 394 overflow: hidden `).concat(r,`; 395 padding-right: `).concat(a,"px ").concat(r,`; 396 } 397 body[`).concat(Io,`] { 398 overflow: hidden `).concat(r,`; 399 overscroll-behavior: contain; 400 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 401 padding-left: `.concat(s,`px; 402 padding-top: `).concat(i,`px; 403 padding-right: `).concat(o,`px; 404 margin-left:0; 405 margin-top:0; 406 margin-right: `).concat(a,"px ").concat(r,`; 407 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
407")].filter(Boolean).join(""),` 408 } 409 410 .`).concat(Ru,` { 411 right: `).concat(a,"px ").concat(r,`; 412 } 413 414 .`).concat(Au,` { 415 margin-right: `).concat(a,"px ").concat(r,`; 416 } 417 418 .`).concat(Ru," .").concat(Ru,` { 419 right: 0 `).concat(r,`; 420 } 421 422 .`).concat(Au," .").concat(Au,` { 423 margin-right: 0 `).concat(r,`; 424 } 425 426 body[`).concat(Io,`] { 427 `).concat(N$,": ").concat(a,`px; 428 } 429`)},mw=function(){var e=parseInt(document.body.getAttribute(Io)||"0",10);return isFinite(e)?e:0},Y$=function(){m.useEffect(function(){return document.body.setAttribute(Io,(mw()+1).toString()),function(){var e=mw()-1;e<=0?document.body.removeAttribute(Io):document.body.setAttribute(Io,e.toString())}},[])},Q$=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;Y$();var i=m.useMemo(function(){return q$(s)},[s]);return m.createElement(K$,{styles:G$(i,!t,s,n?"":"!important")})},Im=!1;if(typeof window<"u")try{var Zc=Object.defineProperty({},"passive",{get:function(){return Im=!0,!0}});window.addEventListener("test",Zc,Zc),window.removeEventListener("test",Zc,Zc)}catch{Im=!1}var Yi=Im?{passive:!1}:!1,X$=function(e){return e.tagName==="TEXTAREA"},HC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!X$(e)&&n[t]==="visible")},J$=function(e){return HC(e,"overflowY")},Z$=function(e){return HC(e,"overflowX")},gw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=qC(e,r);if(s){var i=KC(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},e3=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},t3=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qC=function(e,t){return e==="v"?J$(t):Z$(t)},KC=function(e,t){return e==="v"?e3(t):t3(t)},n3=function(e,t){return e==="h"&&t==="rtl"?-1:1},r3=function(e,t,n,r,s){var i=n3(e,window.getComputedStyle(t).direction),o=i*r,a=n.target,l=t.contains(a),u=!1,d=o>0,f=0,h=0;do{if(!a)break;var p=KC(e,a),w=p[0],g=p[1],x=p[2],y=g-x-i*w;(w||y)&&qC(e,a)&&(f+=y,h+=w);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(h)<1||!s))&&(u=!0),u},eu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yw=function(e){return[e.deltaX,e.deltaY]},vw=function(e){return e&&"current"in e?e.current:e},s3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},i3=function(e){return` 430 .block-interactivity-`.concat(e,` {pointer-events: none;} 431 .allow-interactivity-`).concat(e,` {pointer-events: all;} 432`)},o3=0,Qi=[];function a3(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),s=m.useState(o3++)[0],i=m.useState(WC)[0],o=m.useRef(e);m.useEffect(function(){o.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=j$([e.lockRef.current],(e.shards||[]).map(vw),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=m.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var y=eu(g),v=n.current,b="deltaX"in g?g.deltaX:v[0]-y[0],S="deltaY"in g?g.deltaY:v[1]-y[1],k,T=g.target,E=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&T.type==="range")return!1;var j=gw(E,T);if(!j)return!0;if(j?k=E:(k=E==="v"?"h":"v",j=gw(E,T)),!j)return!1;if(!r.current&&"changedTouches"in g&&(b||S)&&(r.current=k),!k)return!0;var R=r.current||k;return r3(R,x,g,R==="h"?b:S,!0)},[]),l=m.useCallback(function(g){var x=g;if(!(!Qi.length||Qi[Qi.length-1]!==i)){var y="deltaY"in x?yw(x):eu(x),v=t.current.filter(function(k){return k.name===x.type&&(k.target===x.target||x.target===k.shadowParent)&&s3(k.delta,y)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}
vendor: 4,333 bytes, line 432
432if(!v){var b=(o.current.shards||[]).map(vw).filter(Boolean).filter(function(k){return k.contains(x.target)}),S=b.length>0?a(x,b[0]):!o.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),u=m.useCallback(function(g,x,y,v){var b={name:g,delta:x,target:y,should:v,shadowParent:l3(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),d=m.useCallback(function(g){n.current=eu(g),r.current=void 0},[]),f=m.useCallback(function(g){u(g.type,yw(g),g.target,a(g,e.lockRef.current))},[]),h=m.useCallback(function(g){u(g.type,eu(g),g.target,a(g,e.lockRef.current))},[]);m.useEffect(function(){return Qi.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Yi),document.addEventListener("touchmove",l,Yi),document.addEventListener("touchstart",d,Yi),function(){Qi=Qi.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Yi),document.removeEventListener("touchmove",l,Yi),document.removeEventListener("touchstart",d,Yi)}},[]);var p=e.removeScrollBar,w=e.inert;return m.createElement(m.Fragment,null,w?m.createElement(i,{styles:i3(s)}):null,p?m.createElement(Q$,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function l3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const c3=L$(zC,a3);var GC=m.forwardRef(function(e,t){return m.createElement(mf,hr({},e,{ref:t,sideCar:c3}))});GC.classNames=mf.classNames;var u3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xi=new WeakMap,tu=new WeakMap,nu={},Ah=0,YC=function(e){return e&&(e.host||YC(e.parentNode))},d3=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=YC(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},f3=function(e,t,n,r){var s=d3(t,Array.isArray(e)?e:[e]);nu[n]||(nu[n]=new WeakMap);var i=nu[n],o=[],a=new Set,l=new Set(s),u=function(f){!f||a.has(f)||(a.add(f),u(f.parentNode))};s.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var p=h.getAttribute(r),w=p!==null&&p!=="false",g=(Xi.get(h)||0)+1,x=(i.get(h)||0)+1;Xi.set(h,g),i.set(h,x),o.push(h),g===1&&w&&tu.set(h,!0),x===1&&h.setAttribute(n,"true"),w||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),a.clear(),Ah++,function(){o.forEach(function(f){var h=Xi.get(f)-1,p=i.get(f)-1;Xi.set(f,h),i.set(f,p),h||(tu.has(f)||f.removeAttribute(r),tu.delete(f)),p||f.removeAttribute(n)}),Ah--,Ah||(Xi=new WeakMap,Xi=new WeakMap,tu=new WeakMap,nu={})}},h3=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=u3(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),f3(r,s,n,"aria-hidden")):function(){return null}},gf="Dialog",[QC,XC]=On(gf),[p3,sr]=QC(gf),JC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=m.useRef(null),l=m.useRef(null),[u,d]=lc({prop:r,defaultProp:s??!1,onChange:i,caller:gf});return c.jsx(p3,{scope:t,triggerRef:a,contentRef:l,contentId:ol(),titleId:ol(),descriptionId:ol(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(f=>!f),[d]),modal:o,children:n})};JC.displayName=gf;var ZC="DialogTrigger",eE=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=sr(ZC,n),i=Ne(t,s.triggerRef);return c.jsx(me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":By(s.open),...r,ref:i,onClick:he(e.onClick,s.onOpenToggle)})});eE.displayName=ZC;var $y="DialogPortal",[m3,tE]=QC($y,{forceMount:void 0}),nE=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=sr($y,t);return c.jsx(m3,{scope:t,forceMount:n,children:m.Children.map(r,o=>c.jsx(nr,{present:n||i.open,children:c.jsx(cy,{asChild:!0,container:s,children:o})}))})};nE.displayName=$y;var Sd="DialogOverlay",rE=m.forwardRef((e,t)=>{const n=tE(Sd,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=sr(Sd,e.__scopeDialog);return i.modal?c.jsx(nr,{present:r||i.open,children:c.jsx(y3,{...s,ref:t})}):null});rE.displayName=Sd;var g3=Nl("DialogOverlay.RemoveScroll"),y3=m.forwardRef((e,t)=>
vendor: 4,634 bytes, lines 432-436
432{const{__scopeDialog:n,...r}=e,s=sr(Sd,n);return c.jsx(GC,{as:g3,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(me.div,{"data-state":By(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Bi="DialogContent",sE=m.forwardRef((e,t)=>{const n=tE(Bi,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=sr(Bi,e.__scopeDialog);return c.jsx(nr,{present:r||i.open,children:i.modal?c.jsx(v3,{...s,ref:t}):c.jsx(x3,{...s,ref:t})})});sE.displayName=Bi;var v3=m.forwardRef((e,t)=>{const n=sr(Bi,e.__scopeDialog),r=m.useRef(null),s=Ne(t,n.contentRef,r);return m.useEffect(()=>{const i=r.current;if(i)return h3(i)},[]),c.jsx(iE,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:he(e.onFocusOutside,i=>i.preventDefault())})}),x3=m.forwardRef((e,t)=>{const n=sr(Bi,e.__scopeDialog),r=m.useRef(!1),s=m.useRef(!1);return c.jsx(iE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),iE=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=sr(Bi,n),l=m.useRef(null),u=Ne(t,l);return T$(),c.jsxs(c.Fragment,{children:[c.jsx(FC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(Xd,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":By(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(b3,{titleId:a.titleId}),c.jsx(k3,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Fy="DialogTitle",oE=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=sr(Fy,n);return c.jsx(me.h2,{id:s.titleId,...r,ref:t})});oE.displayName=Fy;var aE="DialogDescription",lE=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=sr(aE,n);return c.jsx(me.p,{id:s.descriptionId,...r,ref:t})});lE.displayName=aE;var cE="DialogClose",uE=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=sr(cE,n);return c.jsx(me.button,{type:"button",...r,ref:t,onClick:he(e.onClick,()=>s.onOpenChange(!1))})});uE.displayName=cE;function By(e){return e?"open":"closed"}var dE="DialogTitleWarning",[w3,fE]=Z2(dE,{contentName:Bi,titleName:Fy,docsSlug:"dialog"}),b3=({titleId:e})=>{const t=fE(dE),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 433 434If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 435 436For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},S3="DialogDescriptionWarning",k3=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fE(S3).contentName}}.`;return m.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Uy=JC,hE=eE,Vy=nE,yf=rE,vf=sE,xf=oE,wf=lE,bf=uE;const Mt=Uy,_3=Vy,pE=m.forwardRef(({className:e,...t},n)=>c.jsx(yf,{ref:n,className:oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));pE.displayName=yf.displayName;const Et=m.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(_3,{children:[c.jsx(pE,{}),c.jsxs(vf,{ref:r,className:oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
436nded-lg",e),...n,children:[t,c.jsxs(bf,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Ro,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Et.displayName=vf.displayName;const zy=({className:e,...t})=>c.jsx("div",{className:oe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});zy.displayName="DialogHeader";const Tt=m.forwardRef(({className:e,...t},n)=>c.jsx(xf,{ref:n,className:oe("text-lg font-semibold leading-none tracking-tight",e),...t}));Tt.displayName=xf.displayName;const Cn=m.forwardRef(({className:e,...t},n)=>c.jsx(wf,{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));Cn.displayName=wf.displayName;var mE="AlertDialog",[C3,WW]=On(mE,[XC]),Yr=XC(),gE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Yr(t);return c.jsx(Uy,{...r,...n,modal:!0})};gE.displayName=mE;var E3="AlertDialogTrigger",T3=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Yr(n);return c.jsx(hE,{...s,...r,ref:t})});T3.displayName=E3;var j3="AlertDialogPortal",yE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Yr(t);return c.jsx(Vy,{...r,...n})};yE.displayName=j3;var P3="AlertDialogOverlay",vE=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Yr(n);return c.jsx(yf,{...s,...r,ref:t})});vE.displayName=P3;var Mo="AlertDialogContent",[N3,R3]=C3(Mo),A3=Pk("AlertDialogContent"),xE=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,i=Yr(n),o=m.useRef(null),a=Ne(t,o),l=m.useRef(null);return c.jsx(w3,{contentName:Mo,titleName:wE,docsSlug:"alert-dialog",children:c.jsx(N3,{scope:n,cancelRef:l,children:c.jsxs(vf,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:he(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(A3,{children:r}),c.jsx(D3,{contentRef:o})]})})})});xE.displayName=Mo;var wE="AlertDialogTitle",bE=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Yr(n);return c.jsx(xf,{...s,...r,ref:t})});bE.displayName=wE;var SE="AlertDialogDescription",kE=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Yr(n);return c.jsx(wf,{...s,...r,ref:t})});kE.displayName=SE;var O3="AlertDialogAction",_E=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Yr(n);return c.jsx(bf,{...s,...r,ref:t})});_E.displayName=O3;var CE="AlertDialogCancel",EE=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=R3(CE,n),i=Yr(n),o=Ne(t,s);return c.jsx(bf,{...i,...r,ref:o})});EE.displayName=CE;var D3=({contentRef:e})=>{const t=`\`${Mo}\` requires a description for the component to be accessible for screen reader users. 437 438You can add a description to the \`${Mo}\` by passing a \`${SE}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 439 440Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Mo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 441 442For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return m.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},I3=gE,M3=yE,TE=vE,jE=xE,PE=_E,NE=EE,RE=bE,AE=kE;const L3=I3,$3=M3,OE=m.forwardRef(({className:e,...t},n)=>c.jsx(TE,{className:oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));OE.displayName=TE.displayName;const DE=m.forwardRef(({className:e,...t},n)=>c.jsxs($3,{children:[c.jsx(OE,{}),c.jsx(jE,{ref:n,className:oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
442nded-lg",e),...t})]}));DE.displayName=jE.displayName;const IE=({className:e,...t})=>c.jsx("div",{className:oe("flex flex-col space-y-2 text-center sm:text-left",e),...t});IE.displayName="AlertDialogHeader";const ME=({className:e,...t})=>c.jsx("div",{className:oe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ME.displayName="AlertDialogFooter";const LE=m.forwardRef(({className:e,...t},n)=>c.jsx(RE,{ref:n,className:oe("text-lg font-semibold",e),...t}));LE.displayName=RE.displayName;const $E=m.forwardRef(({className:e,...t},n)=>c.jsx(AE,{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));$E.displayName=AE.displayName;const FE=m.forwardRef(({className:e,...t},n)=>c.jsx(PE,{ref:n,className:oe(Ly(),e),...t}));FE.displayName=PE.displayName;const BE=m.forwardRef(({className:e,...t},n)=>c.jsx(NE,{ref:n,className:oe(Ly({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));BE.displayName=NE.displayName;function fc({open:e,onClose:t,mode:n="onboarding"}){const{user:r}=Oe(),{t:s}=rt(),i=Nt(),[o,a]=m.useState(!1),[l,u]=m.useState(null),[d,f]=m.useState(n==="edit"?"choose":"welcome"),[h,p]=m.useState(""),[w,g]=m.useState([]),[x,y]=m.useState(!1),[v,b]=m.useState(""),[S,k]=m.useState(null),[T,E]=m.useState(!1),j=m.useRef(null),R=m.useRef(0);m.useEffect(()=>{e&&(f(n==="edit"?"choose":"welcome"),u(null),b(""),k(null),p(""),g([]))},[e,n]),m.useEffect(()=>{if(d==="manual"){if(h.trim().length<2){g([]);return}return j.current&&clearTimeout(j.current),j.current=setTimeout(async()=>{const N=++R.current;y(!0);try{const{data:O,error:_}=await ie.functions.invoke("geocode",{body:{query:h.trim()}});if(_)throw _;if(N!==R.current)return;g((O==null?void 0:O.results)||[])}catch{if(N!==R.current)return;$t.error(s.baseCamp.errorSearch)}finally{N===R.current&&y(!1)}},400),()=>{j.current&&clearTimeout(j.current)}}},[h,d,s]);const A=async(N,O,_=1)=>{for(let C=0;C<=_;C++)try{const{data:M,error:B}=await ie.functions.invoke("geocode",{body:{mode:"reverse",lat:N,lng:O}});if(B)throw B;if(M!=null&&M.formatted_address)return{address:M.formatted_address,country_code:M.country_code??null};if(C<_){await new Promise(z=>setTimeout(z,800));continue}return{address:null,country_code:null}}catch{if(C<_){await new Promise(M=>setTimeout(M,800));continue}return{address:null,country_code:null}}return{address:null,country_code:null}},D=async()=>{a(!0);try{const N=await new Promise((M,B)=>navigator.geolocation.getCurrentPosition(M,()=>{navigator.geolocation.getCurrentPosition(M,B,{enableHighAccuracy:!1,timeout:15e3,maximumAge:6e4})},{enableHighAccuracy:!0,timeout:8e3,maximumAge:6e4})),O=N.coords.latitude,_=N.coords.longitude;u({lat:O,lng:_});const C=await A(O,_);b(C.address||`Lat ${O.toFixed(4)}, Lng ${_.toFixed(4)}`),k(C.country_code),f("confirm")}catch{$t.error(s.baseCamp.errorLocation)}finally{a(!1)}},$=N=>{u({lat:N.lat,lng:N.lng}),b(N.formatted_address),k(N.country_code??null),f("confirm")},W=async()=>{if(!r||!l)return;a(!0);const{error:N}=await ie.from("profiles").update({base_camp_lat:l.lat,base_camp_lng:l.lng,base_camp_address:v||null,base_camp_country:S}).eq("id",r.id);if(N){$t.error(s.baseCamp.errorSave),a(!1);return}f("done"),a(!1),setTimeout(()=>{i.invalidateQueries({queryKey:["profile",r.id]}),n==="edit"&&(t==null||t())},2e3)},F=()=>{u(null),b(""),k(null),g([]),p(""),f("choose")},K=()=>{E(!1),t==null||t()},U=n==="edit",V=d==="welcome"?0:d==="choose"||d==="manual"?1:d==="confirm"?2:3;return c.jsxs(c.Fragment,{children:[c.jsx(Mt,{open:e,onOpenChange:U?N=>{N||t==null||t()}:void 0,children:c.jsxs(Et,{className:"mx-auto flex max-h-[85vh] max-w-[340px] flex-col items-center gap-0 overflow-y-auto rounded-3xl border-2 border-primary/20 p-6 text-center [&>button.absolute]:hidden",onInteractOutside:N=>{U||N.preventDefault()},onEscapeKeyDown:N=>{U||N.preventDefault()},children:[c.jsx(Tt,{className:"sr-only",children:s.baseCamp.dialogTitle}),d!=="done"&&c.jsx("div",{className:"mb-5 flex items-center gap-2",children:[0,1,2].map(N=>c.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${N===V?"w-6 bg-primary":N<V?"w-2 bg-primary/40":"w-2 bg-muted"}`},N))}),d==="welcome"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-4 flex h-20 w-20 items-center justify-center rounded-[1.5rem] bg-primary/10",children:c.jsx(ZA,{className:"h-10 w-10 text-primary"})}),c.jsx("h2",{className:"mb-2 text-lg font-black text-foreground",children:s.baseCamp.welcomeTitle}),c.jsxs("p",{className:"mb-5 text-sm font-semibold text-muted-foreground",children:[s.baseCamp.welcomeDesc," ",c.jsx("span",{className:"font-black text-primary",children:"Base Camp"})," ",s.baseCamp.welcomeDescSuffix]}),c.jsx(ne,{onClick:()=>f("choose"),size:"lg",className:"w-full gap-2 rounded-2xl py-5 text-base font-extrabold shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:s.baseCamp.configureCta}),n==="onboarding"&&c.jsxs(ne,{variant:"ghost",onClick:()=>E(!0),className:"mt-3 w-full gap-2 font-bold text-muted-foreground",children:[c.jsx(ax,{className:"h-4 w-4"}),s.baseCamp.skip]})]}),d==="choose"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-4 flex h-20 w-20 items-center justify-center rounded-[1.5rem] bg-primary/10",children:c.jsx(Ii,{className:"h-10 w-10 text-primary"})}),c.jsx("h2",{className:"mb-2 text-lg font-black text-foreground",children:s.baseCamp.chooseTitle}),c.jsx("p",{className:"mb-5 text-sm font-semibold text-muted-foreground",children:s.baseCamp.chooseDesc}),c.jsxs(ne,{onClick:D,disabled:o,size:"lg",className:"w-full gap-2 rounded-2xl py-5 text-base font-extrabold shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:[o?c.jsx(No,{className:"h-5 w-5 animate-spin"}):c.jsx(gr,{className:"h-5 w-5"}),o?s.baseCamp.searching:s.baseCamp.useGps]}),c.jsxs(ne,{onClick:()=>f("manual"),variant:"outline",size:"lg",className:"mt-3 w-full gap-2 rounded-2xl py-5 text-base font-bold",children:[c.jsx(nO,{className:"h-5 w-5"}),s.baseCamp.writeAddress]}),n==="onboarding"&&c.jsxs(ne,{variant:"ghost",onClick:()=>E(!0),className:"mt-3 w-full gap-2 font-bold text-muted-foreground",children:[c.jsx(ax,{className:"h-4 w-4"}),s.baseCamp.skip]}),n==="edit"&&c.jsx(ne,{variant:"ghost",onClick:()=>t==null?void 0:t(),className:"mt-3 w-full font-bold text-muted-foreground",children:s.baseCamp.back})]}),d==="manual"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-4 flex h-20 w-20 items-center justify-center rounded-[1.5rem] bg-primary/10",children:c.jsx(em,{className:"h-10 w-10 text-primary"})}),c.jsx("h2",{className:"mb-2 text-lg font-black text-foreground",children:s.baseCamp.searchTitle}),c.jsx("p",{className:"mb-4 text-sm font-semibold text-muted-foreground",children:s.baseCamp.searchDesc}),c.jsxs("div",{className:"relative mb-3 w-full",children:[c.jsx(Fi,{value:h,onChange:N=>p(N.target.value),placeholder:s.baseCamp.searchPlaceholder,className:"w-full rounded-xl pr-10",maxLength:200,autoFocus:!0}),x&&c.jsx(No,{className:"absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 animate-spin text-muted-foreground"})]}),w.length>0&&c.jsx("div",{className:"mb-3 max-h-44 w-full space-y-2 overflow-y-auto",children:w.map((N,O)=>c.jsxs("button",{onClick:()=>$(N),className:"w-full rounded-xl border border-border bg-card px-3 py-3 text-left text-sm font-medium text-foreground transition-colors hover:border-primary hover:bg-primary/5 active:bg-primary/10",children:[c.jsx(gr,{className:"mb-0.5 mr-1.5 inline-block h-3.5 w-3.5 text-primary"}),N.formatted_address]},O))}),!x&&h.trim().length>
442=2&&w.length===0&&c.jsx("p",{className:"mb-3 text-xs font-medium text-muted-foreground",children:s.baseCamp.noResults}),c.jsx(ne,{variant:"ghost",onClick:F,className:"mt-1 w-full font-bold text-muted-foreground",children:s.baseCamp.back})]}),d==="confirm"&&l&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-4 flex h-20 w-20 items-center justify-center rounded-[1.5rem] bg-primary/10",children:c.jsx(il,{className:"h-10 w-10 text-primary"})}),c.jsx("h2",{className:"mb-2 text-lg font-black text-foreground",children:s.baseCamp.confirmTitle}),c.jsx("p",{className:"mb-1 text-sm font-semibold text-muted-foreground",children:s.baseCamp.confirmDesc}),c.jsxs("div",{className:"mb-5 w-full rounded-xl bg-muted px-4 py-3 text-xs font-bold text-foreground",children:[c.jsx(gr,{className:"mb-0.5 mr-1 inline-block h-3.5 w-3.5 text-primary"}),v]}),c.jsxs(ne,{onClick:W,disabled:o,size:"lg",className:"w-full gap-2 rounded-2xl py-5 text-base font-extrabold shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:[o?c.jsx(No,{className:"h-5 w-5 animate-spin"}):c.jsx(il,{className:"h-5 w-5"}),s.baseCamp.confirmCta]}),c.jsx(ne,{variant:"ghost",onClick:F,className:"mt-2 w-full font-bold text-muted-foreground",children:s.baseCamp.chooseAnother})]}),d==="done"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-4 flex h-20 w-20 items-center justify-center rounded-[1.5rem] bg-primary/10",children:c.jsx(il,{className:"h-10 w-10 text-primary"})}),c.jsx("h2",{className:"mb-2 text-lg font-black text-foreground",children:s.baseCamp.doneTitle}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:s.baseCamp.doneDesc})]})]})}),c.jsx(L3,{open:T,onOpenChange:E,children:c.jsxs(DE,{className:"max-w-[320px] rounded-2xl",children:[c.jsxs(IE,{children:[c.jsx(LE,{className:"font-black",children:s.baseCamp.skipTitle}),c.jsx($E,{className:"font-semibold",children:s.baseCamp.skipDesc})]}),c.jsxs(ME,{children:[c.jsx(BE,{className:"font-bold",children:s.baseCamp.skipCancel}),c.jsx(FE,{onClick:K,className:"font-bold",children:s.baseCamp.skipConfirm})]})]})})]})}const F3=[{id:"UgBBYS2sOqTuMpoF3BR0",name:"Justin Trudeau",sampleUrl:"/audio/voice-preview-man.mp3"},{id:"yj30vwTGJxSHezdAGsv9",name:"Katy Perry",sampleUrl:"/audio/voice-preview-woman.mp3"}];function Wy(){return{defaultVoiceId:"yj30vwTGJxSHezdAGsv9",availableVoices:F3,isLoading:!1}}var B3="Label",UE=m.forwardRef((e,t)=>c.jsx(me.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));UE.displayName=B3;var VE=UE;const U3=ef("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Hy=m.forwardRef(({className:e,...t},n)=>c.jsx(VE,{ref:n,className:oe(U3(),e),...t}));Hy.displayName=VE.displayName;var zE={exports:{}},WE={};/** 443 * @license React 444 * use-sync-external-store-shim.production.js 445 * 446 * Copyright (c) Meta Platforms, Inc. and affiliates. 447 * 448 * This source code is licensed under the MIT license found in the 449 * LICENSE file in the root directory of this source tree. 450 */var oa=m;function V3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var z3=typeof Object.is=="function"?Object.is:V3,W3=oa.useState,H3=oa.useEffect,q3=oa.useLayoutEffect,K3=oa.useDebugValue;function G3(e,t){var n=t(),r=W3({inst:{value:n,getSnapshot:t}}),s=r[0].inst,i=r[1];return q3(function(){s.value=n,s.getSnapshot=t,Oh(s)&&i({inst:s})},[e,n,t]),H3(function(){return Oh(s)&&i({inst:s}),e(function(){Oh(s)&&i({inst:s})})},[e]),K3(n),n}function Oh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!z3(e,n)}catch{return!0}}function Y3(e,t){return t()}var Q3=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Y3:G3;WE.useSyncExternalStore=oa.useSyncExternalStore!==void 0?oa.useSyncExternalStore:Q3;zE.exports=WE;var X3=zE.exports;function J3(){return X3.useSyncExternalStore(Z3,()=>!0,()=>!1)}function Z3(){return()=>{}}var qy="Avatar",[eF,HW]=On(qy),[tF,HE]=eF(qy),qE=m.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[s,i]=m.useState("idle");return c.jsx(tF,{scope:n,imageLoadingStatus:s,onImageLoadingStatusChange:i,children:c.jsx(me.span,{...r,ref:t})})});qE.displayName=qy;var KE="AvatarImage",GE=m.forwardRef((e,t)=>
450{const{__scopeAvatar:n,src:r,onLoadingStatusChange:s=()=>{},...i}=e,o=HE(KE,n),a=nF(r,i),l=gt(u=>{s(u),o.onImageLoadingStatusChange(u)});return gn(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?c.jsx(me.img,{...i,ref:t,src:r}):null});GE.displayName=KE;var YE="AvatarFallback",QE=m.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...s}=e,i=HE(YE,n),[o,a]=m.useState(r===void 0);return m.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&i.imageLoadingStatus!=="loaded"?c.jsx(me.span,{...s,ref:t}):null});QE.displayName=YE;function xw(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function nF(e,{referrerPolicy:t,crossOrigin:n}){const r=J3(),s=m.useRef(null),i=r?(s.current||(s.current=new window.Image),s.current):null,[o,a]=m.useState(()=>xw(i,e));return gn(()=>{a(xw(i,e))},[i,e]),gn(()=>{const l=f=>()=>{a(f)};if(!i)return;const u=l("loaded"),d=l("error");return i.addEventListener("load",u),i.addEventListener("error",d),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",u),i.removeEventListener("error",d)}},[i,n,t]),o}var XE=qE,JE=GE,ZE=QE;const Ky=m.forwardRef(({className:e,...t},n)=>c.jsx(XE,{ref:n,className:oe("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ky.displayName=XE.displayName;const Gy=m.forwardRef(({className:e,...t},n)=>c.jsx(JE,{ref:n,className:oe("aspect-square h-full w-full",e),...t}));Gy.displayName=JE.displayName;const Yy=m.forwardRef(({className:e,...t},n)=>c.jsx(ZE,{ref:n,className:oe("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Yy.displayName=ZE.displayName;function rF({open:e,onOpenChange:t,currentName:n,currentAvatarUrl:r}){var b;const{user:s}=Oe(),{t:i}=rt(),o=Nt(),[a,l]=m.useState(n),[u,d]=m.useState(null),[f,h]=m.useState(null),[p,w]=m.useState(!1),g=m.useRef(null),x=u||r,y=S=>{var T;const k=(T=S.target.files)==null?void 0:T[0];k&&(h(k),d(URL.createObjectURL(k)))},v=async()=>{if(s){w(!0);try{let S=r;if(f){const T=f.name.split(".").pop(),E=`${s.id}/${Date.now()}.${T}`,{error:j}=await ie.storage.from("avatars").upload(E,f,{upsert:!0});if(j)throw j;const{data:R}=ie.storage.from("avatars").getPublicUrl(E);S=R.publicUrl}const{error:k}=await ie.from("profiles").update({display_name:a.trim()||n,avatar_url:S}).eq("id",s.id);if(k)throw k;o.invalidateQueries({queryKey:["profile",s.id]}),$t.success(i.profile.save),t(!1)}catch(S){console.error(S),$t.error("Error")}finally{w(!1)}}};return c.jsx(Mt,{open:e,onOpenChange:t,children:c.jsxs(Et,{className:"max-w-[340px] rounded-3xl border-2 border-primary/20 p-6 text-center [&>button.absolute]:hidden",children:[c.jsx(Tt,{className:"text-lg font-black",children:i.profile.editProfile}),c.jsx(Cn,{className:"sr-only",children:i.profile.changePhoto}),c.jsxs("div",{className:"flex flex-col items-center gap-5 pt-2",children:[c.jsxs("div",{className:"relative",children:[c.jsxs(Ky,{className:"h-24 w-24 border-2 border-primary/10",children:[c.jsx(Gy,{src:x||void 0,alt:a,className:"object-cover"}),c.jsx(Yy,{className:"bg-primary text-primary-foreground text-3xl font-black",children:((b=a==null?void 0:a.charAt(0))==null?void 0:b.toUpperCase())||c.jsx(nf,{className:"h-8 w-8"})})]}),c.jsx("button",{type:"button",onClick:()=>{var S;return(S=g.current)==null?void 0:S.click()},className:"absolute bottom-0 right-0 flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-md transition-transform active:scale-90",children:c.jsx(n_,{className:"h-4 w-4"})}),c.jsx("input",{ref:g,type:"file",accept:"image/*",className:"hidden",onChange:y})]}),c.jsxs("div",{className:"w-full space-y-2",children:[c.jsx(Hy,{htmlFor:"display-name",className:"text-xs font-black uppercase tracking-wider text-muted-foreground",children:i.profile.displayName}),c.jsx(Fi,{id:"display-name",value:a,onChange:S=>l(S.target.value),className:"rounded-xl border-2 text-center text-base font-bold",maxLength:40})]}),c.jsx(ne,{onClick:v,disabled:p||!a.trim(),size:"lg",className:"w-full gap-2 rounded-2xl py-5 text-base font-extrabold shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:i.profile.save})]})]})})}function sF({currentName:e,currentAvatarUrl:t,onNameChange:n,onFileSelect:r,avatarPreview:s}){var u;const{t:i}=rt(),o=m.useRef(null),a=s||t,l=d=>{var h;const f=(h=d.target.files)==null?void 0:h[0];f&&r(f)};return c.jsxs("div",{className:"flex flex-col items-center gap-5",children:[c.jsxs("div",{className:"relative",children:[c.jsxs(Ky,{className:"h-24 w-24 border-2 border-primary/10",children:[c.jsx(Gy,{src:a||void 0,alt:e,className:"object-cover"}),c.jsx(Yy,{className:"bg-primary text-primary-foreground text-3xl font-black",children:((u=e==null?void 0:e.charAt(0))==null?void 0:u.toUpperCase())||c.jsx(nf,{className:"h-8 w-8"})})]}),c.jsx("button",{type:"button",onClick:()=>{var d;return(d=o.current)==null?void 0:d.click()},className:"absolute bottom-0 right-0 flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-md transition-transform active:scale-90",children:c.jsx(n_,{className:"h-4 w-4"})}),c.jsx("input",{ref:o,type:"file",accept:"image/*",className:"hidden",onChange:l})]}),c.jsxs("div",{className:"w-full space-y-2",children:[c.jsx(Hy,{htmlFor:"onboarding-name",className:"text-xs font-black uppercase tracking-wider text-muted-foreground",children:i.profile.displayName}
450),c.jsx(Fi,{id:"onboarding-name",value:e,onChange:d=>n(d.target.value),className:"rounded-xl border-2 text-center text-base font-bold",maxLength:40})]})]})}const Qy="/assets/mr-yaku-mTD6Lref.png",Xy="/assets/mrs-yaku-T7OEu1e3.png",iF={UgBBYS2sOqTuMpoF3BR0:Qy,yj30vwTGJxSHezdAGsv9:Xy};function oF({open:e,onComplete:t}){var U,V,N,O;const{user:n}=Oe(),{t:r,locale:s,setLocale:i}=rt(),o=Nt(),{availableVoices:a}=Wy(),[l,u]=m.useState("profile"),[d,f]=m.useState("es"),[h,p]=m.useState("yj30vwTGJxSHezdAGsv9"),[w,g]=m.useState(!1),[x,y]=m.useState(null),v=m.useRef(null),[b,S]=m.useState(((U=n==null?void 0:n.user_metadata)==null?void 0:U.full_name)||((V=n==null?void 0:n.user_metadata)==null?void 0:V.name)||""),[k,T]=m.useState(null),[E,j]=m.useState(null),R=((N=n==null?void 0:n.user_metadata)==null?void 0:N.avatar_url)||((O=n==null?void 0:n.user_metadata)==null?void 0:O.picture)||null,A=l==="profile"?0:l==="language"?1:2,D=_=>{var M;if(x===_.id){(M=v.current)==null||M.pause(),v.current=null,y(null);return}v.current&&v.current.pause();const C=new Audio(_.sampleUrl);v.current=C,y(_.id),C.onended=()=>{y(null),v.current=null},C.onerror=()=>{y(null),v.current=null},C.play()},$=async()=>{var _;if(n){g(!0);try{let C=R;if(k){const M=k.name.split(".").pop(),B=`${n.id}/${Date.now()}.${M}`,{error:z}=await ie.storage.from("avatars").upload(B,k,{upsert:!0});if(!z){const{data:Q}=ie.storage.from("avatars").getPublicUrl(B);C=Q.publicUrl}}await ie.from("profiles").update({display_name:b.trim()||((_=n.user_metadata)==null?void 0:_.full_name),avatar_url:C}).eq("id",n.id)}catch(C){console.error(C)}g(!1),u("language")}},W=_=>{T(_),j(URL.createObjectURL(_))},F=async()=>{n&&(g(!0),i(d),await ie.from("profiles").update({preferred_locale:d}).eq("id",n.id),g(!1),u("voice"))},K=async()=>{n&&(g(!0),await ie.from("profiles").update({preferred_voice_id:h}).eq("id",n.id),o.invalidateQueries({queryKey:["profile",n.id]}),g(!1),t())};return c.jsx(Mt,{open:e,children:c.jsxs(Et,{className:"mx-auto flex max-h-[85vh] max-w-[340px] flex-col items-center gap-0 overflow-y-auto rounded-3xl border-2 border-primary/20 p-6 text-center [&>button.absolute]:hidden",onInteractOutside:_=>_.preventDefault(),onEscapeKeyDown:_=>_.preventDefault(),children:[c.jsx(Tt,{className:"sr-only",children:"Onboarding"}),c.jsx("div",{className:"mb-5 flex items-center gap-2",children:[0,1,2,3].map(_=>c.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${_===A?"w-6 bg-primary":_<A?"w-2 bg-primary/40":"w-2 bg-muted"}`},_))}),l==="profile"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-4 flex h-20 w-20 items-center justify-center rounded-[1.5rem] bg-primary/10",children:c.jsx(nf,{className:"h-10 w-10 text-primary"})}),c.jsx("h2",{className:"mb-2 text-lg font-black text-foreground",children:r.onboarding.profileTitle}),c.jsx("p",{className:"mb-5 text-sm font-semibold text-muted-foreground",children:r.onboarding.profileDesc}),c.jsx("div",{className:"w-full mb-5",children:c.jsx(sF,{currentName:b,currentAvatarUrl:R,onNameChange:S,onFileSelect:W,avatarPreview:E})}),c.jsx(ne,{onClick:$,disabled:w||!b.trim(),size:"lg",className:"w-full gap-2 rounded-2xl py-5 text-base font-extrabold shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:r.onboarding.continue})]}),l==="language"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-4 flex h-20 w-20 items-center justify-center rounded-[1.5rem] bg-primary/10",children:c.jsx(tf,{className:"h-10 w-10 text-primary"})}),c.jsx("h2",{className:"mb-2 text-lg font-black text-foreground",children:r.onboarding.languageTitle}),c.jsx("p",{className:"mb-5 text-sm font-semibold text-muted-foreground",children:r.onboarding.languageDesc}),c.jsx("div",{className:"w-full space-y-3 mb-5",children:[{id:"es",label:"Espanol",flag:"https://hatscripts.github.io/circle-flags/flags/es.svg"},{id:"en",label:"English",flag:"https://hatscripts.github.io/circle-flags/flags/ca.svg"}].map(_=>c.jsxs("button",{onClick:()=>f(_.id),className:`flex w-full items-center gap-3 rounded-2xl border-2 p-4 transition-all ${d===_.id?"border-primary bg-accent shadow-sm":"border-border hover:border-muted-foreground
450/30"}`,children:[c.jsx("img",{src:_.flag,alt:_.label,className:"h-7 w-7 rounded-full"}),c.jsx("span",{className:"text-base font-black",children:_.label}),d===_.id&&c.jsx("div",{className:"ml-auto flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground",children:c.jsx(ud,{className:"h-4 w-4"})})]},_.id))}),c.jsx(ne,{onClick:F,disabled:w,size:"lg",className:"w-full gap-2 rounded-2xl py-5 text-base font-extrabold shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:r.onboarding.continue})]}),l==="voice"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mb-4 flex h-20 w-20 items-center justify-center rounded-[1.5rem] bg-primary/10",children:c.jsx(aO,{className:"h-10 w-10 text-primary"})}),c.jsx("h2",{className:"mb-2 text-lg font-black text-foreground",children:r.onboarding.voiceTitle}),c.jsx("p",{className:"mb-5 text-sm font-semibold text-muted-foreground",children:r.onboarding.voiceDesc}),c.jsx("div",{className:"w-full space-y-3 mb-5",children:a.map(_=>{const C=h===_.id,M=iF[_.id];return c.jsxs("div",{onClick:()=>p(_.id),className:`flex cursor-pointer items-center gap-3 rounded-2xl border-2 p-3 transition-all ${C?"border-primary bg-accent shadow-sm":"border-border hover:border-muted-foreground/30"}`,children:[c.jsx("img",{src:M,alt:_.name,className:"h-12 w-12 rounded-full object-cover border-2 border-primary/10 bg-accent shrink-0"}),c.jsxs("div",{className:"flex-1 min-w-0 flex flex-col items-center",children:[c.jsx("p",{className:"text-sm font-black truncate",children:_.name}),c.jsx("button",{onClick:B=>{B.stopPropagation(),D(_)},className:"mt-1 flex items-center gap-1.5 text-xs font-bold text-primary focus:outline-none",children:x===_.id?c.jsxs(c.Fragment,{children:[c.jsx(l_,{className:"h-3 w-3"}),c.jsx("span",{children:"Stop"})]}):c.jsxs(c.Fragment,{children:[c.jsx(a_,{className:"h-3 w-3"}),c.jsx("span",{children:"Preview"})]})})]}),C&&c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground",children:c.jsx(ud,{className:"h-4 w-4"})})]},_.id)})}),c.jsx(ne,{onClick:K,disabled:w,size:"lg",className:"w-full gap-2 rounded-2xl py-5 text-base font-extrabold shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:r.onboarding.continue})]})]})})}var aF=m.createContext(void 0);function Sf(e){const t=m.useContext(aF);return e||t||"ltr"}function Jy(e,[t,n]){return Math.min(n,Math.max(t,e))}function lF(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var Zy="ScrollArea",[eT,qW]=On(Zy),[cF,Dn]=eT(Zy),tT=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,l]=m.useState(null),[u,d]=m.useState(null),[f,h]=m.useState(null),[p,w]=m.useState(null),[g,x]=m.useState(null),[y,v]=m.useState(0),[b,S]=m.useState(0),[k,T]=m.useState(!1),[E,j]=m.useState(!1),R=Ne(t,D=>l(D)),A=Sf(s);return c.jsx(cF,{scope:n,type:r,dir:A,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:w,scrollbarXEnabled:k,onScrollbarXEnabledChange:T,scrollbarY:g,onScrollbarYChange:x,scrollbarYEnabled:E,onScrollbarYEnabledChange:j,onCornerWidthChange:v,onCornerHeightChange:S,children:c.jsx(me.div,{dir:A,...o,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});tT.displayName=Zy;var nT="ScrollAreaViewport",rT=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...i}=e,o=Dn(nT,n),a=m.useRef(null),l=Ne(t,a,o.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),c.jsx(me.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});rT.displayName=nT;var kr="ScrollAreaScrollbar",ev=m.forwardRef((e,t)=>
vendor: 4,424 bytes, line 450
450{const{forceMount:n,...r}=e,s=Dn(kr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return m.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?c.jsx(uF,{...r,ref:t,forceMount:n}):s.type==="scroll"?c.jsx(dF,{...r,ref:t,forceMount:n}):s.type==="auto"?c.jsx(sT,{...r,ref:t,forceMount:n}):s.type==="always"?c.jsx(tv,{...r,ref:t}):null});ev.displayName=kr;var uF=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Dn(kr,e.__scopeScrollArea),[i,o]=m.useState(!1);return m.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),c.jsx(nr,{present:n||i,children:c.jsx(sT,{"data-state":i?"visible":"hidden",...r,ref:t})})}),dF=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Dn(kr,e.__scopeScrollArea),i=e.orientation==="horizontal",o=_f(()=>l("SCROLL_END"),100),[a,l]=lF("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return m.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,l]),m.useEffect(()=>{const u=s.viewport,d=i?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const p=u[d];f!==p&&(l("SCROLL"),o()),f=p};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,i,l,o]),c.jsx(nr,{present:n||a!=="hidden",children:c.jsx(tv,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:he(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:he(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),sT=m.forwardRef((e,t)=>{const n=Dn(kr,e.__scopeScrollArea),{forceMount:r,...s}=e,[i,o]=m.useState(!1),a=e.orientation==="horizontal",l=_f(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(a?u:d)}},10);return aa(n.viewport,l),aa(n.content,l),c.jsx(nr,{present:r||i,children:c.jsx(tv,{"data-state":i?"visible":"hidden",...s,ref:t})})}),tv=m.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=Dn(kr,e.__scopeScrollArea),i=m.useRef(null),o=m.useRef(0),[a,l]=m.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=cT(a.viewport,a.content),d={...r,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>i.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function f(h,p){return yF(h,o.current,a,p)}return n==="horizontal"?c.jsx(fF,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollLeft,p=ww(h,a,s.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):n==="vertical"?c.jsx(hF,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollTop,p=ww(h,a);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),fF=m.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=Dn(kr,e.__scopeScrollArea),[o,a]=m.useState(),l=m.useRef(null),u=Ne(t,l,i.onScrollbarXChange);return m.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(oT,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":kf(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),dT(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:_d(o.paddingLeft),paddingEnd:_d(o.paddingRight)}})}})}),hF=m.forwardRef((e,t)=>
vendor: 10,578 bytes, line 450
450{const{sizes:n,onSizesChange:r,...s}=e,i=Dn(kr,e.__scopeScrollArea),[o,a]=m.useState(),l=m.useRef(null),u=Ne(t,l,i.onScrollbarYChange);return m.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(oT,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":kf(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),dT(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:_d(o.paddingTop),paddingEnd:_d(o.paddingBottom)}})}})}),[pF,iT]=eT(kr),oT=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,p=Dn(kr,n),[w,g]=m.useState(null),x=Ne(t,R=>g(R)),y=m.useRef(null),v=m.useRef(""),b=p.viewport,S=r.content-r.viewport,k=gt(d),T=gt(l),E=_f(f,10);function j(R){if(y.current){const A=R.clientX-y.current.left,D=R.clientY-y.current.top;u({x:A,y:D})}}return m.useEffect(()=>{const R=A=>{const D=A.target;(w==null?void 0:w.contains(D))&&k(A,S)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[b,w,S,k]),m.useEffect(T,[r,T]),aa(w,E),aa(p.content,E),c.jsx(pF,{scope:n,scrollbar:w,hasThumb:s,onThumbChange:gt(i),onThumbPointerUp:gt(o),onThumbPositionChange:T,onThumbPointerDown:gt(a),children:c.jsx(me.div,{...h,ref:x,style:{position:"absolute",...h.style},onPointerDown:he(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),y.current=w.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),j(R))}),onPointerMove:he(e.onPointerMove,j),onPointerUp:he(e.onPointerUp,R=>{const A=R.target;A.hasPointerCapture(R.pointerId)&&A.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),y.current=null})})})}),kd="ScrollAreaThumb",aT=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=iT(kd,e.__scopeScrollArea);return c.jsx(nr,{present:n||s.hasThumb,children:c.jsx(mF,{ref:t,...r})})}),mF=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,i=Dn(kd,n),o=iT(kd,n),{onThumbPositionChange:a}=o,l=Ne(t,f=>o.onThumbChange(f)),u=m.useRef(void 0),d=_f(()=>{u.current&&(u.current(),u.current=void 0)},100);return m.useEffect(()=>{const f=i.viewport;if(f){const h=()=>{if(d(),!u.current){const p=vF(f,a);u.current=p,a()}};return a(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[i.viewport,d,a]),c.jsx(me.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:he(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),w=f.clientX-p.left,g=f.clientY-p.top;o.onThumbPointerDown({x:w,y:g})}),onPointerUp:he(e.onPointerUp,o.onThumbPointerUp)})});aT.displayName=kd;var nv="ScrollAreaCorner",lT=m.forwardRef((e,t)=>{const n=Dn(nv,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(gF,{...e,ref:t}):null});lT.displayName=nv;var gF=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=Dn(nv,n),[i,o]=m.useState(0),[a,l]=m.useState(0),u=!!(i&&a);return aa(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),l(d)}),aa(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),u?c.jsx(me.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function _d(e){return e?parseInt(e,10):0}function cT(e,t){const n=e/t;return isNaN(n)?0:n}function kf(e){const t=cT(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function yF(e,t,n,r="ltr"){const s=kf(n),i=s/2,o=t||i,a=s-o,l=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return uT([l,u],f)(e)}function ww(e,t,n="ltr"){const r=kf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-r,l=n==="ltr"?[0,o]:[o*-1,0],u=Jy(e,l);return uT([0,o],[0,a])(u)}function uT(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function dT(e,t){return e>0&&e<t}var vF=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&t(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function _f(e,t){const n=gt(e),r=m.useRef(0);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),m.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function aa(e,t){const n=gt(t);gn(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var fT=tT,xF=rT,wF=lT;const hT=m.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(fT,{ref:r,className:oe("relative overflow-hidden",e),...n,children:[c.jsx(xF,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(pT,{}),c.jsx(wF,{})]}));hT.displayName=fT.displayName;const pT=m.forwardRef(({className:e,orientation:t="vertical",...n},r)=>c.jsx(ev,{ref:r,orientation:t,className:oe("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:c.jsx(aT,{className:"relative flex-1 rounded-full bg-border"})}));pT.displayName=ev.displayName;function bF(){return c.jsxs("div",{className:"space-y-4 text-sm text-muted-foreground leading-relaxed",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-foreground",children:"Last updated: February 2026"}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"1. Acceptance of Terms"}),c.jsx("p",{children:'By accessing or using Yaku ("the App"), you agree to be bound by these Terms of Service. If you do not agree, do not use the App.'})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"2. Description of Service"}),c.jsx("p",{children:"Yaku is a language-confidence application that generates daily real-world challenges to help newcomers in Canada practice English through interactions at nearby businesses and public places."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"3. Account & Authentication"}),c.jsx("p",{children:"You sign in using Google Single Sign-On (SSO). We only store your email address and display name as provided by Google. You are responsible for maintaining the security of your Google account."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"4. Data Collected"}),c.jsxs("p",{children:['We collect and store: (a) your email address via Google SSO, (b) a general "Base Camp" zone (latitude/longitude you choose), and (c) your challenge history and confidence points. We do ',c.jsx("strong",{children:"not"})," perform real-time GPS tracking or background location monitoring."]})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"5. Acceptable Use"}),c.jsx("p",{children:"You agree not to misuse the App, interfere with its operation, or attempt to access data not intended for you. Challenges are suggestions only; you interact with real-world businesses at your own discretion and risk."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"6. Intellectual Property"}),c.jsx("p",{children:"All content, design, and code within Yaku are the property of Yaku and its creators. You may not copy, modify, or distribute any part of the App without prior written consent."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"7. Limitation of Liability"}),c.jsx("p",{children:'Yaku is provided "as is" without warranties of any kind. We are not liable for any damages arising from your use of the App, including interactions at suggested locations.'})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"8. Governing Law"}),c.jsx("p",{children:"These Terms are governed by the laws of the Province of Quebec and the federal laws of Canada applicable therein."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"9. Contact"}),c.jsxs("p",{children:["For questions about these Terms, contact us at ",c.jsx("span",{className:"font-bold text-foreground",children:"[email protected]"}),"."]})]})]})}function SF(){return c.jsxs("div",{className:"space-y-4 text-sm text-muted-foreground leading-relaxed",children:[c.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-foreground",children:"Last updated: February 2026"}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"1. Information We Collect"}),c.jsxs("p",{children:['When you sign in via Google SSO, we receive and store your email address and display name. You also set a "Base Camp" location (a general zone), which we store as coordinates. We do ',c.jsx("strong",{children:"not"})," track your GPS location in the background or record your movement patterns."]})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"2. How We Use Your Information"}),c.jsx("p",{children:"Your email is used for account identification. Your Base Camp zone is used to generate relevant daily challenges at nearby businesses. Your challenge history and confidence points are stored to track y
450our progress."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"3. AI & Third-Party Services"}),c.jsxs("p",{children:["We use Google Gemini AI to generate personalized challenges and vocabulary phrases. Contextual location data (place type, general area) is sent ",c.jsx("strong",{children:"anonymously"})," to the AI service. Your personal information (email, name) is never sent to the AI. ",c.jsx("strong",{children:"Your data is not used to train AI models."})]})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"4. PIPEDA & Quebec Law 25 Compliance"}),c.jsx("p",{children:"We comply with the Personal Information Protection and Electronic Documents Act (PIPEDA) and Quebec's Law 25 (Act respecting the protection of personal information in the private sector). We collect only the minimum data necessary, obtain consent, and provide transparency about data usage."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"5. Right to be Forgotten"}),c.jsx("p",{children:'You have the right to request the complete deletion of your personal data from our servers. You can initiate this process from the "Danger Zone" section in your Profile settings. Upon deletion, all your data -- including confidence points, streak history, challenge records, and profile information -- will be permanently removed.'})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"6. Data Access & Portability"}),c.jsx("p",{children:"You may request a copy of your personal data at any time by contacting us. We will provide it in a commonly used electronic format within 30 days."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"7. Data Retention"}),c.jsx("p",{children:"We retain your data for as long as your account is active. If you delete your account, all data is permanently removed within 30 days."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"8. Security"}),c.jsx("p",{children:"We use industry-standard security measures, including encrypted connections (TLS), secure authentication via Google SSO, and Row Level Security (RLS) on our database to ensure your data is protected."})]}),c.jsxs("section",{children:[c.jsx("h3",{className:"mb-1 text-base font-black text-foreground",children:"9. Contact"}),c.jsxs("p",{children:["For privacy inquiries or data requests, contact us at ",c.jsx("span",{className:"font-bold text-foreground",children:"[email protected]"}),"."]})]})]})}function zl({type:e}){return c.jsx(hT,{className:"h-[60vh] pr-4",children:e==="terms"?c.jsx(bF,{}):c.jsx(SF,{})})}const bw="yaku_consent_accepted";function kF(){const{t:e}=rt(),[t,n]=m.useState(!1),[r,s]=m.useState(!1);if(m.useEffect(()=>{localStorage.getItem(bw)||n(!0)},[]),!t)return null;const i=()=>{localStorage.setItem(bw,"true"),n(!1)};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"fixed inset-x-0 bottom-16 z-50 border-t bg-background p-4 shadow-lg safe-bottom",children:[c.jsx("p",{className:"mb-3 text-xs font-semibold text-muted-foreground leading-relaxed",children:e.consent.message}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(ne,{size:"sm",className:"flex-1 font-bold",onClick:i,children:e.consent.accept}),c.jsx(ne,{size:"sm",variant:"outline",className:"font-bold",onClick:()=>s(!0),children:e.consent.readPolicies})]})]}),c.jsx(Mt,{open:r,onOpenChange:s,children:c.jsxs(Et,{className:"max-w-[400px] rounded-2xl",children:[c.jsx(Tt,{className:"text-lg font-black",children:e.profile.privacyPolicy}),c.jsx(Cn,{className:"sr-only",children:"Privacy Policy"}),c.jsx(zl,{type:"privacy"})]})})]})}function _F({onClick:e}){return c.jsx("button",{onClick:e,className:"fixed bottom-24 right-4 z-[50] flex items-center justify-center h-14 w-14 rounded-full bg-primary shadow-lg animate-bounce","aria-label":"Special offer",children:c.jsx(tO,{className:"h-7 w-7 text-primary-foreground animate-pulse"})})}function CF(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const mT=I.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{}
450,openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),ba=()=>{const e=I.useContext(mT);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};CF(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( 451[data-state=closed] 452){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;
452left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}`);const EF=24,TF=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Sw(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function jF(){return rv(/^Mac/)}function PF(){return rv(/^iPhone/)}function kw(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function NF(){return rv(/^iPad/)||jF()&&navigator.maxTouchPoints>1}function gT(){return PF()||NF()}function rv(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const Dh=typeof document<"u"&&window.visualViewport;function _w(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function yT(e){for(_w(e)&&(e=e.parentElement);e&&!_w(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const RF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ru=0,Ih;function AF(e={}){let{isDisabled:t}=e;TF(()=>{if(!t)return ru++,ru===1&&gT()&&(Ih=OF()),()=>{ru--,ru===0&&(Ih==null||Ih())}},[t])}function OF(){let e,t=0,n=f=>{e=yT(f.target),!(e===document.documentElement&&e===document.body)&&(t=f.changedTouches[0].pageY)},r=f=>{if(!e||e===document.documentElement||e===document.body){f.preventDefault();return}let h=f.changedTouches[0].pageY,p=e.scrollTop,w=e.scrollHeight-e.clientHeight;w!==0&&((p<=0&&h>t||p>=w&&h<t)&&f.preventDefault(),t=h)},s=f=>{let h=f.target;Mm(h)&&h!==document.activeElement&&(f.preventDefault(),h.style.transform="translateY(-2000px)",h.focus(),requestAnimationFrame(()=>{h.style.transform=""}))},i=f=>{let h=f.target;Mm(h)&&(h.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{h.style.transform="",Dh&&(Dh.height<window.innerHeight?requestAnimationFrame(()=>{Cw(h)}):Dh.addEventListener("resize",()=>Cw(h),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},a=window.pageXOffset,l=window.pageYOffset,u=Sw(DF(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=Sw(Fa(document,"touchstart",n,{passive:!1,capture:!0}),Fa(document,"touchmove",r,{passive:!1,capture:!0}),Fa(document,"touchend",s,{passive:!1,capture:!0}),Fa(document,"focus",i,!0),Fa(window,"scroll",o));return()=>{u(),d(),window.scrollTo(a,l)}}function DF(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Fa(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cw(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=yT(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,s=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;const o=n.getBoundingClientRect().bottom+EF;i>o&&(n.scrollTop+=s-r)}e=n.parentElement}}function Mm(e){return e instanceof HTMLInputElement&&!RF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function IF(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function MF(...e){return t=>e.forEach(n=>IF(n,t))}function vT(...e){return m.useCallback(MF(...e),e)}const xT=new WeakMap;function ut(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([s,i])=>{if(s.startsWith("--")){e.style.setProperty(s,i);return}r[s]=e.style[s],e.style[s]=i}),!n&&xT.set(e,r)}function LF(e,t){if(!e||!(e instanceof HTMLElement))return;let n=xT.get(e);n&&(e.style[t]=n[t])}const ht=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function su(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let s=r.match(/^matrix3d\((.+)\)$/);return s?parseFloat(s[1].split(", ")[ht(t)?13:12]):(s=r.match(/^matrix\((.+)\)$/),s?parseFloat(s[1].split(", ")[ht(t)?5:4]):null)}function $F(e){return 8*(Math.log(e+1)-2)}function Mh(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function FF(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const ze={DURATION:.5,EASE:[.32,.72,0,1]},wT=.4,BF=.25,UF=100,bT=8,ri=16,Lm=26,Lh="vaul-dragging";function ST(e){const t=I.useRef(e);return I.useEffect(()=>{t.current=e}),I.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function VF({defaultProp:e,onChange:t}){const n=I.useState(e),[r]=n,s=I.useRef(r),i=ST(t);return I.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}function kT({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=VF({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,a=ST(n),l=I.useCallback(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else s(u)},[i,e,s,a]);return[o,l]}function zF({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:s,fadeFromIndex:i,onSnapPointChange:o,direction:a="bottom",container:l,snapToSequentialPoint:u}){const[d,f]=kT({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[h,p]=I.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);I.useEffect(()=>{function E(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);const w=I.useMemo(()=>d===(n==null?void 0:n[n.length-1])||null,[n,d]),g=I.useMemo(()=>n==null?void 0:n.findIndex(E=>E===d),[n,d]),x=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===d||!n,y=I.useMemo(()=>{const E=l?{width:l.getBoundingClientRect().width,height:l.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var j;return(j=n==null?void 0:n.map(R=>
452{const A=typeof R=="string";let D=0;if(A&&(D=parseInt(R,10)),ht(a)){const W=A?D:h?R*E.height:0;return h?a==="bottom"?E.height-W:-E.height+W:W}const $=A?D:h?R*E.width:0;return h?a==="right"?E.width-$:-E.width+$:$}))!=null?j:[]},[n,h,l]),v=I.useMemo(()=>g!==null?y==null?void 0:y[g]:null,[y,g]),b=I.useCallback(E=>{var j;const R=(j=y==null?void 0:y.findIndex(A=>A===E))!=null?j:null;o(R),ut(r.current,{transition:`transform ${ze.DURATION}s cubic-bezier(${ze.EASE.join(",")})`,transform:ht(a)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`}),y&&R!==y.length-1&&R!==i&&R<i?ut(s.current,{transition:`opacity ${ze.DURATION}s cubic-bezier(${ze.EASE.join(",")})`,opacity:"0"}):ut(s.current,{transition:`opacity ${ze.DURATION}s cubic-bezier(${ze.EASE.join(",")})`,opacity:"1"}),f(n==null?void 0:n[Math.max(R,0)])},[r.current,n,y,i,s,f]);I.useEffect(()=>{if(d||e){var E;const j=(E=n==null?void 0:n.findIndex(R=>R===e||R===d))!=null?E:-1;y&&j!==-1&&typeof y[j]=="number"&&b(y[j])}},[d,e,n,y,b]);function S({draggedDistance:E,closeDrawer:j,velocity:R,dismissible:A}){if(i===void 0)return;const D=a==="bottom"||a==="right"?(v??0)-E:(v??0)+E,$=g===i-1,W=g===0,F=E>0;if($&&ut(s.current,{transition:`opacity ${ze.DURATION}s cubic-bezier(${ze.EASE.join(",")})`}),!u&&R>2&&!F){A?j():b(y[0]);return}if(!u&&R>2&&F&&y&&n){b(y[n.length-1]);return}const K=y==null?void 0:y.reduce((V,N)=>typeof V!="number"||typeof N!="number"?V:Math.abs(N-D)<Math.abs(V-D)?N:V),U=ht(a)?window.innerHeight:window.innerWidth;if(R>wT&&Math.abs(E)<U*.4){const V=F?1:-1;if(V>0&&w){b(y[n.length-1]);return}if(W&&V<0&&A&&j(),g===null)return;b(y[g+V]);return}b(K)}function k({draggedDistance:E}){if(v===null)return;const j=a==="bottom"||a==="right"?v-E:v+E;(a==="bottom"||a==="right")&&j<y[y.length-1]||(a==="top"||a==="left")&&j>y[y.length-1]||ut(r.current,{transform:ht(a)?`translate3d(0, ${j}px, 0)`:`translate3d(${j}px, 0, 0)`})}function T(E,j){if(!n||typeof g!="number"||!y||i===void 0)return null;const R=g===i-1;if(g>=i&&j)return 0;if(R&&!j)return 1;if(!x&&!R)return null;const D=R?g+1:g-1,$=R?y[D]-y[D-1]:y[D+1]-y[D],W=E/Math.abs($);return R?1-W:W}return{isLastSnapPoint:w,activeSnapPoint:d,shouldFade:x,getPercentageDragged:T,setActiveSnapPoint:f,activeSnapPointIndex:g,onRelease:S,onDrag:k,snapPointsOffset:y}}const WF=()=>()=>{};function HF(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:s}=ba(),i=I.useRef(null),o=m.useMemo(()=>document.body.style.backgroundColor,[]);function a(){return(window.innerWidth-Lm)/window.innerWidth}I.useEffect(()=>{if(t&&n){i.current&&clearTimeout(i.current);const l=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!l)return;FF(r&&!s?Mh(document.body,{background:"black"}):WF,Mh(l,{transformOrigin:ht(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${ze.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ze.EASE.join(",")})`}));const u=Mh(l,{borderRadius:`${bT}px`,overflow:"hidden",...ht(e)?{transform:`scale(${a()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${a()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),i.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty("background")},ze.DURATION*1e3)}}},[t,n,o])}let Ba=null;function qF({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:s,noBodyStyles:i}){const[o,a]=I.useState(()=>typeof window<"u"?window.location.href:""),l=I.useRef(0),u=I.useCallback(()=>{if(kw()&&Ba===null&&e&&!i){Ba={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:f,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.current}px`,left:`${-f}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=h-window.innerHeight;p&&l.current>=h&&(document.body.style.top=`${-(l.current+p)}px`)}),300)}},[e]),d=I.useCallback(()=>
452{if(kw()&&Ba!==null&&!i){const f=-parseInt(document.body.style.top,10),h=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Ba),window.requestAnimationFrame(()=>{if(s&&o!==window.location.href){a(window.location.href);return}window.scrollTo(h,f)}),Ba=null}},[o]);return I.useEffect(()=>{function f(){l.current=window.scrollY}return f(),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}},[]),I.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,o,t,n,u,d]),{restorePositionSetting:d}}function _T({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:s,snapPoints:i,shouldScaleBackground:o=!1,setBackgroundColorOnScale:a=!0,closeThreshold:l=BF,scrollLockTimeout:u=UF,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:h=i&&i.length-1,activeSnapPoint:p,setActiveSnapPoint:w,fixed:g,modal:x=!0,onClose:y,nested:v,noBodyStyles:b,direction:S="bottom",defaultOpen:k=!1,disablePreventScroll:T=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:j=!1,repositionInputs:R=!0,onAnimationEnd:A,container:D,autoFocus:$=!1}){var W,F;const[K=!1,U]=kT({defaultProp:k,prop:e,onChange:fe=>{t==null||t(fe),!fe&&!v&&wt(),setTimeout(()=>{A==null||A(fe)},ze.DURATION*1e3),fe&&!x&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),fe||(document.body.style.pointerEvents="auto")}}),[V,N]=I.useState(!1),[O,_]=I.useState(!1),[C,M]=I.useState(!1),B=I.useRef(null),z=I.useRef(null),Q=I.useRef(null),Z=I.useRef(null),L=I.useRef(null),G=I.useRef(!1),Y=I.useRef(null),pe=I.useRef(0),ae=I.useRef(!1),ge=I.useRef(0),H=I.useRef(null),re=I.useRef(((W=H.current)==null?void 0:W.getBoundingClientRect().height)||0),be=I.useRef(((F=H.current)==null?void 0:F.getBoundingClientRect().width)||0),we=I.useRef(0),De=I.useCallback(fe=>{i&&fe===Rt.length-1&&(z.current=new Date)},[]),{activeSnapPoint:je,activeSnapPointIndex:Ye,setActiveSnapPoint:st,onRelease:wn,snapPointsOffset:Rt,onDrag:In,shouldFade:Xs,getPercentageDragged:Ea}=zF({snapPoints:i,activeSnapPointProp:p,setActiveSnapPointProp:w,drawerRef:H,fadeFromIndex:h,overlayRef:B,onSnapPointChange:De,direction:S,container:D,snapToSequentialPoint:E});AF({isDisabled:!K||O||!x||C||!V||!R||!T});const{restorePositionSetting:wt}=qF({isOpen:K,modal:x,nested:v,hasBeenOpened:V,preventScrollRestoration:j,noBodyStyles:b});function sn(){return(window.innerWidth-Lm)/window.innerWidth}function Ta(fe){var Te,Ae;!d&&!i||H.current&&!H.current.contains(fe.target)||(re.current=((Te=H.current)==null?void 0:Te.getBoundingClientRect().height)||0,be.current=((Ae=H.current)==null?void 0:Ae.getBoundingClientRect().width)||0,_(!0),Q.current=new Date,gT()&&window.addEventListener("touchend",()=>G.current=!1,{once:!0}),fe.target.setPointerCapture(fe.pointerId),pe.current=ht(S)?fe.pageY:fe.pageX)}function Js(fe,Te){var Ae,Ie;let Ce=fe;const et=(Ae=window.getSelection())==null?void 0:Ae.toString(),bt=H.current?su(H.current,S):null,se=new Date;if(Ce.hasAttribute("data-vaul-no-drag")||Ce.closest("[data-vaul-no-drag]"))return!1;if(S==="right"||S==="left")return!0;if(z.current&&se.getTime()-z.current.getTime()<500)return!1;if(bt!==null&&(S==="bottom"?bt>0:bt<0))return!0;if(et&&et.length>0)return!1;if(se.getTime()-((Ie=L.current)==null?void 0:Ie.getTime())<u&&bt===0||Te)return L.current=se,!1;for(;Ce;){if(Ce.scrollHeight>Ce.clientHeight){if(Ce.scrollTop!==0)return L.current=new Date,!1;if(Ce.getAttribute("role")==="dialog")return!0}Ce=Ce.parentNode}return!0}function _r(fe){if(H.current&&O){const Te=S==="bottom"||S==="right"?1:-1,Ae=(pe.current-(ht(S)?fe.pageY:fe.pageX))*Te,Ie=Ae>0,Ce=i&&!d&&!Ie;if(Ce&&Ye===0)return;const et=Math.abs(Ae),bt=document.querySelector("[data-vaul-drawer-wrapper]"),se=S==="bottom"||S==="top"?re.current:be.current;let ve=et/se;const Ee=Ea(et,Ie);if(Ee!==null&&(ve=Ee),Ce&&ve>=1||!G.current&&!Js(fe.target,Ie))return;if(H.current.classList.add(Lh),G.current=!0,ut(H.current,{transition:"none"}),ut(B.current,{transition:"none"}),i&&In({draggedDistance:Ae}),Ie&&!i){const Qe=$F(Ae),on=Math.min(Qe*-1,0)*Te;ut(H.current,{transform:ht(S)?`translate3d(0, ${on}px, 0)`:`translate3d(${on}px, 0, 0)`});return}const it=1-ve;if((Xs||h&&Ye===h-1)&&(r==null||r(fe,ve),ut(B.current,{opacity:`${it}`,transition:"none"},!0)),bt&&B.current&&o){const Qe=Math.min(sn()+ve*(1-sn()),1),on=8-ve*8,ir=Math.max(0,14-ve*14);ut(bt,{borderRadius:`${on}px`,transform:ht(S)?`scale(${Qe}) translate3d(0, ${ir}px, 0)`:`scale(${Qe}) translate3d(${ir}px, 0, 0)`,transition:"none"},!0)}if(!i){const Qe=et*Te;ut(H.current,{transform:ht(S)?`translate3d(0, ${Qe}px, 0)`:`translate3d(${Qe}px, 0, 0)`})}}}I.useEffect(()=>{var fe;function Te(){if(!H.current||!R)return;const Ae=document.activeElement;if(Mm(Ae)||ae.current){var Ie;
452const Ce=((Ie=window.visualViewport)==null?void 0:Ie.height)||0,et=window.innerHeight;let bt=et-Ce;const se=H.current.getBoundingClientRect().height||0,ve=se>et*.8;we.current||(we.current=se);const Ee=H.current.getBoundingClientRect().top;if(Math.abs(ge.current-bt)>60&&(ae.current=!ae.current),i&&i.length>0&&Rt&&Ye){const it=Rt[Ye]||0;bt+=it}if(ge.current=bt,se>Ce||ae.current){const it=H.current.getBoundingClientRect().height;let Qe=it;it>Ce&&(Qe=Ce-(ve?Ee:Lm)),g?H.current.style.height=`${it-Math.max(bt,0)}px`:H.current.style.height=`${Math.max(Qe,Ce-Ee)}px`}else H.current.style.height=`${we.current}px`;i&&i.length>0&&!ae.current?H.current.style.bottom="0px":H.current.style.bottom=`${Math.max(bt,0)}px`}}return(fe=window.visualViewport)==null||fe.addEventListener("resize",Te),()=>{var Ae;return(Ae=window.visualViewport)==null?void 0:Ae.removeEventListener("resize",Te)}},[Ye,i,Rt]);function Mn(fe){ei(),y==null||y(),fe||U(!1),setTimeout(()=>{i&&st(i[0])},ze.DURATION*1e3)}function Zs(){if(!H.current)return;const fe=document.querySelector("[data-vaul-drawer-wrapper]"),Te=su(H.current,S);ut(H.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${ze.DURATION}s cubic-bezier(${ze.EASE.join(",")})`}),ut(B.current,{transition:`opacity ${ze.DURATION}s cubic-bezier(${ze.EASE.join(",")})`,opacity:"1"}),o&&Te&&Te>0&&K&&ut(fe,{borderRadius:`${bT}px`,overflow:"hidden",...ht(S)?{transform:`scale(${sn()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${sn()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${ze.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ze.EASE.join(",")})`},!0)}function ei(){!O||!H.current||(H.current.classList.remove(Lh),G.current=!1,_(!1),Z.current=new Date)}function Xr(fe){if(!O||!H.current)return;H.current.classList.remove(Lh),G.current=!1,_(!1),Z.current=new Date;const Te=su(H.current,S);
452if(!Js(fe.target,!1)||!Te||Number.isNaN(Te)||Q.current===null)return;const Ae=Z.current.getTime()-Q.current.getTime(),Ie=pe.current-(ht(S)?fe.pageY:fe.pageX),Ce=Math.abs(Ie)/Ae;if(Ce>.05&&(M(!0),setTimeout(()=>{M(!1)},200)),i){wn({draggedDistance:Ie*(S==="bottom"||S==="right"?1:-1),closeDrawer:Mn,velocity:Ce,dismissible:d}),s==null||s(fe,!0);return}if(S==="bottom"||S==="right"?Ie>0:Ie<0){Zs(),s==null||s(fe,!0);return}if(Ce>wT){Mn(),s==null||s(fe,!1);return}var et;const bt=Math.min((et=H.current.getBoundingClientRect().height)!=null?et:0,window.innerHeight);var se;const ve=Math.min((se=H.current.getBoundingClientRect().width)!=null?se:0,window.innerWidth),Ee=S==="left"||S==="right";if(Math.abs(Te)>=(Ee?ve:bt)*l){Mn(),s==null||s(fe,!1);return}s==null||s(fe,!0),Zs()}I.useEffect(()=>(K&&(ut(document.documentElement,{scrollBehavior:"auto"}),z.current=new Date),()=>{LF(document.documentElement,"scrollBehavior")}),[K]);function Sc(fe){const Te=fe?(window.innerWidth-ri)/window.innerWidth:1,Ae=fe?-ri:0;Y.current&&window.clearTimeout(Y.current),ut(H.current,{transition:`transform ${ze.DURATION}s cubic-bezier(${ze.EASE.join(",")})`,transform:`scale(${Te}) translate3d(0, ${Ae}px, 0)`}),!fe&&H.current&&(Y.current=setTimeout(()=>{const Ie=su(H.current,S);ut(H.current,{transition:"none",transform:ht(S)?`translate3d(0, ${Ie}px, 0)`:`translate3d(${Ie}px, 0, 0)`})},500))}function Jr(fe,Te){if(Te<0)return;const Ae=(window.innerWidth-ri)/window.innerWidth,Ie=Ae+Te*(1-Ae),Ce=-ri+Te*ri;ut(H.current,{transform:ht(S)?`scale(${Ie}) translate3d(0, ${Ce}px, 0)`:`scale(${Ie}) translate3d(${Ce}px, 0, 0)`,transition:"none"})}function If(fe,Te){const Ae=ht(S)?window.innerHeight:window.innerWidth,Ie=Te?(Ae-ri)/Ae:1,Ce=Te?-ri:0;Te&&ut(H.current,{transition:`transform ${ze.DURATION}s cubic-bezier(${ze.EASE.join(",")})`,transform:ht(S)?`scale(${Ie}) translate3d(0, ${Ce}px, 0)`:`scale(${Ie}) translate3d(${Ce}px, 0, 0)`})}return I.createElement(Uy,{defaultOpen:k,onOpenChange:fe=>{!d&&!fe||(fe?N(!0):Mn(!0),U(fe))},open:K},I.createElement(mT.Provider,{value:{activeSnapPoint:je,snapPoints:i,setActiveSnapPoint:st,drawerRef:H,overlayRef:B,onOpenChange:t,onPress:Ta,onRelease:Xr,onDrag:_r,dismissible:d,handleOnly:f,isOpen:K,isDragging:O,shouldFade:Xs,closeDrawer:Mn,onNestedDrag:Jr,onNestedOpenChange:Sc,onNestedRelease:If,keyboardIsOpen:ae,modal:x,snapPointsOffset:Rt,direction:S,shouldScaleBackground:o,setBackgroundColorOnScale:a,noBodyStyles:b,container:D,autoFocus:$}},n))}const CT=I.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:s,shouldFade:i,isOpen:o,modal:a}=ba(),l=vT(t,n),u=r&&r.length>0;return a?I.createElement(yf,{onMouseUp:s,ref:l,"data-vaul-overlay":"","data-vaul-snap-points":o&&u?"true":"false","data-vaul-snap-points-overlay":o&&i?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),null)});CT.displayName="Drawer.Overlay";const ET=I.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},s){const{drawerRef:i,onPress:o,onRelease:a,onDrag:l,keyboardIsOpen:u,snapPointsOffset:d,modal:f,isOpen:h,direction:p,snapPoints:w,container:g,handleOnly:x,autoFocus:y}=ba(),[v,b]=I.useState(!1),S=vT(s,i),k=I.useRef(null),T=I.useRef(null),E=I.useRef(!1),j=w&&w.length>0;HF();const R=(D,$,W=0)=>{if(E.current)return!0;const F=Math.abs(D.y),K=Math.abs(D.x),U=K>F,V=["bottom","right"].includes($)?1:-1;if($==="left"||$==="right"){if(!(D.x*V<0)&&K>=0&&K<=W)return U}else if(!(D.y*V<0)&&F>=0&&F<=W)return!U;return E.current=!0,!0};I.useEffect(()=>{j&&window.requestAnimationFrame(()=>{b(!0)})},[]);function A(D){k.current=null,E.current=!1,a(D)}return I.createElement(vf,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":v?"true":"false","data-vaul-snap-points":h&&j?"true":"false","data-vaul-custom-container":g?"true":"false",...r,ref:S,style:d&&d.length>0?{"--snap-point-height":`${d[0]}px`,...t}:t,onPointerDown:D=>{x||(r.onPointerDown==null||r.onPointerDown.call(r,D),k.current={x:D.pageX,y:D.pageY},o(D))},onOpenAutoFocus:D=>{n==null||n(D),y||D.preventDefault()},onPointerDownOutside:D=>{if(e==null||e(D),!f||D.defaultPrevented){D.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:D=>{if(!f){D.preventDefault();return}},onPointerMove:D=>{if(T.current=D,x||(r.onPointerMove==null||r.onPointerMove.call(r,D),!k.current))return;const $=D.pageY-k.current.y,W=D.pageX-k.current.x,F=D.pointerType==="touch"?10:2;R({x:W,y:$},p,F)?l(D):(Math.abs(W)>F||Math.abs($)>F)&&(k.current=null)},onPointerUp:D=>{r.onPointerUp==null||r.onPointerUp.call(r,D),k.current=null,E.current=!1,a(D)},onPointerOut:D=>{r.onPointerOut==null||r.onPointerOut.call(r,D),A(T.current)},onContextMenu:D=>{r.onContextMenu==null||r.onContextMenu.call(r,D),A(T.current)}})});ET.displayName="Drawer.Content";const KF=250,GF=120,TT=I.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:s,isDragging:i,snapPoints:o,activeSnapPoint:a,setActiveSnapPoint:l,dismissible:u,handleOnly:d,isOpen:f,onPress:h,onDrag:p}=ba(),w=I.useRef(null),g=I.useRef(!1);function x(){if(g.current){b();return}window.setTimeout(()=>{y()},GF)}function y(){if(i||e||g.current){b();return}if(b(),(!o||o.length===0)&&u){s();return}if(a===o[o.length-1]&&u){s();return}const k=o.findIndex(E=>E===a);if(k===-1)return;const T=o[k+1];l(T)}function v(){w.current=window.setTimeout(()=>{g.current=!0},KF)}function b(){window.clearTimeout(w.current),g.current=!1}return I.createElement("div",{onClick:x,onPointerCancel:b,onPointerDown:S=>{d&&h(S),v()},onPointerMove:S=>{d&&p(S)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},I.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});TT.displayName="Drawer.Handle";function YF({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:s,onNestedRelease:i}=ba();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return I.createElement(_T,{nested:!0,onClose:()=>{s(!1)},onDrag:(o,a)=>{r(o,a),e==null||e(o,a)},onOpenChange:o=>{o&&s(o)},onRelease:i,...n})}function QF(e){const t=ba(),{container:n=t.container,...r}=e;return I.createElement(Vy,{container:n,...r})}const Qr={Root:_T,NestedRoot:YF,Content:ET,Overlay:CT,Trigger:hE,Portal:QF,Handle:TT,Close:bf,Title:xf,Description:wf}
452,jT=({shouldScaleBackground:e=!0,...t})=>c.jsx(Qr.Root,{shouldScaleBackground:e,...t});jT.displayName="Drawer";const XF=Qr.Portal,PT=m.forwardRef(({className:e,...t},n)=>c.jsx(Qr.Overlay,{ref:n,className:oe("fixed inset-0 z-50 bg-black/80",e),...t}));PT.displayName=Qr.Overlay.displayName;const NT=m.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(XF,{children:[c.jsx(PT,{}),c.jsxs(Qr.Content,{ref:r,className:oe("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[c.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));NT.displayName="DrawerContent";const RT=({className:e,...t})=>c.jsx("div",{className:oe("grid gap-1.5 p-4 text-center sm:text-left",e),...t});RT.displayName="DrawerHeader";const AT=m.forwardRef(({className:e,...t},n)=>c.jsx(Qr.Title,{ref:n,className:oe("text-lg font-semibold leading-none tracking-tight",e),...t}));AT.displayName=Qr.Title.displayName;const JF=m.forwardRef(({className:e,...t},n)=>c.jsx(Qr.Description,{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));JF.displayName=Qr.Description.displayName;const Ft=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Ft.displayName="Card";const ZF=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:oe("flex flex-col space-y-1.5 p-6",e),...t}));ZF.displayName="CardHeader";const eB=m.forwardRef(({className:e,...t},n)=>c.jsx("h3",{ref:n,className:oe("text-2xl font-semibold leading-none tracking-tight",e),...t}));eB.displayName="CardTitle";const tB=m.forwardRef(({className:e,...t},n)=>c.jsx("p",{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));tB.displayName="CardDescription";const OT=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:oe("p-6 pt-0",e),...t}));OT.displayName="CardContent";const nB=m.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:oe("flex items-center p-6 pt-0",e),...t}));nB.displayName="CardFooter";const rB=ef("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function hc({className:e,variant:t,...n}){return c.jsx("div",{className:oe(rB({variant:t}),e),...n})}const sB="/assets/yaku_sad_paywall-D8v93qpK.jpeg",iB=[{type:"24h",labelKey:"cta24h",priceKey:"price24h"},{type:"7d",labelKey:"cta7d",priceKey:"price7d"},{type:"30d",labelKey:"cta30d",priceKey:"price30d"},{type:"1y",labelKey:"cta1y",priceKey:"price1y"}];function $m(){const{t:e}=rt(),[t,n]=m.useState(null),r=async i=>{n(i);try{const{data:o,error:a}=await ie.functions.invoke("create-checkout",{body:{pass_type:i}});if(a)throw a;o!=null&&o.url&&window.open(o.url,"_blank")}catch(o){console.error("Checkout error:",o)}finally{n(null)}},s=e.paywall;return c.jsxs("div",{className:"flex flex-col items-center justify-center py-4 gap-3 px-4",children:[c.jsxs("div",{className:"w-full max-w-sm rounded-xl bg-gradient-to-r from-orange-500 to-red-600 p-3 text-center text-white shadow-md",children:[c.jsx("p",{className:"text-sm font-black uppercase tracking-wide",children:s.promoTitle}),c.jsx("p",{className:"text-xs font-bold",children:s.promoSubtitle})]}),c.jsx("img",{src:sB,alt:"Yaku sad",className:"w-32 h-32 sm:w-40 sm:h-40 rounded-2xl object-cover"}),c.jsx("h3",{className:"text-lg font-black text-foreground text-center",children:s.title}),c.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-xs",children:s.message}),c.jsx("div",{className:"grid grid-cols-3 gap-2 w-full max-w-sm",children:iB.map(({type:i,labelKey:o,priceKey:a})=>i==="1y"?c.jsxs(Ft,{className:"p-3 flex flex-col items-center gap-1 relative border-primary border-2 col-span-3",children:[c.jsx(hc,{className:"absolute -top-2.5 right-3 bg-destructive text-destructive-foreground text-[10px] font-black px-2",children:s.offerBadge}),c.jsx("span",{className:"text-xs font-bold text-muted-foreground uppercase",children:s[o]}),c.jsx("span",{className:"text-xs text-muted-foreground line-through",children:s[a]}),c.jsxs("div",{className:"flex flex-col items-center gap-0",children:[c.jsx("span",{className:"text-2xl font-black text-primary",children:s.price1yOffer}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"text-[10px] font-bold text-primary uppercase",children:"Coupon: LOVABLE"}),c.jsx("img",{src:"/tech/lovable.svg",className:"h-3 w-auto",alt:"Lovable"})]})]}),c.jsx(ne,{size:"sm",className:"w-full mt-1 text-xs font-bold",onClick:()=>r(i),disabled:t!==null,children:t===i?"...":s.buy}),c.jsx("div",{className:"mt-1 flex justify-center w-full",children:c.jsx("span",{className:"text-[10px] font-black animate-blink bg-gradient-to-r from-orange-500 to-red-600 text-white px-3 py-1 rounded-full uppercase tracking-wider shadow-sm",children:s.todayOnly})})]},i):c.jsxs(Ft,{className:"p-2 flex flex-col items-center gap-1",children:[c.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase text-center leading-tight",children:s[o]}),c.jsx("span",{className:"text-sm font-black text-foreground text-center",children:s[a]}),c.jsx(ne,{size:"sm",className:"w-full mt-1 text-[10px] h-7 px-2 font-bold bg-[#1CB0F6] hover:bg-[#1CB0F6]/90",onClick:()=>r(i),disabled:t!==null,children:t===i?"...":s.buy})]},i))}),c.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-xs mt-1",children:s.orWait})]})}function Wl({open:e,onOpenChange:t}){const n=pf(),{t:r}=rt(),s=r.paywall;return n?c.jsx(jT,{open:e,onOpenChange:t,children:c.jsxs(NT,{className:"max-h-[90vh]",children:[c.jsx(RT,{children:c.jsx(AT,{children:s.title})}),c.jsx("div",{className:"overflow-y-auto px-2 pb-6",children:c.jsx($m,{})})]})}):c.jsx(Mt,{open:e,onOpenChange:t,children:c.jsxs(Et,{className:"sm:max-w-md",children:[c.jsx(zy,{children:c.jsx(Tt,{children:s.title})}),c.jsx($m,{})]})})}function DT(){const{user:e}=Oe(),{data:t,isLoading:n}=xn({queryKey:["active-pass",e==null?void 0:e.id],enabled:!!(e!=null&&e.id),queryFn:async()=>{const[r,s]=await Promise.all([ie.from("user_passes").select("expires_at").eq("user_id",e.id).gt("expires_at",new Date().toISOString()).order("expires_at",{ascending:!1}).limit(1).maybeSingle(),ie.rpc("has_role",{_user_id:e.id,_role:"founder"})]),i=s.data===!0,o=r.data;return{isFounder:i,hasActivePass:!!o,expiresAt:o?new Date(o.expires_at):null}}});return{isFounder:(t==null?void 0:t.isFounder)??!1,hasActivePass:(t==null?void 0:t.hasActivePass)??!1,expiresAt:(t==null?void 0:t.expiresAt)??null,isLoading:n}}function oB(e){const t=e.getTime()-new Date().getTime();if(t<=0)return"0H";const n=Math.floor(t/(1e3*60*60*24)),r=Math.floor(t%(1e3*60*60*24)/(1e3*60*60));return n===0?`${r}H`:`${n}D ${r}H`}const IT=m.createContext(!1),sv=()=>m.useContext(IT);function aB(){const{data:e,isLoading:t}=Gr(),{user:n}=Oe(),{isFounder:r,hasActivePass:s}=DT(),[i,o]=m.useState(!1),[a,l]=m.useState(!1),[u,d]=m.useState(!1),[f,h]=m.useState(!1),[p,w]=m.useState(!1),[g,x]=m.useState(()=>{try{return localStorage.getItem("yaku-mobile-preview")==="true"}catch{return!1}}),y=pf();m.useEffect(()=>{const j=()=>{w(!!document.fullscreenElement)};
452return document.addEventListener("fullscreenchange",j),()=>document.removeEventListener("fullscreenchange",j)},[]);const v=()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen().catch(j=>{console.error(`Error attempting to enable full-screen mode: ${j.message}`)})},[b,S]=m.useState(!1),k=!t&&e&&e.preferred_voice_id===null&&!b,T=!t&&e&&e.preferred_voice_id!==null&&e.base_camp_lat===null&&!i,E=!y;return c.jsxs(IT.Provider,{value:g,children:[E&&c.jsx("div",{className:"fixed top-4 left-4 z-[60] flex items-center gap-2 pointer-events-auto",children:c.jsx(ne,{variant:"outline",size:"icon",onClick:v,className:"h-10 w-10 rounded-full shadow-lg bg-background border-border",title:p?"Esc salir de pantalla completa":"Ver en pantalla completa",children:p?c.jsx(o_,{className:"h-4 w-4"}):c.jsx(i_,{className:"h-4 w-4"})})}),c.jsx("div",{className:g?"flex items-center justify-center min-h-screen bg-muted/50":"",children:c.jsxs("div",{className:`flex min-h-screen flex-col bg-background ${g?"max-w-[390px] w-full h-screen overflow-hidden shadow-2xl relative":"max-w-[100vw] overflow-x-hidden"}`,children:[c.jsx("main",{className:`flex-1 overflow-x-hidden ${g?"overflow-y-auto scrollbar-thin":""} pb-20`,children:c.jsx(vC,{})}),c.jsx(v$,{}),n&&!r&&!s&&c.jsx(_F,{onClick:()=>d(!0)}),c.jsx(Wl,{open:u,onOpenChange:d}),c.jsx(kF,{}),c.jsx(oF,{open:!!k,onComplete:()=>S(!0)}),c.jsx(fc,{open:!!T,onClose:()=>o(!0),mode:"onboarding"})]})}),E&&c.jsx(c.Fragment,{children:c.jsx(x$,{active:g,onToggle:()=>x(j=>{const R=!j;try{localStorage.setItem("yaku-mobile-preview",String(R))}catch{}return R})})}),f&&c.jsxs("div",{className:`fixed inset-0 z-[100] bg-background ${a?"block":"hidden"}`,children:[c.jsx(ne,{variant:"ghost",size:"icon",onClick:()=>l(!1),className:"absolute top-4 right-4 z-[110] h-10 w-10 rounded-full bg-background/50 backdrop-blur-sm border border-border hover:bg-background/80 transition-colors",children:c.jsx(Ro,{className:"h-6 w-6 text-foreground"})}),c.jsx("iframe",{src:"/pitch?modal=true",className:"w-full h-full border-none",title:"Pitch Presentation"})]})]})}function lB(){const{user:e,loading:t}=Oe();return t?c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:c.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):e?c.jsx(vC,{}):c.jsx(Dy,{to:"/login",replace:!0})}const Hl="/assets/yaku_logo-BcaiTntS.jpeg",MT=m.createContext({});function cB(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const LT=typeof window<"u",uB=LT?m.useLayoutEffect:m.useEffect,iv=m.createContext(null);function ov(e,t){e.indexOf(t)===-1&&e.push(t)}function Cd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const br=(e,t,n)=>n>t?t:n<e?e:n;let Cf=()=>{},la=()=>{};const Wr={},$T=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function FT(e){return typeof e=="object"&&e!==null}const BT=e=>/^0[^.\s]+$/u.test(e);function UT(e){let t;return()=>(t===void 0&&(t=e()),t)}const Pn=e=>e,dB=(e,t)=>n=>t(e(n)),pc=(...e)=>e.reduce(dB),ql=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class av{constructor(){this.subscriptions=[]}add(t){return ov(this.subscriptions,t),()=>Cd(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 Nn=e=>e*1e3,Tn=e=>e/1e3;function VT(e,t){return t?e*(1e3/t):0}const zT=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fB=1e-7,hB=12;function pB(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=zT(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>fB&&++a<hB);return o}function mc(e,t,n,r){if(e===t&&n===r)return Pn;const s=i=>pB(i,0,1,e,n);return i=>i===0||i===1?i:zT(s(i),t,r)}const WT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,HT=e=>t=>1-e(1-t),qT=mc(.33,1.53,.69,.99),lv=HT(qT),KT=WT(lv),GT=e=>(e*=2)<1?.5*lv(e):.5*(2-Math.pow(2,-10*(e-1))),cv=e=>1-Math.sin(Math.acos(e)),YT=HT(cv),QT=WT(cv),mB=mc(.42,0,1,1),gB=mc(0,0,.58,1),XT=mc(.42,0,.58,1),yB=e=>Array.isArray(e)&&typeof e[0]!="number",JT=e=>Array.isArray(e)&&typeof e[0]=="number",Ew={linear:Pn,easeIn:mB,easeInOut:XT,easeOut:gB,circIn:cv,circInOut:QT,circOut:YT,backIn:lv,backInOut:KT,backOut:qT,anticipate:GT},vB=e=>typeof e=="string",Tw=e=>{if(JT(e)){la(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return mc(t,n,r,s)}else if(vB(e))return la(Ew[e]!==void 0,`Invalid easing type '${e}
452'`,"invalid-easing-type"),Ew[e];return e},iu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],jw={value:null,addProjectionMetrics:null};function xB(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 u(f){o.has(f)&&(d.schedule(f),e()),l++,f(a)}const d={schedule:(f,h=!1,p=!1)=>{const g=p&&s?n:r;return h&&o.add(f),g.has(f)||g.add(f),f},cancel:f=>{r.delete(f),o.delete(f)},process:f=>{if(a=f,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),t&&jw.value&&jw.value.frameloop[t].push(l),l=0,n.clear(),s=!1,i&&(i=!1,d.process(f))}};return d}const wB=40;function ZT(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=iu.reduce((b,S)=>(b[S]=xB(i,t?S:void 0),b),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:p,postRender:w}=o,g=()=>{const b=Wr.useManualTiming?s.timestamp:performance.now();n=!1,Wr.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(b-s.timestamp,wB),1)),s.timestamp=b,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),d.process(s),f.process(s),h.process(s),p.process(s),w.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},x=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:iu.reduce((b,S)=>{const k=o[S];return b[S]=(T,E=!1,j=!1)=>(n||x(),k.schedule(T,E,j)),b},{}),cancel:b=>{for(let S=0;S<iu.length;S++)o[iu[S]].cancel(b)},state:s,steps:o}}const{schedule:$e,cancel:Ws,state:Ct,steps:$h}=ZT(typeof requestAnimationFrame<"u"?requestAnimationFrame:Pn,!0);let Ou;function bB(){Ou=void 0}const Ht={now:()=>(Ou===void 0&&Ht.set(Ct.isProcessing||Wr.useManualTiming?Ct.timestamp:performance.now()),Ou),set:e=>{Ou=e,queueMicrotask(bB)}},ej=e=>t=>typeof t=="string"&&t.startsWith(e),tj=ej("--"),SB=ej("var(--"),uv=e=>SB(e)?kB.test(e.split("/*")[0].trim()):!1,kB=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Pw(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Sa={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Kl={...Sa,transform:e=>br(0,1,e)},ou={...Sa,default:1},cl=e=>Math.round(e*1e5)/1e5,dv=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _B(e){return e==null}const CB=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fv=(e,t)=>n=>!!(typeof n=="string"&&CB.test(n)&&n.startsWith(e)||t&&!_B(n)&&Object.prototype.hasOwnProperty.call(n,t)),nj=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(dv);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},EB=e=>br(0,255,e),Fh={...Sa,transform:e=>Math.round(EB(e))},mi={test:fv("rgb","red"),parse:nj("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Fh.transform(e)+", "+Fh.transform(t)+", "+Fh.transform(n)+", "+cl(Kl.transform(r))+")"};function TB(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),alpha:s?parseInt(s,16)/255:1}}const Fm={test:fv("#"),parse:TB,transform:mi.transform},gc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),is=gc("deg"),yr=gc("%"),ee=gc("px"),jB=gc("vh"),PB=gc("vw"),Nw={...yr,parse:e=>yr.parse(e)/100,transform:e=>yr.transform(e*100)},xo={test:fv("hsl","hue"),parse:nj("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+yr.transform(cl(t))+", "+yr.transform(cl(n))+", "+cl(Kl.transform(r))+")"},at={test:e=>mi.test(e)||Fm.test(e)||xo.test(e),parse:e=>mi.test(e)?mi.parse(e):xo.test(e)?xo.parse(e):Fm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mi.transform(e):xo.transform(e),getAnimatableNone:e=>{const t=at.parse(e);return t.alpha=0,at.transform(t)}},NB=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function RB(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(dv))==null?void 0:t.length)||0)+(((n=e.match(NB))==null?void 0:n.length)||0)>0}const rj="number",sj="color",AB="var",OB="var(",Rw="${}",DB=/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 Gl(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(DB,l=>(at.test(l)?(r.color.push(i),s.push(sj),n.push(at.parse(l))):l.startsWith(OB)?(r.var.push(i),s.push(AB),n.push(l)):(r.number.push(i),s.push(rj),n.push(parseFloat(l))),++i,Rw)).split(Rw);return{values:n,split:a,indexes:r,types:s}}
vendor: 15,502 bytes, line 452
452function ij(e){return Gl(e).values}function oj(e){const{split:t,types:n}=Gl(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const a=n[o];a===rj?i+=cl(s[o]):a===sj?i+=at.transform(s[o]):i+=s[o]}return i}}const IB=e=>typeof e=="number"?0:at.test(e)?at.getAnimatableNone(e):e;function MB(e){const t=ij(e);return oj(e)(t.map(IB))}const Jn={test:RB,parse:ij,createTransformer:oj,getAnimatableNone:MB};function Bh(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 LB({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=Bh(l,a,e+1/3),i=Bh(l,a,e),o=Bh(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Ed(e,t){return n=>n>0?t:e}const qe=(e,t,n)=>e+(t-e)*n,Uh=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},$B=[Fm,mi,xo],FB=e=>$B.find(t=>t.test(e));function Aw(e){const t=FB(e);if(Cf(!!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===xo&&(n=LB(n)),n}const Ow=(e,t)=>{const n=Aw(e),r=Aw(t);if(!n||!r)return Ed(e,t);const s={...n};return i=>(s.red=Uh(n.red,r.red,i),s.green=Uh(n.green,r.green,i),s.blue=Uh(n.blue,r.blue,i),s.alpha=qe(n.alpha,r.alpha,i),mi.transform(s))},Bm=new Set(["none","hidden"]);function BB(e,t){return Bm.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function UB(e,t){return n=>qe(e,t,n)}function hv(e){return typeof e=="number"?UB:typeof e=="string"?uv(e)?Ed:at.test(e)?Ow:WB:Array.isArray(e)?aj:typeof e=="object"?at.test(e)?Ow:VB:Ed}function aj(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>hv(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function VB(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=hv(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function zB(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 WB=(e,t)=>{const n=Jn.createTransformer(t),r=Gl(e),s=Gl(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?Bm.has(e)&&!s.values.length||Bm.has(t)&&!r.values.length?BB(e,t):pc(aj(zB(r,s),s.values),n):(Cf(!0,`Complex values '${e}' and '${t}' 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"),Ed(e,t))};function lj(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?qe(e,t,n):hv(e)(e,t)}const HB=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>$e.update(t,n),stop:()=>Ws(t),now:()=>Ct.isProcessing?Ct.timestamp:Ht.now()}},cj=(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)})`},Td=2e4;function pv(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Td;)t+=n,r=e.next(t);return t>=Td?1/0:t}function qB(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(pv(r),Td);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Tn(s)}}const KB=5;function uj(e,t,n){const r=Math.max(t-KB,0);return VT(n-e(r),t-r)}const We={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},Vh=.001;function GB({duration:e=We.duration,bounce:t=We.bounce,velocity:n=We.velocity,mass:r=We.mass}){let s,i;Cf(e<=Nn(We.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=br(We.minDamping,We.maxDamping,o),e=br(We.minDuration,We.maxDuration,Tn(e)),o<1?(s=u=>{const d=u*o,f=d*e,h=d-n,p=Um(u,o),w=Math.exp(-f);return Vh-h/p*w},i=u=>{const f=u*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,w=Math.exp(-f),g=Um(Math.pow(u,2),o);return(-s(u)+Vh>0?-1:1)*((h-p)*w)/g}):(s=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Vh+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const a=5/e,l=QB(s,i,a);if(e=Nn(e),isNaN(l))return{stiffness:We.stiffness,damping:We.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const YB=12;function QB(e,t,n){let r=n;for(let s=1;s<YB;s++)r=r-e(r)/t(r);return r}function Um(e,t){return e*Math.sqrt(1-t*t)}const XB=["duration","bounce"],JB=["stiffness","damping","mass"];function Dw(e,t){return t.some(n=>e[n]!==void 0)}function ZB(e){let t={velocity:We.velocity,stiffness:We.stiffness,damping:We.damping,mass:We.mass,isResolvedFromDuration:!1,...e};if(!Dw(e,JB)&&Dw(e,XB))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*br(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:We.mass,stiffness:s,damping:i}}else{const n=GB({...e,velocity:0});t={...t,...n,mass:We.mass},t.isResolvedFromDuration=!0}return t}function jd(e=We.visualDuration,t=We.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:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=ZB({...n,velocity:-Tn(n.velocity||0)}),w=h||0,g=u/(2*Math.sqrt(l*d)),x=o-i,y=Tn(Math.sqrt(l/d)),v=Math.abs(x)<5;r||(r=v?We.restSpeed.granular:We.restSpeed.default),s||(s=v?We.restDelta.granular:We.restDelta.default);let b;if(g<1){const k=Um(y,g);b=T=>{const E=Math.exp(-g*y*T);return o-E*((w+g*y*x)/k*Math.sin(k*T)+x*Math.cos(k*T))}}else if(g===1)b=k=>o-Math.exp(-y*k)*(x+(w+y*x)*k);else{const k=y*Math.sqrt(g*g-1);b=T=>{const E=Math.exp(-g*y*T),j=Math.min(k*T,300);return o-E*((w+g*y*x)*Math.sinh(j)+k*x*Math.cosh(j))/k}}const S={calculatedDuration:p&&f||null,next:k=>{const T=b(k);if(p)a.done=k>=f;else{let E=k===0?w:0;g<1&&(E=k===0?Nn(w):uj(b,k,T));const j=Math.abs(E)<=r,R=Math.abs(o-T)<=s;a.done=j&&R}return a.value=a.done?o:T,a},toString:()=>{const k=Math.min(pv(S),Td),T=cj(E=>S.next(k*E).value,k,30);return k+"ms "+T},toTransition:()=>{}};return S}jd.applyToOptions=e=>{const t=qB(e,100,jd);return e.ease=t.ease,e.duration=Nn(t.duration),e.type="keyframes",e};function Vm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=j=>a!==void 0&&j<a||l!==void 0&&j>l,w=j=>a===void 0?l:l===void 0||Math.abs(a-j)<Math.abs(l-j)?a:l;let g=n*t;const x=f+g,y=o===void 0?x:o(x);y!==x&&(g=y-f);const v=j=>-g*Math.exp(-j/r),b=j=>y+v(j),S=j=>{const R=v(j),A=b(j);h.done=Math.abs(R)<=u,h.value=h.done?y:A};let k,T;const E=j=>{p(h.value)&&(k=j,T=jd({keyframes:[h.value,w(h.value)],velocity:uj(b,j,h.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:j=>{let R=!1;return!T&&k===void 0&&(R=!0,S(j),E(j)),k!==void 0&&j>=k?T.next(j-k):(!R&&S(j),h)}}}function eU(e,t,n){const r=[],s=n||Wr.mix||lj,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]||Pn:t;a=pc(l,a)}r.push(a)}return r}function tU(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(la(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=eU(t,r,s),l=a.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=ql(e[f],e[f+1],d);return a[f](h)};return n?d=>u(br(e[0],e[i-1],d)):u}function nU(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ql(0,t,r);e.push(qe(n,1,s))}}function rU(e){const t=[0];return nU(t,e.length-1),t}function sU(e,t){return e.map(n=>n*t)}function iU(e,t){return e.map(()=>t||XT).splice(0,e.length-1)}function ul({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=yB(r)?r.map(Tw):Tw(r),i={done:!1,value:t[0]},o=sU(n&&n.length===t.length?n:rU(t),e),a=tU(o,t,{ease:Array.isArray(s)?s:iU(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const oU=e=>e!==null;function mv(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(oU),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const aU={decay:Vm,inertia:Vm,tween:ul,keyframes:ul,spring:jd};function dj(e){typeof e.type=="string"&&(e.type=aU[e.type])}class gv{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 lU=e=>e/100;class yv extends gv{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ht.now()&&this.tick(Ht.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;dj(t);const{type:n=ul,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||ul;l!==ul&&typeof a[0]!="number"&&(this.mixKeyframes=pc(lU,lj(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=pv(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}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:u=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:p,type:w,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 y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let b=this.currentTime,S=r;if(f){const j=Math.min(this.currentTime,s)/a;let R=Math.floor(j),A=j%1;!A&&j>=1&&(A=1),A===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(h==="reverse"?(A=1-A,p&&(A-=p/a)):h==="mirror"&&(S=o)),b=br(0,1,A)*a}const k=v?{done:!1,value:d[0]}:S.next(b);i&&(k.value=i(k.value));let{done:T}=k;!v&&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&&w!==Vm&&(k.value=mv(d,this.options,x,this.speed)),g&&g(k.value),E&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return Tn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(this.currentTime)}set time(t){var n;t=Nn(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ht.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Tn(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=HB,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(Ht.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 cU(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const gi=e=>e*180/Math.PI,zm=e=>{const t=gi(Math.atan2(e[1],e[0]));return Wm(t)},uU={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zm,rotateZ:zm,skewX:e=>gi(Math.atan(e[1])),skewY:e=>gi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Wm=e=>(e=e%360,e<0&&(e+=360),e),Iw=zm,Mw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Lw=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),dU={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Mw,scaleY:Lw,scale:e=>(Mw(e)+Lw(e))/2,rotateX:e=>Wm(gi(Math.atan2(e[6],e[5]))),rotateY:e=>Wm(gi(Math.atan2(-e[2],e[0]))),rotateZ:Iw,rotate:Iw,skewX:e=>gi(Math.atan(e[4])),skewY:e=>gi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Hm(e){return e.includes("scale")?1:0}function qm(e,t){if(!e||e==="none")return Hm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=dU,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=uU,s=a}if(!s)return Hm(t);const i=r[t],o=s[1].split(",").map(hU);return typeof i=="function"?i(o):o[i]}const fU=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return qm(n,t)};function hU(e){return parseFloat(e.trim())}const ka=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_a=new Set(ka),$w=e=>e===Sa||e===ee,pU=new Set(["x","y","z"]),mU=ka.filter(e=>!pU.has(e));function gU(e){const t=[];return mU.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Es={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-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})=>qm(t,"x"),y:(e,{transform:t})=>qm(t,"y")};Es.translateX=Es.x;Es.translateY=Es.y;const Pi=new Set;let Km=!1,Gm=!1,Ym=!1;function fj(){if(Gm){const e=Array.from(Pi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=gU(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);
vendor: 1,610 bytes, line 452
452s&&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)})}Gm=!1,Km=!1,Pi.forEach(e=>e.complete(Ym)),Pi.clear()}function hj(){Pi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gm=!0)})}function yU(){Ym=!0,hj(),fj(),Ym=!1}class vv{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?(Pi.add(this),Km||(Km=!0,$e.read(hj),$e.resolveKeyframes(fj))):(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])}cU(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Pi.delete(this)}cancel(){this.state==="scheduled"&&(Pi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vU=e=>e.startsWith("--");function xU(e,t,n){vU(t)?e.style.setProperty(t,n):e.style[t]=n}const wU={};function pj(e,t){const n=UT(e);return()=>wU[t]??n()}const bU=pj(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),mj=pj(()=>{try{document.createElement("div").animate({opacity:0}
vendor: 5,100 bytes, line 452
452,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ga=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ga([0,.65,.55,1]),circOut:Ga([.55,0,1,.45]),backIn:Ga([.31,.01,.66,-.59]),backOut:Ga([.33,1.53,.69,.99])};function gj(e,t){if(e)return typeof e=="function"?mj()?cj(e,t):"ease-out":JT(e)?Ga(e):Array.isArray(e)?e.map(n=>gj(n,t)||Fw.easeOut):Fw[e]}function SU(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const d={[t]:n};l&&(d.offset=l);const f=gj(a,s);Array.isArray(f)&&(d.easing=f);const h={delay:r,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(d,h)}function yj(e){return typeof e=="function"&&"applyToOptions"in e}function kU({type:e,...t}){return yj(e)&&mj()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class vj extends gv{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,la(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=kU(t);this.animation=SU(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=mv(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(d):xU(n,r,d),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 Tn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Nn(t)}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,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&bU()?(this.animation.timeline=t,Pn):n(this)}}const xj={anticipate:GT,backInOut:KT,circInOut:QT};function _U(e){return e in xj}function CU(e){typeof e.ease=="string"&&_U(e.ease)&&(e.ease=xj[e.ease])}const zh=10;class EU extends vj{constructor(t){CU(t),dj(t),super(t),t.startTime!==void 0&&(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 yv({...o,autoplay:!1}),l=Math.max(zh,Ht.now()-this.startTime),u=br(0,zh,l-zh);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const Bw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jn.test(e)||e==="0")&&!e.startsWith("url("));function TU(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 jU(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=Bw(s,t),a=Bw(i,t);return Cf(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:TU(e)||(n==="spring"||yj(n))&&r}function Qm(e){e.duration=0,e.type="keyframes"}const PU=new Set(["opacity","clipPath","filter","transform"]),NU=UT(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function RU(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return NU()&&n&&PU.has(n)&&(n!=="transform"||!u)&&!l&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const AU=40;class OU extends gv{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:
452o="loop",keyframes:a,name:l,motionValue:u,element:d,...f}){var w;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=Ht.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:d,...f},p=(d==null?void 0:d.KeyframeResolver)||vv;this.keyframeResolver=new p(a,(g,x,y)=>this.onKeyframesResolved(g,x,h,!y),l,u,d),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,n,r,s){var x,y;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:d}=r;this.resolvedAt=Ht.now(),jU(t,i,o,a)||((Wr.instantAnimations||!l)&&(d==null||d(mv(t,r,n))),t[0]=t[t.length-1],Qm(r),r.repeat=0);const h={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>AU?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!u&&RU(h),w=(y=(x=h.motionValue)==null?void 0:x.owner)==null?void 0:y.current,g=p?new EU({...h,element:w}):new yv(h);g.finished.then(()=>{this.notifyFinished()}).catch(Pn),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}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(),yU()),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 wj(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const DU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function IU(e){const t=DU.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const MU=4;function bj(e,t,n=1){la(n<=MU,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=IU(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return $T(o)?parseFloat(o):o}return uv(s)?bj(s,t,n+1):s}const LU={type:"spring",stiffness:500,damping:25,restSpeed:10},$U=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),FU={type:"keyframes",duration:.8},BU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},UU=(e,{keyframes:t})=>t.length>2?FU:_a.has(e)?e.startsWith("scale")?$U(t[1]):LU:BU,VU=e=>e!==null;function zU(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(VU),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}function Sj(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function xv(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Sj(n,e):n}function WU({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const wv=(e,t,n,r={},s,i)=>o=>{const a=xv(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Nn(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,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};WU(a)||Object.assign(d,UU(e,d)),d.duration&&(d.duration=Nn(d.duration)),d.repeatDelay&&(d.repeatDelay=Nn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Qm(d),d.delay===0&&(f=!0)),(Wr.instantAnimations||Wr.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(f=!0,Qm(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const h=zU(d.keyframes,a);if(h!==void 0){$e.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new yv(d):new OU(d)};function Uw(e){const t=[{},{}];
vendor: 20,612 bytes, line 452
452return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function bv(e,t,n,r){if(typeof t=="function"){const[s,i]=Uw(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]=Uw(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Lo(e,t,n){const r=e.getProps();return bv(r,t,n!==void 0?n:r.custom,e)}const kj=new Set(["width","height","top","left","right","bottom",...ka]),Vw=30,HU=e=>!isNaN(parseFloat(e));class qU{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Ht.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=Ht.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=HU(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 av);const r=this.events[t].add(n);return t==="change"?()=>{r(),$e.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=Ht.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vw)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vw);return VT(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 ca(e,t){return new qU(e,t)}const Xm=e=>Array.isArray(e);function KU(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ca(n))}function GU(e){return Xm(e)?e[e.length-1]||0:e}function YU(e,t){const n=Lo(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=GU(i[o]);KU(e,o,a)}}const Lt=e=>!!(e&&e.getVelocity);function QU(e){return!!(Lt(e)&&e.add)}function Jm(e,t){const n=e.getValue("willChange");if(QU(n))return n.add(t);if(!n&&Wr.WillChange){const r=new Wr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Sv(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const XU="framerAppearId",_j="data-"+Sv(XU);function Cj(e){return e.props[_j]}function JU({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ej(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?Sj(i,l):l;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const d=[],f=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const p=e.getValue(h,e.latestValues[h]??null),w=a[h];if(w===void 0||f&&JU(f,h))continue;const g={delay:n,...xv(i||{},h)},x=p.get();if(x!==void 0&&!p.isAnimating&&!Array.isArray(w)&&w===x&&!g.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const S=Cj(e);if(S){const k=window.MotionHandoffAnimation(S,h,$e);k!==null&&(g.startTime=k,y=!0)}}Jm(e,h);const v=u??e.shouldReduceMotion;p.start(wv(h,p,w,v&&kj.has(h)?{type:!1}:g,e,y));const b=p.animation;b&&d.push(b)}if(o){const h=()=>$e.update(()=>{o&&YU(e,o)});d.length?Promise.all(d).then(h):h()}return d}function Zm(e,t,n={}){var l;const r=Lo(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(Ej(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return ZU(e,t,u,d,f,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,d]=a==="beforeChildren"?[i,o]:[o,i];return u().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function ZU(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(Zm(l,t,{...o,delay:n+(typeof r=="function"?0:r)+wj(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function eV(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Zm(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Zm(e,t,n);else{const s=typeof t=="function"?Lo(e,t,n.custom):t;r=Promise.all(Ej(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const tV={test:e=>e==="auto",parse:e=>e},Tj=e=>t=>t.test(e),jj=[Sa,ee,yr,is,PB,jB,tV],zw=e=>jj.find(Tj(e));function nV(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||BT(e):!0}const rV=new Set(["brightness","contrast","saturate","opacity"]);function sV(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(dv)||[];if(!r)return e;const s=n.replace(r,"");let i=rV.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const iV=/\b([a-z-]*)\(.*?\)/gu,eg={...Jn,getAnimatableNone:e=>{const t=e.match(iV);return t?t.map(sV).join(" "):e}},tg={...Jn,getAnimatableNone:e=>{const t=Jn.parse(e);return Jn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Ww={...Sa,transform:Math.round},oV={rotate:is,rotateX:is,rotateY:is,rotateZ:is,scale:ou,scaleX:ou,scaleY:ou,scaleZ:ou,skew:is,skewX:is,skewY:is,distance:ee,translateX:ee,translateY:ee,translateZ:ee,x:ee,y:ee,z:ee,perspective:ee,transformPerspective:ee,opacity:Kl,originX:Nw,originY:Nw,originZ:ee},kv={borderWidth:ee,borderTopWidth:ee,borderRightWidth:ee,borderBottomWidth:ee,borderLeftWidth:ee,borderRadius:ee,borderTopLeftRadius:ee,borderTopRightRadius:ee,borderBottomRightRadius:ee,borderBottomLeftRadius:ee,width:ee,maxWidth:ee,height:ee,maxHeight:ee,top:ee,right:ee,bottom:ee,left:ee,inset:ee,insetBlock:ee,insetBlockStart:ee,insetBlockEnd:ee,insetInline:ee,insetInlineStart:ee,insetInlineEnd:ee,padding:ee,paddingTop:ee,paddingRight:ee,paddingBottom:ee,paddingLeft:ee,paddingBlock:ee,paddingBlockStart:ee,paddingBlockEnd:ee,paddingInline:ee,paddingInlineStart:ee,paddingInlineEnd:ee,margin:ee,marginTop:ee,marginRight:ee,marginBottom:ee,marginLeft:ee,marginBlock:ee,marginBlockStart:ee,marginBlockEnd:ee,marginInline:ee,marginInlineStart:ee,marginInlineEnd:ee,fontSize:ee,backgroundPositionX:ee,backgroundPositionY:ee,...oV,zIndex:Ww,fillOpacity:Kl,strokeOpacity:Kl,numOctaves:Ww},aV={...kv,color:at,backgroundColor:at,outlineColor:at,fill:at,stroke:at,borderColor:at,borderTopColor:at,borderRightColor:at,borderBottomColor:at,borderLeftColor:at,filter:eg,WebkitFilter:eg,mask:tg,WebkitMask:tg},Pj=e=>aV[e],lV=new Set([eg,tg]);function Nj(e,t){let n=Pj(e);return lV.has(n)||(n=Jn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const cV=new Set(["auto","none","0"]);function uV(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!cV.has(i)&&Gl(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=Nj(n,s)}class dV extends vv{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 d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),uv(f))){const h=bj(f,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!kj.has(r)||t.length!==2)return;const[s,i]=t,o=zw(s),a=zw(i),l=Pw(s),u=Pw(i);if(l!==u&&Es[r]){this.needsMeasurement=!0;return}if(o!==a)if($w(o)&&$w(a))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else Es[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||nV(t[s]))&&r.push(s);r.length&&uV(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=Es[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]=Es[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,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const fV=new Set(["opacity","clipPath","filter","transform"]);function Rj(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 Aj=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function hV(e){return FT(e)&&"offsetHeight"in e}const{schedule:_v,cancel:KW}=ZT(queueMicrotask,!1),Vn={x:!1,y:!1};function Oj(){return Vn.x||Vn.y}function pV(e){return e==="x"||e==="y"?Vn[e]?null:(Vn[e]=!0,()=>{Vn[e]=!1}):Vn.x||Vn.y?null:(Vn.x=Vn.y=!0,()=>{Vn.x=Vn.y=!1})}function Dj(e,t){const n=Rj(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function mV(e){return!(e.pointerType==="touch"||Oj())}function gV(e,t,n={}){const[r,s,i]=Dj(e,n);return r.forEach(o=>{let a=!1,l=!1,u;const d=()=>{o.removeEventListener("pointerleave",w)},f=x=>{u&&(u(x),u=void 0),d()},h=x=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),l&&(l=!1,f(x))},p=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},w=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}f(x)}},g=x=>{if(!mV(x))return;l=!1;const y=t(o,x);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",w,s))};o.addEventListener("pointerenter",g,s),o.addEventListener("pointerdown",p,s)}),i}const Ij=(e,t)=>t?e===t?!0:Ij(e,t.parentElement):!1,Cv=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yV=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vV(e){return yV.has(e.tagName)||e.isContentEditable===!0}const xV=new Set(["INPUT","SELECT","TEXTAREA"]);function wV(e){return xV.has(e.tagName)||e.isContentEditable===!0}const Du=new WeakSet;function Hw(e){return t=>{t.key==="Enter"&&e(t)}}function Wh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const bV=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Hw(()=>{if(Du.has(n))return;Wh(n,"down");const s=Hw(()=>{Wh(n,"up")}),i=()=>Wh(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 qw(e){return Cv(e)&&!Oj()}const Kw=new WeakSet;function SV(e,t,n={}){const[r,s,i]=Dj(e,n),o=a=>{const l=a.currentTarget;if(!qw(a)||Kw.has(a))return;Du.add(l),n.stopPropagation&&Kw.add(a);const u=t(l,a),d=(p,w)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Du.has(l)&&Du.delete(l),qw(p)&&typeof u=="function"&&u(p,{success:w})},f=p=>{d(p,l===window||l===document||n.useGlobalTarget||Ij(l,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),hV(a)&&(a.addEventListener("focus",u=>bV(u,s)),!vV(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Ev(e){return FT(e)&&"ownerSVGElement"in e}const Iu=new WeakMap;let os;const Mj=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Ev(r)&&"getBBox"in r?r.getBBox()[t]:r[n],kV=Mj("inline","width","offsetWidth"),_V=Mj("block","height","offsetHeight");function CV({target:e,borderBoxSize:t}){var n;(n=Iu.get(e))==null||n.forEach(r=>{r(e,{get width(){return kV(e,t)},get height(){return _V(e,t)}})})}function EV(e){e.forEach(CV)}function TV(){typeof ResizeObserver>"u"||(os=new ResizeObserver(EV))}function jV(e,t){os||TV();const n=Rj(e);return n.forEach(r=>{let s=Iu.get(r);s||(s=new Set,Iu.set(r,s)),s.add(t),os==null||os.observe(r)}),()=>{n.forEach(r=>{const s=Iu.get(r);s==null||s.delete(t),s!=null&&s.size||os==null||os.unobserve(r)})}}const Mu=new Set;let wo;function PV(){wo=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Mu.forEach(t=>t(e))},window.addEventListener("resize",wo)}function NV(e){return Mu.add(e),wo||PV(),()=>{Mu.delete(e),!Mu.size&&typeof wo=="function"&&(window.removeEventListener("resize",wo),wo=void 0)}}function Gw(e,t){return typeof e=="function"?NV(e):jV(e,t)}function RV(e){return Ev(e)&&e.tagName==="svg"}const AV=[...jj,at,Jn],OV=e=>AV.find(Tj(e)),Yw=()=>({translate:0,scale:1,origin:0,originPoint:0}),bo=()=>({x:Yw(),y:Yw()}),Qw=()=>({min:0,max:0}),dt=()=>({x:Qw(),y:Qw()}),DV=new WeakMap;function Ef(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Yl(e){return typeof e=="string"||Array.isArray(e)}const Tv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jv=["initial",...Tv];function Tf(e){return Ef(e.animate)||jv.some(t=>Yl(e[t]))}function Lj(e){return!!(Tf(e)||e.variants)}function IV(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Lt(s))e.addValue(r,s);else if(Lt(i))e.addValue(r,ca(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,ca(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ng={current:null},$j={current:!1},MV=typeof window<"u";function LV(){if($j.current=!0,!!MV)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ng.current=e.matches;e.addEventListener("change",t),t()}else ng.current=!1}const Xw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Pd={};function Fj(e){Pd=e}function $V(){return Pd}class FV{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=vv,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 p=Ht.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,$e.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,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=Tf(n),this.isVariantNode=Lj(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const w=h[p];u[p]!==void 0&&Lt(w)&&w.set(u[p])}}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,DV.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:($j.current||LV(),this.shouldReduceMotion=ng.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(),Ws(this.notifyUpdate),Ws(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&&fV.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:d}=n.accelerate,f=new vj({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:Nn(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=_a.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&$e.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 Pd){const n=Pd[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):dt()}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<Xw.length;r++){const s=Xw[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=IV(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}
vendor: 29,294 bytes, line 452
452addVariantChild(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=ca(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"&&($T(r)||BT(r))?r=parseFloat(r):!OV(r)&&Jn.test(n)&&(r=Nj(t,n)),this.setBaseTarget(t,Lt(r)?r.get():r)),Lt(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=bv(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&&!Lt(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 av),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){_v.render(this.render)}}class Bj extends FV{constructor(){super(...arguments),this.KeyframeResolver=dV}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;Lt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}let Qs=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};function Uj({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function UV(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 Hh(e){return e===void 0||e===1}function rg({scale:e,scaleX:t,scaleY:n}){return!Hh(e)||!Hh(t)||!Hh(n)}function li(e){return rg(e)||Vj(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Vj(e){return Jw(e.x)||Jw(e.y)}function Jw(e){return e&&e!=="0%"}function Nd(e,t,n){const r=e-n,s=t*r;return n+s}function Zw(e,t,n,r,s){return s!==void 0&&(e=Nd(e,s,r)),Nd(e,n,r)+t}function sg(e,t=0,n=1,r,s){e.min=Zw(e.min,t,n,r,s),e.max=Zw(e.max,t,n,r,s)}function zj(e,{x:t,y:n}){sg(e.x,t.translate,t.scale,t.originPoint),sg(e.y,n.translate,n.scale,n.originPoint)}const eb=.999999999999,tb=1.0000000000001;function VV(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ko(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,zj(e,o)),r&&li(i.latestValues)&&ko(e,i.latestValues))}t.x<tb&&t.x>eb&&(t.x=1),t.y<tb&&t.y>eb&&(t.y=1)}function So(e,t){e.min=e.min+t,e.max=e.max+t}function nb(e,t,n,r,s=.5){const i=qe(e.min,e.max,s);sg(e,t,n,i,r)}function ko(e,t){nb(e.x,t.x,t.scaleX,t.scale,t.originX),nb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Wj(e,t){return Uj(UV(e.getBoundingClientRect(),t))}function zV(e,t,n){const r=Wj(e,n),{scroll:s}=t;return s&&(So(r.x,s.offset.x),So(r.y,s.offset.y)),r}const WV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},HV=ka.length;function qV(e,t,n){let r="",s=!0;for(let i=0;i<HV;i++){const o=ka[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 u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=Aj(a,kv[o]);if(!l){s=!1;const d=WV[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Pv(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(_a.has(l)){o=!0;continue}else if(tj(l)){s[l]=u;continue}else{const d=Aj(u,kv[l]);l.startsWith("origin")?(a=!0,i[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=qV(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${l} ${u} ${d}`}}function Hj(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 rb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ua={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ee.test(e))e=parseFloat(e);else return e;const n=rb(e,t.target.x),r=rb(e,t.target.y);return`${n}% ${r}%`}},KV={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Jn.parse(e);if(s.length>5)return r;const i=Jn.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 u=qe(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},ig={borderRadius:{...Ua,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ua,borderTopRightRadius:Ua,borderBottomLeftRadius:Ua,borderBottomRightRadius:Ua,boxShadow:KV};function qj(e,{layout:t,layoutId:n}){return _a.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ig[e]||e==="opacity")}function Nv(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)(Lt(r[a])||s&&Lt(s[a])||qj(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function GV(e){return window.getComputedStyle(e)}class YV extends Bj{constructor(){super(...arguments),this.type="html",this.renderInstance=Hj}readValueFromInstance(t,n){var r;if(_a.has(n))return(r=this.projection)!=null&&r.isProjecting?Hm(n):fU(t,n);{const s=GV(t),i=(tj(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Wj(t,n)}build(t,n,r){Pv(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Nv(t,n,r)}}const QV={offset:"stroke-dashoffset",array:"stroke-dasharray"},XV={offset:"strokeDashoffset",array:"strokeDasharray"};function JV(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?QV:XV;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const ZV=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Kj(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,u,d){if(Pv(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox);for(const p of ZV)f[p]!==void 0&&(h[p]=f[p],delete f[p]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&JV(f,s,i,o,!1)}const Gj=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"]),Yj=e=>typeof e=="string"&&e.toLowerCase()==="svg";function e6(e,t,n,r){Hj(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Gj.has(s)?s:Sv(s),t.attrs[s])}function Qj(e,t,n){const r=Nv(e,t,n);for(const s in e)if(Lt(e[s])||Lt(t[s])){const i=ka.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class t6 extends Bj{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=dt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(_a.has(n)){const r=Pj(n);return r&&r.default||0}return n=Gj.has(n)?n:Sv(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Qj(t,n,r)}build(t,n,r){Kj(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){e6(t,n,r,s)}mount(t){this.isSVGTag=Yj(t.tagName),super.mount(t)}}const n6=jv.length;function Xj(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Xj(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<n6;n++){const r=jv[n],s=e.props[r];(Yl(s)||s===!1)&&(t[r]=s)}return t}function Jj(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 r6=[...Tv].reverse(),s6=Tv.length;function i6(e){return t=>Promise.all(t.map(({animation:n,options:r})=>eV(e,n,r)))}function o6(e){let t=i6(e),n=sb(),r=!0;const s=l=>(u,d)=>{var h;const f=Lo(e,d,l==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(f){const{transition:p,transitionEnd:w,...g}=f;u={...u,...g,...w}}return u};function i(l){t=l(e)}function o(l){const{props:u}=e,d=Xj(e.parent)||{},f=[],h=new Set;let p={},w=1/0;for(let x=0;x<s6;x++){const y=r6[x],v=n[y],b=u[y]!==void 0?u[y]:d[y],S=Yl(b),k=y===l?v.isActive:null;k===!1&&(w=x);let T=b===d[y]&&b!==u[y]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),v.protectedKeys={...p},!v.isActive&&k===null||!b&&!v.prevProp||Ef(b)||typeof b=="boolean")continue;if(y==="exit"&&v.isActive&&k!==!0){v.prevResolvedValues&&(p={...p,...v.prevResolvedValues});continue}const E=a6(v.prevProp,b);let j=E||y===l&&v.isActive&&!T&&S||x>w&&S,R=!1;const A=Array.isArray(b)?b:[b];let D=A.reduce(s(y),{});k===!1&&(D={});const{prevResolvedValues:$={}}=v,W={...$,...D},F=V=>{j=!0,h.has(V)&&(R=!0,h.delete(V)),v.needsAnimating[V]=!0;const N=e.getValue(V);N&&(N.liveStyle=!1)};for(const V in W){const N=D[V],O=$[V];if(p.hasOwnProperty(V))continue;let _=!1;Xm(N)&&Xm(O)?_=!Jj(N,O):_=N!==O,_?N!=null?F(V):h.add(V):N!==void 0&&h.has(V)?F(V):v.protectedKeys[V]=!0}v.prevProp=b,v.prevResolvedValues=D,v.isActive&&(p={...p,...D}),r&&e.blockInitialAnimation&&(j=!1);const K=T&&E;j&&(!K||R)&&f.push(...A.map(V=>{const N={type:y};if(typeof V=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:O}=e,_=Lo(O,V);if(O.enteringChildren&&_){const{delayChildren:C}=_.transition||{};N.delay=wj(O.enteringChildren,e,C)}}return{animation:V,options:N}}))}if(h.size){const x={};if(typeof u.initial!="boolean"){const y=Lo(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(x.transition=y.transition)}h.forEach(y=>{const v=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),x[y]=v??null}),f.push({animation:x})}let g=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(f):Promise.resolve()}function a(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(h=>{var p;return(p=h.animationState)==null?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=o(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=sb()}}}function a6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Jj(t,e):!1}function si(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sb(){return{animate:si(!0),whileInView:si(),whileHover:si(),whileTap:si(),whileDrag:si(),whileFocus:si(),exit:si()}}function ib(e,t){e.min=t.min,e.max=t.max}function Bn(e,t){ib(e.x,t.x),ib(e.y,t.y)}function ob(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Zj=1e-4,l6=1-Zj,c6=1+Zj,eP=.01,u6=0-eP,d6=0+eP;function qt(e){return e.max-e.min}function f6(e,t,n){return Math.abs(e-t)<=n}function ab(e,t,n,r=.5){e.origin=r,e.originPoint=qe(t.min,t.max,e.origin),e.scale=qt(n)/qt(t),e.translate=qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=l6&&e.scale<=c6||isNaN(e.scale))&&(e.scale=1),(e.translate>=u6&&e.translate<=d6||isNaN(e.translate))&&(e.translate=0)}function dl(e,t,n,r){ab(e.x,t.x,n.x,r?r.originX:void 0),ab(e.y,t.y,n.y,r?r.originY:void 0)}function lb(e,t,n){e.min=n.min+t.min,e.max=e.min+qt(t)}function h6(e,t,n){lb(e.x,t.x,n.x),lb(e.y,t.y,n.y)}function cb(e,t,n){e.min=t.min-n.min,e.max=e.min+qt(t)}function Rd(e,t,n){cb(e.x,t.x,n.x),cb(e.y,t.y,n.y)}function ub(e,t,n,r,s){return e-=t,e=Nd(e,1/n,r),s!==void 0&&(e=Nd(e,1/s,r)),e}function p6(e,t=0,n=1,r=.5,s,i=e,o=e){if(yr.test(t)&&(t=parseFloat(t),t=qe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=qe(i.min,i.max,r);e===i&&(a-=t),e.min=ub(e.min,t,n,a,s),e.max=ub(e.max,t,n,a,s)}function db(e,t,[n,r,s],i,o){p6(e,t[n],t[r],t[s],t.scale,i,o)}const m6=["x","scaleX","originX"],g6=["y","scaleY","originY"];function fb(e,t,n,r){db(e.x,t,m6,n?n.x:void 0,r?r.x:void 0),db(e.y,t,g6,n?n.y:void 0,r?r.y:void 0)}function hb(e){return e.translate===0&&e.scale===1}function tP(e){return hb(e.x)&&hb(e.y)}function pb(e,t){return e.min===t.min&&e.max===t.max}function y6(e,t){return pb(e.x,t.x)&&pb(e.y,t.y)}function mb(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nP(e,t){return mb(e.x,t.x)&&mb(e.y,t.y)}function gb(e){return qt(e.x)/qt(e.y)}function yb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function lr(e){return[e("x"),e("y")]}function v6(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:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:w}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),w&&(r+=`skewY(${w}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 rP=["TopLeft","TopRight","BottomLeft","BottomRight"],x6=rP.length,vb=e=>typeof e=="string"?parseFloat(e):e,xb=e=>typeof e=="number"||ee.test(e);function w6(e,t,n,r,s,i){s?(e.opacity=qe(0,n.opacity??1,b6(r)),e.opacityExit=qe(t.opacity??1,0,S6(r))):i&&(e.opacity=qe(t.opacity??1,n.opacity??1,r));for(let o=0;o<x6;o++){const a=`border${rP[o]}Radius`;let l=wb(t,a),u=wb(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||xb(l)===xb(u)?(e[a]=Math.max(qe(vb(l),vb(u),r),0),(yr.test(u)||yr.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=qe(t.rotate||0,n.rotate||0,r))}function wb(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const b6=sP(0,.5,YT),S6=sP(.5,.95,Pn);function sP(e,t,n){return r=>r<e?0:r>t?1:n(ql(e,t,r))}function k6(e,t,n){const r=Lt(e)?e:ca(e);return r.start(wv("",r,t,n)),r.animation}function Ql(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const _6=(e,t)=>e.depth-t.depth;class C6{constructor(){this.children=[],this.isDirty=!1}add(t){ov(this.children,t),this.isDirty=!0}remove(t){Cd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_6),this.isDirty=!1,this.children.forEach(t)}}function E6(e,t){const n=Ht.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ws(r),e(i-t))};return $e.setup(r,!0),()=>Ws(r)}function Lu(e){return Lt(e)?e.get():e}class T6{constructor(){this.members=[]}add(t){ov(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.isPresent!==!1&&!r.snapshot&&Cd(this.members,r)}t.scheduleRender()}remove(t){if(Cd(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){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s],o=i.instance;if(i.isPresent!==!1&&(!o||o.isConnected!==!1)){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const s=r.options.layoutDependency,i=t.options.layoutDependency;if(!(s!==void 0&&i!==void 0&&s===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const $u={hasAnimatedSinceResize:!0,hasEverUpdated:!1},qh=["","X","Y","Z"],j6=1e3;let P6=0;function Kh(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Cj(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",$e,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iP(r)}function oP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=P6++,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(A6),this.nodes.forEach(M6),this.nodes.forEach(L6),this.nodes.forEach(O6)},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 C6)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new av),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=Ev(o)&&!RV(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;$e.read(()=>{f=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,d&&d(),d=E6(h,250),$u.hasAnimatedSinceResize&&($u.hasAnimatedSinceResize=!1,this.nodes.forEach(kb)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||u.getDefaultTransition()||V6,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),y=!this.targetLayout||!nP(this.targetLayout,p),v=!f&&h;if(this.options.layoutRoot||this.resumeFrom||v||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...xv(w,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(d,v)}else f||kb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(),Ws(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($6),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&&iP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bb);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Sb);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(I6),this.nodes.forEach(N6),this.nodes.forEach(R6)):this.nodes.forEach(Sb),this.clearAllSnapshots();const a=Ht.now();Ct.delta=br(0,1e3/60,a-Ct.timestamp),Ct.timestamp=a,Ct.isProcessing=!0,$h.update.process(Ct),$h.preRender.process(Ct),$h.render.process(Ct),Ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_v.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(D6),this.sharedNodes.forEach(F6)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$e.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$e.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!qt(this.snapshot.measuredBox.x)&&!qt(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=dt(),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);this.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&&!tP(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||li(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),z6(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return dt();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(W6))){const{scroll:d}=this.root;d&&(So(a.x,d.offset.x),So(a.y,d.offset.y))}return a}removeElementScroll(o){var l;const a=dt();if(Bn(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&Bn(a,o),So(a.x,f.offset.x),So(a.y,f.offset.y))}return a}applyTransform(o,a=!1){const l=dt();Bn(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ko(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),li(d.latestValues)&&ko(l,d.latestValues)}return li(this.latestValues)&&ko(l,this.latestValues),l}removeTransform(o){const a=dt();Bn(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!li(u.latestValues))continue;rg(u.latestValues)&&u.updateSnapshot();const d=dt(),f=u.measurePageBox();Bn(d,f),fb(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return li(this.latestValues)&&fb(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!==Ct.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;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||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=Ct.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=dt(),this.targetWithTransforms=dt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),h6(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Bn(this.target,this.layout.layoutBox),zj(this.target,this.targetDelta)):Bn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!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||rg(this.parent.latestValues)||Vj(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=dt(),this.relativeTargetOrigin=dt(),Rd(this.relativeTargetOrigin,a,l),Bn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var w;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&
vendor: 5,299 bytes, line 452
452(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ct.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Bn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;VV(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=dt());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ob(this.prevProjectionDelta.x,this.projectionDelta.x),ob(this.prevProjectionDelta.y,this.projectionDelta.y)),dl(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!yb(this.projectionDelta.x,this.prevProjectionDelta.x)||!yb(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}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=bo(),this.projectionDelta=bo(),this.projectionDeltaWithTransform=bo()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},f=bo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=dt(),p=l?l.source:void 0,w=this.layout?this.layout.source:void 0,g=p!==w,x=this.getStack(),y=!x||x.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(U6));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const k=S/1e3;_b(f.x,o.x,k),_b(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rd(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),B6(this.relativeTarget,this.relativeTargetOrigin,h,k),b&&y6(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=dt()),Bn(b,this.relativeTarget)),g&&(this.animationValues=d,w6(d,u,this.latestValues,k,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ws(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$e.update(()=>{$u.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ca(0)),this.motionValue.jump(0,!1),this.currentAnimation=k6(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},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(j6),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&aP(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||dt();const f=qt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=qt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Bn(a,l),ko(a,d),dl(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new T6),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.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 u=this.getStack();u&&u.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: 8,574 bytes, line 452
452resetSkewAndRotation(){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 u={};l.z&&Kh("z",o,u,this.animationValues);for(let d=0;d<qh.length;d++)Kh(`rotate${qh[d]}`,o,u,this.animationValues),Kh(`skew${qh[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);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=Lu(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Lu(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!li(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=v6(this.projectionDeltaWithTransform,this.treeScale,d);l&&(f=l(d,f)),o.transform=f;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const w in ig){if(d[w]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:y}=ig[w],v=f==="none"?d[w]:g(d[w],u);if(x){const b=x.length;for(let S=0;S<b;S++)o[x[S]]=v}else y?this.options.visualElement.renderState.vars[w]=v:o[w]=v}this.options.layoutId&&(o.pointerEvents=u===this?Lu(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(bb),this.root.sharedNodes.clear()}}}function N6(e){e.updateLayout()}function R6(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;i==="size"?lr(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],p=qt(h);h.min=r[f].min,h.max=h.min+p}):aP(i,t.layoutBox,r)&&lr(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],p=qt(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const a=bo();dl(a,r,t.layoutBox);const l=bo();o?dl(l,e.applyTransform(s,!0),t.measuredBox):dl(l,r,t.layoutBox);const u=!tP(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const w=dt();Rd(w,t.layoutBox,h.layoutBox);const g=dt();Rd(g,r,p.layoutBox),nP(w,g)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=w,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function A6(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 O6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function D6(e){e.clearSnapshot()}function bb(e){e.clearMeasurements()}function Sb(e){e.isLayoutDirty=!1}function I6(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function M6(e){e.resolveTargetDelta()}function L6(e){e.calcProjection()}function $6(e){e.resetSkewAndRotation()}function F6(e){e.removeLeadSnapshot()}function _b(e,t,n){e.translate=qe(t.translate,0,n),e.scale=qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Cb(e,t,n,r){e.min=qe(t.min,n.min,r),e.max=qe(t.max,n.max,r)}function B6(e,t,n,r){Cb(e.x,t.x,n.x,r),Cb(e.y,t.y,n.y,r)}function U6(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const V6={duration:.45,ease:[.4,0,.1,1]},Eb=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Tb=Eb("applewebkit/")&&!Eb("chrome/")?Math.round:Pn;function jb(e){e.min=Tb(e.min),e.max=Tb(e.max)}function z6(e){jb(e.x),jb(e.y)}function aP(e,t,n){return e==="position"||e==="preserve-aspect"&&!f6(gb(t),gb(n),.2)}function W6(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const H6=oP({attachResizeListener:(e,t)=>Ql(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}),Gh={current:void 0},lP=oP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gh.current){const e=new H6({});e.mount(window),e.setOptions({layoutScroll:!0}),Gh.current=e}return Gh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),cP=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function q6(e=!0){const t=m.useContext(iv);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=m.useId();m.useEffect(()=>{if(e)return s(i)},[e]);const o=m.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const uP=m.createContext({strict:!1}),Pb={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 Nb=!1;function K6(){if(Nb)return;const e={};for(const t in Pb)e[t]={isEnabled:n=>Pb[t].some(r=>!!n[r])};Fj(e),Nb=!0}function dP(){return K6(),$V()}function G6(e){const t=dP();for(const n in e)t[n]={...t[n],...e[n]};Fj(t)}const Y6=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 Ad(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Y6.has(e)}let fP=e=>!Ad(e);function Q6(e){typeof e=="function"&&(fP=t=>t.startsWith("on")?!Ad(t):e(t))}try{Q6(require("@emotion/is-prop-valid").default)}catch{}function X6(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(fP(s)||n===!0&&Ad(s)||!t&&!Ad(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const jf=m.createContext({});function J6(e,t){if(Tf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Yl(n)?n:void 0,animate:Yl(r)?r:void 0}}return e.inherit!==!1?t:{}}function Z6(e){const{initial:t,animate:n}=J6(e,m.useContext(jf));return m.useMemo(()=>({initial:t,animate:n}),[Rb(t),Rb(n)])}function Rb(e){return Array.isArray(e)?e.join(" "):e}const Rv=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hP(e,t,n){for(const r in t)!Lt(t[r])&&!qj(r,n)&&(e[r]=t[r])}function ez({transformTemplate:e},t){return m.useMemo(()=>{const n=Rv();return Pv(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tz(e,t){const n=e.style||{},r={};return hP(r,n,e),Object.assign(r,ez(e,t)),r}function nz(e,t){const n={},r=tz(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"}
452`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const pP=()=>({...Rv(),attrs:{}});function rz(e,t,n,r){const s=m.useMemo(()=>{const i=pP();return Kj(i,t,Yj(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};hP(i,e.style,e),s.style={...i,...s.style}}return s}const sz=["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 Av(e){return typeof e!="string"||e.includes("-")?!1:!!(sz.indexOf(e)>-1||/[A-Z]/u.test(e))}function iz(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??Av(e)?rz:nz)(t,r,s,e),u=X6(t,typeof e=="string",i),d=e!==m.Fragment?{...u,...l,ref:n}:{},{children:f}=t,h=m.useMemo(()=>Lt(f)?f.get():f,[f]);return m.createElement(e,{...d,children:h})}function oz({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:az(n,r,s,e),renderState:t()}}function az(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=Lu(i[h]);let{initial:o,animate:a}=e;const l=Tf(e),u=Lj(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;if(f&&typeof f!="boolean"&&!Ef(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const w=bv(e,h[p]);if(w){const{transitionEnd:g,transition:x,...y}=w;for(const v in y){let b=y[v];if(Array.isArray(b)){const S=d?b.length-1:0;b=b[S]}b!==null&&(s[v]=b)}for(const v in g)s[v]=g[v]}}}return s}const mP=e=>(t,n)=>{const r=m.useContext(jf),s=m.useContext(iv),i=()=>oz(e,t,r,s);return n?i():cB(i)},lz=mP({scrapeMotionValuesFromProps:Nv,createRenderState:Rv}),cz=mP({scrapeMotionValuesFromProps:Qj,createRenderState:pP}),uz=Symbol.for("motionComponentSymbol");function dz(e,t,n){const r=m.useRef(n);m.useInsertionEffect(()=>{r.current=n});const s=m.useRef(null);return m.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i)),t&&(i?t.mount(i):t.unmount());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])}const gP=m.createContext({});function so(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function fz(e,t,n,r,s,i){var b,S;const{visualElement:o}=m.useContext(jf),a=m.useContext(uP),l=m.useContext(iv),u=m.useContext(cP),d=u.reducedMotion,f=u.skipAnimations,h=m.useRef(null),p=m.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:d,skipAnimations:f,isSVG:i}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const w=h.current,g=m.useContext(gP);w&&!w.projection&&s&&(w.type==="html"||w.type==="svg")&&hz(h.current,n,s,g);const x=m.useRef(!1);m.useInsertionEffect(()=>{w&&x.current&&w.update(n,l)});const y=n[_j],v=m.useRef(!!y&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,y))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,y)));return uB(()=>{p.current=!0,w&&(x.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),v.current&&w.animationState&&w.animationState.animateChanges())}),m.useEffect(()=>{w&&(!v.current&&w.animationState&&w.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,y)}),v.current=!1),w.enteringChildren=void 0)}),w}function hz(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yP(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&so(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u})}function yP(e){if(e)return e.options.allowProjection!==!1?e.projection:yP(e.parent)}function Yh(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&G6(r);const i=n?n==="svg":Av(e),o=i?cz:lz;function a(u,d){let f;const h={...m.useContext(cP),...u,layoutId:pz(u)},{isStatic:p}=h,w=Z6(u),g=o(u,p);if(!p&<){mz();const x=gz(h);f=x.MeasureLayout,w.visualElement=fz(e,g,h,s,x.ProjectionNode,i)}return c.jsxs(jf.Provider,{value:w,children:[f&&w.visualElement?c.jsx(f,{visualElement:w.visualElement,...h}):null,iz(e,u,dz(g,w.visualElement,d),g,p,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=m.forwardRef(a);return l[uz]=e,l}function pz({layoutId:e}){const t=m.useContext(MT).id;return t&&e!==void 0?t+"-"+e:e}function mz(e,t){m.useContext(uP).strict}function gz(e){const t=dP(),{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: 17,815 bytes, line 452
452function yz(e,t){if(typeof Proxy>"u")return Yh;const n=new Map,r=(i,o)=>Yh(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,Yh(o,void 0,e,t)),n.get(o))})}const vz=(e,t)=>t.isSVG??Av(e)?new t6(t):new YV(t,{allowProjection:e!==m.Fragment});class xz extends Qs{constructor(t){super(t),t.animationState||(t.animationState=o6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ef(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 wz=0;class bz extends Qs{constructor(){super(...arguments),this.id=wz++}update(){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;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Sz={animation:{Feature:xz},exit:{Feature:bz}};function yc(e){return{point:{x:e.pageX,y:e.pageY}}}const kz=e=>t=>Cv(t)&&e(t,yc(t));function fl(e,t,n,r){return Ql(e,t,kz(n),r)}const vP=({current:e})=>e?e.ownerDocument.defaultView:null,Ab=(e,t)=>Math.abs(e-t);function _z(e,t){const n=Ab(e.x,t.x),r=Ab(e.y,t.y);return Math.sqrt(n**2+r**2)}const Ob=new Set(["auto","scroll"]);class xP{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.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Xh(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,g=_z(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!g)return;const{point:x}=p,{timestamp:y}=Ct;this.history.push({...x,timestamp:y});const{onStart:v,onMove:b}=this.handlers;w||(v&&v(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,w)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Qh(w,this.transformPagePoint),$e.update(this.updatePoint,!0)},this.handlePointerUp=(p,w)=>{this.end();const{onEnd:g,onSessionEnd:x,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Xh(p.type==="pointercancel"?this.lastMoveEventInfo:Qh(w,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,v),x&&x(p,v)},!Cv(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=yc(t),u=Qh(l,this.transformPagePoint),{point:d}=u,{timestamp:f}=Ct;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,Xh(u,this.history)),this.removeListeners=pc(fl(this.contextWindow,"pointermove",this.handlePointerMove),fl(this.contextWindow,"pointerup",this.handlePointerUp),fl(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Ob.has(r.overflowX)||Ob.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),$e.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ws(this.updatePoint)}}function Qh(e,t){return t?{point:t(e.point)}:e}function Db(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xh({point:e},t){return{point:e,delta:Db(e,wP(t)),offset:Db(e,Cz(t)),velocity:Ez(t,.1)}}function Cz(e){return e[0]}function wP(e){return e[e.length-1]}function Ez(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=wP(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Nn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Nn(t)*2&&(r=e[1]);const i=Tn(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 Tz(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qe(n,e,r.max):Math.min(e,n)),e}function Ib(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 jz(e,{top:t,left:n,bottom:r,right:s}){return{x:Ib(e.x,n,s),y:Ib(e.y,t,r)}}function Mb(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 Pz(e,t){return{x:Mb(e.x,t.x),y:Mb(e.y,t.y)}}function Nz(e,t){let n=.5;const r=qt(e),s=qt(t);return s>r?n=ql(t.min,t.max-r,e.min):r>s&&(n=ql(e.min,e.max-s,t.min)),br(0,1,n)}function Rz(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 og=.35;function Az(e=og){return e===!1?e=0:e===!0&&(e=og),{x:Lb(e,"left","right"),y:Lb(e,"top","bottom")}}function Lb(e,t,n){return{min:$b(e,t),max:$b(e,n)}}function $b(e,t){return typeof e=="number"?e:e[t]||0}const Oz=new WeakMap;class Dz{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=dt(),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=f=>{n&&this.snapToCursor(yc(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:p,dragPropagation:w,onDragStart:g}=this.getProps();if(p&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pV(p),!this.openDragLock))return;this.latestPointerEvent=f,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),lr(y=>{let v=this.getAxisMotionValue(y).get()||0;if(yr.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const S=b.layout.layoutBox[y];S&&(v=qt(S)*(parseFloat(v)/100))}}this.originPoint[y]=v}),g&&$e.update(()=>g(f,h),!1,!0),Jm(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:w,onDirectionLock:g,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=h;if(w&&this.currentDirection===null){this.currentDirection=Mz(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),x&&$e.update(()=>x(f,h),!1,!0)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new xP(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:vP(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&&$e.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||!au(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Tz(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&&so(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=jz(r.layoutBox,t):this.constraints=!1,this.elastic=Az(n),s!==this.constraints&&!so(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&lr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Rz(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!so(t))return!1;const r=t.current;la(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=zV(r,s.root,this.visualElement.getTransformPagePoint());let o=Pz(s.layout.layoutBox,i);if(n){const a=n(BV(o));this.hasMutatedConstraints=!!a,a&&(o=Uj(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=lr(d=>{if(!au(d,n,this.currentDirection))return;let f=l&&l[d]||{};o&&(f={min:0,max:0});const h=s?200:1e6,p=s?40:1e7,w={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,w)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jm(this.visualElement,t),r.start(wv(t,r,0,n,this.visualElement,!1))}stopAnimation(){lr(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){lr(n=>{const{drag:r}=this.getProps();if(!au(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]-qe(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!so(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};lr(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=Nz({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(),lr(o=>{if(!au(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(qe(l,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Oz.set(this.visualElement,this);const t=this.visualElement.current,n=fl(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,p=h!==t&&wV(h);d&&f&&!p&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();so(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Iz(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),$e.read(s);const a=Ql(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(lr(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].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=og,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Fb(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Iz(e,t,n){const r=Gw(e,Fb(n)),s=Gw(t,Fb(n));return()=>{r(),s()}}function au(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Mz(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Lz extends Qs{constructor(t){super(t),this.removeGroupControls=Pn,this.removeListeners=Pn,this.controls=new Dz(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pn}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 Jh=e=>(t,n)=>{e&&$e.update(()=>e(t,n),!1,!0)};class $z extends Qs{constructor(){super(...arguments),this.removePointerDownListener=Pn}onPointerDown(t){this.session=new xP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Jh(t),onStart:Jh(n),onMove:Jh(r),onEnd:(i,o)=>{delete this.session,s&&$e.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=fl(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 Zh=!1;class Fz extends m.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),Zh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),$u.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}),Zh=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||$e.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_v.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Zh=!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 bP(e){const[t,n]=q6(),r=m.useContext(MT);return c.jsx(Fz,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(gP),isPresent:t,safeToRemove:n})}const Bz={pan:{Feature:$z},drag:{Feature:Lz,ProjectionNode:lP,MeasureLayout:bP}};function Bb(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&&$e.postRender(()=>i(t,yc(t)))}class Uz extends Qs{mount(){const{current:t}=this.node;t&&(this.unmount=gV(t,(n,r)=>(Bb(this.node,r,"Start"),s=>Bb(this.node,s,"End"))))}unmount(){}}class Vz extends Qs{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=pc(Ql(this.node.current,"focus",()=>this.onFocus()),Ql(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ub(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&&$e.postRender(()=>i(t,yc(t)))}class zz extends Qs{mount(){const{current:t}=this.node;if(!t)return;
452const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=SV(t,(s,i)=>(Ub(this.node,i,"Start"),(o,{success:a})=>Ub(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const ag=new WeakMap,ep=new WeakMap,Wz=e=>{const t=ag.get(e.target);t&&t(e)},Hz=e=>{e.forEach(Wz)};function qz({root:e,...t}){const n=e||document;ep.has(n)||ep.set(n,{});const r=ep.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Hz,{root:e,...t})),r[s]}function Kz(e,t,n){const r=qz(t);return ag.set(e,n),r.observe(e),()=>{ag.delete(e),r.unobserve(e)}}const Gz={some:0,all:1};class Yz extends Qs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();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:Gz[s]},a=l=>{const{isIntersecting:u}=l;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:f}=this.node.getProps(),h=u?d:f;h&&h(l)};return Kz(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(Qz(t,n))&&this.startObserver()}unmount(){}}function Qz({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Xz={inView:{Feature:Yz},tap:{Feature:zz},focus:{Feature:Vz},hover:{Feature:Uz}},Jz={layout:{ProjectionNode:lP,MeasureLayout:bP}},Zz={...Sz,...Xz,...Bz,...Jz},ft=yz(Zz,vz),Vb="/assets/today-kDAX2v0Q.png",zb="/assets/explore-O1RKILAd.png",Wb="/assets/profile-DBhJpoKj.png",Hb="/assets/history-BeMFJ9MN.png",qb="/assets/place-3_sFl7H-.png",e8=[{icon:my,key:"section1"},{icon:tf,key:"section2"},{icon:ra,key:"section3"},{icon:gr,key:"section4"},{icon:uO,key:"section5"},{icon:gy,key:"section6"}],lu={hidden:{opacity:0,y:30},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}},t8={visible:{transition:{staggerChildren:.12}}};function n8(){const{user:e,loading:t}=Oe(),{locale:n,setLocale:r,t:s}=rt(),i=s.landing;return t?c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:c.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):e?c.jsx(Dy,{to:"/today",replace:!0}):c.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[c.jsxs("header",{className:"sticky top-0 z-30 flex items-center justify-between border-b border-border bg-background/95 px-4 py-3 backdrop-blur-sm",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("img",{src:Hl,alt:"Yaku",className:"h-12 w-12 rounded-xl object-cover shadow-sm"}),c.jsxs("div",{className:"flex flex-col items-start",children:[c.jsx("span",{className:"text-xl font-black tracking-tighter text-foreground leading-none",children:"YAKU"}),c.jsx("span",{className:"text-[10px] md:text-xs font-bold text-muted-foreground/60 tracking-tight",children:"Fluid English for real life."})]})]}),c.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[c.jsx("button",{onClick:()=>r(n==="en"?"es":"en"),className:"rounded-lg border border-border px-3 py-1.5 text-xs font-extrabold text-muted-foreground transition-colors hover:bg-muted",children:i.langLabel}),c.jsx(eo,{to:"/login",children:c.jsx(ne,{variant:"ghost",size:"sm",className:"text-xs font-extrabold text-yaku-arctic sm:text-sm",children:i.loginCta})})]})]}),c.jsxs("section",{className:"relative w-full overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 z-0 pointer-events-none opacity-[1.0]",style:{backgroundImage:"radial-gradient(circle, #ced4da 1px, transparent 1px)",backgroundSize:"24px 24px",maskImage:"radial-gradient(ellipse at center, black, transparent 95%)",WebkitMaskImage:"radial-gradient(ellipse at center, black, transparent 95%)"}}),c.jsxs(ft.div,{initial:"hidden",animate:"visible",variants:t8,className:"relative z-10 flex flex-col items-center px-6 pb-20 pt-6 text-center md:px-8 md:pt-10",children:[c.jsx(ft.div,{variants:lu,className:"mb-8 overflow-hidden rounded-3xl",children:c.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInl
452ine:!0,className:"h-48 w-48 object-cover sm:h-56 sm:w-56 md:h-80 md:w-80",children:c.jsx("source",{src:"/yaku.mp4",type:"video/mp4"})})}),c.jsxs(ft.h1,{variants:lu,className:"max-w-lg text-3xl font-black leading-tight text-primary sm:text-4xl md:text-5xl",children:[i.heroTitlePrefix,c.jsx("span",{className:"text-yaku-arctic",children:i.heroTitleHighlight}),i.heroTitleSuffix]}),c.jsx(ft.p,{variants:lu,className:"mt-4 max-w-md text-base text-muted-foreground md:text-lg",children:i.heroSub}),c.jsx(ft.div,{variants:lu,className:"mt-8 flex w-full max-w-xs flex-col gap-3",children:c.jsx(eo,{to:"/login",children:c.jsx(ne,{size:"lg",className:"w-full rounded-2xl py-6 text-base font-black uppercase tracking-wider shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:i.loginCta})})})]})]}),c.jsx("section",{className:"bg-muted/40 px-6 py-16 md:px-8",children:c.jsx("div",{className:"mx-auto max-w-7xl",children:c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:e8.map((o,a)=>{const l=o.icon,u=i[`${o.key}Title`],d=i[`${o.key}Desc`];return c.jsxs(ft.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.5,delay:a*.1},className:"bg-white rounded-[2rem] p-8 shadow-sm border border-slate-100/50 hover:shadow-md transition-all duration-300 flex flex-col items-start text-left group",children:[c.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl bg-yaku-arctic/10 group-hover:bg-yaku-arctic/20 transition-colors mb-6",children:c.jsx(l,{className:"h-7 w-7 text-yaku-arctic",strokeWidth:2.5})}),c.jsx("h2",{className:"text-xl font-black tracking-tight text-foreground mb-3 leading-tight uppercase",children:u}),c.jsx("p",{className:"text-sm font-semibold leading-relaxed text-muted-foreground/80",children:d})]},o.key)})})})}),c.jsx("section",{className:"overflow-hidden bg-white px-6 py-24 md:px-8",children:c.jsxs("div",{className:"mx-auto max-w-7xl",children:[c.jsxs("div",{className:"flex flex-col items-center text-center mb-16",children:[c.jsxs(ft.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-3xl md:text-5xl font-black tracking-tight text-foreground uppercase mb-6",children:["Real World ",c.jsx("span",{className:"text-primary italic",children:"Practice"})]}),c.jsx(ft.p,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},className:"max-w-2xl text-lg font-bold text-muted-foreground/70",children:"No more boring flashcards. Go out, explore your city, and talk to real people. Yaku guides you every step of the way."})]}),c.jsxs("div",{className:"relative mt-12 flex justify-center h-[600px] md:h-[750px] perspective-1000",children:[c.jsxs("div",{className:"hidden sm:contents",children:[c.jsx(ft.div,{initial:{opacity:0,x:-160,rotate:-25,scale:.7},whileInView:{opacity:1,x:-80,rotate:-15,scale:.85},whileHover:{x:-100,rotate:-18,scale:.9,zIndex:30},viewport:{once:!0},transition:{duration:.8,type:"spring"},className:"absolute left-[5%] md:left-[15%] top-20 w-[200px] md:w-[280px] rounded-[2rem] border-[6px] border-slate-900 bg-slate-900 shadow-2xl overflow-hidden hidden lg:block origin-bottom cursor-pointer group",children:c.jsx("div",{className:"relative aspect-[9/19.5] w-full pt-4",children:c.jsx("img",{src:Hb,alt:"History",className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"})})}),c.jsx(ft.div,{initial:{opacity:0,x:-100,rotate:-15,scale:.8},whileInView:{opacity:1,x:-40,rotate:-10,scale:.9},whileHover:{x:-60,rotate:-12,scale:.95,zIndex:30},viewport:{once:!0},transition:{duration:.8,type:"spring",delay:.1},className:"absolute left-[10%] md:left-[25%] top-10 w-[240px] md:w-[320px] rounded-[2.5rem] border-[8px] border-slate-900 bg-slate-900 shadow-2xl overflow-hidden hidden sm:block origin-bottom cursor-pointer group",children:c.jsx("div",{className:"relative aspect-[9/19.5] w-full pt-4",children:c.jsx("img",{src:zb,alt:"Explore App",className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"})})}),c.jsx(ft.div,{initial:{opacity:0,x:160,rotate:25,scale:.7},whileInView:{opacity:1,x:80,rotate:15,scale:.85},whileHover:{x:100,rotate:18,scale:.9,zIndex:30},viewport:{once:!0},transition:{duration:.8,type:"spring"},className:"absolute right-[5%] md:right-[15%] top-20 w-[200px] md:w-[280px] rounded-[2rem] border-[6px] border-slate-900 bg-slate-900 shadow-2xl overflow-hidden hidden lg:block origin-bottom cursor-pointer group",children:c.jsx("div",{className:"relative aspect-[9/19.5] w-full pt-4",children:c.jsx("img",{src:Wb,alt:"Profile",className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"})})}),c.jsx(ft.div,{initial:{opacity:0,x:100,rotate:15,scale:.8},whileInView:{opacity:1,x:40,rotate:10,scale:.9},whileHover:{x:60,rotate:12,scale:.95,zIndex:30},viewport:{once:!0},transition:{duration:.8,type:"spring",delay:.1},className:"absolute right-[10%] md:right-[25%] top-10 w-[240px] md:w-[320px] rounded-[2.5rem] border-[8px] border-slate-900 bg-slate-900 shadow-2xl overflow-hidden hidden sm:block origin-bottom cursor-pointer group",children:c.jsx("div",{className:"relative aspect-[9/19.5] w-full pt-4",children:c.jsx("img",{src:qb,alt:"Place Detail",className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"})})}),c.jsx(ft.div,{initial:{opacity:0,y:100,scale:.9},whileInView:{opacity:1,y:0,scale:1,zIndex:20},whileHover:{scale:1.02},viewport:{once:!0},transition:{duration:.8,type:"spring",delay:.2},className:"relative w-[280px] md:w-[340px] rounded-[3rem] border-[10px] border-slate-900 bg-slate-900 shadow-[0_40px_100px_rgba(0,0,0,0.3)] overflow-hidden cursor-pointer",children:c.jsxs("div",{className:"relative aspect-[9/19.5] w-full pt-6",children:[c.jsx("img",{src:Vb,alt:"Today Missions",className:"h-full w-full object-cover"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-white/10 to-transparent pointer-events-none"})]})})]}),c.jsx("div",{className:"flex w-full snap-x snap-mandatory overflow-x-auto pb-8 sm:hidden px-4 no-scrollbar gap-6",children:[Hb,zb,Vb,qb,Wb].map((o,a)=>c.jsx("div",{className:"flex-none snap-center snap-always",children:c.jsx("div",{className:"relative w-[260px] rounded-[3rem] border-[10px] border-slate-900 bg-slate-900 shadow-2xl overflow-hidden",children:c.jsxs("div",{className:"relative aspect-[9/19.5] w-full pt-6",children:[c.jsx("img",{src:o,alt:`Screen ${a}`,className:"h-full w-full object-cover"}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-white/10 to-transparent pointer-events-none"})]})})},a))})]}),c.jsx("div",{className:"mt-4 text-center sm:hidden",children:c.jsx("p",{className:"text-sm font-black text-primary animate-pulse up
452percase tracking-widest",children:"Swipe for more screens"})})]})}),c.jsxs(ft.section,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"flex flex-col items-center px-6 py-16 text-center md:px-8",children:[c.jsxs("h2",{className:"text-xl font-black text-primary sm:text-2xl md:text-3xl",children:[i.heroTitlePrefix,c.jsx("span",{className:"text-yaku-arctic",children:i.heroTitleHighlight}),i.heroTitleSuffix]}),c.jsx(eo,{to:"/login",className:"mt-6",children:c.jsx(ne,{size:"lg",className:"rounded-2xl px-12 py-6 text-base font-black uppercase tracking-wider shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:i.loginCta})})]}),c.jsxs("footer",{className:"border-t border-border bg-muted/30 px-6 py-8 text-center",children:[c.jsxs("div",{className:"flex items-center justify-center gap-2 text-xs font-bold text-muted-foreground",children:[c.jsx(gr,{className:"h-3.5 w-3.5"}),i.footerTag]}),c.jsxs("div",{className:"mt-3 flex items-center justify-center gap-4 text-xs text-muted-foreground",children:[c.jsx(eo,{to:"/login",className:"underline hover:text-foreground",children:i.footerLegal}),c.jsx(eo,{to:"/login",className:"underline hover:text-foreground",children:i.footerPrivacy})]}),c.jsx("p",{className:"mt-3 text-[10px] text-muted-foreground",children:"YAKU 2026"})]})]})}function r8(){const{user:e,loading:t,signInWithGoogle:n}=Oe(),{t:r}=rt(),s=rr(),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return t?c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:c.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):e?c.jsx(Dy,{to:"/today",replace:!0}):c.jsxs("div",{className:"relative flex min-h-screen flex-col items-center justify-center bg-background px-6 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 z-0 pointer-events-none opacity-[1.0]",style:{backgroundImage:"radial-gradient(circle, #ced4da 1px, transparent 1px)",backgroundSize:"24px 24px",maskImage:"radial-gradient(ellipse at center, black, transparent 95%)",WebkitMaskImage:"radial-gradient(ellipse at center, black, transparent 95%)"}}),c.jsx("div",{className:"fixed top-0 left-0 right-0 z-50 p-4 pointer-events-none",children:c.jsx("button",{onClick:()=>s("/"),className:"pointer-events-auto p-2 rounded-full border border-border bg-background/80 text-muted-foreground hover:text-primary transition-all active:scale-95 shadow-sm",title:"Back to Home",children:c.jsx(py,{className:"w-5 h-5 md:w-6 md:h-6"})})}),c.jsxs("div",{className:"relative z-10 mb-12 text-center flex flex-col items-center",children:[c.jsx("div",{className:"mb-6 overflow-hidden rounded-3xl",children:c.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"h-40 w-40 object-cover md:h-48 md:w-48",children:c.jsx("source",{src:"/yaku.mp4",type:"video/mp4"})})}),c.jsx("h1",{className:"text-4xl md:text-5xl font-black text-foreground tracking-tighter uppercase",children:"YAKU"}),c.jsx("p",{className:"mt-4 max-w-sm text-base md:text-lg font-semibold text-muted-foreground/80 leading-relaxed text-balance",children:r.login.tagline})]}),c.jsxs(ne,{onClick:n,size:"lg",className:"w-full max-w-xs gap-4 rounded-2xl bg-primary py-7 text-lg font-black shadow-yaku transition-all active:translate-y-1 active:shadow-none uppercase tracking-wide",children:[c.jsxs("svg",{className:"h-6 w-6",viewBox:"0 0 24 24",children:[c.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"}),c.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),c.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),c.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),r.login.continueGoogle]}),c.jsxs("p",{className:"mt-6 max-w-xs text-center text-[11px] text-muted-foreground",children:[r.login.legal," ",c.jsx("button",{onClick:()=>o(!0),className:"font-bold underline",children:r.login.terms})," ",r.login.and," ",c.jsx("button",{onClick:()=>l(!0),className:"font-bold underline",children:r.login.privacy})]}),c.jsx(Mt,{open:i,onOpenChange:o,children:c.jsxs(Et,{className:"max-w-[400px] rounded-2xl",children:[c.jsx(Tt,{className:"text-lg font-black",children:r.login.terms}),c.jsx(Cn,{className:"sr-only",children:"Terms of Service"}),c.jsx(zl,{type:"terms"})]})}),c.jsx(Mt,{open:a,onOpenChange:l,children:c.jsxs(Et,{className:"max-w-[400px] rounded-2xl",children:[c.jsx(Tt,{className:"text-lg font-black",children:r.login.privacy}),c.jsx(Cn,{className:"sr-only",children:"Privacy Policy"}),c.jsx(zl,{type:"privacy"})]})})]})}const Pf="/assets/yaku_celebrating-BfCCeQfL.jpg",SP="/assets/yaku_frozen-zLMXj62M.jpg",Ov="/assets/yaku_survived-DNCwv_uW.jpg",Dv="/assets/yaku_cake_happy-DrahF7r_.jpg";var tp="rovingFocusGroup.onEntryFocus",s8={bubbles:!1,cancelable:!0},vc="RovingFocusGroup",[lg,kP,i8]=ly(vc),[o8,_P]=On(vc,[i8]),[a8,l8]=o8(vc),CP=m.forwardRef((e,t)=>
vendor: 1,748 bytes, line 452
452c.jsx(lg.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(lg.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(c8,{...e,ref:t})})}));CP.displayName=vc;var c8=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=m.useRef(null),p=Ne(t,h),w=Sf(i),[g,x]=lc({prop:o,defaultProp:a??null,onChange:l,caller:vc}),[y,v]=m.useState(!1),b=gt(u),S=kP(n),k=m.useRef(!1),[T,E]=m.useState(0);return m.useEffect(()=>{const j=h.current;if(j)return j.addEventListener(tp,b),()=>j.removeEventListener(tp,b)},[b]),c.jsx(a8,{scope:n,orientation:r,dir:w,loop:s,currentTabStopId:g,onItemFocus:m.useCallback(j=>x(j),[x]),onItemShiftTab:m.useCallback(()=>v(!0),[]),onFocusableItemAdd:m.useCallback(()=>E(j=>j+1),[]),onFocusableItemRemove:m.useCallback(()=>E(j=>j-1),[]),children:c.jsx(me.div,{tabIndex:y||T===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:he(e.onMouseDown,()=>{k.current=!0}),onFocus:he(e.onFocus,j=>{const R=!k.current;if(j.target===j.currentTarget&&R&&!y){const A=new CustomEvent(tp,s8);if(j.currentTarget.dispatchEvent(A),!A.defaultPrevented){const D=S().filter(U=>U.focusable),$=D.find(U=>U.active),W=D.find(U=>U.id===g),K=[$,W,...D].filter(Boolean).map(U=>U.ref.current);jP(K,d)}}k.current=!1}),onBlur:he(e.onBlur,()=>v(!1))})})}),EP="RovingFocusGroupItem",TP=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,children:o,...a}=e,l=ol(),u=i||l,d=l8(EP,n),f=d.currentTabStopId===u,h=kP(n),{onFocusableItemAdd:p,onFocusableItemRemove:w,currentTabStopId:g}=d;return m.useEffect(()=>{if(r)return p(),()=>w()}
vendor: 4,605 bytes, line 452
452,[r,p,w]),c.jsx(lg.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:c.jsx(me.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:he(e.onMouseDown,x=>{r?d.onItemFocus(u):x.preventDefault()}),onFocus:he(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:he(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=f8(x,d.orientation,d.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const S=b.indexOf(x.currentTarget);b=d.loop?h8(b,S+1):b.slice(S+1)}setTimeout(()=>jP(b))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:g!=null}):o})})});TP.displayName=EP;var u8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function d8(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function f8(e,t,n){const r=d8(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return u8[r]}function jP(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function h8(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var p8=CP,m8=TP,Nf="Tabs",[g8,QW]=On(Nf,[_P]),PP=_P(),[y8,Iv]=g8(Nf),NP=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=Sf(a),[f,h]=lc({prop:r,onChange:s,defaultProp:i??"",caller:Nf});return c.jsx(y8,{scope:n,baseId:ol(),value:f,onValueChange:h,orientation:o,dir:d,activationMode:l,children:c.jsx(me.div,{dir:d,"data-orientation":o,...u,ref:t})})});NP.displayName=Nf;var RP="TabsList",AP=m.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,i=Iv(RP,n),o=PP(n);return c.jsx(p8,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:c.jsx(me.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});AP.displayName=RP;var OP="TabsTrigger",DP=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=e,o=Iv(OP,n),a=PP(n),l=LP(o.baseId,r),u=$P(o.baseId,r),d=r===o.value;return c.jsx(m8,{asChild:!0,...a,focusable:!s,active:d,children:c.jsx(me.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:t,onMouseDown:he(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:he(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:he(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!s&&f&&o.onValueChange(r)})})})});DP.displayName=OP;var IP="TabsContent",MP=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=e,a=Iv(IP,n),l=LP(a.baseId,r),u=$P(a.baseId,r),d=r===a.value,f=m.useRef(d);return m.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),c.jsx(nr,{present:s||d,children:({present:h})=>c.jsx(me.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&i})})});MP.displayName=IP;function LP(e,t){return`${e}-trigger-${t}`}function $P(e,t){return`${e}-content-${t}`}var v8=NP,FP=AP,BP=DP,UP=MP;const Rf=v8,xc=m.forwardRef(({className:e,...t},n)=>c.jsx(FP,{ref:n,className:oe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));xc.displayName=FP.displayName;const vr=m.forwardRef(({className:e,...t},n)=>c.jsx(BP,{ref:n,className:oe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));vr.displayName=BP.displayName;const xr=m.forwardRef(({className:e,...t},n)=>c.jsx(UP,{ref:n,className:oe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));xr.displayName=UP.displayName;function Kb(){const e=new Date;return`${e.getFullYear()}
452-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function x8(){const{user:e}=Oe(),{data:t}=Gr(),n=Nt(),[r,s]=m.useState(!1),i=xn({queryKey:["daily-challenge",Kb()],queryFn:async()=>{if(!(t!=null&&t.base_camp_lat)||!(t!=null&&t.base_camp_lng))return null;const a=Kb()+"T00:00:00",{data:l}=await ie.from("daily_quests").select("*").eq("user_id",e.id).gte("created_at",a).order("created_at",{ascending:!1}).limit(1);if(l&&l.length>0){const p=l[0];return typeof p.phrases=="string"&&(p.phrases=JSON.parse(p.phrases)),typeof p.responses=="string"&&(p.responses=JSON.parse(p.responses)),s(!1),p}s(!0);const{data:u}=await ie.from("daily_quests").select("poi_category, confidence").eq("user_id",e.id).eq("status","completed").order("created_at",{ascending:!1}).limit(1).maybeSingle(),{data:d,error:f}=await ie.functions.invoke("daily-challenge",{body:{baseLat:t.base_camp_lat,baseLng:t.base_camp_lng,lastCategory:(u==null?void 0:u.poi_category)??null,lastConfidence:(u==null?void 0:u.confidence)??null,radiusKm:(t==null?void 0:t.quest_radius_km)??5,timezoneOffsetMinutes:new Date().getTimezoneOffset()}});if(s(!1),f)throw f;if(d!=null&&d.error)throw new Error(d.error);const h=d;return typeof h.phrases=="string"&&(h.phrases=JSON.parse(h.phrases)),typeof h.responses=="string"&&(h.responses=JSON.parse(h.responses)),h},enabled:!!e&&!!(t!=null&&t.base_camp_lat),staleTime:1e3*60*5,retry:1}),o=ya({mutationFn:async({confidence:a,cpOverride:l})=>{const u=i.data;if(!u||!e)throw new Error("No challenge");const d=l??u.cp_reward,{error:f}=await ie.rpc("complete_daily_quest",{p_quest_id:u.id,p_user_id:e.id,p_confidence:a,p_cp_reward:d,p_poi_category:u.poi_category});if(f)throw f},onSuccess:()=>{n.invalidateQueries({queryKey:["daily-challenge"]}),n.invalidateQueries({queryKey:["profile"]})}});return{challenge:i.data,isLoading:i.isLoading,isGenerating:r,error:i.error,completeChallenge:o.mutateAsync,isCompleting:o.isPending}}function VP(){const[e,t]=m.useState(null),[n,r]=m.useState(null),[s,i]=m.useState(null),[o,a]=m.useState(!1),l=m.useCallback(()=>{if(!navigator.geolocation){i("Geolocation not supported");return}i(null);const u=d=>{t(d.coords.latitude),r(d.coords.longitude),i(null)};navigator.geolocation.getCurrentPosition(u,()=>{navigator.geolocation.getCurrentPosition(u,d=>i(d.message),{enableHighAccuracy:!1,timeout:15e3,maximumAge:6e4})},{enableHighAccuracy:!0,timeout:8e3,maximumAge:6e4})},[]);return m.useEffect(()=>{if(!navigator.geolocation){i("Geolocation not supported");return}a(!0);const u=navigator.geolocation.watchPosition(d=>{t(d.coords.latitude),r(d.coords.longitude),i(null)},d=>{i(d.message),a(!1)},{enableHighAccuracy:!1,maximumAge:6e4,timeout:3e4});return()=>{navigator.geolocation.clearWatch(u),a(!1)}},[]),{userLat:e,userLng:n,error:s,isTracking:o,requestPermission:l}}const w8="https://vyxpqbrblszdonsqifwk.supabase.co",Gb="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InZ5eHBxYnJibHN6ZG9uc3FpZndrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE4OTY0NDksImV4cCI6MjA4NzQ3MjQ0OX0.9cMUCFjc8gtU_YU748pe6EqmaXc4JEAQiIjvs7caP0g",Yb=new Map;function Mv(e,t){const[n,r]=m.useState(null),[s,i]=m.useState(null),o=m.useRef(null),a=m.useCallback(async(f,h)=>{if(o.current&&(o.current.pause(),o.current=null),n===f){r(null);return}i(f),r(null);const p=`${e||"default"}:${h}`;try{let w=Yb.get(p);if(!w){const{data:{session:x}}=await ie.auth.getSession(),y=(x==null?void 0:x.access_token)||Gb,v=await fetch(`${w8}/functions/v1/elevenlabs-tts`,{method:"POST",headers:{"Content-Type":"application/json",apikey:Gb,Authorization:`Bearer ${y}`},body:JSON.stringify({text:h,voiceId:e||void 0})});if(v.status===429){i(null),r(null),t==null||t();return}if(!v.ok)throw new Error(`TTS ${v.status}`);const b=await v.json();if((b==null?void 0:b.error)==="limit_reached"){i(null),r(null),t==null||t();return}if(!(b!=null&&b.url))throw new Error("No URL returned");w=b.url,Yb.set(p,w)}const g=new Audio(w);o.current=g,i(null),r(f),g.onended=()=>{r(x=>x===f?null:x),o.current=null},g.onerror=()=>{$t.error("Audio error"),r(x=>x===f?null:x),o.current=null},await g.play()}catch(w){console.error("Play error:",w),$t.error("Error generating audio"),i(null),r(null)}},[e,n,t]),l=m.useCallback(()=>{o.current&&(o.current.pause(),o.current=null),r(null),i(null)},[]),u=m.useCallback(f=>n===f,[n]),d=m.useCallback(f=>s===f,[s]);return{play:a,stop:l,playingId:n,isPlayingId:u,loadingId:s,isLoadingId:d}}function zP(){const{user:e}=Oe();return xn({queryKey:["favorite-phrases",e==null?void 0:e.id],queryFn:async()=>{const{data:t,error:n}=await ie.from("favorite_phrases").select("*").eq("user_id",e.id).order("created_at",{ascending:!1});if(n)throw n;return t??[]},enabled:!!e})}function Lv(){const{user:e}=Oe(),t=Nt();return ya({mutationFn:async n=>{if(!e)throw new Error("Not authenticated");const{data:r}=await ie.from("favorite_phrases").select("id").eq("user_id",e.id).eq("english",n.english).eq("spanish",n.spanish).limit(1);if((r==null?void 0:r.length)>0){const{error:s}=await ie.from("favorite_phrases").delete().eq("id",r[0].id);if(s)throw s;return{action:"removed"}}else{const{error:s}=await ie.from("favorite_phrases").insert({user_id:e.id,english:n.english,spanish:n.spanish,pronunciation:n.pronunciation??null,source_place:n.source_place??null});if(s)throw s;return{action:"added"}}},onSuccess:()=>{t.invalidateQueries({queryKey:["favorite-phrases"]})}})}function WP(e,t){const{data:n}=zP();return n?n.some(r=>r.english===e&&r.spanish===t):!1}function Mr({isPlaying:e,isLoading:t,onPlay:n}){return c.jsx("button",{type:"button",onClick:r=>{r.stopPropagation(),n()},disabled:t,className:"shrink-0 p-1.5 rounded-md hover:bg-muted transition-colors","aria-label":"Play audio",children:t?c.jsx(No,{className:"h-4 w-4 text-primary animate-spin"}):c.jsx(d_,{className:oe("h-4 w-4 transition-colors",e?"text-primary animate-pulse":"text-muted-foreground")})})}function $v(e,t,n,r){const i=u=>u*Math.PI/180,o=i(n-e),a=i(r-t),l=Math.sin(o/2)**2+Math.cos(i(e))*Math.cos(i(n))*Math.sin(a/2)**2;return 6371e3*2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function HP(e){return e<1e3?`${Math.round(e)}m`:`${(e/1e3).toFixed(1)}km`}var wc={};(function e(t,n,r,s){var i=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;try{var _=new OffscreenCanvas(1,1),C=_.getContext("2d");C.fillRect(0,0,1,1);var M=_.transferToImageBitmap();
vendor: 9,088 bytes, lines 452-453
452C.createPattern(M,"no-repeat")}catch{return!1}return!0}();function l(){}function u(_){var C=n.exports.Promise,M=C!==void 0?C:t.Promise;return typeof M=="function"?new M(_):(_(l,l),null)}var d=function(_,C){return{transform:function(M){if(_)return M;if(C.has(M))return C.get(M);var B=new OffscreenCanvas(M.width,M.height),z=B.getContext("2d");return z.drawImage(M,0,0),C.set(M,B),B},clear:function(){C.clear()}}}(a,new Map),f=function(){var _=Math.floor(16.666666666666668),C,M,B={},z=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(C=function(Q){var Z=Math.random();return B[Z]=requestAnimationFrame(function L(G){z===G||z+_-1<G?(z=G,delete B[Z],Q()):B[Z]=requestAnimationFrame(L)}),Z},M=function(Q){B[Q]&&cancelAnimationFrame(B[Q])}):(C=function(Q){return setTimeout(Q,_)},M=function(Q){return clearTimeout(Q)}),{frame:C,cancel:M}}(),h=function(){var _,C,M={};function B(z){function Q(Z,L){z.postMessage({options:Z||{},callback:L})}z.init=function(L){var G=L.transferControlToOffscreen();z.postMessage({canvas:G},[G])},z.fire=function(L,G,Y){if(C)return Q(L,null),C;var pe=Math.random().toString(36).slice(2);return C=u(function(ae){function ge(H){H.data.callback===pe&&(delete M[pe],z.removeEventListener("message",ge),C=null,d.clear(),Y(),ae())}z.addEventListener("message",ge),Q(L,pe),M[pe]=ge.bind(null,{data:{callback:pe}})}),C},z.reset=function(){z.postMessage({reset:!0});for(var L in M)M[L](),delete M[L]}}return function(){if(_)return _;if(!r&&i){var z=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(` 453`);try{_=new Worker(URL.createObjectURL(new Blob([z])))}catch(Q){return typeof console<"u"&&typeof console.warn=="function"&&console.warn("ð Could not load worker",Q),null}B(_)}return _}}(),p={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function w(_,C){return C?C(_):_}function g(_){return _!=null}function x(_,C,M){return w(_&&g(_[C])?_[C]:p[C],M)}function y(_){return _<0?0:Math.floor(_)}function v(_,C){return Math.floor(Math.random()*(C-_))+_}function b(_){return parseInt(_,16)}function S(_){return _.map(k)}function k(_){var C=String(_).replace(/[^0-9a-f]/gi,"");return C.length<6&&(C=C[0]+C[0]+C[1]+C[1]+C[2]+C[2]),{r:b(C.substring(0,2)),g:b(C.substring(2,4)),b:b(C.substring(4,6))}}function T(_){var C=x(_,"origin",Object);return C.x=x(C,"x",Number),C.y=x(C,"y",Number),C}function E(_){_.width=document.documentElement.clientWidth,_.height=document.documentElement.clientHeight}function j(_){var C=_.getBoundingClientRect();_.width=C.width,_.height=C.height}function R(_){var C=document.createElement("canvas");return C.style.position="fixed",C.style.top="0px",C.style.left="0px",C.style.pointerEvents="none",C.style.zIndex=_,C}function A(_,C,M,B,z,Q,Z,L,G){_.save(),_.translate(C,M),_.rotate(Q),_.scale(B,z),_.arc(0,0,1,Z,L,G),_.restore()}function D(_){var C=_.angle*(Math.PI/180),M=_.spread*(Math.PI/180);return{x:_.x,y:_.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:_.startVelocity*.5+Math.random()*_.startVelocity,angle2D:-C+(.5*M-Math.random()*M),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:_.color,shape:_.shape,tick:0,totalTicks:_.ticks,decay:_.decay,drift:_.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:_.gravity*3,ovalScalar:.6,scalar:_.scalar,flat:_.flat}}function $(_,C){C.x+=Math.cos(C.angle2D)*C.velocity+C.drift,C.y+=Math.sin(C.angle2D)*C.velocity+C.gravity,C.velocity*=C.decay,C.flat?(C.wobble=0,C.wobbleX=C.x+10*C.scalar,C.wobbleY=C.y+10*C.scalar,C.tiltSin=0,C.tiltCos=0,C.random=1):(C.wobble+=C.wobbleSpeed,C.wobbleX=C.x+10*C.scalar*Math.cos(C.wobble),C.wobbleY=C.y+10*C.scalar*Math.sin(C.wobble),C.tiltAngle+=.1,C.tiltSin=Math.sin(C.tiltAngle),C.tiltCos=Math.cos(C.tiltAngle),C.random=Math.random()+2);var M=C.tick++/C.totalTicks,B=C.x+C.random*C.tiltCos,z=C.y+C.random*C.tiltSin,Q=C.wobbleX+C.random*C.tiltCos,Z=C.wobbleY+C.random*C.tiltSin;if(_.fillStyle="rgba("+C.color.r+", "+C.color.g+", "+C.color.b+", "+(1-M)+")",_.beginPath(),o&&C.shape.type==="path"&&typeof C.shape.path=="string"&&Array.isArray(C.shape.matrix))_.fill(V(C.shape.path,C.shape.matrix,C.x,C.y,Math.abs(Q-B)*.1,Math.abs(Z-z)*.1,Math.PI/10*C.wobble));else if(C.shape.type==="bitmap"){var L=Math.PI/10*C.wobble,G=Math.abs(Q-B)*.1,Y=Math.abs(Z-z)*.1,pe=C.shape.bitmap.width*C.scalar,ae=C.shape.bitmap.height*C.scalar,ge=new DOMMatrix([Math.cos(L)*G,Math.sin(L)*G,-Math.sin(L)*Y,Math.cos(L)*Y,C.x,C.y]);ge.multiplySelf(new DOMMatrix(C.shape.matrix));var H=_.createPattern(d.transform(C.shape.bitmap),"no-repeat");H.setTransform(ge),_.globalAlpha=1-M,_.fillStyle=H,_.fillRect(C.x-pe/2,C.y-ae/2,pe,ae),_.globalAlpha=1}else if(C.shape==="circle")_.ellipse?_.ellipse(C.x,C.y,Math.abs(Q-B)*C.ovalScalar,Math.abs(Z-z)*C.ovalScalar,Math.PI/10*C.wobble,0,2*Math.PI):A(_,C.x,C.y,Math.abs(Q-B)*C.ovalScalar,Math.abs(Z-z)*C.ovalScalar,Math.PI/10*C.wobble,0,2*Math.PI);else if(C.shape==="star")for(var re=Math.PI/2*3,be=4*C.scalar,we=8*C.scalar,De=C.x,je=C.y,Ye=5,st=Math.PI/Ye;Ye--;)De=C.x+Math.cos(re)*we,je=C.y+Math.sin(re)*we,_.lineTo(De,je),re+=st,De=C.x+Math.cos(re)*be,je=C.y+Math.sin(re)*be,_.lineTo(De,je),re+=st;else _.moveTo(Math.floor(C.x),Math.floor(C.y)),_.lineTo(Math.floor(C.wobbleX),Math.floor(z)),_.lineTo(Math.floor(Q),Math.floor(Z)),_.lineTo(Math.floor(B),Math.floor(C.wobbleY));return _.closePath(),_.fill(),C.tick<C.totalTicks}function W(_,C,M,B,z){var Q=C.slice(),Z=_.getContext("2d"),L,G,Y=u(function(pe){function ae(){L=G=null,Z.clearRect(0,0,B.width,B.height),d.clear(),z(),pe()}function ge(){r&&!(B.width===s.width&&B.height===s.height)&&(B.width=_.width=s.width,B.height=_.height=s.height),!B.width&&!B.height&&(M(_),B.width=_.width,B.height=_.height),Z.clearRect(0,0,B.width,B.height),Q=Q.filter(function(H){return $(Z,H)}),Q.length?L=f.frame(ge):ae()}L=f.frame(ge),G=ae});return{addFettis:function(pe){return Q=Q.concat(pe),Y},canvas:_,promise:Y,reset:function(){L&&f.cancel(L),G&&G()}}}function F(_,C){var M=!_,B=!!x(C||{},"resize"),z=!1,Q=x(C,"disableForReducedMotion",Boolean),Z=i&&!!x(C||{},"useWorker"),L=Z?h():null,G=M?E:j,Y=_&&L?!!_.__confetti_initialized:!1,pe=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,ae;function ge(re,be,we){for(var De=x(re,"particleCount",y),je=x(re,"angle",Number),Ye=x(re,"spread",Number),st=x(re,"startVelocity",Number),wn=x(re,"decay",Number),Rt=x(re,"gravity",Number),In=x(re,"drift",Number),Xs=x(re,"colors",S),Ea=x(re,"ticks",Number),wt=x(re,"shapes"),sn=x(re,"scalar"),Ta=!!x(re,"flat"),Js=T(re),_r=De,Mn=[],Zs=_.width*Js.x,ei=_.height*Js.y;_r--;)Mn.push(D({x:Zs,y:ei,angle:je,spread:Ye,startVelocity:st,color:Xs[_r%Xs.length],shape:wt[v(0,wt.length)],ticks:Ea,decay:wn,gravity:Rt,drift:In,scalar:sn,flat:Ta}));return ae?ae.addFettis(Mn):(ae=W(_,Mn,G,be,we),ae.promise)}function H(re){var be=Q||x(re,"disableForReducedMotion",Boolean),we=x(re,"zIndex",Number);if(be&&pe)return u(function(st){st()});M&&ae?_=ae.canvas:M&&!_&&(_=R(we),document.body.appendChild(_)),B&&!Y&&G(_);var De={width:_.width,height:_.height};L&&!Y&&L.init(_),Y=!0,L&&(_.__confetti_initialized=!0);function je(){if(L){var st={getBoundingClientRect:function(){if(!M)return _.getBoundingClientRect()}};G(st),L.postMessage({resize:{width:st.width,height:st.height}});return}De.width=De.height=null}function Ye(){ae=null,B&&(z=!1,t.removeEventListener("resize",je)),M&&_&&(document.body.contains(_)&&document.body.removeChild(_),_=null,Y=!1)}return B&&!z&&(z=!0,t.addEventListener("resize",je,!1)),L?L.fire(re,De,Ye):ge(re,De,Ye)}return H.reset=function(){L&&L.reset(),ae&&ae.reset()},H}var K;function U(){return K||(K=F(null,{useWorker:!0,resize:!0})),K}function V(_,C,M,B,z,Q,Z){var L=new Path2D(_),G=new Path2D;G.addPath(L,new DOMMatrix(C));var Y=new Path2D;return Y.addPath(G,new DOMMatrix([Math.cos(Z)*z,Math.sin(Z)*z,-Math.sin(Z)*Q,Math.cos(Z)*Q,M,B])),Y}function N(_){if(!o)throw new Error("path confetti are not supported in this browser");var C,M;typeof _=="string"?C=_:(C=_.path,M=_.matrix);var B=new Path2D(C),z=document.createElement("canvas"),Q=z.getContext("2d");if(!M){for(var Z=1e3,L=Z,G=Z,Y=0,pe=0,ae,ge,H=0;H<Z;H+=2)for(var re=0;re<Z;re+=2)Q.isPointInPath(B,H,re,"nonzero")&&(L=Math.min(L,H),G=Math.min(G,re),Y=Math.max(Y,H),pe
453=Math.max(pe,re));ae=Y-L,ge=pe-G;var be=10,we=Math.min(be/ae,be/ge);M=[we,0,0,we,-Math.round(ae/2+L)*we,-Math.round(ge/2+G)*we]}return{type:"path",path:C,matrix:M}}function O(_){var C,M=1,B="#000000",z='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof _=="string"?C=_:(C=_.text,M="scalar"in _?_.scalar:M,z="fontFamily"in _?_.fontFamily:z,B="color"in _?_.color:B);var Q=10*M,Z=""+Q+"px "+z,L=new OffscreenCanvas(Q,Q),G=L.getContext("2d");G.font=Z;var Y=G.measureText(C),pe=Math.ceil(Y.actualBoundingBoxRight+Y.actualBoundingBoxLeft),ae=Math.ceil(Y.actualBoundingBoxAscent+Y.actualBoundingBoxDescent),ge=2,H=Y.actualBoundingBoxLeft+ge,re=Y.actualBoundingBoxAscent+ge;pe+=ge+ge,ae+=ge+ge,L=new OffscreenCanvas(pe,ae),G=L.getContext("2d"),G.font=Z,G.fillStyle=B,G.fillText(C,H,re);var be=1/M;return{type:"bitmap",bitmap:L.transferToImageBitmap(),matrix:[be,0,0,be,-pe*be/2,-ae*be/2]}}n.exports=function(){return U().apply(this,arguments)},n.exports.reset=function(){U().reset()},n.exports.create=F,n.exports.shapeFromPath=N,n.exports.shapeFromText=O})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),wc,!1);const b8=wc.exports;wc.exports.create;const qP=()=>{const t={origin:{y:.7},colors:["#1CB0F6","#58CC02","#FF9600","#FFC800"]};function n(r,s){b8({...t,...s,particleCount:Math.floor(200*r)})}n(.25,{spread:26,startVelocity:55}),n(.2,{spread:60}),n(.35,{spread:100,decay:.91,scalar:.8}),n(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),n(.1,{spread:120,startVelocity:45})};function S8({phrase:e,index:t,isPlaying:n,isLoading:r,onPlay:s,placeName:i}){const o=WP(e.english,e.spanish),a=Lv();return c.jsx("li",{className:"rounded-xl bg-muted/50 p-3",children:c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t+1,". ",e.english]}),c.jsxs("p",{className:"mt-0.5 text-xs italic text-muted-foreground",children:["(",e.pronunciation,")"]}),c.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.spanish})]}),c.jsxs("div",{className:"flex gap-1 shrink-0",children:[c.jsx(Mr,{isPlaying:n,isLoading:r,onPlay:s}),c.jsx("button",{onClick:()=>a.mutate({english:e.english,spanish:e.spanish,pronunciation:e.pronunciation,source_place:i}),className:"p-1.5",disabled:a.isPending,children:c.jsx(Fs,{className:`h-4 w-4 ${o?"fill-current text-destructive":"text-muted-foreground"}`})})]})]})})}function k8({phrase:e,index:t,orAlsoLabel:n,youCanReplyLabel:r,playingId:s,isLoadingId:i,onPlay:o}){const a=`today-response-${t}`;return c.jsxs("li",{className:"rounded-xl bg-muted/50 p-3 space-y-2",children:[c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t+1,". ",e.english]}),c.jsxs("p",{className:"mt-0.5 text-xs italic text-muted-foreground",children:["(",e.pronunciation,")"]}),c.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.spanish})]}),c.jsx(Mr,{isPlaying:s===a,isLoading:i(a),onPlay:()=>o(a,e.english)})]}),e.variant&&c.jsxs("div",{className:"border-t border-border pt-2",children:[c.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground mb-1",children:n}),c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-sm font-semibold text-foreground",children:e.variant.english}),c.jsxs("p",{className:"mt-0.5 text-xs italic text-muted-foreground",children:["(",e.variant.pronunciation,")"]}),c.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.variant.spanish})]}),c.jsx(Mr,{isPlaying:s===`${a}-variant`,isLoading:i(`${a}-variant`),onPlay:()=>o(`${a}-variant`,e.variant.english)})]})]}),e.replies&&e.replies.length>0&&c.jsxs("div",{className:"border-t border-border pt-2",children:[c.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-primary mb-1",children:r}),e.replies.map((l,u)=>c.jsxs("div",{className:oe("flex items-start justify-between gap-2",u>0&&"mt-2"),children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("p",{className:"text-sm font-semibold text-foreground",children:['"',l.english,'"']}),c.jsxs("p",{className:"mt-0.5 text-xs italic text-muted-foreground",children:["(",l.pronunciation,")"]}),c.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:l.spanish})]}),c.jsx(Mr,{isPlaying:s===`${a}-reply-${u}`,isLoading:i(`${a}-reply-${u}`),onPlay:()=>o(`${a}-reply-${u}`,l.english)})]},u))]})]})}function _8(){var V,N;const{t:e}=rt(),{data:t}=Gr(),{challenge:n,isLoading:r,isGenerating:s,error:i,completeChallenge:o,isCompleting:a}=x8(),{userLat:l,userLng:u,error:d,isTracking:f,requestPermission:h}
453=VP(),p=Nt(),[w,g]=m.useState(!1),[x,y]=m.useState(!1),v=()=>{p.invalidateQueries({queryKey:["can-generate","tts"]}),g(!0)},b=(t==null?void 0:t.current_streak)??0,S=(n==null?void 0:n.status)==="completed",{play:k,playingId:T,isLoadingId:E}=Mv(t==null?void 0:t.preferred_voice_id,v),[j,R]=m.useState(!1),[A,D]=m.useState(null),$=l!=null&&u!=null&&(n!=null&&n.place_lat)&&(n!=null&&n.place_lng)?$v(l,u,n.place_lat,n.place_lng):null,F=$!==null&&$<=1e3,K=F?(n==null?void 0:n.cp_reward)??10:1,U=async()=>{if(A)try{await o({confidence:A,cpOverride:K}),R(!1),D(null),$t.success(e.today.completed),qP()}catch{$t.error(e.today.errorGenerating)}};return t&&!t.base_camp_lat?c.jsx("div",{className:"mx-auto max-w-lg px-4 pt-6",children:c.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20 text-center",children:[c.jsx(gr,{className:"h-12 w-12 text-muted-foreground"}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:e.today.noBaseCamp}),c.jsx(ne,{onClick:()=>y(!0),children:e.explore.configure}),c.jsx(fc,{open:x,onClose:()=>y(!1),mode:"onboarding"})]})}):c.jsxs("div",{className:"mx-auto max-w-lg px-4 pt-6 pb-24",children:[c.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsxs("h1",{className:"text-2xl font-black text-foreground",children:[e.today.greeting,t!=null&&t.display_name?` ${t.display_name.split(" ")[0]}`:""]}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:e.today.challengeOf})]}),c.jsxs("div",{className:"flex items-center gap-1.5 rounded-xl bg-yaku-bee/15 px-3 py-1.5",children:[c.jsx(s_,{className:"h-5 w-5 text-yaku-fox"}),c.jsx("span",{className:"text-sm font-extrabold text-yaku-fox",children:b})]})]}),r&&c.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-4",children:[c.jsx("img",{src:"/images/waiting.svg",alt:"Loading",className:"w-72 h-72 sm:w-80 sm:h-80"}),c.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-xs px-4",children:s?e.today.generating:e.today.loadingChallenge}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-[#1CB0F6] animate-bounce [animation-delay:0ms]"}),c.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-[#1CB0F6] animate-bounce [animation-delay:150ms]"}),c.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-[#1CB0F6] animate-bounce [animation-delay:300ms]"})]})]}),i&&!r&&c.jsxs("div",{className:"flex flex-col items-center gap-4 py-20 text-center",children:[c.jsx(JA,{className:"h-12 w-12 text-destructive"}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:e.today.errorGenerating}),c.jsx(ne,{variant:"outline",onClick:()=>window.location.reload(),children:e.today.retry})]}),n&&!r&&S&&c.jsxs("div",{className:"flex flex-col items-center gap-2 mb-6",children:[c.jsx("img",{src:Pf,alt:"Yaku celebrating",className:"h-48 w-48 rounded-full object-cover shadow-lg"}),c.jsx("p",{className:"text-sm font-bold text-primary text-center",children:e.today.yakuProud})]}),n&&!r&&c.jsxs(c.Fragment,{children:[c.jsx(Ft,{className:oe("border-2 transition-all",S?"border-primary bg-background":"border-border"),children:c.jsxs(OT,{className:"p-5",children:[c.jsxs("div",{className:"flex items-start justify-between mb-2",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:e.today.mission}),c.jsx("h2",{className:"text-base font-extrabold text-foreground leading-snug mt-0.5",children:n.title}),n.mission_instruction&&n.mission_instruction!==n.description&&c.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n.mission_instruction}),n.place_name&&c.jsxs("a",{href:n.place_lat&&n.place_lng?l!=null&&u!=null?`https://www.google.com/maps/dir/?api=1&origin=${l},${u}&destination=${n.place_lat},${n.place_lng}&travelmode=walking`:`https://www.google.com/maps/search/?api=1&query=${n.place_lat},${n.place_lng}`:void 0,target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-flex items-center gap-1.5 text-xs font-semibold text-primary hover:underline",children:[c.jsx(Ii,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:n.place_name}),$!==null&&c.jsxs("span",{className:"font-extrabold",children:["- ",HP($)]})]})]}),c.jsxs("div",{className:"shrink-0 rounded-lg bg-yaku-bee/15 px-2.5 py-1 text-xs font-black text-yaku-fox",children:["+",n.cp_reward," CP"]})]}),S&&c.jsxs("div",{className:"mt-4 flex items-center gap-2 rounded-xl bg-primary/10 p-3",children:[c.jsx(il,{className:"h-5 w-5 text-primary"}),c.jsx("span",{className:"text-sm font-bold text-primary",children:e.today.completed})]})]})}),!S&&c.jsxs("div",{className:"mt-4",children:[c.jsx(ne,{size:"lg",className:"w-full rounded-2xl text-base font-black h-14",disabled:a,onClick:()=>R(!0),children:a?"...":`${e.today.completeChallenge} (+${K} CP)`}),!F&&c.jsxs("div",{className:"mt-3 flex items-center justify-center gap-1.5 text-center",children:[c.jsx(Ii,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("p",{className:"text-xs font-semibold text-muted-foreground",children:e.today.reducedReward})]})]}),(((V=n.phrases)==null?void 0:V.length)||((N=n.responses)==null?void 0:N.length))&&c.jsxs(Rf,{defaultValue:"toSay",className:"mt-4",children:[c.jsxs(xc,{className:"w-full",children:[c.jsx(vr,{value:"toSay",className:"flex-1 text-xs font-bold",children:e.today.toSay}),c.jsx(vr,{value:"responses",className:"flex-1 text-xs font-bold",children:e.today.responses})]}),c.jsx(xr,{value:"toSay",children:n.phrases&&n.phrases.length>0&&c.jsx("ol",{className:"space-y-3 mt-2",children:n.phrases.map((O,_)=>c.jsx(S8,{phrase:O,index:_,isPlaying:T===`today-phrase-${_}`,isLoading:E(`today-phrase-${_}`),onPlay:()=>k(`today-phrase-${_}`,O.english),placeName:n.place_name??void 0},_))})}),c.jsx(xr,{value:"responses",children:n.responses&&n.responses.length>0&&c.jsx("ol",{className:"space-y-3 mt-2",children:n.responses.map((O,_)=>c.jsx(k8,{phrase:O,index:_,orAlsoLabel:e.today.orAlso,youCanReplyLabel:e.today.youCanReply,playingId:T,isLoadingId:E,onPlay:k},_))})})]})]}),c.jsx(Mt,{open:j,onOpenChange:R,children:c.jsxs(Et,{className:"max-w-sm rounded-2xl pt-14 overflow-visible",children:[c.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2",children:c.jsx("img",{src:Hl,alt:"Yaku",className:"h-20 w-20 rounded-full border-4 border-background object-cover shadow-yaku-lg"})}),c.jsx(zy,{children:c.jsx(Tt,{className:"text-center text-lg font-black",children:e.today.howDidItGo})}),c.jsx("div",{className:"grid grid-cols-3 gap-3 py-2",children:[{key:"frozen",img:SP,label:e.today.froze},{key:"survived",img:Ov,label:e.today.survived},{key:"easy",img:Dv,label:e.today.pieceOfCake}].map(({key:O,img:_,label:C})=>c.jsxs("button",{onClick:()=>D(O),className:oe("flex flex-col items-center gap-2 rounded-xl border-2 p-3 text-xs font-bold transition-all active:scale-[0.98]",A===O?"border-primary bg-accent text-foreground":"border-border bg-background text-foreground hover:border-muted-foreground
453/30"),children:[c.jsx("img",{src:_,alt:C,className:"h-16 w-16 rounded-full object-cover"}),C]},O))}),c.jsx(ne,{size:"lg",className:"w-full rounded-2xl font-black h-12",disabled:!A||a,onClick:U,children:a?"...":e.today.save})]})}),c.jsx(Wl,{open:w,onOpenChange:g}),c.jsx(Wl,{open:w,onOpenChange:g})]})}function yi({className:e,...t}){return c.jsx("div",{className:oe("animate-pulse rounded-md bg-muted",e),...t})}function C8(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var KP=["PageUp","PageDown"],GP=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],YP={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ca="Slider",[cg,E8,T8]=ly(Ca),[QP,XW]=On(Ca,[T8]),[j8,Af]=QP(Ca),XP=m.forwardRef((e,t)=>{const{name:n,min:r=0,max:s=100,step:i=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:w,...g}=e,x=m.useRef(new Set),y=m.useRef(0),b=o==="horizontal"?P8:N8,[S=[],k]=lc({prop:d,defaultProp:u,onChange:D=>{var W;(W=[...x.current][y.current])==null||W.focus(),f(D)}}),T=m.useRef(S);function E(D){const $=I8(S,D);A(D,$)}function j(D){A(D,y.current)}function R(){const D=T.current[y.current];S[y.current]!==D&&h(S)}function A(D,$,{commit:W}={commit:!1}){const F=F8(i),K=B8(Math.round((D-r)/i)*i+r,F),U=Jy(K,[r,s]);k((V=[])=>{const N=O8(V,U,$);if($8(N,l*i)){y.current=N.indexOf(U);const O=String(N)!==String(V);return O&&W&&h(N),O?N:V}else return V})}return c.jsx(j8,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:s,valueIndexToChangeRef:y,thumbs:x.current,values:S,orientation:o,form:w,children:c.jsx(cg.Provider,{scope:e.__scopeSlider,children:c.jsx(cg.Slot,{scope:e.__scopeSlider,children:c.jsx(b,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:he(g.onPointerDown,()=>{a||(T.current=S)}),min:r,max:s,inverted:p,onSlideStart:a?void 0:E,onSlideMove:a?void 0:j,onSlideEnd:a?void 0:R,onHomeKeyDown:()=>!a&&A(r,0,{commit:!0}),onEndKeyDown:()=>!a&&A(s,S.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:$})=>{if(!a){const K=KP.includes(D.key)||D.shiftKey&&GP.includes(D.key)?10:1,U=y.current,V=S[U],N=i*K*$;A(V+N,U,{commit:!0})}}})})})})});XP.displayName=Ca;var[JP,ZP]=QP(Ca,{startEdge:"left",endEdge:"right",size:"width",direction:1}),P8=m.forwardRef((e,t)=>{const{min:n,max:r,dir:s,inverted:i,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onStepKeyDown:u,...d}=e,[f,h]=m.useState(null),p=Ne(t,b=>h(b)),w=m.useRef(void 0),g=Sf(s),x=g==="ltr",y=x&&!i||!x&&i;function v(b){const S=w.current||f.getBoundingClientRect(),k=[0,S.width],E=Fv(k,y?[n,r]:[r,n]);return w.current=S,E(b-S.left)}return c.jsx(JP,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:c.jsx(eN,{dir:g,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const S=v(b.clientX);o==null||o(S)},onSlideMove:b=>{const S=v(b.clientX);a==null||a(S)},onSlideEnd:()=>{w.current=void 0,l==null||l()},onStepKeyDown:b=>{const k=YP[y?"from-left":"from-right"].includes(b.key);u==null||u({event:b,direction:k?-1:1})}})})}),N8=m.forwardRef((e,t)=>{const{min:n,max:r,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:a,onStepKeyDown:l,...u}=e,d=m.useRef(null),f=Ne(t,d),h=m.useRef(void 0),p=!s;function w(g){const x=h.current||d.current.getBoundingClientRect(),y=[0,x.height],b=Fv(y,p?[r,n]:[n,r]);return h.current=x,b(g-x.top)}return c.jsx(JP,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:c.jsx(eN,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const x=w(g.clientY);i==null||i(x)},onSlideMove:g=>{const x=w(g.clientY);o==null||o(x)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:g=>{const y=YP[p?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:y?-1:1})}})})}),eN=m.forwardRef((e,t)=>
453{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:l,...u}=e,d=Af(Ca,n);return c.jsx(me.span,{...u,ref:t,onKeyDown:he(e.onKeyDown,f=>{f.key==="Home"?(o(f),f.preventDefault()):f.key==="End"?(a(f),f.preventDefault()):KP.concat(GP).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:he(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():r(f)}),onPointerMove:he(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&s(f)}),onPointerUp:he(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),i(f))})})}),tN="SliderTrack",nN=m.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,s=Af(tN,n);return c.jsx(me.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:t})});nN.displayName=tN;var ug="SliderRange",rN=m.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,s=Af(ug,n),i=ZP(ug,n),o=m.useRef(null),a=Ne(t,o),l=s.values.length,u=s.values.map(h=>oN(h,s.min,s.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return c.jsx(me.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:a,style:{...e.style,[i.startEdge]:d+"%",[i.endEdge]:f+"%"}})});rN.displayName=ug;var dg="SliderThumb",sN=m.forwardRef((e,t)=>{const n=E8(e.__scopeSlider),[r,s]=m.useState(null),i=Ne(t,a=>s(a)),o=m.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return c.jsx(R8,{...e,ref:i,index:o})}),R8=m.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:s,...i}=e,o=Af(dg,n),a=ZP(dg,n),[l,u]=m.useState(null),d=Ne(t,v=>u(v)),f=l?o.form||!!l.closest("form"):!0,h=R_(l),p=o.values[r],w=p===void 0?0:oN(p,o.min,o.max),g=D8(r,o.values.length),x=h==null?void 0:h[a.size],y=x?M8(x,w,a.direction):0;return m.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),c.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${w}% + ${y}px)`},children:[c.jsx(cg.ItemSlot,{scope:e.__scopeSlider,children:c.jsx(me.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:d,style:p===void 0?{display:"none"}:e.style,onFocus:he(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),f&&c.jsx(iN,{name:s??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:p},r)]})});sN.displayName=dg;var A8="RadioBubbleInput",iN=m.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const s=m.useRef(null),i=Ne(s,r),o=C8(t);return m.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&d){const f=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[o,t]),c.jsx(me.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});iN.displayName=A8;function O8(e=[],t,n){const r=[...e];return r[n]=t,r.sort((s,i)=>s-i)}function oN(e,t,n){const i=100/(n-t)*(e-t);return Jy(i,[0,100])}function D8(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function I8(e,t){if(e.length===1)return 0;const n=e.map(s=>Math.abs(s-t)),r=Math.min(...n);return n.indexOf(r)}function M8(e,t,n){const r=e/2,i=Fv([0,50],[0,r]);return(r-i(t)*n)*n}function L8(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function $8(e,t){if(t>0){const n=L8(e);return Math.min(...n)>=t}return!0}function Fv(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function F8(e){return(String(e).split(".")[1]||"").length}function B8(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var aN=XP,U8=nN,V8=rN,z8=sN;const Xl=m.forwardRef(({className:e,...t},n)=>c.jsxs(aN,{ref:n,className:oe("relative flex w-full touch-none select-none items-center",e),...t,children:[c.jsx(U8,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:c.jsx(V8,{className:"absolute h-full bg-primary"})}),c.jsx(z8,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background 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"})]}));Xl.displayName=aN.displayName;let Fu=!1,cu=!1;function W8(e){return Fu?Promise.resolve():cu?new Promise(t=>{const n=setInterval(()=>{Fu&&(clearInterval(n),t())},100)}):(cu=!0,new Promise((t,n)=>{const r=document.createElement("script");
453r.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=geometry,places`,r.async=!0,r.defer=!0,r.onload=()=>{Fu=!0,cu=!1,t()},r.onerror=()=>{cu=!1,n(new Error("Failed to load Google Maps"))},document.head.appendChild(r)}))}function lN(){const[e,t]=m.useState(Fu),{data:n,error:r}=xn({queryKey:["maps-key"],queryFn:async()=>{const{data:s,error:i}=await ie.functions.invoke("maps-key");if(i)throw i;return s.key},staleTime:1/0,retry:2});return m.useEffect(()=>{n&&W8(n).then(()=>t(!0))},[n]),{isLoaded:e,error:r}}async function cN(e,t,n,r,s){const i={mode:e,lat:t,lng:n};r&&(i.query=r),s&&(i.radius=s);const{data:o,error:a}=await ie.functions.invoke("places",{body:i});if(a)throw a;const l=(o.places||[]).map(u=>({...u,distance:$v(t,n,u.lat,u.lng)}));return s?l.filter(u=>u.distance<=s):l}function H8(e,t,n){const r=n?n*1e3:void 0;return xn({queryKey:["nearby-places",e,t,r],queryFn:()=>cN("nearby",e,t,void 0,r),enabled:e!==null&&t!==null,staleTime:5*60*1e3})}function q8(e,t,n,r){const s=r?r*1e3:void 0;return xn({queryKey:["search-places",e,t,n,s],queryFn:()=>cN("search",t,n,e,s),enabled:e.length>=2&&t!==null&&n!==null,staleTime:2*60*1e3})}function uN(){const{user:e}=Oe();return xn({queryKey:["favorites",e==null?void 0:e.id],enabled:!!e,queryFn:async()=>{const{data:t,error:n}=await ie.from("favorite_places").select("*").order("created_at",{ascending:!1});if(n)throw n;return t??[]}})}function Of(){const{user:e}=Oe(),t=Nt();return ya({mutationFn:async n=>{if(!e)throw new Error("Not authenticated");const{data:r}=await ie.from("favorite_places").select("id").eq("place_id",n.place_id).maybeSingle();if(r){const{error:s}=await ie.from("favorite_places").delete().eq("id",r.id);if(s)throw s;return{action:"removed"}}else{const{error:s}=await ie.from("favorite_places").insert({user_id:e.id,place_id:n.place_id,name:n.name,vicinity:n.vicinity??null,types:n.types,lat:n.lat,lng:n.lng});if(s)throw s;return{action:"added"}}},onSuccess:()=>{t.invalidateQueries({queryKey:["favorites"]})}})}function Bv(e){const{data:t}=uN();return!e||!t?!1:t.some(n=>n.place_id===e)}const fg={restaurant:{es:"Restaurante",en:"Restaurant"},cafe:{es:"Cafe",en:"Cafe"},bar:{es:"Bar",en:"Bar"},grocery_or_supermarket:{es:"Supermercado",en:"Supermarket"},supermarket:{es:"Supermercado",en:"Supermarket"},store:{es:"Tienda",en:"Store"},shopping_mall:{es:"Centro comercial",en:"Shopping Mall"},pharmacy:{es:"Farmacia",en:"Pharmacy"},hospital:{es:"Hospital",en:"Hospital"},doctor:{es:"Consultorio",en:"Doctor"},bank:{es:"Banco",en:"Bank"},atm:{es:"Cajero",en:"ATM"},gas_station:{es:"Gasolinera",en:"Gas Station"},parking:{es:"Estacionamiento",en:"Parking"},school:{es:"Escuela",en:"School"},university:{es:"Universidad",en:"University"},library:{es:"Biblioteca",en:"Library"},park:{es:"Parque",en:"Park"},gym:{es:"Gimnasio",en:"Gym"},church:{es:"Iglesia",en:"Church"},movie_theater:{es:"Cine",en:"Movie Theater"},laundry:{es:"Lavanderia",en:"Laundry"},post_office:{es:"Correo",en:"Post Office"},police:{es:"Policia",en:"Police"},bus_station:{es:"Estacion de bus",en:"Bus Station"},subway_station:{es:"Metro",en:"Subway"},train_station:{es:"Estacion de tren",en:"Train Station"},bakery:{es:"Panaderia",en:"Bakery"},beauty_salon:{es:"Salon de belleza",en:"Beauty Salon"},hair_care:{es:"Peluqueria",en:"Hair Salon"},convenience_store:{es:"Tienda de conveniencia",en:"Convenience Store"}
453,clothing_store:{es:"Tienda de ropa",en:"Clothing Store"},lodging:{es:"Alojamiento",en:"Lodging"},dentist:{es:"Dentista",en:"Dentist"}};function Qb(e){const t=new Set(["point_of_interest","establishment","food","health","finance","place_of_worship"]);for(const r of e)if(fg[r])return r;return e.find(r=>!t.has(r))??"store"}function bc(e,t){for(const s of e)if(fg[s])return fg[s][t];const n=new Set(["point_of_interest","establishment","food","health","finance","place_of_worship"]),r=e.find(s=>!n.has(s));return r?r.replace(/_/g," ").replace(/\b\w/g,s=>s.toUpperCase()):t==="es"?"Lugar":"Place"}function K8(){const{t:e,locale:t}=rt(),n=rr(),[r,s]=xC(),i=sv(),a=pf()||i,{data:l,isLoading:u}=Gr(),{isLoaded:d}=lN(),f=(l==null?void 0:l.base_camp_lat)??null,h=(l==null?void 0:l.base_camp_lng)??null,p=(l==null?void 0:l.quest_radius_km)??5,[w,g]=m.useState(null),x=w??p,{data:y,isLoading:v}=H8(f,h,x),{data:b}=uN(),[S,k]=m.useState(()=>r.get("q")??""),[T,E]=m.useState(S),{data:j}=q8(T,f,h,x),[R,A]=m.useState(!1),[D,$]=m.useState(()=>r.get("tab")??"nearby"),[W,F]=m.useState(null),K=m.useRef(null),U=m.useRef(null),V=m.useRef([]),N=m.useRef(null),O=m.useRef(null),_=w!==null||S.length>0,C=()=>{g(null),k(""),E("")};m.useEffect(()=>{const L=setTimeout(()=>{E(S);const G=new URLSearchParams(r);S?G.set("q",S):G.delete("q"),D!=="nearby"?G.set("tab",D):G.delete("tab"),s(G,{replace:!0})},400);return()=>clearTimeout(L)},[S,D,r,s]);const M=u?"loading":f===null?"no-camp":"list",B=T.length>=2?j:y,z=B&&[...B].sort((L,G)=>L.distance-G.distance),Q=T.length>=2;m.useEffect(()=>{!d||!K.current||f===null||h===null||U.current||(U.current=new google.maps.Map(K.current,{center:{lat:f,lng:h},zoom:14,disableDefaultUI:!0,zoomControl:!0,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1,clickableIcons:!0}),N.current=new google.maps.Marker({position:{lat:f,lng:h},map:U.current,title:"Base Camp",icon:{url:`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(` 454 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 455 <circle cx="12" cy="12" r="8" fill="#58CC02" stroke="white" stroke-width="2.5"/> 456 </svg> 457 `)}`,anchor:new google.maps.Point(12,12)},zIndex:999}),O.current=new google.maps.Circle({map:U.current,center:{lat:f,lng:h},radius:x*1e3,fillColor:"#1CB0F6",fillOpacity:.1,strokeColor:"#1CB0F6",strokeOpacity:.4,strokeWeight:2,clickable:!1}),U.current.addListener("click",L=>{L.placeId?(L.stop(),new google.maps.places.PlacesService(U.current).getDetails({placeId:L.placeId,fields:["name","geometry","vicinity","types","opening_hours","place_id"]},(Y,pe)=>{var ae,ge,H;if(pe==="OK"&&Y){const re={place_id:Y.place_id,name:Y.name,vicinity:Y.vicinity||Y.formatted_address||"",types:Y.types||[],open_now:((ge=(ae=Y.opening_hours)==null?void 0:ae.isOpen)==null?void 0:ge.call(ae))??null,lat:Y.geometry.location.lat(),lng:Y.geometry.location.lng(),rating:null,distance:0};F(re),(H=U.current)==null||H.panTo({lat:re.lat,lng:re.lng})}})):F(null)}))},[d,f,h]),m.useEffect(()=>{if(O.current&&U.current){O.current.setRadius(x*1e3);const L=O.current.getBounds();L&&(U.current.fitBounds(L),l!=null&&l.base_camp_lat&&(l!=null&&l.base_camp_lng)&&U.current.setCenter({lat:l.base_camp_lat,lng:l.base_camp_lng}))}},[x,l==null?void 0:l.base_camp_lat,l==null?void 0:l.base_camp_lng]),m.useEffect(()=>{if(!U.current||(V.current.forEach(G=>G.setMap(null)),V.current=[],!(z!=null&&z.length)))return;const L=new google.maps.LatLngBounds;f!==null&&h!==null&&L.extend({lat:f,lng:h}),z.forEach(G=>{const Y=new google.maps.Marker({position:{lat:G.lat,lng:G.lng},map:U.current,title:G.name,icon:{url:`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(` 458 <svg width="32" height="32" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 459 <path d="M12 21C16 17 20 13.5 20 9.5C20 5.35786 16.4183 2 12 2C7.58172 2 4 5.35786 4 9.5C4 13.5 8 17 12 21Z" fill="#1CB0F6" stroke="white" stroke-width="1.5"/> 460 <circle cx="12" cy="9.5" r="3" fill="white"/> 461 </svg> 462 `)}`,anchor:new google.maps.Point(16,28),scaledSize:new google.maps.Size(32,32)}});Y.addListener("click",()=>{var pe;F(G),(pe=U.current)==null||pe.panTo({lat:G.lat,lng:G.lng})}),V.current.push(Y),L.extend({lat:G.lat,lng:G.lng})}),U.current.fitBounds(L,60)},[z,f,h]);const Z=L=>
462{n("/place",{state:{place_id:("place_id"in L,L.place_id),name:L.name,vicinity:L.vicinity,types:L.types,lat:L.lat,lng:L.lng,open_now:"open_now"in L?L.open_now:null}})};return M==="no-camp"?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[80vh] px-4 text-center",children:[c.jsx("div",{className:"flex h-20 w-20 items-center justify-center rounded-3xl bg-primary/10 mb-4",children:c.jsx(gr,{className:"h-10 w-10 text-primary"})}),c.jsx("h1",{className:"text-2xl font-black text-foreground mb-2",children:t==="es"?"Explorar":"Explore"}),c.jsx("p",{className:"text-muted-foreground font-semibold max-w-xs mb-6",children:e.explore.noBaseCamp}),c.jsx(ne,{onClick:()=>A(!0),children:e.explore.configure})]}),c.jsx(fc,{open:R,onClose:()=>A(!1),mode:"edit"})]}):M==="loading"||!d?c.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[c.jsx(yi,{className:"h-10 w-full rounded-lg"}),c.jsx(yi,{className:"h-[50vh] w-full rounded-xl"}),c.jsx(yi,{className:"h-24 w-full rounded-xl"}),c.jsx(yi,{className:"h-24 w-full rounded-xl"})]}):c.jsxs("div",{className:a?"flex flex-col w-full max-w-full h-[calc(100dvh-4rem)] overflow-hidden":"flex flex-row h-[calc(100vh-5rem)] px-[10%] py-4 gap-4 overflow-hidden",children:[a&&c.jsxs("div",{className:"px-3 pt-2 pb-1 space-y-2 shrink-0",children:[c.jsxs("div",{className:"relative flex gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(em,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(Fi,{value:S,onChange:L=>k(L.target.value),placeholder:e.explore.searchPlaceholder,className:"pl-9"})]}),_&&c.jsx(ne,{variant:"ghost",size:"icon",className:"shrink-0",onClick:C,children:c.jsx(Ro,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Zp,{className:"h-4 w-4 text-muted-foreground shrink-0"}),c.jsx(Xl,{value:[x],onValueChange:L=>g(L[0]),min:1,max:100,step:1,className:"flex-1"}),c.jsxs("span",{className:"text-sm font-black text-primary w-14 text-right shrink-0",children:[x," km"]})]})]}),c.jsxs("div",{className:`relative ${a?"shrink-0 h-[30vh] w-full":"w-[60%] shrink-0 h-full rounded-2xl overflow-hidden border border-border shadow-sm"}`,children:[c.jsx("div",{ref:K,"data-explore-map":!0,className:"h-full w-full"}),!a&&c.jsx("div",{className:"absolute top-4 left-4 right-4 z-10",children:c.jsxs("div",{className:"bg-background/95 backdrop-blur-sm rounded-xl shadow-lg p-3 space-y-2 border border-border",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(em,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),c.jsx(Fi,{value:S,onChange:L=>k(L.target.value),placeholder:e.explore.searchPlaceholder,className:"pl-9"})]}),_&&c.jsx(ne,{variant:"ghost",size:"icon",className:"shrink-0",onClick:C,children:c.jsx(Ro,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Zp,{className:"h-4 w-4 text-muted-foreground shrink-0"}),c.jsx(Xl,{value:[x],onValueChange:L=>g(L[0]),min:1,max:100,step:1,className:"flex-1"}),c.jsxs("span",{className:"text-sm font-black text-primary w-14 text-right shrink-0",children:[x," km"]})]})]})}),W&&c.jsx("div",{className:"absolute bottom-6 left-6 right-6 z-10 animate-scale-in",children:c.jsxs(Ft,{className:"p-4 relative shadow-lg border-2 border-primary/20",children:[c.jsx("button",{onClick:()=>F(null),className:"absolute top-2 right-2 p-1 rounded-full bg-muted hover:bg-muted-foreground/20 transition-colors",children:c.jsx(Ro,{className:"h-4 w-4 text-muted-foreground"})}),c.jsx("p",{className:"font-black text-foreground text-sm pr-6 truncate",children:W.name}),W.vicinity&&c.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:W.vicinity}),c.jsxs("div",{className:"flex items-center gap-2 mt-1.5 flex-wrap",children:[c.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:bc(W.types,t)}),W.open_now!==null&&c.jsx(hc,{variant:W.open_now?"default":"destructive",className:"text-[10px] px-1.5 py-0",children:W.open_now?e.explore.open:e.explore.closed})]}),c.jsxs("div",{className:"flex gap-2 mt-3",children:[c.jsx(G8,{place:W}),c.jsxs(ne,{size:"sm",variant:"outline",className:"flex-1 gap-1 text-xs",onClick:()=>Z(W),children:[c.jsx(hy,{className:"h-3.5 w-3.5"})," ",e.explore.vocabulary]}),c.jsx(ne,{size:"sm",className:"flex-1 gap-1 text-xs",asChild:!0,children:c.jsxs("a",{href:`https://www.google.com/maps/dir/?api=1&origin=${f},${h}&destination=${W.lat},${W.lng}&travelmode=driving`,target:"_blank",rel:"noopener noreferrer",children:[c.jsx(Ii,{className:"h-3.5 w-3.5"})," ",e.explore.go]})})]})]})})]}),c.jsx("div",{className:`flex-1 min-w-0 flex flex-col min-h-0 overflow-hidden ${a?"w-full":"h-full rounded-2xl border border-border shadow-sm bg-background"}`,children:c.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:c.jsx("div",{className:"px-3 pb-3 pt-2 space-y-2",children:c.jsxs(Rf,{value:D,onValueChange:$,className:"w-full",children:[c.jsxs(xc,{className:"w-full",children:[c.jsx(vr,{value:"nearby",className:"flex-1",children:e.explore.nearby}),c.jsx(vr,{value:"favorites",className:"flex-1",children:e.explore.favorites})]}),c.jsxs(xr,{value:"nearby",className:"space-y-2 mt-2",children:[Q&&c.jsx("h2",{className:"text-sm font-bold text-muted-foreground uppercase tracking-wider px-1",children:e.explore.searchPlaceholder.replace("...","")}),v&&!(z!=null&&z.length)?c.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm px-1",children:[c.jsx(No,{className:"h-4 w-4 animate-spin"})," ",e.explore.loading]}):z!=null&&z.length?z.map(L=>c.jsx(Y8,{place:L,baseLat:f,baseLng:h,locale:t,t:e,onVocabulary:()=>Z(L)},L.place_id)):c.jsx("p",{className:"text-muted-foreground text-sm px-1",children:e.explore.noResults})]}),c.jsx(xr,{value:"favorites",className:"space-y-2 mt-2",children:b!=null&&b.length?b.map(L=>c.jsx(Q8,{fav:L,baseLat:f,baseLng:h,locale:t,t:e,onVocabulary:()=>Z(L)},L.id)):c.jsx("p",{className:"text-muted-foreground text-sm px-1",children:e.explore.noFavorites})})]})})})})]})}function G8({place:e}){const t=Bv(e.place_id),n=Of();return c.jsx(ne,{size:"sm",variant:"ghost",className:"px-2",onClick:()=>n.mutate({place_id:e.place_id,name:e.name,vicinity:e.vicinity,types:e.types,lat:e.lat,lng:e.lng}),disabled:n.isPending,children:c.jsx(Fs,{className:`h-4 w-4 ${t?"fill-current text-destructive":""}`})})}function Y8({place:e,baseLat:t,baseLng:n,locale:r,t:s,onVocabulary:i}){const o=Bv(e.place_id),a=Of(),l=`https://www.google.com/maps/dir/?api=1&origin=${t},${n}&destination=${e.lat},${e.lng}&travelmode=driving`;return c.jsxs(Ft,{className:"p-3 flex items-start gap-2 overflow-hidden",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"font-bold text-foreground truncate",children:e.name}),c.jsxs("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[c.jsx("span",{className:"text-xs text-muted-foreground",children:bc(e.types,r)}),e.open_now!==null&&c.jsx(hc,{variant:e.open_now?"default":"destructive",className:"text-[10px] px-1.5 py-0",children:e.open_now?s.explore.open:s.explore.closed})]}),c.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:HP(e.distance)})]}),c.jsxs("div",{className:"flex gap-1 shrink-0",children:[c.jsx(ne,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>a.mutate({place_id:e.place_id,name:e.name,vicinity:e.vicinity,types:e.types,lat:e.lat,lng:e.lng}),disabled:a.isPending,children:c.jsx(Fs,{className:`h-4 w-4 ${o?"fill-current text-destructive":""}`})}),c.jsx(ne,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:i,children:c.jsx(hy,{className:"h-4 w-4"})}),c.jsx(ne,{size:"sm",asChild:!0,className:"gap-1",children:c.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:[c.jsx(Ii,{className:"h-3.5 w-3.5"})," ",s.explore.go]})})]})]})}
462function Q8({fav:e,baseLat:t,baseLng:n,locale:r,t:s,onVocabulary:i}){const o=Of(),a=`https://www.google.com/maps/dir/?api=1&origin=${t},${n}&destination=${e.lat},${e.lng}&travelmode=driving`;return c.jsxs(Ft,{className:"p-3 flex items-start gap-2 overflow-hidden",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"font-bold text-foreground truncate",children:e.name}),c.jsx("span",{className:"text-xs text-muted-foreground",children:bc(e.types,r)}),e.vicinity&&c.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:e.vicinity})]}),c.jsxs("div",{className:"flex gap-1 shrink-0",children:[c.jsx(ne,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>o.mutate({place_id:e.place_id,name:e.name,vicinity:e.vicinity??void 0,types:e.types,lat:e.lat,lng:e.lng}),disabled:o.isPending,children:c.jsx(Fs,{className:"h-4 w-4 fill-current text-destructive"})}),c.jsx(ne,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:i,children:c.jsx(hy,{className:"h-4 w-4"})}),c.jsx(ne,{size:"sm",asChild:!0,className:"gap-1",children:c.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:[c.jsx(Ii,{className:"h-3.5 w-3.5"})," ",s.explore.go]})})]})]})}const Df="/assets/yaku_sad-DdoVcPTA.jpeg",dN="/assets/yaku_cake_neutral-DKFAvts3.jpg";var Uv="Progress",Vv=100,[X8,JW]=On(Uv),[J8,Z8]=X8(Uv),fN=m.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:s,getValueLabel:i=eW,...o}=e;(s||s===0)&&!Xb(s)&&console.error(tW(`${s}`,"Progress"));const a=Xb(s)?s:Vv;r!==null&&!Jb(r,a)&&console.error(nW(`${r}`,"Progress"));const l=Jb(r,a)?r:null,u=Od(l)?i(l,a):void 0;return c.jsx(J8,{scope:n,value:l,max:a,children:c.jsx(me.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Od(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":mN(l,a),"data-value":l??void 0,"data-max":a,...o,ref:t})})});fN.displayName=Uv;var hN="ProgressIndicator",pN=m.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,s=Z8(hN,n);return c.jsx(me.div,{"data-state":mN(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...r,ref:t})});pN.displayName=hN;function eW(e,t){return`${Math.round(e/t*100)}%`}function mN(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Od(e){return typeof e=="number"}function Xb(e){return Od(e)&&!isNaN(e)&&e>0}function Jb(e,t){return Od(e)&&!isNaN(e)&&e<=t&&e>=0}function tW(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Vv}\`.`}function nW(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 463 - a positive number 464 - less than the value passed to \`max\` (or ${Vv} if no \`max\` prop is set) 465 - \`null\` or \`undefined\` if the progress is indeterminate. 466 467Defaulting to \`null\`.`}
467var gN=fN,rW=pN;const yN=m.forwardRef(({className:e,value:t,...n},r)=>c.jsx(gN,{ref:r,className:oe("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:c.jsx(rW,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));yN.displayName=gN.displayName;function vN(){const{user:e}=Oe();return xn({queryKey:["completed-quests",e==null?void 0:e.id],queryFn:async()=>{const{data:t,error:n}=await ie.from("daily_quests").select("id, title, place_name, poi_category, cp_reward, confidence, completed_at, place_lat, place_lng").eq("user_id",e.id).eq("status","completed").order("completed_at",{ascending:!1});if(n)throw n;return t},enabled:!!e})}function sW({baseLat:e,baseLng:t,initialRadius:n,onSaved:r}){const{isLoaded:s}=lN(),{t:i}=rt(),{user:o}=Oe(),a=Nt(),l=m.useRef(null),u=m.useRef(null),d=m.useRef(null),[f,h]=m.useState(n),[p,w]=m.useState(!1);m.useEffect(()=>{if(!s||!l.current)return;const x={lat:e,lng:t},y=new google.maps.Map(l.current,{center:x,zoom:12,disableDefaultUI:!0,zoomControl:!0,gestureHandling:"greedy",styles:[{featureType:"poi",stylers:[{visibility:"off"}]}]});new google.maps.Marker({position:x,map:y,icon:{url:`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(` 468 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 469 <circle cx="12" cy="12" r="8" fill="#58CC02" stroke="white" stroke-width="2.5"/> 470 </svg> 471 `)}`,anchor:new google.maps.Point(12,12)},zIndex:999});const v=new google.maps.Circle({map:y,center:x,radius:f*1e3,fillColor:"#1CB0F6",fillOpacity:.1,strokeColor:"#1CB0F6",strokeWeight:2});return u.current=y,d.current=v,()=>{v.setMap(null)}},[s,e,t]),m.useEffect(()=>{!d.current||!u.current||(d.current.setRadius(f*1e3),u.current.fitBounds(d.current.getBounds()))},[f]);const g=async()=>{if(o){w(!0);try{const{error:x}=await ie.from("profiles").update({quest_radius_km:f}).eq("id",o.id);if(x)throw x;a.invalidateQueries({queryKey:["profile"]}),$t.success(i.radius.saved),r==null||r()}catch{$t.error(i.radius.errorSaving)}finally{w(!1)}}};return s?c.jsxs("div",{className:"space-y-4",children:[c.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:i.radius.description}),c.jsx("div",{ref:l,className:"h-56 w-full rounded-xl overflow-hidden border-2 border-border"}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center justify-between text-xs font-bold text-muted-foreground",children:[c.jsx("span",{children:"1 km"}),c.jsxs("span",{className:"text-base font-black text-foreground",children:[f," km"]}),c.jsx("span",{children:"50 km"})]}),c.jsx(Xl,{min:1,max:50,step:1,value:[f],onValueChange:([x])=>h(x)})]}),c.jsx(ne,{onClick:g,disabled:p,className:"w-full rounded-2xl py-5 text-base font-extrabold shadow-yaku",children:p?"...":i.radius.save})]}):c.jsx("div",{className:"flex h-48 items-center justify-center",children:c.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})})}function iW({open:e,onOpenChange:t}){const{t:n}=rt(),{signOut:r}=Oe(),s=rr(),[i,o]=m.useState(""),[a,l]=m.useState(!1),u=i==="DELETE",d=async()=>{if(u){l(!0);try{const{error:f}=await ie.functions.invoke("delete-account");if(f)throw f;await r(),$t.success(n.profile.deleted),s("/login",{replace:!0})}catch(f){console.error("Delete account error:",f),$t.error(n.profile.deleteError||"Error deleting account"),l(!1)}}};return c.jsx(Mt,{open:e,onOpenChange:f=>{a||(t(f),o(""))},children:c.jsxs(Et,{className:"max-w-[360px] rounded-2xl",children:[c.jsx(Tt,{className:"text-lg font-black text-destructive",children:n.profile.deleteAccount}),c.jsx(Cn,{className:"text-sm font-medium text-muted-foreground",children:n.profile.deleteWarning}),c.jsxs("div",{className:"space-y-3 pt-2",children:[c.jsx("label",{className:"text-xs font-bold text-muted-foreground",children:n.profile.typeDelete}),c.jsx(Fi,{value:i,onChange:f=>o(f.target.value),placeholder:"DELETE",className:"font-mono font-bold tracking-widest",maxLength:6,disabled:a}),c.jsx(ne,{variant:"destructive",className:"w-full font-bold",disabled:!u||a,onClick:d,children:a?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-destructive-foreground border-t-transparent"}),n.profile.deleting]}):n.profile.deleteAccount})]})]})})}const oW={UgBBYS2sOqTuMpoF3BR0:Qy,yj30vwTGJxSHezdAGsv9:Xy};function aW({open:e,onOpenChange:t}){const{t:n}=rt(),{user:r}=Oe(),{data:s}
471=Gr(),{availableVoices:i,defaultVoiceId:o}=Wy(),a=Nt(),[l,u]=m.useState(null),d=m.useRef(null),f=(s==null?void 0:s.preferred_voice_id)||o,h=w=>{var x;if(l===w.id){(x=d.current)==null||x.pause(),d.current=null,u(null);return}d.current&&d.current.pause();const g=new Audio(w.sampleUrl);d.current=g,u(w.id),g.onended=()=>{u(null),d.current=null},g.onerror=()=>{u(null),d.current=null},g.play()},p=async w=>{if(!r)return;const{error:g}=await ie.from("profiles").update({preferred_voice_id:w}).eq("id",r.id);if(g){$t.error("Error saving voice");return}a.invalidateQueries({queryKey:["profile"]}),t(!1)};return c.jsx(Mt,{open:e,onOpenChange:t,children:c.jsxs(Et,{className:"max-w-[380px] rounded-2xl p-5",children:[c.jsx(Tt,{className:"text-lg font-black",children:n.profile.voice}),c.jsx(Cn,{className:"text-sm text-muted-foreground",children:n.profile.voiceSelect}),c.jsx("div",{className:"space-y-3 mt-3",children:i.map(w=>{const g=f===w.id,x=oW[w.id];return c.jsxs("div",{className:`flex items-center gap-3 rounded-2xl border-2 p-3 transition-all ${g?"border-primary bg-accent shadow-sm":"border-border hover:border-muted-foreground/30"}`,children:[c.jsx("img",{src:x,alt:w.name,className:"h-12 w-12 sm:h-14 sm:w-14 rounded-full object-cover border-2 border-primary/10 bg-accent shrink-0"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm sm:text-base font-black truncate",children:w.name}),c.jsx("button",{onClick:()=>h(w),className:"mt-1 flex items-center gap-1.5 text-xs font-bold text-primary focus:outline-none focus-visible:outline-none",children:l===w.id?c.jsxs(c.Fragment,{children:[c.jsx(l_,{className:"h-3 w-3"}),c.jsx("span",{children:"Stop"})]}):c.jsxs(c.Fragment,{children:[c.jsx(a_,{className:"h-3 w-3"}),c.jsx("span",{children:"Preview"})]})})]}),g?c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground",children:c.jsx(ud,{className:"h-4 w-4"})}):c.jsx(ne,{variant:"outline",size:"sm",className:"shrink-0 rounded-xl text-xs font-bold",onClick:()=>p(w.id),children:n.profile.voicePreview})]},w.id)})})]})})}const uu=[0,100,300,600,1e3];function lW(){var L,G;const{user:e,signOut:t}=Oe(),{data:n,isLoading:r}=Gr(),{data:s}=vN(),{locale:i,setLocale:o,t:a}=rt(),[l,u]=m.useState(!1),[d,f]=m.useState(!1),[h,p]=m.useState(null),[w,g]=m.useState(!1),[x,y]=m.useState(!1),[v,b]=m.useState(!1),[S,k]=m.useState(!1),[T,E]=m.useState(!1),{availableVoices:j,defaultVoiceId:R}=Wy(),{isFounder:A,hasActivePass:D,expiresAt:$}=DT(),W=A||D,F=(n==null?void 0:n.base_camp_address)??null,K=(n==null?void 0:n.current_level)??1,U=(n==null?void 0:n.cp_balance)??0,V=uu[K]??uu[uu.length-1],N=uu[K-1]??0,O=V>N?(U-N)/(V-N)*100:100,_=(n==null?void 0:n.display_name)||((L=e==null?void 0:e.user_metadata)==null?void 0:L.full_name)||"Explorador",C=(n==null?void 0:n.avatar_url)||((G=e==null?void 0:e.user_metadata)==null?void 0:G.avatar_url),M=(n==null?void 0:n.base_camp_lat)!==null&&(n==null?void 0:n.base_camp_lat)!==void 0,B=()=>{p(i==="es"?"toEn":"toEs")},z=()=>{o("en"),p(null)},Q=()=>{o("es"),p("disappointment")},Z=[{label:a.profile.practiceLang,icon:tf},{label:a.profile.openToTalk,icon:my},{label:a.profile.chatWithYaku,icon:oO},{label:a.profile.practiceGroups,icon:u_},{label:a.profile.alertsRewards,icon:YA}];return r?c.jsx("div",{className:"flex min-h-[60vh] items-center justify-center",children:c.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"})}):c.jsxs("div",{className:"min-h-screen bg-gray-50",children:[c.jsxs("div",{className:"mx-auto max-w-lg px-4 pt-6 pb-20",children:[c.jsxs(Ft,{className:"mb-6 border-none shadow-sm rounded-3xl p-6 bg-white overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between mb-6",children:[c.jsxs("div",{className:"flex items-center gap-4 cursor-pointer",onClick:()=>E(!0),children:[c.jsxs("div",{className:"relative",children:[C?c.jsx("img",{src:C,alt:_,className:`h-16 w-16 rounded-full object-cover shadow-sm ${W?"border-[3px] border-amber-400":"border-2 border-primary/10"}`}):c.jsx("div",{className:`flex h-16 w-16 items-center justify-center rounded-full text-primary-foreground text-2xl font-black ${W?"bg-primary border-[3px] border-amber-400":"bg-primary border-2 border-primary/10"}`,children:_.charAt(0)}),W&&c.jsx("div",{className:"absolute -bottom-1 -right-1 flex h-6 w-6 items-center justify-center rounded-full bg-amber-400 shadow-sm",children:c.jsx(fh,{className:"h-3.5 w-3.5 text-white",strokeWidth:2.5})}),c.jsx("div",{className:"absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-sm",children:c.jsx(cO,{className:"h-2.5 w-2.5"})})]}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-black text-foreground leading-tight",children:_}),c.jsxs("p",{className:"text-sm font-semibold text-muted-foreground",children:[a.profile.level," ",K]}),A?c.jsxs("span",{className:"mt-1 inline-flex items-center gap-1 rounded-full bg-foreground px-2.5 py-0.5 text-xs font-bold text-background",children:[c.jsx(fh,{className:"h-3 w-3"}
471),a.profile.founder]}):D&&$?c.jsxs("span",{className:"mt-1 inline-flex items-center gap-1 rounded-full bg-foreground px-2.5 py-0.5 text-xs font-bold text-background",children:[c.jsx(fh,{className:"h-3 w-3"}),oB($)," ",a.profile.remaining]}):c.jsx("span",{className:"mt-1 inline-block rounded-full bg-gray-100 px-2 py-0.5 text-xs font-bold text-gray-400",children:a.profile.free})]})]}),c.jsxs("button",{onClick:B,className:"flex items-center gap-1.5 rounded-full bg-gray-50 border border-gray-100 px-3 py-1.5 text-xs font-black transition-all hover:bg-white hover:shadow-sm",children:[c.jsx("span",{className:i==="es"?"text-primary":"text-muted-foreground",children:"ES"}),c.jsx("span",{className:"text-gray-300 font-normal",children:"|"}),c.jsx("span",{className:i==="en"?"text-primary":"text-muted-foreground",children:"EN"})]})]}),c.jsxs("div",{className:"mb-8",children:[c.jsxs("div",{className:"flex items-center justify-between text-[11px] font-black uppercase tracking-wider text-muted-foreground mb-2",children:[c.jsxs("span",{children:[a.profile.level," ",K]}),c.jsxs("span",{className:"text-primary",children:[U,"/",V," CP"]})]}),c.jsx(yN,{value:O,className:"h-2 rounded-full bg-gray-100"})]}),c.jsx("div",{className:"grid grid-cols-3 divide-x divide-gray-100 border-t border-gray-50 pt-6",children:[{icon:fO,label:a.profile.totalCp,value:U,color:"text-yaku-bee"},{icon:s_,label:a.profile.streak,value:(n==null?void 0:n.current_streak)??0,color:"text-yaku-fox"},{icon:ra,label:a.profile.missions,value:(s==null?void 0:s.length)??0,color:"text-primary"}].map(({icon:Y,label:pe,value:ae,color:ge})=>c.jsxs("div",{className:"flex flex-col items-center justify-center px-2 text-center",children:[c.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[c.jsx(Y,{className:`h-4 w-4 ${ge}`}),c.jsx("span",{className:"text-lg font-black leading-none",children:ae})]}),c.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-tight",children:pe})]},pe))})]}),c.jsxs("section",{className:"mb-8",children:[c.jsxs("h2",{className:"px-4 mb-2 text-[11px] font-black text-muted-foreground uppercase tracking-wider",children:[a.profile.baseCamp," / ",a.radius.title]}),c.jsx("div",{className:"bg-white rounded-2xl shadow-sm border border-gray-50 overflow-hidden",children:c.jsxs("ul",{className:"divide-y divide-gray-50",children:[c.jsxs("li",{onClick:()=>u(!0),className:"flex items-center gap-4 p-4 active:bg-gray-50 transition-colors cursor-pointer group",children:[c.jsx("div",{className:"bg-primary/10 p-2 rounded-xl",children:c.jsx(gr,{className:"h-5 w-5 text-primary"})}),c.jsxs("div",{className:"flex-1",children:[c.jsx("p",{className:"text-sm font-black",children:a.profile.baseCamp}),c.jsx("p",{className:"text-xs text-muted-foreground truncate max-w-[200px]",children:F||a.profile.baseCampNotSet})]}),c.jsx(Zi,{className:"h-4 w-4 text-gray-300 group-hover:text-primary transition-colors"})]}),M&&c.jsxs("li",{onClick:()=>f(!0),className:"flex items-center gap-4 p-4 active:bg-gray-50 transition-colors cursor-pointer group",children:[c.jsx("div",{className:"bg-primary/10 p-2 rounded-xl",children:c.jsx(Zp,{className:"h-5 w-5 text-primary"})}),c.jsx("div",{className:"flex-1 text-sm font-black",children:a.profile.searchRadius}),c.jsxs("div",{className:"text-sm font-bold text-gray-400 mr-2",children:[(n==null?void 0:n.quest_radius_km)??5," km"]}),c.jsx(Zi,{className:"h-4 w-4 text-gray-300 group-hover:text-primary transition-colors"})]}),c.jsxs("li",{onClick:()=>k(!0),className:"flex items-center gap-4 p-4 active:bg-gray-50 transition-colors cursor-pointer group",children:[c.jsx("div",{className:"bg-primary/10 p-2 rounded-xl",children:c.jsx(d_,{className:"h-5 w-5 text-primary"})}),c.jsx("div",{className:"flex-1 text-sm font-black",children:a.profile.voice}),c.jsx("div",{className:"flex items-center gap-2 mr-2",children:(()=>{const Y=j.find(ge=>ge.id===((n==null?void 0:n.preferred_voice_id)||R)),ae=Y?{UgBBYS2sOqTuMpoF3BR0:Qy,yj30vwTGJxSHezdAGsv9:Xy}[Y.id]:void 0;return c.jsxs(c.Fragment,{children:[ae&&c.jsx("img",{src:ae,alt:Y==null?void 0:Y.name,className:"h-7 w-7 rounded-full object-cover border border-primary/10"}),c.jsx("span",{className:"text-sm font-bold text-gray-400",children:(Y==null?void 0:Y.name)||"Justin Trudeau"})]})})()}),c.jsx(Zi,{className:"h-4 w-4 text-gray-300 group-hover:text-primary transition-colors"})]})]})})]}),c.jsxs("section",{className:"mb-10",children:[c.jsx("h2",{className:"px-4 mb-2 text-[11px] font-black text-muted-foreground uppercase tracking-wider",children:a.profile.comingSoon}),c.jsx("div",{className:"bg-white rounded-2xl shadow-sm border border-gray-50 overflow-hidden",children:c.jsx("ul",{className:"divide-y divide-gray-50",children:Z.map(Y=>c.jsxs("li",{className:"flex items-center gap-4 p-4 opacity-60 bg-white",children:[c.jsx("div",{className:"bg-gray-50 p-2 rounded-xl text-muted-foreground",children:c.jsx(Y.icon,{className:"h-5 w-5"})}),c.jsx("span",{className:"flex-1 text-sm font-black text-foreground",children:Y.label}),c.jsx(rO,{className:"h-3.5 w-3.5 text-gray-300"})]},Y.label))})})]}),c.jsxs("section",{className:"mb-12",children:[c.jsx("h2",{className:"px-4 mb-2 text-[11px] font-black text-muted-foreground uppercase tracking-wider",children:a.profile.legalPrivacy}),c.jsx("div",{className:"bg-white rounded-2xl shadow-sm border border-gray-50 overflow-hidden",children:c.jsxs("ul",{className:"divide-y divide-gray-50",children:[c.jsxs("li",{onClick:()=>g(!0),className:"flex items-center gap-4 p-4 active:bg-gray-50 transition-colors cursor-pointer group",children:[c.jsx("div",{className:"bg-gray-100 p-2 rounded-xl text-gray-500",children:c.jsx(ox,{className:"h-5 w-5"})}),c.jsx("div",{className:"flex-1 text-sm font-black",children:a.profile.termsOfService}),c.jsx(Zi,{className:"h-4 w-4 text-gray-300 group-hover:text-primary transition-colors"})]}),c.jsxs("li",{onClick:()=>y(!0),className:"flex items-center gap-4 p-4 active:bg-gray-50 transition-colors cursor-pointer group",children:[c.jsx("div",{className:"bg-gray-100 p-2 rounded-xl text-gray-500",children:c.jsx(ox,{className:"h-5 w-5"})}),c.jsx("div",{className:"flex-1 text-sm font-black",children:a.profile.privacyPolicy}),c.jsx(Zi,{className:"h-4 w-4 text-gray-300 group-hover:text-primary transition-colors"})]})]})})]}),c.jsxs("div",{className:"space-y-4 px-2",children:[c.jsxs(ne,{variant:"ghost",className:"w-full h-14 roun
471ded-2xl bg-white border border-gray-100 font-extrabold text-gray-600 shadow-sm hover:bg-gray-50",onClick:t,children:[c.jsx(sO,{className:"mr-2 h-5 w-5 opacity-70"}),a.profile.logout]}),c.jsx("div",{className:"pt-8",children:c.jsxs(ne,{variant:"ghost",className:"w-full text-xs font-bold text-red-400 hover:text-red-500 hover:bg-red-50",onClick:()=>b(!0),children:[c.jsx(c_,{className:"mr-2 h-4 w-4 opacity-70"}),a.profile.deleteAccount]})})]})]}),c.jsx(fc,{open:l,onClose:()=>u(!1),mode:"edit"}),c.jsx(Mt,{open:d,onOpenChange:f,children:c.jsxs(Et,{className:"max-w-[400px] rounded-2xl",children:[c.jsx(Tt,{className:"text-lg font-black",children:a.radius.title}),c.jsx(Cn,{className:"sr-only",children:a.radius.description}),M&&c.jsx(sW,{baseLat:n.base_camp_lat,baseLng:n.base_camp_lng,initialRadius:(n==null?void 0:n.quest_radius_km)??5,onSaved:()=>f(!1)})]})}),c.jsx(Mt,{open:h==="toEn",onOpenChange:Y=>{Y||p(null)},children:c.jsxs(Et,{className:"max-w-[320px] p-0 overflow-hidden rounded-2xl text-center",children:[c.jsx("div",{className:"w-full h-52 bg-white flex items-center justify-center",children:c.jsx("img",{src:Pf,alt:"Yaku celebrating",className:"max-h-full max-w-full object-contain"})}),c.jsxs("div",{className:"p-6 pt-2",children:[c.jsx(Tt,{className:"text-lg font-black mb-2",children:a.langSwitch.congratsTitle}),c.jsx(Cn,{className:"text-sm font-semibold text-muted-foreground whitespace-pre-wrap mb-6",children:a.langSwitch.congratsMsg}),c.jsx(ne,{onClick:z,size:"lg",className:"w-full gap-2 rounded-2xl py-5 text-base font-extrabold shadow-yaku",children:a.langSwitch.letsGo})]})]})}),c.jsx(Mt,{open:h==="toEs",onOpenChange:Y=>{Y||p(null)},children:c.jsxs(Et,{className:"max-w-[320px] p-0 overflow-hidden rounded-2xl text-center",children:[c.jsx("div",{className:"w-full h-52 bg-white flex items-center justify-center",children:c.jsx("img",{src:dN,alt:"Yaku a little angry",className:"max-h-full max-w-full object-contain"})}),c.jsxs("div",{className:"p-6 pt-2",children:[c.jsx(Tt,{className:"text-lg font-black mb-2",children:a.langSwitch.areYouSure}),c.jsx(Cn,{className:"text-sm font-semibold text-muted-foreground whitespace-pre-wrap mb-6",children:a.langSwitch.yakuSad}),c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx(ne,{onClick:()=>p(null),size:"lg",className:"w-full rounded-2xl py-5 text-base font-extrabold shadow-yaku",children:a.langSwitch.stayEnglish}),c.jsx(ne,{variant:"ghost",onClick:Q,className:"w-full font-bold text-muted-foreground",children:a.langSwitch.switchSpanish})]})]})]})}),c.jsx(Mt,{open:h==="disappointment",onOpenChange:Y=>{Y||p(null)},children:c.jsxs(Et,{className:"max-w-[320px] p-0 overflow-hidden rounded-2xl text-center",children:[c.jsx("div",{className:"w-full h-52 bg-white flex items-center justify-center",children:c.jsx("img",{src:Df,alt:"Yaku crying",className:"max-h-full max-w-full object-contain"})}),c.jsxs("div",{className:"p-6 pt-2",children:[c.jsx(Tt,{className:"text-lg font-black whitespace-pre-wrap mb-6",children:a.langSwitch.disappointment}),c.jsx(ne,{onClick:()=>p(null),size:"lg",className:"w-full rounded-2xl py-5 text-base font-extrabold shadow-yaku",children:"OK"})]})]})}),c.jsx(Mt,{open:w,onOpenChange:g,children:c.jsxs(Et,{className:"max-w-[400px] rounded-2xl",children:[c.jsx(Tt,{className:"text-lg font-black",children:a.profile.termsOfService}),c.jsx(Cn,{className:"sr-only",children:"Terms of Service"}),c.jsx(zl,{type:"terms"})]})}),c.jsx(Mt,{open:x,onOpenChange:y,children:c.jsxs(Et,{className:"max-w-[400px] rounded-2xl",children:[c.jsx(Tt,{className:"text-lg font-black",children:a.profile.privacyPolicy}),c.jsx(Cn,{className:"sr-only",children:"Privacy Policy"}),c.jsx(zl,{type:"privacy"})]})}),c.jsx(iW,{open:v,onOpenChange:b}),c.jsx(aW,{open:S,onOpenChange:k}),c.jsx(rF,{open:T,onOpenChange:E,currentName:_,currentAvatarUrl:C||null})]})}function cW(){const{user:e}=Oe();return xn({queryKey:["place-visits",e==null?void 0:e.id],queryFn:async()=>{const{data:t,error:n}=await ie.from("place_visits").select("*").eq("user_id",e.id).order("created_at",{ascending:!1}).limit(50);if(n)throw n;return t??[]},enabled:!!e})}function uW(){const{user:e}=Oe(),t=Nt();return ya({mutationFn:async n=>{if(!e)throw new Error("Not authenticated");const{error:r}=await ie.from("place_visits").delete().eq("id",n).eq("user_id",e.id);if(r)throw r},onSuccess:()=>{t.invalidateQueries({queryKey:["place-visits"]})}})}function dW(){const{user:e}=Oe(),t=Nt();return ya({mutationFn:async n=>{if(!e)throw new Error("Not authenticated");const{error:r}=await ie.from("place_visits").upsert({user_id:e.id,created_at:new Date().toISOString(),...n},{onConflict:"user_id,place_id"});if(r)throw r},onSuccess:()=>{t.invalidateQueries({queryKey:["place-visits"]})}})}function Zb(e,t){return new Date(e).toLocaleDateString(t==="es"?"es-419":"en-CA",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}const fW={frozen:{es:"Dificil",en:"Hard"},survived:{es:"Normal",en:"Normal"},easy:{es:"Facil",en:"Easy"}};function hW(){const{t:e,locale:t}=rt(),n=rr(),{data:r,isLoading:s}=cW(),{data:i,isLoading:o}=zP(),{data:a,isLoading:l}=vN(),u=Lv(),d=uW(),{data:f}=Gr(),{play:h,playingId:p,isLoadingId:w}=Mv(f==null?void 0:f.preferred_voice_id,()=>{g.invalidateQueries({queryKey:["can-generate","tts"]}),y(!0)}),g=Nt(),[x,y]=m.useState(!1);return c.jsxs("div",{className:"mx-auto max-w-lg px-4 pt-6 pb-24",children:[c.jsx("h1",{className:"text-2xl font-black text-foreground mb-4",children:e.history.title}),c.jsxs(Rf,{defaultValue:"missions",children:[c.jsxs(xc,{className:"w-full",children:[c.jsx(vr,{value:"missions",className:"flex-1 text-xs font-bold",children:e.history.missions}),c.jsx(vr,{value:"places",className:"flex-1 text-xs font-bold",children:e.history.places}),c.jsx(vr,{value:"phrases",className:"flex-1 text-xs font-bold",children:e.history.phrases})]}),c.jsx(xr,{value:"missions",className:"mt-3 space-y-2",children:l?Array.from({length:3}).map((v,b)=>c.jsx(yi,{className:"h-20 w-full rounded-xl"},b)):a!=null&&a.length?a.map(v=>{var b;return c.jsx(Ft,{className:`p-3 ${v.place_name&&v.place_lat!=null?"curs
471or-pointer active:scale-[0.98] transition-transform":""}`,onClick:()=>{v.place_name&&v.place_lat!=null&&v.place_lng!=null&&n("/place",{state:{place_id:v.place_name.replace(/\s+/g,"_").toLowerCase(),name:v.place_name,vicinity:"",types:[v.poi_category],lat:v.place_lat,lng:v.place_lng,open_now:null}})},children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10 shrink-0",children:c.jsx(ra,{className:"h-5 w-5 text-primary"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"font-bold text-foreground truncate",children:v.title}),c.jsxs("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[v.place_name&&c.jsx("span",{className:"text-xs text-muted-foreground truncate",children:v.place_name}),v.confidence&&c.jsx(hc,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:((b=fW[v.confidence])==null?void 0:b[t])??v.confidence})]}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:Zb(v.completed_at,t)})]}),c.jsxs("div",{className:"shrink-0 rounded-lg bg-yaku-bee/15 px-2.5 py-1 text-xs font-black text-yaku-fox",children:["+",v.cp_reward," CP"]})]})},v.id)}):c.jsxs("div",{className:"flex flex-col items-center gap-3 py-16 text-center",children:[c.jsx(gy,{className:"h-10 w-10 text-muted-foreground"}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:e.history.noMissions})]})}),c.jsx(xr,{value:"places",className:"mt-3 space-y-2",children:s?Array.from({length:3}).map((v,b)=>c.jsx(yi,{className:"h-20 w-full rounded-xl"},b)):r!=null&&r.length?r.map(v=>c.jsx(Ft,{className:"p-3 cursor-pointer active:scale-[0.98] transition-transform",onClick:()=>n("/place",{state:{place_id:v.place_id,name:v.place_name,vicinity:v.vicinity,types:[v.place_type],lat:v.lat,lng:v.lng,open_now:null}}),children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10 shrink-0",children:c.jsx(gr,{className:"h-5 w-5 text-primary"})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"font-bold text-foreground truncate",children:v.place_name}),c.jsx("p",{className:"text-xs text-muted-foreground",children:bc([v.place_type],t)}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:Zb(v.created_at,t)})]}),c.jsx("button",{onClick:b=>{b.stopPropagation(),d.mutate(v.id,{onSuccess:()=>$t.success(t==="es"?"Visita eliminada":"Visit removed")})},className:"flex h-10 w-10 items-center justify-center rounded-xl bg-destructive/10 text-destructive shrink-0","aria-label":t==="es"?"Eliminar visita":"Delete visit",disabled:d.isPending,children:c.jsx(c_,{className:"h-5 w-5"})})]})},v.id)):c.jsxs("div",{className:"flex flex-col items-center gap-3 py-16 text-center",children:[c.jsx(r_,{className:"h-10 w-10 text-muted-foreground"}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:e.history.noVisits})]})}),c.jsx(xr,{value:"phrases",className:"mt-3 space-y-2",children:o?Array.from({length:3}).map((v,b)=>c.jsx(yi,{className:"h-16 w-full rounded-xl"},b)):i!=null&&i.length?i.map(v=>c.jsx(Ft,{className:"p-3",children:c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"text-sm font-bold text-foreground",children:v.english}),v.pronunciation&&c.jsxs("p",{className:"text-xs italic text-muted-foreground mt-0.5",children:["(",v.pronunciation,")"]}),c.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:v.spanish}),v.source_place&&c.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:v.source_place})]}),c.jsxs("div",{className:"flex gap-1 shrink-0",children:[c.jsx(Mr,{isPlaying:p===`fav-${v.id}`,isLoading:w(`fav-${v.id}`),onPlay:()=>h(`fav-${v.id}`,v.english)}),c.jsx("button",{onClick:()=>u.mutate({english:v.english,spanish:v.spanish,pronunciation:v.pronunciation??void 0,source_place:v.source_place??void 0}),className:"p-1.5",disabled:u.isPending,children:c.jsx(Fs,{className:"h-4 w-4 fill-current text-destructive"})})]})]})},v.id)):c.jsxs("div",{className:"flex flex-col items-center gap-3 py-16 text-center",children:[c.jsx(Fs,{className:"h-10 w-10 text-muted-foreground"}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:e.history.noPhrases})]})})]}),c.jsx(Wl,{open:x,onOpenChange:y})]})}function pW(e,t,n,r){const{user:s}=Oe(),i=!!r;return xn({queryKey:["leaderboard",i?`country:${r}
471`:`radius:${e},${t},${n}`],queryFn:async()=>{let o=[],a=null;if(i){const[l,u]=await Promise.all([ie.rpc("leaderboard_by_country",{p_country:r,p_limit:10}),s?ie.rpc("user_rank_by_country",{p_user_id:s.id,p_country:r}):Promise.resolve({data:null,error:null})]);if(l.error)throw l.error;o=l.data??[],a=u.data??null}else{const[l,u]=await Promise.all([ie.rpc("leaderboard_nearby",{p_lat:e,p_lng:t,p_radius_km:n,p_limit:10}),s?ie.rpc("user_rank_nearby",{p_user_id:s.id,p_lat:e,p_lng:t,p_radius_km:n}):Promise.resolve({data:null,error:null})]);if(l.error)throw l.error;o=l.data??[],a=u.data??null}return{entries:o,userRank:a}},enabled:!!s&&(i||e!==null&&t!==null),staleTime:5*60*1e3})}function mW(e){const t=m.useRef(!1),n=Nt();m.useEffect(()=>{t.current||e&&(e.base_camp_country||e.base_camp_lat==null||e.base_camp_lng==null||(t.current=!0,(async()=>{try{const{data:r,error:s}=await ie.functions.invoke("geocode",{body:{mode:"reverse",lat:e.base_camp_lat,lng:e.base_camp_lng}});if(s||!(r!=null&&r.country_code))return;await ie.from("profiles").update({base_camp_country:r.country_code}).eq("id",e.id),n.invalidateQueries({queryKey:["profile"]}),n.invalidateQueries({queryKey:["leaderboard"]})}catch{}})()))},[e,n])}function du({code:e,className:t="h-5 w-5"}){return c.jsx("img",{src:`https://hatscripts.github.io/circle-flags/flags/${e.toLowerCase()}.svg`,alt:e,className:`${t} inline-block rounded-full object-cover`})}function gW(){const{t:e}=rt(),{user:t}=Oe(),{data:n}=Gr(),[r,s]=m.useState(50),[i,o]=m.useState(!1);mW(n);const a=(n==null?void 0:n.base_camp_lat)??null,l=(n==null?void 0:n.base_camp_lng)??null,u=!!(n!=null&&n.base_camp_country),d=r===null&&u?(n==null?void 0:n.base_camp_country)??null:void 0,{data:f,isLoading:h}=pW(a,l,r??50,d),p=f==null?void 0:f.entries,w=f==null?void 0:f.userRank,g=p==null?void 0:p.some(x=>x.user_id===(t==null?void 0:t.id));return n!=null&&n.base_camp_lat?c.jsxs("div",{className:"mx-auto max-w-lg px-4 pt-6 pb-24",children:[c.jsxs("h1",{className:"text-2xl font-black text-foreground mb-2",children:[e.ranking.title," ",(n==null?void 0:n.base_camp_country)&&c.jsx(du,{code:n.base_camp_country,className:"h-6 w-6 align-middle"})]}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground mb-4",children:e.ranking.subtitle}),c.jsxs(Ft,{className:"p-4 mb-4",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("span",{className:"text-sm font-bold text-muted-foreground",children:e.ranking.radius}),c.jsx("span",{className:"text-sm font-black text-primary",children:r===null?e.ranking.all:`${r} km`})]}),c.jsx(Xl,{value:[r??100],onValueChange:x=>s(x[0]),min:1,max:100,step:1,disabled:r===null,className:r===null?"opacity-40":""}),c.jsx(ne,{variant:r===null?"default":"outline",size:"sm",className:"w-full mt-2 text-xs",onClick:()=>{r===null?s(50):u&&s(null)},disabled:r!==null&&!u,children:r===null?"50 km":u&&(n!=null&&n.base_camp_country)?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(du,{code:n.base_camp_country,className:"h-4 w-4"}),e.ranking.all]}):e.ranking.countryPending})]}),h?c.jsx("div",{className:"flex items-center justify-center py-16",children:c.jsx(No,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):p!=null&&p.length?c.jsxs("div",{className:"space-y-2",children:[p.map((x,y)=>{const v=x.user_id===(t==null?void 0:t.id),b=["text-yaku-bee","text-muted-foreground","text-yaku-fox"];return c.jsxs(Ft,{className:oe("p-3 flex items-center gap-3 transition-all",v&&"border-2 border-primary bg-[#F1D6FF]"),children:[c.jsx("span",{className:oe("text-lg font-black w-8 text-center",y<3?b[y]:"text-muted-foreground"),children:y+1}),x.avatar_url?c.jsx("img",{src:x.avatar_url,alt:x.display_name??"",className:"h-10 w-10 rounded-full object-cover border-2 border-border"}):c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-muted overflow-hidden",children:x.base_camp_country?c.jsx(du,{code:x.base_camp_country,className:"h-6 w-6"}):c.jsx("span",{className:"text-lg font-bold",children:(x.display_name??"?").charAt(0)})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("p",{className:"font-bold text-foreground truncate",children:[x.display_name??e.ranking.anonymous,v&&c.jsxs("span",{className:"text-primary ml-1",children:["(",e.ranking.y
471ou,")"]})]}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.profile.level," ",x.current_level]})]}),c.jsxs("div",{className:"shrink-0 rounded-lg bg-yaku-bee/15 px-2.5 py-1 text-xs font-black text-yaku-fox",children:[x.cp_balance," CP"]})]},x.user_id)}),!g&&w&&n&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex items-center justify-center gap-2 py-1",children:c.jsx("span",{className:"text-xs text-muted-foreground",children:"..."})}),c.jsxs(Ft,{className:"p-3 flex items-center gap-3 border-2 border-primary bg-[#F1D6FF]",children:[c.jsx("span",{className:"text-lg font-black w-8 text-center text-muted-foreground",children:w}),n.avatar_url?c.jsx("img",{src:n.avatar_url,alt:n.display_name??"",className:"h-10 w-10 rounded-full object-cover border-2 border-border"}):c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-muted overflow-hidden",children:n.base_camp_country?c.jsx(du,{code:n.base_camp_country,className:"h-6 w-6"}):c.jsx("span",{className:"text-lg font-bold",children:(n.display_name??"?").charAt(0)})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("p",{className:"font-bold text-foreground truncate",children:[n.display_name??e.ranking.anonymous,c.jsxs("span",{className:"text-primary ml-1",children:["(",e.ranking.you,")"]})]}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.profile.level," ",n.current_level]})]}),c.jsxs("div",{className:"shrink-0 rounded-lg bg-yaku-bee/15 px-2.5 py-1 text-xs font-black text-yaku-fox",children:[n.cp_balance," CP"]})]})]})]}):c.jsxs("div",{className:"flex flex-col items-center gap-3 py-16 text-center",children:[c.jsx(ra,{className:"h-10 w-10 text-muted-foreground"}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:e.ranking.noResults})]})]}):c.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] px-4 text-center",children:[c.jsx(ra,{className:"h-12 w-12 text-muted-foreground mb-4"}),c.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:e.ranking.noBaseCamp}),c.jsx(ne,{onClick:()=>o(!0),className:"mt-4",children:e.explore.configure}),c.jsx(fc,{open:i,onClose:()=>o(!1),mode:"onboarding"})]})}const yW=()=>c.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center bg-background px-6 text-center",children:c.jsxs(ft.div,{initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},transition:{duration:.5,type:"spring"},className:"flex flex-col items-center",children:[c.jsxs("div",{className:"relative mb-8",children:[c.jsx("img",{src:Df,alt:"Yaku is sad",className:"h-48 w-48 rounded-[2.5rem] object-cover shadow-yaku-lg md:h-64 md:w-64"}),c.jsx("div",{className:"absolute -right-4 -top-4 rounded-2xl bg-destructive px-4 py-2 text-xl font-black text-white shadow-lg rotate-12",children:"404"})]}),c.jsxs("h1",{className:"text-3xl font-black tracking-tight text-foreground md:text-5xl uppercase mb-4",children:["Oops! ",c.jsx("span",{className:"text-destructive",children:"Lost"})," in the City?"]}),c.jsx("p",{className:"max-w-md text-lg font-bold text-muted-foreground/70 mb-10",children:"Even Yaku gets lost sometimes. The page you're looking for doesn't exist or has moved to a new neighborhood."}),c.jsx(eo,{to:"/",children:c.jsxs(ne,{size:"lg",className:"group relative flex items-center gap-3 rounded-2xl px-8 py-7 text-lg font-black uppercase tracking-wider shadow-yaku transition-all active:translate-y-1 active:shadow-none",children:[c.jsx(py,{className:"h-6 w-6 transition-transform group-hover:-translate-y-0.5"}),"Back to Base Camp"]})})]})});function vW(e){const{user:t}=Oe();return xn({queryKey:["place-completed",t==null?void 0:t.id,e],queryFn:async()=>{if(!e)return!1;const{data:n}=await ie.from("daily_quests").select("id").eq("user_id",t.id).eq("place_name",e).eq("status","completed").limit(1);return((n==null?void 0:n.length)??0)>0},enabled:!!t&&!!e})}function xW(){const{user:e}=Oe(),t=Nt();return ya({mutationFn:async n=>{if(!e)throw new Error("Not authenticated");const r=n.cp_reward??10,{error:s}=await ie.from("daily_quests").insert({user_id:e.id,title:`Mission: ${n.place_name}`,place_name:n.place_name,place_lat:n.lat,place_lng:n.lng,poi_category:n.place_type,cp_reward:r,status:"completed",confidence:n.confidence,completed_at:new Date().toISOString()});if(s)throw s;const{error:i}=await ie.rpc("increment_cp",{p_user_id:e.id,p_amount:r});if(i)throw i},onSuccess:()=>{t.invalidateQueries({queryKey:["completed-quests"]}),t.invalidateQueries({queryKey:["profile"]}),t.invalidateQueries({queryKey:["place-completed"]})}})}function wW(e){const{user:t}=Oe();return xn({queryKey:["can-generate",e,t==null?void 0:t.id],enabled:!!t,staleTime:3e4,queryFn:async()=>{const n=t.id,{data:r}=await ie.rpc("has_role",{_user_id:n,_role:"founder"});if(r)return{allowed:!0,remaining:1/0,isFounder:!0};const{data:s}=await ie.from("user_passes").select("id").eq("user_id",n).gt("expires_at",new Date().toISOString()).limit(1);if(s&&s.length>0)return{allowed:!0,remaining:1/0,isFounder:!1};const{data:i}=await ie.from("app_settings").select("value").eq("key",`daily_limit_${e}`).single(),o=i!=null&&i.value?parseInt(i.value,10):2;if(!isFinite(o)||o<=0)return{allowed:!0,remaining:1/0,isFounder:!1};const{data:a}=await ie.rpc("daily_usage_count",{p_user_id:n,p_type:e}),u=Math.max(0,o-(a??0));return{allowed:u>0,remaining:u,isFounder:!1}}})}function bW(){const{t:e,locale:t}=rt(),n=rr(),s=Ys().state,{user:i}=Oe(),{data:o}=Gr(),a=Bv(s==null?void 0:s.place_id),l=Of(),u=Nt(),[d,f]=m.useState(!1),h=m.useCallback(()=>
471{u.invalidateQueries({queryKey:["can-generate","tts"]}),f(!0)},[u]),{play:p,playingId:w,isLoadingId:g}=Mv(o==null?void 0:o.preferred_voice_id,h),x=Lv(),y=dW(),v=sv(),S=pf()||v,[k,T]=m.useState([]),[E,j]=m.useState([]),[R,A]=m.useState(!0),[D,$]=m.useState(!1),[W,F]=m.useState(!1),[K,U]=m.useState(!1),{data:V}=vW(s==null?void 0:s.name),N=xW(),{data:O,isLoading:_}=wW("vocabulary"),{userLat:C,userLng:M}=VP(),Q=(s&&C&&M?$v(C,M,s.lat,s.lng):1/0)<=1e3,Z=k.length>0||E.length>0,L=!V&&Z&&!R&&!W,G=Q?10:1,Y=async H=>{if(!s)return;const re=Qb(s.types);await N.mutateAsync({place_name:s.name,place_type:re,lat:s.lat,lng:s.lng,confidence:H,cp_reward:G}),U(!1),$t.success(e.placeDetail.missionCompleted),qP()};if(m.useEffect(()=>{if(!s){n("/explore",{replace:!0});return}const H=Qb(s.types);if(_)return;(async()=>{var be;A(!0),$(!1),F(!1);try{let we;const{data:De}=await ie.from("place_visits").select("phrases, responses").eq("place_id",s.place_id).eq("user_id",(i==null?void 0:i.id)??"").order("created_at",{ascending:!1}).limit(1);if(we=De==null?void 0:De[0],(!(we!=null&&we.phrases)||we.phrases.length===0)&&s.name){const{data:Rt}=await ie.from("place_visits").select("phrases, responses").eq("place_name",s.name).eq("user_id",(i==null?void 0:i.id)??"").order("created_at",{ascending:!1}).limit(1);(be=Rt==null?void 0:Rt[0])!=null&&be.phrases&&Rt[0].phrases.length>0&&(we=Rt[0])}if(we!=null&&we.phrases&&we.phrases.length>0){T(we.phrases),j(we.responses||[]),A(!1);return}if(O&&!O.allowed){F(!0),A(!1);return}const{data:je,error:Ye}=await ie.functions.invoke("vocabulary",{body:{place_type:H,place_name:s.name,place_types:s.types}});if(Ye)throw new Error("No phrases");if((je==null?void 0:je.error)==="limit_reached"){F(!0),A(!1);return}const st=(je==null?void 0:je.phrasesToSay)||(je==null?void 0:je.phrases)||[],wn=(je==null?void 0:je.possibleResponses)||[];T(st),j(wn),st.length>0&&y.mutate({place_id:s.place_id,place_name:s.name,place_type:H,vicinity:s.vicinity,lat:s.lat,lng:s.lng,phrases:st,responses:wn})}catch{$(!0)}finally{A(!1)}})()},[s,n,i==null?void 0:i.id,O==null?void 0:O.allowed,_]),!s)return null;const pe=o==null?void 0:o.base_camp_lat,ae=o==null?void 0:o.base_camp_lng,ge=pe&&ae?`https://www.google.com/maps/dir/?api=1&origin=${pe},${ae}&destination=${s.lat},${s.lng}&travelmode=walking`:`https://www.google.com/maps/search/?api=1&query=${s.lat},${s.lng}`;return c.jsxs("div",{className:"flex flex-col min-h-[calc(100vh-5rem)]",children:[c.jsxs("div",{className:"p-4 space-y-3",children:[c.jsxs(ne,{variant:"ghost",size:"sm",onClick:()=>n(-1),className:"gap-1 -ml-2",children:[c.jsx(KA,{className:"h-4 w-4"})," ",e.placeDetail.back]}),c.jsxs("div",{className:`flex ${S?"flex-col gap-3":"flex-row items-start justify-between gap-4"}`,children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"text-xl font-black text-foreground",children:s.name}),c.jsxs("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[c.jsx("span",{className:"text-sm text-muted-foreground",children:bc(s.types,t)}),s.open_now!==null&&c.jsx(hc,{variant:s.open_now?"default":"destructive",className:"text-[10px] px-1.5 py-0",children:s.open_now?e.explore.open:e.explore.closed})]}),c.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.vicinity})]}),c.jsxs("div",{className:"flex flex-wrap gap-2 shrink-0",children:[c.jsxs(ne,{variant:"outline",size:S?"icon":"sm",className:S?`h-9 w-9 ${a?"bg-[#1CB0F6] text-white border-[#1CB0F6]":"text-[#1CB0F6] border-[#1CB0F6]/30"}`:`gap-1 font-extrabold uppercase text-[#1CB0F6] border-[#1CB0F6]/30 ${a?"bg-[#1CB0F6] text-white border-[#1CB0F6]":""}`,onClick:()=>l.mutate({place_id:s.place_id,name:s.name,vicinity:s.vicinity,types:s.types,lat:s.lat,lng:s.lng}),disabled:l.isPending,children:[c.jsx(Fs,{className:`h-4 w-4 ${a?"fill-current":""}`}),!S&&(a?e.explore.removeFavorite:e.explore.addFavorite)]}),c.jsx(ne,{variant:"outline",size:"sm",className:"gap-1",asChild:!0,children:c.jsxs("a",{href:ge,target:"_blank",rel:"noopener noreferrer",children:[c.jsx(Ii,{className:"h-4 w-4"}),S?"Ir":e.placeDetail.openInMaps]})}),V?c.jsxs("div",{className:"flex items-center gap-2 text-sm font-bold text-muted-foreground",children:[c.jsx(ud,{className:"h-4 w-4"}),e.placeDetail.alreadyCompleted]}):L&&!K?c.jsxs(ne,{size:"sm",className:"gap-1",onClick:()=>U(!0),disabled:N.isPending,children:[c.jsx(gy,{className:"h-4 w-4"}),e.placeDetail.completeMission," (+",G," CP)"]}):null]})]}),K&&c.jsxs("div",{className:"space-y-2",children:[c.jsx("p",{className:"text-sm font-bold text-muted-foreground",children:e.today.howDidItGo}),c.jsx("div",{className:"grid grid-cols-3 gap-2",children:[{key:"froze",img:SP,label:e.today.froze},{key:"survived",img:Ov,label:e.today.survived},{key:"easy",img:Dv,label:e.today.pieceOfCake}].map(({key:H,img:re,label:be})=>c.jsxs(ne,{variant:"outline",size:"sm",className:"flex-col h-auto py-3 gap-2 text-xs",onClick:()=>Y(H),disabled:N.isPending,children:[c.jsx("img",{src:re,alt:be,className:"h-20 w-20 rounded-full object-cover"}),be]},H))})]})]}),c.jsxs("div",{className:"flex-1 px-4 pb-4 space-y-3",children:[c.jsx("h2",{className:"text-sm font-bold text-muted-foreground uppercase tracking-wider",children:e.placeDetail.commonPhrases}),W?c.jsx($m,{}):R?c.jsxs("div",{className:"flex flex-col items-center justify-center py-8 gap-4",children:[c.jsx("img",{src:"/images/waiting.svg",alt:"Loading",className:"w-72 h-72 sm:w-80 sm:h-80"}),c.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-xs px-4",children:e.placeDetail.loadingPhrases}),c.jsxs("div",{className:"flex gap-1.5",children:[c.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-[#1CB0F6] animate-bounce [animation-delay:0ms]"}),c.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-[#1CB0F6] animate-bounce [animation-delay:150ms]"}),c.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-[#1CB0F6] animate-bounce [animation-delay:300ms]"})]})]}):D?c.jsx("p",{className:"text-sm text-destructive",children:e.placeDetail.errorPhrases}):c.jsxs(Rf,{defaultValue:"toSay",children:[c.jsxs(xc,{className:"w-full",children:[c.jsx(vr,{value:"toSay",className:"flex-1 text-xs font-bold",children:e.placeDetail.toSay}),c.jsx(vr,{value:"responses",className:"flex-1 text-xs font-bold",children:e.placeDetail.responses})]}),c.jsx(xr,{value:"toSay",children:c.jsx("div",{className:"space-y-3 mt-2",children:k.map((H,re)=>c.jsx(SW,{phrase:H,index:re,playingId:w,isLoadingId:g,onPlay:()=>p(`place-phrase-${re}`,H.english),placeName:s.name,toggleFavPhrase:x},re))})}),c.jsx(xr,{value:"responses",children:c.jsxs("div",{className:"space-y-3 mt-2",children:[E.map((H,re)=>{const be=`place-response-${re}`;return c.jsxs(Ft,{className:"p-3 space-y-2",children:[c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("p",{className:"text-base font-semibold text-foreground",children:[re+1,'. "',H.english,'"']}),H.pronunciation&&c.jsxs("p",{className:"text-xs italic text-muted-foreground mt-0.5",children:["(",H.pronunciation,")"]}),c.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:H.spanish})]}),c.jsx(Mr,{isPlaying:w===be,isLoading:g(be),onPlay:()=>p(be,H.english)})]}),H.variant&&c.jsxs("div",{className:"border-t border-border pt-2",children:[c.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground mb-1",children:e.placeDetail.orAlso}),c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("p",{className:"text-sm font-semibold text-foreground",children:['"',H.variant.english,'"']}),H.variant.pronunciation&&c.jsxs("p",{className:"text-xs italic text-muted-foreground mt-0.5",children:["(",H.variant.pronunciation,")"]}),c.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:H.variant.spanish})]}),c.jsx(Mr,{isPlaying:w===`${be}-variant`,isLoading:g(`${be}-variant`),onPlay:()=>p(`${be}-variant`,H.variant.english)})]})]}),H.replies&&H.replies.length>0&&c.jsxs("div",{className:"border-t border-border pt-2",children:[c.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-primary mb-1",children:e.placeDetail.youCanReply}),H.replies.map((we,De)=>c.jsxs("div",{className:`flex items-start justify-between gap-2${De>0?" mt-2":""}`,children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("p",{className:"text-sm font-semibold text-foreground",children:['"',we.english,'"']}),we.pronunciation&&c.jsxs("p",{className:"text-xs italic text-muted-foreground mt-0.5",children:["(",we.pronunciation,")"]}),c.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:we.spanish})]}),c.jsx(Mr,{isPlaying:w===`${be}-reply-${De}`,isLoading:g(`${be}-reply-${De}`),onPlay:()=>p(`${be}-reply-${De}`,we.english)})]},De))]})]},re)}
471),E.length===0&&c.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"--"})]})})]})]}),c.jsx(Wl,{open:d,onOpenChange:f})]})}function SW({phrase:e,index:t,playingId:n,isLoadingId:r,onPlay:s,placeName:i,toggleFavPhrase:o}){const a=WP(e.english,e.spanish),l=`place-phrase-${t}`;return c.jsx(Ft,{className:"p-3",children:c.jsxs("div",{className:"flex items-start justify-between gap-2",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsxs("p",{className:"text-base font-semibold text-foreground",children:[t+1,'. "',e.english,'"']}),e.pronunciation&&c.jsxs("p",{className:"text-xs italic text-muted-foreground mt-0.5",children:["(",e.pronunciation,")"]}),c.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:e.spanish})]}),c.jsxs("div",{className:"flex gap-1 shrink-0",children:[c.jsx(Mr,{isPlaying:n===l,isLoading:r(l),onPlay:s}),c.jsx("button",{onClick:()=>o.mutate({english:e.english,spanish:e.spanish,pronunciation:e.pronunciation,source_place:i}),className:"p-1.5",disabled:o.isPending,children:c.jsx(Fs,{className:`h-4 w-4 ${a?"fill-current text-destructive":"text-muted-foreground"}`})})]})]})})}const fu=[{name:"ElevenLabs",src:"/tech/ElevenLabs.png"},{name:"Supabase",src:"/tech/supabase.svg"},{name:"Vercel",src:"/tech/vercel_wordmark.svg"},{name:"GitHub",src:"/tech/github.png"},{name:"Lovable",src:"/tech/lovable.svg"},{name:"Google Maps",src:"/tech/googleMaps.svg"},{name:"Stripe",src:"/tech/stripe.svg"}];function kW({className:e=""}){return c.jsx("div",{className:`w-full py-6 overflow-hidden relative ${e}`,children:c.jsx("div",{className:"flex w-[200%] animate-infinite-scroll",children:[...fu,...fu,...fu,...fu].map((t,n)=>c.jsx("div",{className:"flex-1 flex items-center justify-center px-8 grayscale hover:grayscale-0 transition-all opacity-40 hover:opacity-100",children:c.jsx("img",{src:t.src,alt:t.name,className:"h-8 md:h-12 w-auto object-contain max-w-[120px]"})},n))})})}const _W="/assets/yaku_newcomers-BCiLqKmT.png",CW="/assets/rosmel-DTMSZCm0.jpg",EW="/assets/natalia-D-p1S5Pe.png",TW="/assets/yaku_qr-uwiMkudk.png",e1=[Hl,Dv,dN,Pf,Df,Ov],Dd=6;function jW(){const{locale:e,setLocale:t}=rt(),n=rr(),[r]=xC(),s=r.get("modal")==="true",[i,o]=m.useState(!1);m.useEffect(()=>{const l=()=>{o(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",l),()=>document.removeEventListener("fullscreenchange",l)},[]);const a=()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen().catch(l=>{console.error(`Error attempting to enable full-screen mode: ${l.message}`)})};return c.jsxs("div",{className:"fixed top-0 left-0 right-0 z-50 flex items-center justify-between px-4 py-3 md:px-6 md:py-4 bg-transparent pointer-events-none",children:[c.jsxs("div",{className:"flex items-center gap-2 pointer-events-auto",children:[!s&&c.jsx("button",{onClick:()=>n("/"),className:"p-2 rounded-full border border-border bg-background/80 text-muted-foreground hover:text-primary transition-all active:scale-95 shadow-sm",title:"Back to Landing",children:c.jsx(py,{className:"w-4 h-4 md:w-5 md:h-5"})}),c.jsx("button",{onClick:a,className:"p-2 rounded-full border border-border bg-background/80 text-muted-foreground hover:text-primary transition-all active:scale-95 shadow-sm",title:i?"Exit Fullscreen":"Enter Fullscreen",children:i?c.jsx(o_,{className:"w-4 h-4 md:w-5 md:h-5"}):c.jsx(i_,{className:"w-4 h-4 md:w-5 md:h-5"})}),s&&c.jsx("button",{onClick:()=>window.open("/pitch","_blank"),className:"p-2 rounded-full border border-border bg-background/80 text-muted-foreground hover:text-primary transition-all active:scale-95 shadow-sm",title:"Open in new tab",children:c.jsx(eO,{className:"w-4 h-4 md:w-5 md:h-5"})})]}),c.jsxs("div",{className:`flex items-center gap-2 pointer-events-auto ${s?"mr-12":""}`,children:[c.jsx("button",{onClick:()=>t(e==="es"?"en":"es"),className:"px-3 py-1.5 rounded-full text-xs font-bold tracking-wider border border-border bg-background/80 text-muted-foreground hover:text-foreground transition-colors shadow-sm","aria-label":"Switch language",children:e==="es"?"EN":"ES"}),!s&&c.jsx(ne,{size:"sm",onClick:()=>
471n("/login"),className:"font-black text-xs shadow-yaku",children:e==="es"?"Ingresar":"Log in"})]})]})}function PW({active:e}){return c.jsx("div",{className:"fixed bottom-4 md:bottom-8 left-1/2 -translate-x-1/2 z-50 flex gap-3 bg-white/50 backdrop-blur-sm px-4 py-2 rounded-full shadow-sm border border-black/5",children:Array.from({length:Dd}).map((t,n)=>c.jsx("span",{className:`block rounded-full transition-all duration-300 ${n===e?"w-8 h-2.5 bg-primary":"w-2.5 h-2.5 bg-muted-foreground/20"}`},n))})}function NW({onPrev:e,onNext:t,active:n}){return c.jsx(c.Fragment,{children:c.jsxs(c.Fragment,{children:[n>0&&c.jsx("button",{onClick:e,className:"fixed left-4 lg:left-8 top-1/2 -translate-y-1/2 z-50 hidden md:flex items-center justify-center w-12 h-12 rounded-full bg-white shadow-lg border border-border text-muted-foreground hover:text-primary hover:scale-110 transition-all","aria-label":"Previous",children:c.jsx(XA,{className:"w-6 h-6"})}),n<Dd-1&&c.jsx("button",{onClick:t,className:"fixed right-4 lg:right-8 top-1/2 -translate-y-1/2 z-50 hidden md:flex items-center justify-center w-12 h-12 rounded-full bg-white shadow-lg border border-border text-muted-foreground hover:text-primary hover:scale-110 transition-all","aria-label":"Next",children:c.jsx(Zi,{className:"w-6 h-6"})})]})})}const xN=e=>e.split(/(\*\*.*?\*\*)/).map((n,r)=>n.startsWith("**")&&n.endsWith("**")?c.jsx("strong",{className:"text-[#1CB0F6] font-black",children:n.slice(2,-2)},r):n),RW={hidden:{opacity:0},visible:{opacity:1,transition:{duration:.4,ease:"easeOut"}}};function Ji({children:e,className:t="",index:n,isActive:r=!1}){return c.jsxs(ft.div,{initial:"hidden",animate:r?"visible":"hidden",variants:RW,className:`relative w-full h-full max-w-5xl md:h-auto md:aspect-video bg-white rounded-[2.5rem] shadow-2xl overflow-hidden flex flex-col justify-center items-center px-3 md:px-16 py-4 md:py-12 ${t}`,children:[n!==void 0&&c.jsx("div",{className:"absolute top-4 left-4 md:top-8 md:left-8 w-8 h-8 md:w-12 md:h-12 rounded-xl md:rounded-2xl bg-slate-50 flex items-center justify-center border border-slate-100 select-none",children:c.jsx("span",{className:"text-[10px] md:text-sm font-black text-slate-300",children:(n+1).toString().padStart(2,"0")})}),c.jsx("div",{className:"absolute -top-24 -right-24 w-96 h-96 bg-primary/5 rounded-full mix-blend-multiply filter blur-3xl op
471acity-50 animate-pulse"}),c.jsx("div",{className:"absolute -bottom-24 -left-24 w-96 h-96 bg-secondary/5 rounded-full mix-blend-multiply filter blur-3xl opacity-50 animate-pulse",style:{animationDelay:"2s"}}),c.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[40rem] h-[40rem] bg-yaku-bee/5 rounded-full mix-blend-multiply filter blur-[100px] opacity-30"}),c.jsx("div",{className:"relative z-10 w-full flex flex-col items-center justify-center",children:e})]})}function AW(){const[e,t]=m.useState(0);return m.useEffect(()=>{const n=setInterval(()=>{t(r=>(r+1)%e1.length)},2e3);return()=>clearInterval(n)},[]),c.jsx("div",{className:"relative w-48 h-48 md:w-64 md:h-64 mb-10",children:e1.map((n,r)=>c.jsx(ft.img,{src:n,alt:"Yaku Mascot",className:"absolute inset-0 w-full h-full rounded-[3rem] shadow-2xl object-cover",initial:{opacity:0,scale:.9,rotate:-5},animate:{opacity:r===e?1:0,scale:r===e?1:.9,rotate:r===e?0:-5},transition:{duration:.8}},n))})}function hu({initials:e,name:t,image:n,imgClassName:r=""}){return c.jsxs("div",{className:"flex flex-col items-center gap-3",children:[c.jsx("div",{className:"w-20 h-20 md:w-28 md:h-28 rounded-full overflow-hidden bg-gradient-to-br from-primary/10 to-secondary/10 flex items-center justify-center text-primary font-black text-xl md:text-3xl shadow-lg border-2 border-white",children:n?c.jsx("img",{src:n,alt:t,className:`w-full h-full object-cover ${r}`}):e}),c.jsx("span",{className:"font-bold text-base md:text-lg text-foreground",children:t})]})}function pu({icon:e,title:t,desc:n}){return c.jsxs("div",{className:"flex items-start gap-2 md:gap-4 max-w-sm",children:[c.jsx("div",{className:"mt-0.5 flex-shrink-0 w-8 h-8 md:w-12 md:h-12 rounded-lg md:rounded-xl bg-primary/10 flex items-center justify-center",children:c.jsx(e,{className:"w-4 h-4 md:w-6 md:h-6 text-primary"})}),c.jsxs("div",{children:[c.jsx("p",{className:"font-bold text-sm md:text-lg text-[#1CB0F6]",children:t}),c.jsx("p",{className:"text-xs md:text-base text-muted-foreground leading-snug md:leading-relaxed",children:n})]})]})}function t1({text:e,iconColor:t="text-muted-foreground/40"}){return c.jsxs("li",{className:"flex items-start gap-2 md:gap-3",children:[c.jsx(il,{className:`w-4 h-4 md:w-5 md:h-5 mt-0.5 shrink-0 ${t}`}),c.jsx("p",{className:"text-sm md:text-xl text-muted-foreground leading-snug md:leading-relaxed",children:xN(e)})]})}function np({icon:e,title:t,desc:n}){return c.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2 md:gap-4 p-4 md:p-8 rounded-2xl md:rounded-[2.5rem] bg-white border border-gray-100 shadow-sm hover:shadow-md transition-all min-w-0",children:[c.jsx("div",{className:"w-10 h-10 md:w-16 md:h-16 rounded-xl md:rounded-2xl bg-primary/10 flex items-center justify-center",children:c.jsx(e,{className:"w-5 h-5 md:w-8 md:h-8 text-primary"})}),c.jsxs("div",{className:"text-center space-y-1",children:[c.jsx("h3",{className:"text-sm md:text-xl font-bold text-[#1CB0F6]",children:t}),c.jsx("p",{className:"text-xs md:text-base text-muted-foreground leading-snug md:leading-relaxed",children:n})]})]})}function OW(){const{t:e}=rt(),t=e.pitch,n=m.useRef(null),r=m.useRef([]),[s,i]=m.useState(0),o=rr();m.useEffect(()=>{const d=window.location.hash;if(d.startsWith("#slide-")){const f=parseInt(d.replace("#slide-",""),10)-1;f>=0&&f<Dd&&setTimeout(()=>{var h;(h=r.current[f])==null||h.scrollIntoView({behavior:"auto",inline:"start"}),i(f)},100)}},[]),m.useEffect(()=>{const d=`slide-${s+1}`;window.location.hash!==`#${d}`&&window.history.replaceState(null,"",`#${d}`)},[s]);const a=m.useCallback(d=>{var f;(f=r.current[d])==null||f.scrollIntoView({behavior:"smooth",inline:"start"})},[]);m.useEffect(()=>{const d=r.current.filter(Boolean);if(!d.length)return;const f=new IntersectionObserver(h=>{h.forEach(p=>{if(p.isIntersecting){const w=d.indexOf(p.target);w!==-1&&i(w)}})},{threshold:.6});return d.forEach(h=>f.observe(h)),()=>f.disconnect()},[]),m.useEffect(()=>{const d=f=>{f.key==="ArrowRight"&&s<Dd-1&&a(s+1),f.key==="ArrowLeft"&&s>0&&a(s-1)};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[s,a]);const l=d=>f=>{r.current[d]=f},u="min-w-full h-screen snap-center flex flex-col items-center justify-center px-4 md:px-8 py-16 md:py-12 relative overflow-hidden";return c.jsxs("div",{ref:n,className:"flex overflow-x-auto snap-x snap-mandatory w-screen h-screen scrollbar-hide bg-slate-50",style:{scrollbarWidth:"none",msOverflowStyle:"none",WebkitOverflowScrolling:"touch"},children:[c.jsx("style",{children:"div::-webkit-scrollbar { display: none; }"}),c.jsx(jW,{}),c.jsx(PW,{active:s}),c.jsx(NW,{onPrev:()=>a(s-1),onNext:()=>a(s+1),active:s}),c.jsx("div",{ref:l(0),className:`${u}`,children:c.jsxs(Ji,{index:0,isActive:s===0,children:[c.jsx(AW,{}),c.jsx("h1",{className:"text-4xl md:text-8xl font-black text-primary text-center max-w-4xl tracking-tight mb-2",children:"Yaku"}),c.jsx("h2",{className:"text-xl md:text-4xl font-extrabold text-foreground text-center max-w-4xl tracking-tight mb-6 px-4",children:"Fluid English for real life"}),c.jsx("p",{className:"text-base md:text-2xl text-muted-foreground text-center max-w-2xl font-medium leading-relaxed px-4",children:"Daily real-world challenges to practice English through everyday interactions in Canada."})]})}),c.jsx("div",{ref:l(1),className:u,children:c.jsxs(Ji,{index:1,isActive:s===1,children:[c.jsx(ft.img,{src:Df,alt:"Sad Yaku",className:"w-16 h-16 md:w-4
4710 md:h-40 rounded-2xl shadow-xl mb-3 md:mb-6 object-cover",animate:{scale:[1,1.05,1]},transition:{duration:4,repeat:1/0,ease:"easeInOut"}}),c.jsx("h2",{className:"text-2xl md:text-5xl font-black text-foreground mb-3 md:mb-10",children:t.problem.title}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-16 w-full max-w-4xl px-2 md:px-4",children:[c.jsxs("div",{className:"space-y-2 md:space-y-4",children:[c.jsx("span",{className:"text-xs md:text-base font-bold uppercase tracking-widest text-destructive/60",children:t.problem.needLabel}),c.jsx("ul",{className:"space-y-2 md:space-y-4",children:t.problem.needItems.map((d,f)=>c.jsx(t1,{text:d,iconColor:"text-destructive/30"},f))})]}),c.jsxs("div",{className:"space-y-2 md:space-y-4",children:[c.jsx("span",{className:"text-xs md:text-base font-bold uppercase tracking-widest text-primary/60",children:t.problem.whoLabel}),c.jsx("ul",{className:"space-y-2 md:space-y-4",children:t.problem.whoItems.map((d,f)=>c.jsx(t1,{text:d,iconColor:"text-primary/30"},f))})]})]})]})}),c.jsx("div",{ref:l(2),className:u,children:c.jsxs(Ji,{className:"relative overflow-visible",index:2,isActive:s===2,children:[c.jsx(ft.img,{src:Pf,alt:"Celebrating Yaku",className:"w-14 h-14 md:w-32 md:h-32 rounded-2xl shadow-xl mb-3 md:mb-6 object-cover",animate:{scale:[1,1.05,1],rotate:[0,2,0,-2,0]},transition:{duration:4,repeat:1/0,ease:"easeInOut"}}),c.jsx("h2",{className:"text-xl md:text-5xl font-black text-foreground mb-2 md:mb-4",children:t.solution.title}),c.jsx("p",{className:"text-xs md:text-xl text-muted-foreground text-center max-w-xl mb-4 md:mb-10 leading-snug md:leading-relaxed",children:t.solution.desc}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 md:gap-6 max-w-2xl",children:[c.jsx(pu,{icon:my,title:t.solution.f1,desc:t.solution.f1d}),c.jsx(pu,{icon:u_,title:t.solution.f2,desc:t.solution.f2d}),c.jsx(pu,{icon:gr,title:t.solution.f3,desc:t.solution.f3d}),c.jsx(pu,{icon:pO,title:t.solution.f4,desc:t.solution.f4d})]})]})}),c.jsx("div",{ref:l(3),className:u,children:c.jsxs(Ji,{className:"relative overflow-visible",index:3,isActive:s===3,children:[c.jsx("div",{className:"absolute inset-0 z-0 flex items-center justify-center opacity-[0.03] pointer-events-none transform -rotate-6 scale-75 md:scale-90",children:c.jsx("img",{src:_W,alt:"",className:"max-w-2xl w-full h-auto object-contain"})}),c.jsx("h2",{className:"text-2xl md:text-5xl font-black text-foreground mb-2 md:mb-6 z-10",children:t.beneficiaries.title}),c.jsx("p",{className:"text-xs md:text-xl text-muted-foreground text-center max-w-2xl mb-4 md:mb-12 leading-snug md:leading-relaxed z-10",children:xN(t.beneficiaries.subtitle)}),c.jsxs("div",{className:"flex flex-col md:flex-row justify-center items-stretch gap-3 md:gap-6 w-full max-w-5xl px-2 md:px-4 z-10",children:[c.jsx(np,{icon:hO,title:t.beneficiaries.c1t,desc:t.beneficiaries.c1d}),c.jsx(np,{icon:GA,title:t.beneficiaries.c2t,desc:t.beneficiaries.c2d}),c.jsx(np,{icon:tf,title:t.beneficiaries.c3t,desc:t.beneficiaries.c3d})]})]})}),c.jsx("div",{ref:l(4),className:u,children:c.jsxs(Ji,{index:4,isActive:s===4,children:[c.jsx("h2",{className:"text-3xl md:text-5xl font-black text-foreground mb-12",children:t.team.title}),c.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8 md:gap-16",children:[c.jsx(hu,{initials:"RG",name:"Rosmel",image:CW}),c.jsx(hu,{initials:"NP",name:"Natalia",image:EW}),c.jsx(hu,{initials:"MR",name:"Milagros",image:Hl}),c.jsx(hu,{initials:"AC",name:"Arturo",image:Hl})]})]})}),c.jsx("div",{ref:l(5),className:u,children:c.jsxs(Ji,{index:5,className:"md:pt-20",isActive:s===5,children:[c.jsx("h2",{className:"text-3xl md:text-5xl font-black text-foreground mb-10",children:t.app.title}),c.jsxs("div",{className:"mb-8 z-10 flex flex-col items-center",children:[c.jsx("div",{className:"p-4 bg-white rounded-3xl shadow-xl border border-slate-100 group hover:scale-105 transition-transform duration-300",children:c.jsx("img",{src:TW,alt:"Scan to discover Yaku",className:"w-32 h-32 md:w-48 md:h-48 object-contain"})}),c.jsxs("div",{className:"mt-4 flex items-center justify-center gap-3 z-10 text-sm font-bold tracking-wide",children:[c.jsxs("a",{href:"https://yakua
471pp.lovable.app",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-slate-600 hover:text-primary transition-colors",children:[c.jsx("img",{src:"/tech/lovable.svg",alt:"",className:"w-4 h-4"}),c.jsx("span",{children:"yakuapp.lovable.app"})]}),c.jsx("span",{className:"text-slate-300",children:"|"}),c.jsx("a",{href:"https://yaku.today",target:"_blank",rel:"noopener noreferrer",className:"text-yaku-arctic hover:underline hover:brightness-110 transition-all font-black",children:"yaku.today"})]})]}),c.jsx("button",{onClick:()=>o("/login"),className:"px-10 py-4 rounded-xl bg-primary text-primary-foreground font-bold text-base md:text-lg shadow-yaku hover:brightness-110 transition-all z-10 mb-12",children:t.app.cta}),c.jsx("div",{className:"w-full",children:c.jsx(kW,{})})]})})]})}const DW=new vM,IW=()=>c.jsx(kM,{client:DW,children:c.jsx(m$,{children:c.jsx(y$,{children:c.jsxs(tM,{children:[c.jsx(QO,{}),c.jsx(jD,{}),c.jsx(OL,{children:c.jsxs(CL,{children:[c.jsx(an,{path:"/",element:c.jsx(n8,{})}),c.jsx(an,{path:"/login",element:c.jsx(r8,{})}),c.jsx(an,{path:"/pitch",element:c.jsx(OW,{})}),c.jsx(an,{element:c.jsx(lB,{}),children:c.jsxs(an,{element:c.jsx(aB,{}),children:[c.jsx(an,{path:"/today",element:c.jsx(_8,{})}),c.jsx(an,{path:"/explore",element:c.jsx(K8,{})}),c.jsx(an,{path:"/place",element:c.jsx(bW,{})}),c.jsx(an,{path:"/history",element:c.jsx(hW,{})}),c.jsx(an,{path:"/ranking",element:c.jsx(gW,{})}),c.jsx(an,{path:"/profile",element:c.jsx(lW,{})})]})}),c.jsx(an,{path:"*",element:c.jsx(yW,{})})]})})]})})})});Ek(document.getElementById("root")).render(c.jsx(IW,{}))});export default MW();
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.