vendor: 5,914 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mapbox-gl-Brc2MXa0.css"])))=>i.map(i=>d[i]); 2var xp=e=>{throw TypeError(e)};var eu=(e,t,r)=>t.has(e)||xp("Cannot "+r);var k=(e,t,r)=>(eu(e,t,"read from private field"),r?r.call(e):t.get(e)),G=(e,t,r)=>t.has(e)?xp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),z=(e,t,r,n)=>(eu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),te=(e,t,r)=>(eu(e,t,"access private method"),r);var ba=(e,t,r,n)=>({set _(s){z(e,t,s,r)},get _(){return k(e,t,n)}});function F1(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(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 n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var a4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jv={exports:{}},dc={},Nv={exports:{}},Z={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var sa=Symbol.for("react.element"),z1=Symbol.for("react.portal"),B1=Symbol.for("react.fragment"),H1=Symbol.for("react.strict_mode"),W1=Symbol.for("react.profiler"),V1=Symbol.for("react.provider"),q1=Symbol.for("react.context"),K1=Symbol.for("react.forward_ref"),G1=Symbol.for("react.suspense"),Q1=Symbol.for("react.memo"),J1=Symbol.for("react.lazy"),_p=Symbol.iterator;function Y1(e){return e===null||typeof e!="object"?null:(e=_p&&e[_p]||e["@@iterator"],typeof e=="function"?e:null)}var Pv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Av=Object.assign,Ov={};function Ni(e,t,r){this.props=e,this.context=t,this.refs=Ov,this.updater=r||Pv}Ni.prototype.isReactComponent={};Ni.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")};Ni.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Iv(){}Iv.prototype=Ni.prototype;function Nh(e,t,r){this.props=e,this.context=t,this.refs=Ov,this.updater=r||Pv}var Ph=Nh.prototype=new Iv;Ph.constructor=Nh;Av(Ph,Ni.prototype);Ph.isPureReactComponent=!0;var Sp=Array.isArray,Lv=Object.prototype.hasOwnProperty,Ah={current:null},$v={key:!0,ref:!0,__self:!0,__source:!0};function Dv(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Lv.call(t,n)&&!$v.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:sa,type:e,key:i,ref:o,props:s,_owner:Ah.current}}function X1(e,t){return{$$typeof:sa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Oh(e){return typeof e=="object"&&e!==null&&e.$$typeof===sa}function Z1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Ep=/\/+/g;function tu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Z1(""+e.key):t.toString(36)}function tl(e,t,r,n,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 sa:case z1:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+tu(o,0):n,Sp(s)?(r="",e!=null&&(r=e.replace(Ep,"$&/")+"/"),tl(s,t,r,"",function(c){return c})):s!=null&&(Oh(s)&&(s=X1(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Ep,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",Sp(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+tu(i,a);o+=tl(i,t,r,l,s)}else if(l=Y1(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+tu(i,a++),o+=tl(i,t,r,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 xa(e,t,r){if(e==null)return e;var n=[],s=0;return tl(e,n,"","",function(i){return t.call(r,i,s++)}),n}function e_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ze={current:null},rl={transition:null},t_={ReactCurrentDispatcher:Ze,ReactCurrentBatchConfig:rl,ReactCurrentOwner:Ah};function Mv(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 4,141 bytes, lines 10-26
10Z.Children={map:xa,forEach:function(e,t,r){xa(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return xa(e,function(){t++}),t},toArray:function(e){return xa(e,function(t){return t})||[]},only:function(e){if(!Oh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=Ni;Z.Fragment=B1;Z.Profiler=W1;Z.PureComponent=Nh;Z.StrictMode=H1;Z.Suspense=G1;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t_;Z.act=Mv;Z.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Av({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Ah.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Lv.call(t,l)&&!$v.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:sa,type:e.type,key:s,ref:i,props:n,_owner:o}};Z.createContext=function(e){return e={$$typeof:q1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:V1,_context:e},e.Consumer=e};Z.createElement=Dv;Z.createFactory=function(e){var t=Dv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:K1,render:e}};Z.isValidElement=Oh;Z.lazy=function(e){return{$$typeof:J1,_payload:{_status:-1,_result:e},_init:e_}};Z.memo=function(e,t){return{$$typeof:Q1,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=rl.transition;rl.transition={};try{e()}finally{rl.transition=t}};Z.unstable_act=Mv;Z.useCallback=function(e,t){return Ze.current.useCallback(e,t)};Z.useContext=function(e){return Ze.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return Ze.current.useDeferredValue(e)};Z.useEffect=function(e,t){return Ze.current.useEffect(e,t)};Z.useId=function(){return Ze.current.useId()};Z.useImperativeHandle=function(e,t,r){return Ze.current.useImperativeHandle(e,t,r)};Z.useInsertionEffect=function(e,t){return Ze.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return Ze.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return Ze.current.useMemo(e,t)};Z.useReducer=function(e,t,r){return Ze.current.useReducer(e,t,r)};Z.useRef=function(e){return Ze.current.useRef(e)};Z.useState=function(e){return Ze.current.useState(e)};Z.useSyncExternalStore=function(e,t,r){return Ze.current.useSyncExternalStore(e,t,r)};Z.useTransition=function(){return Ze.current.useTransition()};Z.version="18.3.1";Nv.exports=Z;var y=Nv.exports;const O=Rv(y),Ih=F1({__proto__:null,default:O},[y]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var r_=y,n_=Symbol.for("react.element"),s_=Symbol.for("react.fragment"),i_=Object.prototype.hasOwnProperty,o_=r_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a_={key:!0,ref:!0,__self:!0,__source:!0};function Uv(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)i_.call(t,n)&&!a_.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:n_,type:e,key:i,ref:o,props:s,_owner:o_.current}}dc.Fragment=s_;dc.jsx=Uv;dc.jsxs=Uv;jv.exports=dc;var d=jv.exports,Fv={exports:{}},yt={},zv={exports:{}},Bv={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(j,A){var M=j.length;j.push(A);e:for(;0<M;){var W=M-1>>>1,H=j[W];if(0<s(H,A))j[W]=A,j[M]=H,M=W;else break e}}function r(j){return j.length===0?null:j[0]}
vendor: 10,467 bytes, lines 26-35
26function n(j){if(j.length===0)return null;var A=j[0],M=j.pop();if(M!==A){j[0]=M;e:for(var W=0,H=j.length,X=H>>>1;W<X;){var ee=2*(W+1)-1,Te=j[ee],Be=ee+1,ae=j[Be];if(0>s(Te,M))Be<H&&0>s(ae,Te)?(j[W]=ae,j[Be]=M,W=Be):(j[W]=Te,j[ee]=M,W=ee);else if(Be<H&&0>s(ae,M))j[W]=ae,j[Be]=M,W=Be;else break e}}return A}function s(j,A){var M=j.sortIndex-A.sortIndex;return M!==0?M:j.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],h=1,u=null,p=3,f=!1,x=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(j){for(var A=r(c);A!==null;){if(A.callback===null)n(c);else if(A.startTime<=j)n(c),A.sortIndex=A.expirationTime,t(l,A);else break;A=r(c)}}function _(j){if(m=!1,w(j),!x)if(r(l)!==null)x=!0,K(S);else{var A=r(c);A!==null&&Q(_,A.startTime-j)}}function S(j,A){x=!1,m&&(m=!1,v(T),T=-1),f=!0;var M=p;try{for(w(A),u=r(l);u!==null&&(!(u.expirationTime>A)||j&&!B());){var W=u.callback;if(typeof W=="function"){u.callback=null,p=u.priorityLevel;var H=W(u.expirationTime<=A);A=e.unstable_now(),typeof H=="function"?u.callback=H:u===r(l)&&n(l),w(A)}else n(l);u=r(l)}if(u!==null)var X=!0;else{var ee=r(c);ee!==null&&Q(_,ee.startTime-A),X=!1}return X}finally{u=null,p=M,f=!1}}var E=!1,C=null,T=-1,R=5,P=-1;function B(){return!(e.unstable_now()-P<R)}function N(){if(C!==null){var j=e.unstable_now();P=j;var A=!0;try{A=C(!0,j)}finally{A?$():(E=!1,C=null)}}else E=!1}var $;if(typeof g=="function")$=function(){g(N)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,q=L.port2;L.port1.onmessage=N,$=function(){q.postMessage(null)}}else $=function(){b(N,0)};function K(j){C=j,E||(E=!0,$())}function Q(j,A){T=b(function(){j(e.unstable_now())},A)}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(j){j.callback=null},e.unstable_continueExecution=function(){x||f||(x=!0,K(S))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(j){switch(p){case 1:case 2:case 3:var A=3;break;default:A=p}var M=p;p=A;try{return j()}finally{p=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,A){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var M=p;p=j;try{return A()}finally{p=M}},e.unstable_scheduleCallback=function(j,A,M){var W=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?W+M:W):M=W,j){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=M+H,j={id:h++,callback:A,priorityLevel:j,startTime:M,expirationTime:H,sortIndex:-1},M>W?(j.sortIndex=M,t(c,j),r(l)===null&&j===r(c)&&(m?(v(T),T=-1):m=!0,Q(_,M-W))):(j.sortIndex=H,t(l,j),x||f||(x=!0,K(S))),j},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(j){var A=p;return function(){var M=p;p=A;try{return j.apply(this,arguments)}finally{p=M}}}})(Bv);zv.exports=Bv;var l_=zv.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var c_=y,vt=l_;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Hv=new Set,bo={};function ms(e,t){wi(e,t),wi(e+"Capture",t)}function wi(e,t){for(bo[e]=t,e=0;e<t.length;e++)Hv.add(t[e])}var Nr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zu=Object.prototype.hasOwnProperty,u_=/^[: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]*$/,kp={},Cp={};function d_(e){return Zu.call(Cp,e)?!0:Zu.call(kp,e)?!1:u_.test(e)?Cp[e]=!0:(kp[e]=!0,!1)}function h_(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function f_(e,t,r,n){if(t===null||typeof t>"u"||h_(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var ze={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ze[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ze[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ze[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ze[e]=new et(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){ze[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ze[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ze[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ze[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ze[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Lh=/[\-:]([a-z])/g;function $h(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(Lh,$h);ze[t]=new et(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(Lh,$h);ze[t]=new et(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(Lh,$h);ze[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ze[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});ze.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ze[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dh(e,t,r,n){var s=ze.hasOwnProperty(t)?ze[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(f_(t,r,s,n)&&(r=null),n||s===null?d_(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Dr=c_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_a=Symbol.for("react.element"),Ls=Symbol.for("react.portal"),$s=Symbol.for("react.fragment"),Mh=Symbol.for("react.strict_mode"),ed=Symbol.for("react.profiler"),Wv=Symbol.for("react.provider"),Vv=Symbol.for("react.context"),Uh=Symbol.for("react.forward_ref"),td=Symbol.for("react.suspense"),rd=Symbol.for("react.suspense_list"),Fh=Symbol.for("react.memo"),Jr=Symbol.for("react.lazy"),qv=Symbol.for("react.offscreen"),Tp=Symbol.iterator;function zi(e){return e===null||typeof e!="object"?null:(e=Tp&&e[Tp]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Object.assign,ru;function Zi(e){if(ru===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);ru=t&&t[1]||""}return` 35`+ru+e}var nu=!1;function su(e,t){if(!e||nu)return"";nu=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}
vendor: 14,090 bytes, lines 35-38
35catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(` 36`),i=n.stack.split(` 37`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 38`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{nu=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Zi(e):""}function p_(e){switch(e.tag){case 5:return Zi(e.type);case 16:return Zi("Lazy");case 13:return Zi("Suspense");case 19:return Zi("SuspenseList");case 0:case 2:case 15:return e=su(e.type,!1),e;case 11:return e=su(e.type.render,!1),e;case 1:return e=su(e.type,!0),e;default:return""}}function nd(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 $s:return"Fragment";case Ls:return"Portal";case ed:return"Profiler";case Mh:return"StrictMode";case td:return"Suspense";case rd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vv:return(e.displayName||"Context")+".Consumer";case Wv:return(e._context.displayName||"Context")+".Provider";case Uh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fh:return t=e.displayName||null,t!==null?t:nd(e.type)||"Memo";case Jr:t=e._payload,e=e._init;try{return nd(e(t))}catch{}}return null}function m_(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 nd(t);case 8:return t===Mh?"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 kn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function g_(e){var t=Kv(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sa(e){e._valueTracker||(e._valueTracker=g_(e))}function Gv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Kv(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function xl(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 sd(e,t){var r=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Rp(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=kn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Qv(e,t){t=t.checked,t!=null&&Dh(e,"checked",t,!1)}function id(e,t){Qv(e,t);var r=kn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?od(e,t.type,r):t.hasOwnProperty("defaultValue")&&od(e,t.type,kn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jp(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function od(e,t,r){(t!=="number"||xl(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var eo=Array.isArray;function Ks(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+kn(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ad(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return xe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Np(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(I(92));if(eo(r)){if(1<r.length)throw Error(I(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:kn(r)}}function Jv(e,t){var r=kn(t.value),n=kn(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Pp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Yv(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 ld(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Yv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ea,Xv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ea=Ea||document.createElement("div"),Ea.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ea.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xo(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ao={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},v_=["Webkit","ms","Moz","O"];Object.keys(ao).forEach(function(e){v_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ao[t]=ao[e]})});function Zv(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ao.hasOwnProperty(e)&&ao[e]?(""+t).trim():t+"px"}function ey(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Zv(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var y_=xe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function cd(e,t){if(t){if(y_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function ud(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 dd=null;function zh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hd=null,Gs=null,Qs=null;function Ap(e){if(e=aa(e)){if(typeof hd!="function")throw Error(I(280));var t=e.stateNode;t&&(t=gc(t),hd(e.stateNode,e.type,t))}}function ty(e){Gs?Qs?Qs.push(e):Qs=[e]:Gs=e}function ry(){if(Gs){var e=Gs,t=Qs;if(Qs=Gs=null,Ap(e),t)for(e=0;e<t.length;e++)Ap(t[e])}}function ny(e,t){return e(t)}function sy(){}var iu=!1;function iy(e,t,r){if(iu)return e(t,r);iu=!0;try{return ny(e,t,r)}finally{iu=!1,(Gs!==null||Qs!==null)&&(sy(),ry())}}function _o(e,t){var r=e.stateNode;if(r===null)return null;var n=gc(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(I(231,t,typeof r));return r}var fd=!1;if(Nr)try{var Bi={};Object.defineProperty(Bi,"passive",{get:function(){fd=!0}}),window.addEventListener("test",Bi,Bi),window.removeEventListener("test",Bi,Bi)}catch{fd=!1}function w_(e,t,r,n,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(h){this.onError(h)}}var lo=!1,_l=null,Sl=!1,pd=null,b_={onError:function(e){lo=!0,_l=e}};function x_(e,t,r,n,s,i,o,a,l){lo=!1,_l=null,w_.apply(b_,arguments)}function __(e,t,r,n,s,i,o,a,l){if(x_.apply(this,arguments),lo){if(lo){var c=_l;lo=!1,_l=null}else throw Error(I(198));Sl||(Sl=!0,pd=c)}}function gs(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function oy(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 Op(e){if(gs(e)!==e)throw Error(I(188))}function S_(e){var t=e.alternate;if(!t){if(t=gs(e),t===null)throw Error(I(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return Op(s),e;if(i===n)return Op(s),t;i=i.sibling}throw Error(I(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(I(189))}}if(r.alternate!==n)throw Error(I(190))}if(r.tag!==3)throw Error(I(188));return r.stateNode.current===r?e:t}function ay(e){return e=S_(e),e!==null?ly(e):null}function ly(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ly(e);if(t!==null)return t;e=e.sibling}return null}var cy=vt.unstable_scheduleCallback,Ip=vt.unstable_cancelCallback,E_=vt.unstable_shouldYield,k_=vt.unstable_requestPaint,Ce=vt.unstable_now,C_=vt.unstable_getCurrentPriorityLevel,Bh=vt.unstable_ImmediatePriority,uy=vt.unstable_UserBlockingPriority,El=vt.unstable_NormalPriority,T_=vt.unstable_LowPriority,dy=vt.unstable_IdlePriority,hc=null,cr=null;function R_(e){if(cr&&typeof cr.onCommitFiberRoot=="function")try{cr.onCommitFiberRoot(hc,e,void 0,(e.current.flags&128)===128)}catch{}}var qt=Math.clz32?Math.clz32:P_,j_=Math.log,N_=Math.LN2;function P_(e){return e>>>=0,e===0?32:31-(j_(e)/N_|0)|0}var ka=64,Ca=4194304;function to(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 kl(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=to(a):(i&=o,i!==0&&(n=to(i)))}else o=r&~s,o!==0?n=to(o):i!==0&&(n=to(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-qt(t),s=1<<r,n|=e[r],t&=~s;return n}function A_(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 O_(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-qt(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=A_(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function md(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function hy(){var e=ka;return ka<<=1,!(ka&4194240)&&(ka=64),e}function ou(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 38
38function ia(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-qt(t),e[t]=r}function I_(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-qt(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function Hh(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-qt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ce=0;function fy(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var py,Wh,my,gy,vy,gd=!1,Ta=[],pn=null,mn=null,gn=null,So=new Map,Eo=new Map,Xr=[],L_="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 Lp(e,t){switch(e){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":gn=null;break;case"pointerover":case"pointerout":So.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Eo.delete(t.pointerId)}}function Hi(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=aa(t),t!==null&&Wh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function $_(e,t,r,n,s){switch(t){case"focusin":return pn=Hi(pn,e,t,r,n,s),!0;case"dragenter":return mn=Hi(mn,e,t,r,n,s),!0;case"mouseover":return gn=Hi(gn,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return So.set(i,Hi(So.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,Eo.set(i,Hi(Eo.get(i)||null,e,t,r,n,s)),!0}return!1}function yy(e){var t=Hn(e.target);if(t!==null){var r=gs(t);if(r!==null){if(t=r.tag,t===13){if(t=oy(r),t!==null){e.blockedOn=t,vy(e.priority,function(){my(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function nl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=vd(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);dd=n,r.target.dispatchEvent(n),dd=null}else return t=aa(r),t!==null&&Wh(t),e.blockedOn=r,!1;t.shift()}return!0}function $p(e,t,r){nl(e)&&r.delete(t)}function D_(){gd=!1,pn!==null&&nl(pn)&&(pn=null),mn!==null&&nl(mn)&&(mn=null),gn!==null&&nl(gn)&&(gn=null),So.forEach($p),Eo.forEach($p)}function Wi(e,t){e.blockedOn===t&&(e.blockedOn=null,gd||(gd=!0,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,D_)))}function ko(e){function t(s){return Wi(s,e)}if(0<Ta.length){Wi(Ta[0],e);for(var r=1;r<Ta.length;r++){var n=Ta[r];n.blockedOn===e&&(n.blockedOn=null)}}for(pn!==null&&Wi(pn,e),mn!==null&&Wi(mn,e),gn!==null&&Wi(gn,e),So.forEach(t),Eo.forEach(t),r=0;r<Xr.length;r++)n=Xr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Xr.length&&(r=Xr[0],r.blockedOn===null);)yy(r),r.blockedOn===null&&Xr.shift()}var Js=Dr.ReactCurrentBatchConfig,Cl=!0;function M_(e,t,r,n){var s=ce,i=Js.transition;Js.transition=null;try{ce=1,Vh(e,t,r,n)}finally{ce=s,Js.transition=i}}function U_(e,t,r,n){var s=ce,i=Js.transition;Js.transition=null;try{ce=4,Vh(e,t,r,n)}finally{ce=s,Js.transition=i}}function Vh(e,t,r,n){if(Cl){var s=vd(e,t,r,n);if(s===null)gu(e,t,n,Tl,r),Lp(e,n);else if($_(s,e,t,r,n))n.stopPropagation();else if(Lp(e,n),t&4&&-1<L_.indexOf(e)){for(;s!==null;){var i=aa(s);if(i!==null&&py(i),i=vd(e,t,r,n),i===null&&gu(e,t,n,Tl,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else gu(e,t,n,null,r)}}var Tl=null;function vd(e,t,r,n){if(Tl=null,e=zh(n),e=Hn(e),e!==null)if(t=gs(e),t===null)e=null;else if(r=t.tag,r===13){if(e=oy(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Tl=e,null}
vendor: 10,401 bytes, line 38
38function wy(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(C_()){case Bh:return 1;case uy:return 4;case El:case T_:return 16;case dy:return 536870912;default:return 16}default:return 16}}var dn=null,qh=null,sl=null;function by(){if(sl)return sl;var e,t=qh,r=t.length,n,s="value"in dn?dn.value:dn.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[i-n];n++);return sl=s.slice(e,1<n?1-n:void 0)}function il(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 Ra(){return!0}function Dp(){return!1}function wt(e){function t(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ra:Dp,this.isPropagationStopped=Dp,this}return xe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ra)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ra)},persist:function(){},isPersistent:Ra}),t}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kh=wt(Pi),oa=xe({},Pi,{view:0,detail:0}),F_=wt(oa),au,lu,Vi,fc=xe({},oa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gh,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!==Vi&&(Vi&&e.type==="mousemove"?(au=e.screenX-Vi.screenX,lu=e.screenY-Vi.screenY):lu=au=0,Vi=e),au)},movementY:function(e){return"movementY"in e?e.movementY:lu}}),Mp=wt(fc),z_=xe({},fc,{dataTransfer:0}),B_=wt(z_),H_=xe({},oa,{relatedTarget:0}),cu=wt(H_),W_=xe({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),V_=wt(W_),q_=xe({},Pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),K_=wt(q_),G_=xe({},Pi,{data:0}),Up=wt(G_),Q_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J_={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"},Y_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Y_[e])?!!t[e]:!1}function Gh(){return X_}var Z_=xe({},oa,{key:function(e){if(e.key){var t=Q_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=il(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?J_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gh,charCode:function(e){return e.type==="keypress"?il(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?il(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eS=wt(Z_),tS=xe({},fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fp=wt(tS),rS=xe({},oa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gh}),nS=wt(rS),sS=xe({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),iS=wt(sS),oS=xe({},fc,{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}),aS=wt(oS),lS=[9,13,27,32],Qh=Nr&&"CompositionEvent"in window,co=null;Nr&&"documentMode"in document&&(co=document.documentMode);var cS=Nr&&"TextEvent"in window&&!co,xy=Nr&&(!Qh||co&&8<co&&11>=co),zp=" ",Bp=!1;function _y(e,t){switch(e){case"keyup":return lS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ds=!1;function uS(e,t){switch(e){case"compositionend":return Sy(t);case"keypress":return t.which!==32?null:(Bp=!0,zp);case"textInput":return e=t.data,e===zp&&Bp?null:e;default:return null}}function dS(e,t){if(Ds)return e==="compositionend"||!Qh&&_y(e,t)?(e=by(),sl=qh=dn=null,Ds=!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 xy&&t.locale!=="ko"?null:t.data;default:return null}}var hS={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 Hp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hS[e.type]:t==="textarea"}function Ey(e,t,r,n){ty(n),t=Rl(t,"onChange"),0<t.length&&(r=new Kh("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var uo=null,Co=null;function fS(e){Ly(e,0)}function pc(e){var t=Fs(e);if(Gv(t))return e}function pS(e,t){if(e==="change")return t}var ky=!1;if(Nr){var uu;if(Nr){var du="oninput"in document;if(!du){var Wp=document.createElement("div");Wp.setAttribute("oninput","return;"),du=typeof Wp.oninput=="function"}uu=du}else uu=!1;ky=uu&&(!document.documentMode||9<document.documentMode)}function Vp(){uo&&(uo.detachEvent("onpropertychange",Cy),Co=uo=null)}function Cy(e){if(e.propertyName==="value"&&pc(Co)){var t=[];Ey(t,Co,e,zh(e)),iy(fS,t)}}function mS(e,t,r){e==="focusin"?(Vp(),uo=t,Co=r,uo.attachEvent("onpropertychange",Cy)):e==="focusout"&&Vp()}function gS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pc(Co)}function vS(e,t){if(e==="click")return pc(t)}function yS(e,t){if(e==="input"||e==="change")return pc(t)}function wS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gt=typeof Object.is=="function"?Object.is:wS;function To(e,t){if(Gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Zu.call(t,s)||!Gt(e[s],t[s]))return!1}return!0}function qp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kp(e,t){var r=qp(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=qp(r)}}function Ty(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ty(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ry(){for(var e=window,t=xl();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=xl(e.document)}return t}function Jh(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 bS(e){var t=Ry(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Ty(r.ownerDocument.documentElement,r)){if(n!==null&&Jh(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=Kp(r,i);var o=Kp(r,n);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>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var xS=Nr&&"documentMode"in document&&11>=document.documentMode,Ms=null,yd=null,ho=null,wd=!1;function Gp(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;wd||Ms==null||Ms!==xl(n)||(n=Ms,"selectionStart"in n&&Jh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 38
38sNode:n.focusNode,focusOffset:n.focusOffset}),ho&&To(ho,n)||(ho=n,n=Rl(yd,"onSelect"),0<n.length&&(t=new Kh("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ms)))}function ja(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Us={animationend:ja("Animation","AnimationEnd"),animationiteration:ja("Animation","AnimationIteration"),animationstart:ja("Animation","AnimationStart"),transitionend:ja("Transition","TransitionEnd")},hu={},jy={};Nr&&(jy=document.createElement("div").style,"AnimationEvent"in window||(delete Us.animationend.animation,delete Us.animationiteration.animation,delete Us.animationstart.animation),"TransitionEvent"in window||delete Us.transitionend.transition);function mc(e){if(hu[e])return hu[e];if(!Us[e])return e;var t=Us[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in jy)return hu[e]=t[r];return e}var Ny=mc("animationend"),Py=mc("animationiteration"),Ay=mc("animationstart"),Oy=mc("transitionend"),Iy=new Map,Qp="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 Pn(e,t){Iy.set(e,t),ms(t,[e])}for(var fu=0;fu<Qp.length;fu++){var pu=Qp[fu],_S=pu.toLowerCase(),SS=pu[0].toUpperCase()+pu.slice(1);Pn(_S,"on"+SS)}Pn(Ny,"onAnimationEnd");Pn(Py,"onAnimationIteration");Pn(Ay,"onAnimationStart");Pn("dblclick","onDoubleClick");Pn("focusin","onFocus");Pn("focusout","onBlur");Pn(Oy,"onTransitionEnd");wi("onMouseEnter",["mouseout","mouseover"]);wi("onMouseLeave",["mouseout","mouseover"]);wi("onPointerEnter",["pointerout","pointerover"]);wi("onPointerLeave",["pointerout","pointerover"]);ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ms("onBeforeInput",["compositionend","keypress","textInput","paste"]);ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ro="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ES=new Set("cancel close invalid load scroll toggle".split(" ").concat(ro));function Jp(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,__(n,t,void 0,e),e.currentTarget=null}function Ly(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Jp(s,a,c),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Jp(s,a,c),i=l}}}if(Sl)throw e=pd,Sl=!1,pd=null,e}function pe(e,t){var r=t[Ed];r===void 0&&(r=t[Ed]=new Set);var n=e+"__bubble";r.has(n)||($y(t,e,2,!1),r.add(n))}function mu(e,t,r){var n=0;t&&(n|=4),$y(r,e,n,t)}var Na="_reactListening"+Math.random().toString(36).slice(2);function Ro(e){if(!e[Na]){e[Na]=!0,Hv.forEach(function(r){r!=="selectionchange"&&(ES.has(r)||mu(r,!1,e),mu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Na]||(t[Na]=!0,mu("selectionchange",!1,t))}}function $y(e,t,r,n){switch(wy(t)){case 1:var s=M_;break;case 4:s=U_;break;default:s=Vh}r=s.bind(null,t,r,e),s=void 0,!fd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function gu(e,t,r,n,s){var i=n;
vendor: 6,280 bytes, lines 38-39
38if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.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=Hn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}iy(function(){var c=i,h=zh(r),u=[];e:{var p=Iy.get(e);if(p!==void 0){var f=Kh,x=e;switch(e){case"keypress":if(il(r)===0)break e;case"keydown":case"keyup":f=eS;break;case"focusin":x="focus",f=cu;break;case"focusout":x="blur",f=cu;break;case"beforeblur":case"afterblur":f=cu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Mp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=B_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=nS;break;case Ny:case Py:case Ay:f=V_;break;case Oy:f=iS;break;case"scroll":f=F_;break;case"wheel":f=aS;break;case"copy":case"cut":case"paste":f=K_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Fp}var m=(t&4)!==0,b=!m&&e==="scroll",v=m?p!==null?p+"Capture":null:p;m=[];for(var g=c,w;g!==null;){w=g;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,v!==null&&(_=_o(g,v),_!=null&&m.push(jo(g,_,w)))),b)break;g=g.return}0<m.length&&(p=new f(p,x,null,r,h),u.push({event:p,listeners:m}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==dd&&(x=r.relatedTarget||r.fromElement)&&(Hn(x)||x[Pr]))break e;if((f||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,f?(x=r.relatedTarget||r.toElement,f=c,x=x?Hn(x):null,x!==null&&(b=gs(x),x!==b||x.tag!==5&&x.tag!==6)&&(x=null)):(f=null,x=c),f!==x)){if(m=Mp,_="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=Fp,_="onPointerLeave",v="onPointerEnter",g="pointer"),b=f==null?p:Fs(f),w=x==null?p:Fs(x),p=new m(_,g+"leave",f,r,h),p.target=b,p.relatedTarget=w,_=null,Hn(h)===c&&(m=new m(v,g+"enter",x,r,h),m.target=w,m.relatedTarget=b,_=m),b=_,f&&x)t:{for(m=f,v=x,g=0,w=m;w;w=Es(w))g++;for(w=0,_=v;_;_=Es(_))w++;for(;0<g-w;)m=Es(m),g--;for(;0<w-g;)v=Es(v),w--;for(;g--;){if(m===v||v!==null&&m===v.alternate)break t;m=Es(m),v=Es(v)}m=null}else m=null;f!==null&&Yp(u,p,f,m,!1),x!==null&&b!==null&&Yp(u,b,x,m,!0)}}e:{if(p=c?Fs(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var S=pS;else if(Hp(p))if(ky)S=yS;else{S=gS;var E=mS}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(S=vS);if(S&&(S=S(e,c))){Ey(u,S,r,h);break e}E&&E(e,p,c),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&od(p,"number",p.value)}switch(E=c?Fs(c):window,e){case"focusin":(Hp(E)||E.contentEditable==="true")&&(Ms=E,yd=c,ho=null);break;case"focusout":ho=yd=Ms=null;break;case"mousedown":wd=!0;break;case"contextmenu":case"mouseup":case"dragend":wd=!1,Gp(u,r,h);break;case"selectionchange":if(xS)break;case"keydown":case"keyup":Gp(u,r,h)}var C;if(Qh)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Ds?_y(e,r)&&(T="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(xy&&r.locale!=="ko"&&(Ds||T!=="onCompositionStart"?T==="onCompositionEnd"&&Ds&&(C=by()):(dn=h,qh="value"in dn?dn.value:dn.textContent,Ds=!0)),E=Rl(c,T),0<E.length&&(T=new Up(T,e,null,r,h),u.push({event:T,listeners:E}),C?T.data=C:(C=Sy(r),C!==null&&(T.data=C)))),(C=cS?uS(e,r):dS(e,r))&&(c=Rl(c,"onBeforeInput"),0<c.length&&(h=new Up("onBeforeInput","beforeinput",null,r,h),u.push({event:h,listeners:c}),h.data=C))}Ly(u,t)})}function jo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Rl(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=_o(e,r),i!=null&&n.unshift(jo(e,i,s)),i=_o(e,t),i!=null&&n.push(jo(e,i,s))),e=e.return}return n}function Es(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Yp(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,s?(l=_o(r,i),l!=null&&o.unshift(jo(r,l,a))):s||(l=_o(r,i),l!=null&&o.push(jo(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var kS=/\r\n?/g,CS=/\u0000|\uFFFD/g;function Xp(e){return(typeof e=="string"?e:""+e).replace(kS,` 39`).replace(CS,"")}function Pa(e,t,r){if(t=Xp(t),Xp(e)!==t&&r)throw Error(I(425))}function jl(){}var bd=null,xd=null;function _d(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 Sd=typeof setTimeout=="function"?setTimeout:void 0,TS=typeof clearTimeout=="function"?clearTimeout:void 0,Zp=typeof Promise=="function"?Promise:void 0,RS=typeof queueMicrotask=="function"?queueMicrotask:typeof Zp<"u"?function(e){return Zp.resolve(null).then(e).catch(jS)}:Sd;function jS(e){setTimeout(function(){throw e})}function vu(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),ko(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);ko(t)}function vn(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 em(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ai=Math.random().toString(36).slice(2),ar="__reactFiber$"+Ai,No="__reactProps$"+Ai,Pr="__reactContainer$"+Ai,Ed="__reactEvents$"+Ai,NS="__reactListeners$"+Ai,PS="__reactHandles$"+Ai;function Hn(e){var t=e[ar];
vendor: 3,947 bytes, line 39
39if(t)return t;for(var r=e.parentNode;r;){if(t=r[Pr]||r[ar]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=em(e);e!==null;){if(r=e[ar])return r;e=em(e)}return t}e=r,r=e.parentNode}return null}function aa(e){return e=e[ar]||e[Pr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function gc(e){return e[No]||null}var kd=[],zs=-1;function An(e){return{current:e}}function me(e){0>zs||(e.current=kd[zs],kd[zs]=null,zs--)}function he(e,t){zs++,kd[zs]=e.current,e.current=t}var Cn={},Ge=An(Cn),lt=An(!1),os=Cn;function bi(e,t){var r=e.type.contextTypes;if(!r)return Cn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ct(e){return e=e.childContextTypes,e!=null}function Nl(){me(lt),me(Ge)}function tm(e,t,r){if(Ge.current!==Cn)throw Error(I(168));he(Ge,t),he(lt,r)}function Dy(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(I(108,m_(e)||"Unknown",s));return xe({},r,n)}function Pl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cn,os=Ge.current,he(Ge,e),he(lt,lt.current),!0}function rm(e,t,r){var n=e.stateNode;if(!n)throw Error(I(169));r?(e=Dy(e,t,os),n.__reactInternalMemoizedMergedChildContext=e,me(lt),me(Ge),he(Ge,e)):me(lt),he(lt,r)}var Er=null,vc=!1,yu=!1;function My(e){Er===null?Er=[e]:Er.push(e)}function AS(e){vc=!0,My(e)}function On(){if(!yu&&Er!==null){yu=!0;var e=0,t=ce;try{var r=Er;for(ce=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Er=null,vc=!1}catch(s){throw Er!==null&&(Er=Er.slice(e+1)),cy(Bh,On),s}finally{ce=t,yu=!1}}return null}var Bs=[],Hs=0,Al=null,Ol=0,Et=[],kt=0,as=null,Tr=1,Rr="";function Un(e,t){Bs[Hs++]=Ol,Bs[Hs++]=Al,Al=e,Ol=t}function Uy(e,t,r){Et[kt++]=Tr,Et[kt++]=Rr,Et[kt++]=as,as=e;var n=Tr;e=Rr;var s=32-qt(n)-1;n&=~(1<<s),r+=1;var i=32-qt(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,Tr=1<<32-qt(t)+s|r<<s|n,Rr=i+e}else Tr=1<<i|r<<s|n,Rr=e}function Yh(e){e.return!==null&&(Un(e,1),Uy(e,1,0))}function Xh(e){for(;e===Al;)Al=Bs[--Hs],Bs[Hs]=null,Ol=Bs[--Hs],Bs[Hs]=null;for(;e===as;)as=Et[--kt],Et[kt]=null,Rr=Et[--kt],Et[kt]=null,Tr=Et[--kt],Et[kt]=null}var mt=null,pt=null,ye=!1,Ht=null;function Fy(e,t){var r=Ct(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function nm(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,mt=e,pt=vn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mt=e,pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=as!==null?{id:Tr,overflow:Rr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Ct(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,mt=e,pt=null,!0):!1;default:return!1}}function Cd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Td(e){if(ye){var t=pt;if(t){var r=t;if(!nm(e,t)){if(Cd(e))throw Error(I(418));t=vn(r.nextSibling);var n=mt;t&&nm(e,t)?Fy(n,r):(e.flags=e.flags&-4097|2,ye=!1,mt=e)}}else{if(Cd(e))throw Error(I(418));e.flags=e.flags&-4097|2,ye=!1,mt=e}}}function sm(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mt=e}function Aa(e){if(e!==mt)return!1;if(!ye)return sm(e),ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!_d(e.type,e.memoizedProps)),t&&(t=pt)){if(Cd(e))throw zy(),Error(I(418));for(;t;)Fy(e,t),t=vn(t.nextSibling)}if(sm(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317)
vendor: 12,508 bytes, line 39
39);e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){pt=vn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}pt=null}}else pt=mt?vn(e.stateNode.nextSibling):null;return!0}function zy(){for(var e=pt;e;)e=vn(e.nextSibling)}function xi(){pt=mt=null,ye=!1}function Zh(e){Ht===null?Ht=[e]:Ht.push(e)}var OS=Dr.ReactCurrentBatchConfig;function qi(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(I(309));var n=r.stateNode}if(!n)throw Error(I(147,e));var s=n,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(I(284));if(!r._owner)throw Error(I(290,e))}return e}function Oa(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function im(e){var t=e._init;return t(e._payload)}function By(e){function t(v,g){if(e){var w=v.deletions;w===null?(v.deletions=[g],v.flags|=16):w.push(g)}}function r(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function n(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=xn(v,g),v.index=0,v.sibling=null,v}function i(v,g,w){return v.index=w,e?(w=v.alternate,w!==null?(w=w.index,w<g?(v.flags|=2,g):w):(v.flags|=2,g)):(v.flags|=1048576,g)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,g,w,_){return g===null||g.tag!==6?(g=ku(w,v.mode,_),g.return=v,g):(g=s(g,w),g.return=v,g)}function l(v,g,w,_){var S=w.type;return S===$s?h(v,g,w.props.children,_,w.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Jr&&im(S)===g.type)?(_=s(g,w.props),_.ref=qi(v,g,w),_.return=v,_):(_=hl(w.type,w.key,w.props,null,v.mode,_),_.ref=qi(v,g,w),_.return=v,_)}function c(v,g,w,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==w.containerInfo||g.stateNode.implementation!==w.implementation?(g=Cu(w,v.mode,_),g.return=v,g):(g=s(g,w.children||[]),g.return=v,g)}function h(v,g,w,_,S){return g===null||g.tag!==7?(g=is(w,v.mode,_,S),g.return=v,g):(g=s(g,w),g.return=v,g)}function u(v,g,w){if(typeof g=="string"&&g!==""||typeof g=="number")return g=ku(""+g,v.mode,w),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case _a:return w=hl(g.type,g.key,g.props,null,v.mode,w),w.ref=qi(v,null,g),w.return=v,w;case Ls:return g=Cu(g,v.mode,w),g.return=v,g;case Jr:var _=g._init;return u(v,_(g._payload),w)}if(eo(g)||zi(g))return g=is(g,v.mode,w,null),g.return=v,g;Oa(v,g)}return null}function p(v,g,w,_){var S=g!==null?g.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(v,g,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _a:return w.key===S?l(v,g,w,_):null;case Ls:return w.key===S?c(v,g,w,_):null;case Jr:return S=w._init,p(v,g,S(w._payload),_)}if(eo(w)||zi(w))return S!==null?null:h(v,g,w,_,null);Oa(v,w)}return null}function f(v,g,w,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return v=v.get(w)||null,a(g,v,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case _a:return v=v.get(_.key===null?w:_.key)||null,l(g,v,_,S);case Ls:return v=v.get(_.key===null?w:_.key)||null,c(g,v,_,S);case Jr:var E=_._init;return f(v,g,w,E(_._payload),S)}if(eo(_)||zi(_))return v=v.get(w)||null,h(g,v,_,S,null);Oa(g,_)}return null}function x(v,g,w,_){for(var S=null,E=null,C=g,T=g=0,R=null;C!==null&&T<w.length;T++){C.index>T?(R=C,C=null):R=C.sibling;var P=p(v,C,w[T],_);if(P===null){C===null&&(C=R);break}e&&C&&P.alternate===null&&t(v,C),g=i(P,g,T),E===null?S=P:E.sibling=P,E=P,C=R}if(T===w.length)return r(v,C),ye&&Un(v,T),S;if(C===null){for(;T<w.length;T++)C=u(v,w[T],_),C!==null&&(g=i(C,g,T),E===null?S=C:E.sibling=C,E=C);return ye&&Un(v,T),S}for(C=n(v,C);T<w.length;T++)R=f(C,v,T,w[T],_),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?T:R.key),g=i(R,g,T),E===null?S=R:E.sibling=R,E=R);return e&&C.forEach(function(B){return t(v,B)}),ye&&Un(v,T),S}function m(v,g,w,_){var S=zi(w);if(typeof S!="function")throw Error(I(150));if(w=S.call(w),w==null)throw Error(I(151));for(var E=S=null,C=g,T=g=0,R=null,P=w.next();C!==null&&!P.done;T++,P=w.next()){C.index>T?(R=C,C=null):R=C.sibling;var B=p(v,C,P.value,_);if(B===null){C===null&&(C=R);break}e&&C&&B.alternate===null&&t(v,C),g=i(B,g,T),E===null?S=B:E.sibling=B,E=B,C=R}if(P.done)return r(v,C),ye&&Un(v,T),S;if(C===null){for(;!P.done;T++,P=w.next())P=u(v,P.value,_),P!==null&&(g=i(P,g,T),E===null?S=P:E.sibling=P,E=P);return ye&&Un(v,T),S}for(C=n(v,C);!P.done;T++,P=w.next())P=f(C,v,T,P.value,_),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?T:P.key),g=i(P,g,T),E===null?S=P:E.sibling=P,E=P);return e&&C.forEach(function(N){return t(v,N)}),ye&&Un(v,T),S}function b(v,g,w,_){if(typeof w=="object"&&w!==null&&w.type===$s&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case _a:e:{for(var S=w.key,E=g;E!==null;){if(E.key===S){if(S=w.type,S===$s){if(E.tag===7){r(v,E.sibling),g=s(E,w.props.children),g.return=v,v=g;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Jr&&im(S)===E.type){r(v,E.sibling),g=s(E,w.props),g.ref=qi(v,E,w),g.return=v,v=g;break e}r(v,E);break}else t(v,E);E=E.sibling}w.type===$s?(g=is(w.props.children,v.mode,_,w.key),g.return=v,v=g):(_=hl(w.type,w.key,w.props,null,v.mode,_),_.ref=qi(v,g,w),_.return=v,v=_)}return o(v);case Ls:e:{for(E=w.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){r(v,g.sibling),g=s(g,w.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else t(v,g);g=g.sibling}g=Cu(w,v.mode,_),g.return=v,v=g}return o(v);case Jr:return E=w._init,b(v,g,E(w._payload),_)}if(eo(w))return x(v,g,w,_);if(zi(w))return m(v,g,w,_);Oa(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(r(v,g.sibling),g=s(g,w),g.return=v,v=g):(r(v,g),g=ku(w,v.mode,_),g.return=v,v=g),o(v)):r(v,g)}return b}var _i=By(!0),Hy=By(!1),Il=An(null),Ll=null,Ws=null,ef=null;function tf(){ef=Ws=Ll=null}function rf(e){var t=Il.current;me(Il),e._currentValue=t}function Rd(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ys(e,t){Ll=e,ef=Ws=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(at=!0),e.firstContext=null)}function Rt(e){var t=e._currentValue;if(ef!==e)if(e={context:e,memoizedValue:t,next:null},Ws===null){if(Ll===null)throw Error(I(308));Ws=e,Ll.dependencies={lanes:0,firstContext:e}}else Ws=Ws.next=e;return t}var Wn=null;function nf(e){Wn===null?Wn=[e]:Wn.push(e)}function Wy(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,nf(t)):(r.next=s.next,s.next=r),t.interleaved=r,Ar(e,n)}function Ar(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Yr=!1;function sf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vy(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 jr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ie&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Ar(e,r)}return s=n.interleaved,s===null?(t.next=t,nf(n)):(t.next=s.next,s.next=t),n.interleaved=t,Ar(e,r)}function ol(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Hh(e,r)}}function om(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function $l(e,t,r,n){var s=e.updateQueue;Yr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=l))}if(i!==null){var u=s.baseState;o=0,h=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((n&p)===p){h!==null&&(h=h.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,m=a;switch(p=t,f=r,m.tag){case 1:if(x=m.payload,typeof x=="function"){u=x.call(f,u,p);break e}u=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=m.payload,p=typeof x=="function"?x.call(f,u,p):x,p==null)break e;u=xe({},u,p);break e;case 2:Yr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=f,l=u):h=h.next=f,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(h===null&&(l=u),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=h,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);cs|=o,e.lanes=o,e.memoizedState=u}}function am(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(I(191,s));s.call(n)}}}var la={},ur=An(la),Po=An(la),Ao=An(la);function Vn(e){if(e===la)throw Error(I(174));return e}function of(e,t){switch(he(Ao,t),he(Po,e),he(ur,la),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ld(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ld(t,e)}me(ur),he(ur,t)}function Si(){me(ur),me(Po),me(Ao)}function qy(e){Vn(Ao.current);var t=Vn(ur.current),r=ld(t,e.type);t!==r&&(he(Po,e),he(ur,r))}function af(e){Po.current===e&&(me(ur),me(Po))}var we=An(0);function Dl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wu=[];function lf(){for(var e=0;e<wu.length;e++)wu[e]._workInProgressVersionPrimary=null;wu.length=0}var al=Dr.ReactCurrentDispatcher,bu=Dr.ReactCurrentBatchConfig,ls=0,be=null,Pe=null,Ie=null,Ml=!1,fo=!1,Oo=0,IS=0;function He(){throw Error(I(321))}function cf(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Gt(e[r],t[r]))return!1;return!0}function uf(e,t,r,n,s,i){if(ls=i,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,al.current=e===null||e.memoizedState===null?MS:US,e=r(n,s),fo){i=0;do{if(fo=!1,Oo=0,25<=i)throw Error(I(301));i+=1,Ie=Pe=null,t.updateQueue=null,al.current=FS,e=r(n,s)}while(fo)}if(al.current=Ul,t=Pe!==null&&Pe.next!==null,ls=0,Ie=Pe=be=null,Ml=!1,t)throw Error(I(300));return e}function df(){var e=Oo!==0;return Oo=0,e}function tr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?be.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function jt(){if(Pe===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=Ie===null?be.memoizedState:Ie.next;if(t!==null)Ie=t,Pe=e;else{if(e===null)throw Error(I(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Ie===null?be.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function Io(e,t){return typeof t=="function"?t(e):t}function xu(e){var t=jt(),r=t.queue;if(r===null)throw Error(I(311));r.lastRenderedReducer=e;
vendor: 5,688 bytes, line 39
39var n=Pe,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,c=i;do{var h=c.lane;if((ls&h)===h)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var u={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,o=n):l=l.next=u,be.lanes|=h,cs|=h}c=c.next}while(c!==null&&c!==i);l===null?o=n:l.next=a,Gt(n,t.memoizedState)||(at=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,be.lanes|=i,cs|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function _u(e){var t=jt(),r=t.queue;if(r===null)throw Error(I(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Gt(i,t.memoizedState)||(at=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function Ky(){}function Gy(e,t){var r=be,n=jt(),s=t(),i=!Gt(n.memoizedState,s);if(i&&(n.memoizedState=s,at=!0),n=n.queue,hf(Yy.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Ie!==null&&Ie.memoizedState.tag&1){if(r.flags|=2048,Lo(9,Jy.bind(null,r,n,s,t),void 0,null),Le===null)throw Error(I(349));ls&30||Qy(r,t,s)}return s}function Qy(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Jy(e,t,r,n){t.value=r,t.getSnapshot=n,Xy(t)&&Zy(e)}function Yy(e,t,r){return r(function(){Xy(t)&&Zy(e)})}function Xy(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Gt(e,r)}catch{return!0}}function Zy(e){var t=Ar(e,1);t!==null&&Kt(t,e,1,-1)}function lm(e){var t=tr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t.queue=e,e=e.dispatch=DS.bind(null,be,e),[t.memoizedState,e]}function Lo(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function e0(){return jt().memoizedState}function ll(e,t,r,n){var s=tr();be.flags|=e,s.memoizedState=Lo(1|t,r,void 0,n===void 0?null:n)}function yc(e,t,r,n){var s=jt();n=n===void 0?null:n;var i=void 0;if(Pe!==null){var o=Pe.memoizedState;if(i=o.destroy,n!==null&&cf(n,o.deps)){s.memoizedState=Lo(t,r,i,n);return}}be.flags|=e,s.memoizedState=Lo(1|t,r,i,n)}function cm(e,t){return ll(8390656,8,e,t)}function hf(e,t){return yc(2048,8,e,t)}function t0(e,t){return yc(4,2,e,t)}function r0(e,t){return yc(4,4,e,t)}function n0(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 s0(e,t,r){return r=r!=null?r.concat([e]):null,yc(4,4,n0.bind(null,t,e),r)}function ff(){}function i0(e,t){var r=jt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&cf(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function o0(e,t){var r=jt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&cf(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function a0(e,t,r){return ls&21?(Gt(r,t)||(r=hy(),be.lanes|=r,cs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,at=!0),e.memoizedState=r)}function LS(e,t){var r=ce;ce=r!==0&&4>r?r:4,e(!0);var n=bu.transition;bu.transition={};try{e(!1),t()}finally{ce=r,bu.transition=n}}function l0(){return jt().memoizedState}function $S(e,t,r){var n=bn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},c0(e))u0(t,r);else if(r=Wy(e,t,r,n),r!==null){var s=Xe();Kt(r,e,n,s),d0(r,t,n)}}function DS(e,t,r){var n=bn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(c0(e))u0(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,r);if(s.hasEagerState=!0,s.eagerState=a,Gt(a,o)){var l=t.interleaved;l===null?(s.next=s,nf(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Wy(e,t,s,n),r!==null&&(s=Xe(),Kt(r,e,n,s),d0(r,t,n))}}function c0(e){var t=e.alternate;return e===be||t!==null&&t===be}function u0(e,t){fo=Ml=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function d0(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Hh(e,r)}}var Ul={readContext:Rt,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},MS={readContext:Rt,useCallback:function(e,t){return tr().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:cm,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ll(4194308,4,n0.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ll(4194308,4,e,t)},useInsertionEffect:function(e,t){return ll(4,2,e,t)},useMemo:function(e,t){var r=tr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=tr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=$S.bind(null,be,e),[n.memoizedState,e]}
vendor: 7,431 bytes, lines 39-41
39,useRef:function(e){var t=tr();return e={current:e},t.memoizedState=e},useState:lm,useDebugValue:ff,useDeferredValue:function(e){return tr().memoizedState=e},useTransition:function(){var e=lm(!1),t=e[0];return e=LS.bind(null,e[1]),tr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=be,s=tr();if(ye){if(r===void 0)throw Error(I(407));r=r()}else{if(r=t(),Le===null)throw Error(I(349));ls&30||Qy(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,cm(Yy.bind(null,n,i,e),[e]),n.flags|=2048,Lo(9,Jy.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=tr(),t=Le.identifierPrefix;if(ye){var r=Rr,n=Tr;r=(n&~(1<<32-qt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Oo++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=IS++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},US={readContext:Rt,useCallback:i0,useContext:Rt,useEffect:hf,useImperativeHandle:s0,useInsertionEffect:t0,useLayoutEffect:r0,useMemo:o0,useReducer:xu,useRef:e0,useState:function(){return xu(Io)},useDebugValue:ff,useDeferredValue:function(e){var t=jt();return a0(t,Pe.memoizedState,e)},useTransition:function(){var e=xu(Io)[0],t=jt().memoizedState;return[e,t]},useMutableSource:Ky,useSyncExternalStore:Gy,useId:l0,unstable_isNewReconciler:!1},FS={readContext:Rt,useCallback:i0,useContext:Rt,useEffect:hf,useImperativeHandle:s0,useInsertionEffect:t0,useLayoutEffect:r0,useMemo:o0,useReducer:_u,useRef:e0,useState:function(){return _u(Io)},useDebugValue:ff,useDeferredValue:function(e){var t=jt();return Pe===null?t.memoizedState=e:a0(t,Pe.memoizedState,e)},useTransition:function(){var e=_u(Io)[0],t=jt().memoizedState;return[e,t]},useMutableSource:Ky,useSyncExternalStore:Gy,useId:l0,unstable_isNewReconciler:!1};function Mt(e,t){if(e&&e.defaultProps){t=xe({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function jd(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:xe({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var wc={isMounted:function(e){return(e=e._reactInternals)?gs(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Xe(),s=bn(e),i=jr(n,s);i.payload=t,r!=null&&(i.callback=r),t=yn(e,i,s),t!==null&&(Kt(t,e,s,n),ol(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Xe(),s=bn(e),i=jr(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=yn(e,i,s),t!==null&&(Kt(t,e,s,n),ol(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Xe(),n=bn(e),s=jr(r,n);s.tag=2,t!=null&&(s.callback=t),t=yn(e,s,n),t!==null&&(Kt(t,e,n,r),ol(t,e,n))}};function um(e,t,r,n,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!To(r,n)||!To(s,i):!0}function h0(e,t,r){var n=!1,s=Cn,i=t.contextType;return typeof i=="object"&&i!==null?i=Rt(i):(s=ct(t)?os:Ge.current,n=t.contextTypes,i=(n=n!=null)?bi(e,s):Cn),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wc,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function dm(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&wc.enqueueReplaceState(t,t.state,null)}function Nd(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},sf(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Rt(i):(i=ct(t)?os:Ge.current,s.context=bi(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(jd(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&wc.enqueueReplaceState(s,s.state,null),$l(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ei(e,t){try{var r="",n=t;do r+=p_(n),n=n.return;while(n);var s=r}catch(i){s=` 40Error generating stack: `+i.message+` 41`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Su(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Pd(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var zS=typeof WeakMap=="function"?WeakMap:Map;function f0(e,t,r){r=jr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){zl||(zl=!0,zd=n),Pd(e,t)},r}function p0(e,t,r){r=jr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Pd(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Pd(e,t),typeof n!="function"&&(wn===null?wn=new Set([this]):wn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function hm(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new zS;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=tE.bind(null,e,t,r),t.then(e,e))}function fm(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 pm(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=jr(-1,1),t.tag=2,yn(r,t,1))),r.lanes|=1),e)}var BS=Dr.ReactCurrentOwner,at=!1;function Ye(e,t,r,n){t.child=e===null?Hy(t,null,r,n):_i(t,e.child,r,n)}function mm(e,t,r,n,s){r=r.render;var i=t.ref;return Ys(t,s),n=uf(e,t,r,n,i,s),r=df(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Or(e,t,s)):(ye&&r&&Yh(t),t.flags|=1,Ye(e,t,n,s),t.child)}function gm(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!xf(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,m0(e,t,i,n,s)):(e=hl(r.type,null,n,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(r=r.compare,r=r!==null?r:To,r(o,n)&&e.ref===t.ref)return Or(e,t,s)}return t.flags|=1,e=xn(i,n),e.ref=t.ref,e.return=t,t.child=e}function m0(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(To(i,n)&&e.ref===t.ref)if(at=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(at=!0);else return t.lanes=e.lanes,Or(e,t,s)}return Ad(e,t,r,n,s)}function g0(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},he(qs,dt),dt|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,he(qs,dt),dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,he(qs,dt),dt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,he(qs,dt),dt|=n;return Ye(e,t,s,r),t.child}function v0(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,239 bytes, line 41
41function Ad(e,t,r,n,s){var i=ct(r)?os:Ge.current;return i=bi(t,i),Ys(t,s),r=uf(e,t,r,n,i,s),n=df(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Or(e,t,s)):(ye&&n&&Yh(t),t.flags|=1,Ye(e,t,r,s),t.child)}function vm(e,t,r,n,s){if(ct(r)){var i=!0;Pl(t)}else i=!1;if(Ys(t,s),t.stateNode===null)cl(e,t),h0(t,r,n),Nd(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Rt(c):(c=ct(r)?os:Ge.current,c=bi(t,c));var h=r.getDerivedStateFromProps,u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&dm(t,o,n,c),Yr=!1;var p=t.memoizedState;o.state=p,$l(t,n,o,s),l=t.memoizedState,a!==n||p!==l||lt.current||Yr?(typeof h=="function"&&(jd(t,r,h,n),l=t.memoizedState),(a=Yr||um(t,r,a,n,p,l,c))?(u||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=n,t.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Vy(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Mt(t.type,a),o.props=c,u=t.pendingProps,p=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Rt(l):(l=ct(r)?os:Ge.current,l=bi(t,l));var f=r.getDerivedStateFromProps;(h=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||p!==l)&&dm(t,o,n,l),Yr=!1,p=t.memoizedState,o.state=p,$l(t,n,o,s);var x=t.memoizedState;a!==u||p!==x||lt.current||Yr?(typeof f=="function"&&(jd(t,r,f,n),x=t.memoizedState),(c=Yr||um(t,r,c,n,p,x,l)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,x,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,x,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=x),o.props=n,o.state=x,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Od(e,t,r,n,i,s)}function Od(e,t,r,n,s,i){v0(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&rm(t,r,!1),Or(e,t,i);n=t.stateNode,BS.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=_i(t,e.child,null,i),t.child=_i(t,null,a,i)):Ye(e,t,a,i),t.memoizedState=n.state,s&&rm(t,r,!0),t.child}function y0(e){var t=e.stateNode;t.pendingContext?tm(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tm(e,t.context,!1),of(e,t.containerInfo)}function ym(e,t,r,n,s){return xi(),Zh(s),t.flags|=256,Ye(e,t,r,n),t.child}var Id={dehydrated:null,treeContext:null,retryLane:0};function Ld(e){return{baseLanes:e,cachePool:null,transitions:null}}function w0(e,t,r){var n=t.pendingProps,s=we.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),he(we,s&1),e===null)return Td(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=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=_c(o,n,0,null),e=is(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ld(r),t.memoizedState=Id,e):pf
vendor: 5,276 bytes, line 41
41(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return HS(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=xn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=xn(a,i):(i=is(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?Ld(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=Id,n}return i=e.child,e=i.sibling,n=xn(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function pf(e,t){return t=_c({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ia(e,t,r,n){return n!==null&&Zh(n),_i(t,e.child,null,r),e=pf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HS(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=Su(Error(I(422))),Ia(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=_c({mode:"visible",children:n.children},s,0,null),i=is(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&_i(t,e.child,null,o),t.child.memoizedState=Ld(o),t.memoizedState=Id,i);if(!(t.mode&1))return Ia(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(I(419)),n=Su(i,n,void 0),Ia(e,t,o,n)}if(a=(o&e.childLanes)!==0,at||a){if(n=Le,n!==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&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Ar(e,s),Kt(n,e,s,-1))}return bf(),n=Su(Error(I(421))),Ia(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=rE.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,pt=vn(s.nextSibling),mt=t,ye=!0,Ht=null,e!==null&&(Et[kt++]=Tr,Et[kt++]=Rr,Et[kt++]=as,Tr=e.id,Rr=e.overflow,as=t),t=pf(t,n.children),t.flags|=4096,t)}function wm(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Rd(e.return,t,r)}function Eu(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function b0(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(Ye(e,t,n.children,r),n=we.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wm(e,r,t);else if(e.tag===19)wm(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(he(we,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Dl(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Eu(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Dl(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Eu(t,!0,r,null,i);break;case"together":Eu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Or(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),cs|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,r=xn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=xn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function WS(e,t,r){switch(t.tag){case 3:y0(t),xi();break;case 5:qy(t);break;case 1:ct(t.type)&&Pl(t);break;case 4:of(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;he(Il,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(he(we,we.current&1),t.flags|=128,null):r&t.child.childLanes?w0(e,t,r):(he(we,we.current&1),e=Or(e,t,r),e!==null?e.sibling:null);he(we,we.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return b0(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),he(we,we.current),n)break;return null;case 22:case 23:return t.lanes=0,g0(e,t,r)}return Or(e,t,r)}var x0,$d,_0,S0;x0=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};$d=function(){};_0=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Vn(ur.current);var i=null;
vendor: 4,114 bytes, line 41
41switch(r){case"input":s=sd(e,s),n=sd(e,n),i=[];break;case"select":s=xe({},s,{value:void 0}),n=xe({},n,{value:void 0}),i=[];break;case"textarea":s=ad(e,s),n=ad(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=jl)}cd(r,n);var o;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(bo.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(bo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&pe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};S0=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ki(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function VS(e,t,r){var n=t.pendingProps;switch(Xh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return ct(t.type)&&Nl(),We(t),null;case 3:return n=t.stateNode,Si(),me(lt),me(Ge),lf(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Aa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ht!==null&&(Wd(Ht),Ht=null))),$d(e,t),We(t),null;case 5:af(t);var s=Vn(Ao.current);if(r=t.type,e!==null&&t.stateNode!=null)_0(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(I(166));return We(t),null}if(e=Vn(ur.current),Aa(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[ar]=t,n[No]=i,e=(t.mode&1)!==0,r){case"dialog":pe("cancel",n),pe("close",n);break;case"iframe":case"object":case"embed":pe("load",n);break;case"video":case"audio":for(s=0;s<ro.length;s++)pe(ro[s],n);break;case"source":pe("error",n);break;case"img":case"image":case"link":pe("error",n),pe("load",n);break;case"details":pe("toggle",n);break;case"input":Rp(n,i),pe("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},pe("invalid",n);break;case"textarea":Np(n,i),pe("invalid",n)}cd(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Pa(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Pa(n.textContent,a,e),s=["children",""+a]):bo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&pe("scroll",n)}switch(r){case"input":Sa(n),jp(n,i,!0);break;case"textarea":Sa(n),Pp(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=jl)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Yv(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
41",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[ar]=t,e[No]=n,x0(e,t,!1,!1),t.stateNode=e;e:{switch(o=ud(r,n),r){case"dialog":pe("cancel",e),pe("close",e),s=n;break;case"iframe":case"object":case"embed":pe("load",e),s=n;break;case"video":case"audio":for(s=0;s<ro.length;s++)pe(ro[s],e);s=n;break;case"source":pe("error",e),s=n;break;case"img":case"image":case"link":pe("error",e),pe("load",e),s=n;break;case"details":pe("toggle",e),s=n;break;case"input":Rp(e,n),s=sd(e,n),pe("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=xe({},n,{value:void 0}),pe("invalid",e);break;case"textarea":Np(e,n),s=ad(e,n),pe("invalid",e);break;default:s=n}cd(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?ey(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Xv(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&xo(e,l):typeof l=="number"&&xo(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(bo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&pe("scroll",e):l!=null&&Dh(e,i,l,o))}switch(r){case"input":Sa(e),jp(e,n,!1);break;case"textarea":Sa(e),Pp(e);break;case"option":n.value!=null&&e.setAttribute("value",""+kn(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Ks(e,!!n.multiple,i,!1):n.defaultValue!=null&&Ks(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=jl)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return We(t),null;case 6:if(e&&t.stateNode!=null)S0(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(I(166));if(r=Vn(Ao.current),Vn(ur.current),Aa(t)){if(n=t.stateNode,r=t.memoizedProps,n[ar]=t,(i=n.nodeValue!==r)&&(e=mt,e!==null))switch(e.tag){case 3:Pa(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Pa(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ar]=t,t.stateNode=n}return We(t),null;case 13:if(me(we),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ye&&pt!==null&&t.mode&1&&!(t.flags&128))zy(),xi(),t.flags|=98560,i=!1;else if(i=Aa(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(I(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(I(317)
vendor: 25,875 bytes, line 41
41);i[ar]=t}else xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;We(t),i=!1}else Ht!==null&&(Wd(Ht),Ht=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Ae===0&&(Ae=3):bf())),t.updateQueue!==null&&(t.flags|=4),We(t),null);case 4:return Si(),$d(e,t),e===null&&Ro(t.stateNode.containerInfo),We(t),null;case 10:return rf(t.type._context),We(t),null;case 17:return ct(t.type)&&Nl(),We(t),null;case 19:if(me(we),i=t.memoizedState,i===null)return We(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)Ki(i,!1);else{if(Ae!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Dl(e),o!==null){for(t.flags|=128,Ki(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,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}),r=r.sibling;return he(we,we.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ce()>ki&&(t.flags|=128,n=!0,Ki(i,!1),t.lanes=4194304)}else{if(!n)if(e=Dl(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ki(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ye)return We(t),null}else 2*Ce()-i.renderingStartTime>ki&&r!==1073741824&&(t.flags|=128,n=!0,Ki(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ce(),t.sibling=null,r=we.current,he(we,n?r&1|2:r&1),t):(We(t),null);case 22:case 23:return wf(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?dt&1073741824&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function qS(e,t){switch(Xh(t),t.tag){case 1:return ct(t.type)&&Nl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Si(),me(lt),me(Ge),lf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return af(t),null;case 13:if(me(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(we),null;case 4:return Si(),null;case 10:return rf(t.type._context),null;case 22:case 23:return wf(),null;case 24:return null;default:return null}}var La=!1,Ke=!1,KS=typeof WeakSet=="function"?WeakSet:Set,F=null;function Vs(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ke(e,t,n)}else r.current=null}function Dd(e,t,r){try{r()}catch(n){ke(e,t,n)}}var bm=!1;function GS(e,t){if(bd=Cl,e=Ry(),Jh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,h=0,u=e,p=null;t:for(;;){for(var f;u!==r||s!==0&&u.nodeType!==3||(a=o+s),u!==i||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(f=u.firstChild)!==null;)p=u,u=f;for(;;){if(u===e)break t;if(p===r&&++c===s&&(a=o),p===i&&++h===n&&(l=o),(f=u.nextSibling)!==null)break;u=p,p=u.parentNode}u=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(xd={focusedElem:e,selectionRange:r},Cl=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var m=x.memoizedProps,b=x.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Mt(t.type,m),b);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(_){ke(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return x=bm,bm=!1,x}function po(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Dd(t,r,i)}s=s.next}while(s!==n)}}function bc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Md(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function E0(e){var t=e.alternate;t!==null&&(e.alternate=null,E0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ar],delete t[No],delete t[Ed],delete t[NS],delete t[PS])),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 k0(e){return e.tag===5||e.tag===3||e.tag===4}function xm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||k0(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 Ud(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=jl));else if(n!==4&&(e=e.child,e!==null))for(Ud(e,t,r),e=e.sibling;e!==null;)Ud(e,t,r),e=e.sibling}function Fd(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Fd(e,t,r),e=e.sibling;e!==null;)Fd(e,t,r),e=e.sibling}var De=null,Bt=!1;function Vr(e,t,r){for(r=r.child;r!==null;)C0(e,t,r),r=r.sibling}function C0(e,t,r){if(cr&&typeof cr.onCommitFiberUnmount=="function")try{cr.onCommitFiberUnmount(hc,r)}catch{}switch(r.tag){case 5:Ke||Vs(r,t);case 6:var n=De,s=Bt;De=null,Vr(e,t,r),De=n,Bt=s,De!==null&&(Bt?(e=De,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):De.removeChild(r.stateNode));break;case 18:De!==null&&(Bt?(e=De,r=r.stateNode,e.nodeType===8?vu(e.parentNode,r):e.nodeType===1&&vu(e,r),ko(e)):vu(De,r.stateNode));break;case 4:n=De,s=Bt,De=r.stateNode.containerInfo,Bt=!0,Vr(e,t,r),De=n,Bt=s;break;case 0:case 11:case 14:case 15:if(!Ke&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Dd(r,t,o),s=s.next}while(s!==n)}Vr(e,t,r);break;case 1:if(!Ke&&(Vs(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ke(r,t,a)}Vr(e,t,r);break;case 21:Vr(e,t,r);break;case 22:r.mode&1?(Ke=(n=Ke)||r.memoizedState!==null,Vr(e,t,r),Ke=n):Vr(e,t,r);break;default:Vr(e,t,r)}}function _m(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new KS),t.forEach(function(n){var s=nE.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Lt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:De=a.stateNode,Bt=!1;break e;case 3:De=a.stateNode.containerInfo,Bt=!0;break e;case 4:De=a.stateNode.containerInfo,Bt=!0;break e}a=a.return}if(De===null)throw Error(I(160));C0(i,o,s),De=null,Bt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){ke(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)T0(t,e),t=t.sibling}function T0(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Lt(t,e),er(e),n&4){try{po(3,e,e.return),bc(3,e)}catch(m){ke(e,e.return,m)}try{po(5,e,e.return)}catch(m){ke(e,e.return,m)}}break;case 1:Lt(t,e),er(e),n&512&&r!==null&&Vs(r,r.return);break;case 5:if(Lt(t,e),er(e),n&512&&r!==null&&Vs(r,r.return),e.flags&32){var s=e.stateNode;try{xo(s,"")}catch(m){ke(e,e.return,m)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Qv(s,i),ud(a,o);var c=ud(a,i);for(o=0;o<l.length;o+=2){var h=l[o],u=l[o+1];h==="style"?ey(s,u):h==="dangerouslySetInnerHTML"?Xv(s,u):h==="children"?xo(s,u):Dh(s,h,u,c)}switch(a){case"input":id(s,i);break;case"textarea":Jv(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?Ks(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?Ks(s,!!i.multiple,i.defaultValue,!0):Ks(s,!!i.multiple,i.multiple?[]:"",!1))}s[No]=i}catch(m){ke(e,e.return,m)}}break;case 6:if(Lt(t,e),er(e),n&4){if(e.stateNode===null)throw Error(I(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(m){ke(e,e.return,m)}}break;case 3:if(Lt(t,e),er(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{ko(t.containerInfo)}catch(m){ke(e,e.return,m)}break;case 4:Lt(t,e),er(e);break;case 13:Lt(t,e),er(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(vf=Ce())),n&4&&_m(e);break;case 22:if(h=r!==null&&r.memoizedState!==null,e.mode&1?(Ke=(c=Ke)||h,Lt(t,e),Ke=c):Lt(t,e),er(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(F=e,h=e.child;h!==null;){for(u=F=h;F!==null;){switch(p=F,f=p.child,p.tag){case 0:case 11:case 14:case 15:po(4,p,p.return);break;case 1:Vs(p,p.return);var x=p.stateNode;if(typeof x.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(m){ke(n,r,m)}}break;case 5:Vs(p,p.return);break;case 22:if(p.memoizedState!==null){Em(u);continue}}f!==null?(f.return=p,F=f):Em(u)}h=h.sibling}e:for(h=null,u=e;;){if(u.tag===5){if(h===null){h=u;try{s=u.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=u.stateNode,l=u.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Zv("display",o))}catch(m){ke(e,e.return,m)}}}else if(u.tag===6){if(h===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(m){ke(e,e.return,m)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:Lt(t,e),er(e),n&4&&_m(e);break;case 21:break;default:Lt(t,e),er(e)}}function er(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(k0(r)){var n=r;break e}r=r.return}throw Error(I(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(xo(s,""),n.flags&=-33);var i=xm(e);Fd(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=xm(e);Ud(e,a,o);break;default:throw Error(I(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QS(e,t,r){F=e,R0(e)}function R0(e,t,r){for(var n=(e.mode&1)!==0;F!==null;){var s=F,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||La;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ke;a=La;var c=Ke;if(La=o,(Ke=l)&&!c)for(F=s;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?km(s):l!==null?(l.return=o,F=l):km(s);for(;i!==null;)F=i,R0(i),i=i.sibling;F=s,La=a,Ke=c}Sm(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,F=i):Sm(e)}}function Sm(e){for(;F!==null;){var t=F;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ke||bc(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Ke)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Mt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&am(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}am(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var u=h.dehydrated;u!==null&&ko(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}Ke||t.flags&512&&Md(t)}catch(p){ke(t,t.return,p)}}if(t===e){F=null;break}if(r=t.sibling,r!==null){r.return=t.return,F=r;break}F=t.return}}function Em(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var r=t.sibling;if(r!==null){r.return=t.return,F=r;break}F=t.return}}function km(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{bc(4,t)}catch(l){ke(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){ke(t,s,l)}}var i=t.return;try{Md(t)}catch(l){ke(t,i,l)}break;case 5:var o=t.return;try{Md(t)}catch(l){ke(t,o,l)}}}catch(l){ke(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var JS=Math.ceil,Fl=Dr.ReactCurrentDispatcher,mf=Dr.ReactCurrentOwner,Tt=Dr.ReactCurrentBatchConfig,ie=0,Le=null,je=null,Fe=0,dt=0,qs=An(0),Ae=0,$o=null,cs=0,xc=0,gf=0,mo=null,it=null,vf=0,ki=1/0,wr=null,zl=!1,zd=null,wn=null,$a=!1,hn=null,Bl=0,go=0,Bd=null,ul=-1,dl=0;function Xe(){return ie&6?Ce():ul!==-1?ul:ul=Ce()}function bn(e){return e.mode&1?ie&2&&Fe!==0?Fe&-Fe:OS.transition!==null?(dl===0&&(dl=hy()),dl):(e=ce,e!==0||(e=window.event,e=e===void 0?16:wy(e.type)),e):1}function Kt(e,t,r,n){if(50<go)throw go=0,Bd=null,Error(I(185));ia(e,r,n),(!(ie&2)||e!==Le)&&(e===Le&&(!(ie&2)&&(xc|=r),Ae===4&&Zr(e,Fe)),ut(e,n),r===1&&ie===0&&!(t.mode&1)&&(ki=Ce()+500,vc&&On()))}function ut(e,t){var r=e.callbackNode;O_(e,t);var n=kl(e,e===Le?Fe:0);if(n===0)r!==null&&Ip(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Ip(r),t===1)e.tag===0?AS(Cm.bind(null,e)):My(Cm.bind(null,e)),RS(function(){!(ie&6)&&On()}),r=null;else{switch(fy(n)){case 1:r=Bh;break;case 4:r=uy;break;case 16:r=El;break;case 536870912:r=dy;break;default:r=El}r=$0(r,j0.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function j0(e,t){if(ul=-1,dl=0,ie&6)throw Error(I(327));var r=e.callbackNode;if(Xs()&&e.callbackNode!==r)return null;var n=kl(e,e===Le?Fe:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Hl(e,n);else{t=n;var s=ie;ie|=2;var i=P0();(Le!==e||Fe!==t)&&(wr=null,ki=Ce()+500,ss(e,t));do try{ZS();break}catch(a){N0(e,a)}while(!0);tf(),Fl.current=i,ie=s,je!==null?t=0:(Le=null,Fe=0,t=Ae)}if(t!==0){if(t===2&&(s=md(e),s!==0&&(n=s,t=Hd(e,s))),t===1)throw r=$o,ss(e,0),Zr(e,n),ut(e,Ce()),r;if(t===6)Zr(e,n);else{if(s=e.current.alternate,!(n&30)&&!YS(s)&&(t=Hl(e,n),t===2&&(i=md(e),i!==0&&(n=i,t=Hd(e,i))),t===1))throw r=$o,ss(e,0),Zr(e,n),ut(e,Ce()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(I(345));case 2:Fn(e,it,wr);break;case 3:if(Zr(e,n),(n&130023424)===n&&(t=vf+500-Ce(),10<t)){if(kl(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Xe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Sd(Fn.bind(null,e,it,wr),t);break}Fn(e,it,wr);break;case 4:if(Zr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-qt(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=Ce()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*JS(n/1960))-n,10<n){e.timeoutHandle=Sd(Fn.bind(null,e,it,wr),n);break}Fn(e,it,wr);break;case 5:Fn(e,it,wr);break;default:throw Error(I(329))}}}return ut(e,Ce()),e.callbackNode===r?j0.bind(null,e):null}function Hd(e,t){var r=mo;return e.current.memoizedState.isDehydrated&&(ss(e,t).flags|=256),e=Hl(e,t),e!==2&&(t=it,it=r,t!==null&&Wd(t)),e}function Wd(e){it===null?it=e:it.push.apply(it,e)}function YS(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Gt(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zr(e,t){for(t&=~gf,t&=~xc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-qt(t),n=1<<r;e[r]=-1,t&=~n}}function Cm(e){if(ie&6)throw Error(I(327));Xs();var t=kl(e,0);if(!(t&1))return ut(e,Ce()),null;var r=Hl(e,t);if(e.tag!==0&&r===2){var n=md(e);n!==0&&(t=n,r=Hd(e,n))}if(r===1)throw r=$o,ss(e,0),Zr(e,t),ut(e,Ce()),r;if(r===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fn(e,it,wr),ut(e,Ce()),null}function yf(e,t){var r=ie;ie|=1;try{return e(t)}finally{ie=r,ie===0&&(ki=Ce()+500,vc&&On())}}function us(e){hn!==null&&hn.tag===0&&!(ie&6)&&Xs();var t=ie;ie|=1;var r=Tt.transition,n=ce;try{if(Tt.transition=null,ce=1,e)return e()}finally{ce=n,Tt.transition=r,ie=t,!(ie&6)&&On()}}function wf(){dt=qs.current,me(qs)}function ss(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,TS(r)),je!==null)for(r=je.return;r!==null;){var n=r;switch(Xh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Nl();break;case 3:Si(),me(lt),me(Ge),lf();break;case 5:af(n);break;case 4:Si();break;case 13:me(we);break;case 19:me(we);break;case 10:rf(n.type._context);break;case 22:case 23:wf()}r=r.return}if(Le=e,je=e=xn(e.current,null),Fe=dt=t,Ae=0,$o=null,gf=xc=cs=0,it=mo=null,Wn!==null){for(t=0;t<Wn.length;t++)if(r=Wn[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}Wn=null}return e}function N0(e,t){do{var r=je;try{if(tf(),al.current=Ul,Ml){for(var n=be.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Ml=!1}if(ls=0,Ie=Pe=be=null,fo=!1,Oo=0,mf.current=null,r===null||r.return===null){Ae=1,$o=t,je=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=Fe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,h=a,u=h.tag;if(!(h.mode&1)&&(u===0||u===11||u===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var f=fm(o);if(f!==null){f.flags&=-257,pm(f,o,a,i,t),f.mode&1&&hm(i,c,t),t=f,l=c;var x=t.updateQueue;if(x===null){var m=new Set;m.add(l),t.updateQueue=m}else x.add(l);break e}else{if(!(t&1)){hm(i,c,t),bf();break e}l=Error(I(426))}}else if(ye&&a.mode&1){var b=fm(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),pm(b,o,a,i,t),Zh(Ei(l,a));break e}}i=l=Ei(l,a),Ae!==4&&(Ae=2),mo===null?mo=[i]:mo.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=f0(i,l,t);om(i,v);break e;case 1:a=l;var g=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(wn===null||!wn.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=p0(i,a,t);om(i,_);break e}}i=i.return}while(i!==null)}O0(r)}catch(S){t=S,je===r&&r!==null&&(je=r=r.return);continue}break}while(!0)}function P0(){var e=Fl.current;return Fl.current=Ul,e===null?Ul:e}function bf(){(Ae===0||Ae===3||Ae===2)&&(Ae=4),Le===null||!(cs&268435455)&&!(xc&268435455)||Zr(Le,Fe)}function Hl(e,t){var r=ie;ie|=2;var n=P0();(Le!==e||Fe!==t)&&(wr=null,ss(e,t));do try{XS();break}catch(s){N0(e,s)}while(!0);if(tf(),ie=r,Fl.current=n,je!==null)throw Error(I(261));return Le=null,Fe=0,Ae}function XS(){for(;je!==null;)A0(je)}function ZS(){for(;je!==null&&!E_();)A0(je)}function A0(e){var t=L0(e.alternate,e,dt);e.memoizedProps=e.pendingProps,t===null?O0(e):je=t,mf.current=null}function O0(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=qS(r,t),r!==null){r.flags&=32767,je=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ae=6,je=null;return}}else if(r=VS(r,t,dt),r!==null){je=r;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ae===0&&(Ae=5)}function Fn(e,t,r){var n=ce,s=Tt.transition;try{Tt.transition=null,ce=1,eE(e,t,r,n)}finally{Tt.transition=s,ce=n}return null}function eE(e,t,r,n){do Xs();while(hn!==null);if(ie&6)throw Error(I(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(I(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(I_(e,i),e===Le&&(je=Le=null,Fe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||$a||($a=!0,$0(El,function(){return Xs(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Tt.transition,Tt.transition=null;var o=ce;ce=1;var a=ie;ie|=4,mf.current=null,GS(e,r),T0(r,e),bS(xd),Cl=!!bd,xd=bd=null,e.current=r,QS(r),k_(),ie=a,ce=o,Tt.transition=i}else e.current=r;if($a&&($a=!1,hn=e,Bl=s),i=e.pendingLanes,i===0&&(wn=null),R_(r.stateNode),ut(e,Ce()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(zl)throw zl=!1,e=zd,zd=null,e;return Bl&1&&e.tag!==0&&Xs(),i=e.pendingLanes,i&1?e===Bd?go++:(go=0,Bd=e):go=0,On(),null}function Xs(){if(hn!==null){var e=fy(Bl),t=Tt.transition,r=ce;try{if(Tt.transition=null,ce=16>e?16:e,hn===null)var n=!1;else{if(e=hn,hn=null,Bl=0,ie&6)throw Error(I(331));var s=ie;for(ie|=4,F=e.current;F!==null;){var i=F,o=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(F=c;F!==null;){var h=F;switch(h.tag){case 0:case 11:case 15:po(8,h,i)}var u=h.child;if(u!==null)u.return=h,F=u;else for(;F!==null;){h=F;var p=h.sibling,f=h.return;if(E0(h),h===c){F=null;break}if(p!==null){p.return=f,F=p;break}F=f}}}var x=i.alternate;if(x!==null){var m=x.child;if(m!==null){x.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}F=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,F=o;else e:for(;F!==null;){if(i=F,i.flags&2048)switch(i.tag){case 0:case 11:case 15:po(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,F=v;break e}F=i.return}}var g=e.current;for(F=g;F!==null;){o=F;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,F=w;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:bc(9,a)}}catch(S){ke(a,a.return,S)}if(a===o){F=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,F=_;break e}F=a.return}}if(ie=s,On(),cr&&typeof cr.onPostCommitFiberRoot=="function")try{cr.onPostCommitFiberRoot(hc,e)}catch{}n=!0}return n}finally{ce=r,Tt.transition=t}}return!1}function Tm(e,t,r){t=Ei(r,t),t=f0(e,t,1),e=yn(e,t,1),t=Xe(),e!==null&&(ia(e,1,t),ut(e,t))}function ke(e,t,r){if(e.tag===3)Tm(e,e,r);else for(;t!==null;){if(t.tag===3){Tm(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(wn===null||!wn.has(n))){e=Ei(r,e),e=p0(t,e,1),t=yn(t,e,1),e=Xe(),t!==null&&(ia(t,1,e),ut(t,e));break}}t=t.return}}function tE(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Xe(),e.pingedLanes|=e.suspendedLanes&r,Le===e&&(Fe&r)===r&&(Ae===4||Ae===3&&(Fe&130023424)===Fe&&500>Ce()-vf?ss(e,0):gf|=r),ut(e,t)}function I0(e,t){t===0&&(e.mode&1?(t=Ca,Ca<<=1,!(Ca&130023424)&&(Ca=4194304)):t=1);var r=Xe();e=Ar(e,t),e!==null&&(ia(e,t,r),ut(e,r))}function rE(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),I0(e,r)}function nE(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(I(314))}n!==null&&n.delete(t),I0(e,r)}var L0;L0=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||lt.current)at=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return at=!1,WS(e,t,r);at=!!(e.flags&131072)}else at=!1,ye&&t.flags&1048576&&Uy(t,Ol,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;cl(e,t),e=t.pendingProps;var s=bi(t,Ge.current);Ys(t,r),s=uf(null,t,n,e,s,r);var i=df();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ct(n)?(i=!0,Pl(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,sf(t),s.updater=wc,t.stateNode=s,s._reactInternals=t,Nd(t,n,e,r),t=Od(null,t,n,!0,i,r)):(t.tag=0,ye&&i&&Yh(t),Ye(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(cl(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=iE(n),e=Mt(n,e),s){case 0:t=Ad(null,t,n,e,r);break e;case 1:t=vm(null,t,n,e,r);break e;case 11:t=mm(null,t,n,e,r);break e;case 14:t=gm(null,t,n,Mt(n.type,e),r);break e}throw Error(I(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Mt(n,s),Ad(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Mt(n,s),vm(e,t,n,s,r);case 3:e:{if(y0(t),e===null)throw Error(I(387));n=t.pendingProps,i=t.memoizedState,s=i.element,Vy(e,t),$l(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ei(Error(I(423)),t),t=ym(e,t,n,r,s
vendor: 5,432 bytes, line 41
41);break e}else if(n!==s){s=Ei(Error(I(424)),t),t=ym(e,t,n,r,s);break e}else for(pt=vn(t.stateNode.containerInfo.firstChild),mt=t,ye=!0,Ht=null,r=Hy(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xi(),n===s){t=Or(e,t,r);break e}Ye(e,t,n,r)}t=t.child}return t;case 5:return qy(t),e===null&&Td(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,_d(n,s)?o=null:i!==null&&_d(n,i)&&(t.flags|=32),v0(e,t),Ye(e,t,o,r),t.child;case 6:return e===null&&Td(t),null;case 13:return w0(e,t,r);case 4:return of(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=_i(t,null,n,r):Ye(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Mt(n,s),mm(e,t,n,s,r);case 7:return Ye(e,t,t.pendingProps,r),t.child;case 8:return Ye(e,t,t.pendingProps.children,r),t.child;case 12:return Ye(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,he(Il,n._currentValue),n._currentValue=o,i!==null)if(Gt(i.value,o)){if(i.children===s.children&&!lt.current){t=Or(e,t,r);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===n){if(i.tag===1){l=jr(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?l.next=l:(l.next=h.next,h.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Rd(i.return,r,t),a.lanes|=r;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(I(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Rd(o,r,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}Ye(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Ys(t,r),s=Rt(s),n=n(s),t.flags|=1,Ye(e,t,n,r),t.child;case 14:return n=t.type,s=Mt(n,t.pendingProps),s=Mt(n.type,s),gm(e,t,n,s,r);case 15:return m0(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Mt(n,s),cl(e,t),t.tag=1,ct(n)?(e=!0,Pl(t)):e=!1,Ys(t,r),h0(t,n,s),Nd(t,n,s,r),Od(null,t,n,!0,e,r);case 19:return b0(e,t,r);case 22:return g0(e,t,r)}throw Error(I(156,t.tag))};function $0(e,t){return cy(e,t)}function sE(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ct(e,t,r,n){return new sE(e,t,r,n)}function xf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function iE(e){if(typeof e=="function")return xf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uh)return 11;if(e===Fh)return 14}return 2}function xn(e,t){var r=e.alternate;return r===null?(r=Ct(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function hl(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")xf(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case $s:return is(r.children,s,i,t);case Mh:o=8,s|=8;break;case ed:return e=Ct(12,r,t,s|2),e.elementType=ed,e.lanes=i,e;case td:return e=Ct(13,r,t,s),e.elementType=td,e.lanes=i,e;case rd:return e=Ct(19,r,t,s),e.elementType=rd,e.lanes=i,e;case qv:return _c(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wv:o=10;break e;case Vv:o=9;break e;case Uh:o=11;break e;case Fh:o=14;break e;case Jr:o=16,n=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Ct(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function is(e,t,r,n){return e=Ct(7,e,n,t),e.lanes=r,e}function _c(e,t,r,n){return e=Ct(22,e,n,t),e.elementType=qv,e.lanes=r,e.stateNode={isHidden:!1},e}function ku(e,t,r){return e=Ct(6,e,null,t),e.lanes=r,e}function Cu(e,t,r){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function oE(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ou(0),this.expirationTimes=ou(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function _f(e,t,r,n,s,i,o,a,l){return e=new oE(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ct(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},sf(i),e}function aE(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 3,611 bytes, line 41
41return{$$typeof:Ls,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function D0(e){if(!e)return Cn;e=e._reactInternals;e:{if(gs(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ct(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var r=e.type;if(ct(r))return Dy(e,r,t)}return t}function M0(e,t,r,n,s,i,o,a,l){return e=_f(r,n,!0,e,s,i,o,a,l),e.context=D0(null),r=e.current,n=Xe(),s=bn(r),i=jr(n,s),i.callback=t??null,yn(r,i,s),e.current.lanes=s,ia(e,s,n),ut(e,n),e}function Sc(e,t,r,n){var s=t.current,i=Xe(),o=bn(s);return r=D0(r),t.context===null?t.context=r:t.pendingContext=r,t=jr(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=yn(s,t,o),e!==null&&(Kt(e,s,o,i),ol(e,s,o)),o}function Wl(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 Rm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Sf(e,t){Rm(e,t),(e=e.alternate)&&Rm(e,t)}function lE(){return null}var U0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ef(e){this._internalRoot=e}Ec.prototype.render=Ef.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));Sc(e,t,null,null)};Ec.prototype.unmount=Ef.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;us(function(){Sc(null,e,null,null)}),t[Pr]=null}};function Ec(e){this._internalRoot=e}Ec.prototype.unstable_scheduleHydration=function(e){if(e){var t=gy();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Xr.length&&t!==0&&t<Xr[r].priority;r++);Xr.splice(r,0,e),r===0&&yy(e)}};function kf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function kc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jm(){}function cE(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var c=Wl(o);i.call(c)}}var o=M0(t,n,e,0,null,!1,!1,"",jm);return e._reactRootContainer=o,e[Pr]=o.current,Ro(e.nodeType===8?e.parentNode:e),us(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=Wl(l);a.call(c)}}var l=_f(e,0,!1,null,null,!1,!1,"",jm);return e._reactRootContainer=l,e[Pr]=l.current,Ro(e.nodeType===8?e.parentNode:e),us(function(){Sc(t,l,r,n)}),l}function Cc(e,t,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Wl(o);a.call(l)}}Sc(t,o,e,s)}else o=cE(r,t,e,s,n);return Wl(o)}py=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=to(t.pendingLanes);r!==0&&(Hh(t,r|1),ut(t,Ce()),!(ie&6)&&(ki=Ce()+500,On()))}break;case 13:us(function(){var n=Ar(e,1);if(n!==null){var s=Xe();Kt(n,e,1,s)}}),Sf(e,1)}};Wh=function(e){if(e.tag===13){var t=Ar(e,134217728);if(t!==null){var r=Xe();Kt(t,e,134217728,r)}Sf(e,134217728)}};my=function(e){if(e.tag===13){var t=bn(e),r=Ar(e,t);if(r!==null){var n=Xe();Kt(r,e,t,n)}Sf(e,t)}};gy=function(){return ce};vy=function(e,t){var r=ce;try{return ce=e,t()}finally{ce=r}};hd=function(e,t,r){switch(t){case"input":if(id(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=gc(n);if(!s)throw Error(I(90));
41Gv(n),id(n,s)}}}break;case"textarea":Jv(e,r);break;case"select":t=r.value,t!=null&&Ks(e,!!r.multiple,t,!1)}};ny=yf;sy=us;var uE={usingClientEntryPoint:!1,Events:[aa,Fs,gc,ty,ry,yf]},Gi={findFiberByHostInstance:Hn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dE={bundleType:Gi.bundleType,version:Gi.version,rendererPackageName:Gi.rendererPackageName,rendererConfig:Gi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Dr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ay(e),e===null?null:e.stateNode},findFiberByHostInstance:Gi.findFiberByHostInstance||lE,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 Da=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Da.isDisabled&&Da.supportsFiber)try{hc=Da.inject(dE),cr=Da}catch{}}yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uE;yt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kf(t))throw Error(I(200));return aE(e,t,null,r)};yt.createRoot=function(e,t){if(!kf(e))throw Error(I(299));var r=!1,n="",s=U0;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=_f(e,1,!1,null,null,r,!1,n,s),e[Pr]=t.current,Ro(e.nodeType===8?e.parentNode:e),new Ef(t)};yt.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(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=ay(t),e=e===null?null:e.stateNode,e};yt.flushSync=function(e){return us(e)};yt.hydrate=function(e,t,r){if(!kc(t))throw Error(I(200));return Cc(null,e,t,!0,r)};yt.hydrateRoot=function(e,t,r){if(!kf(e))throw Error(I(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=U0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=M0(t,null,e,1,r??null,s,!1,i,o),e[Pr]=t.current,Ro(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Ec(t)};yt.render=function(e,t,r){if(!kc(t))throw Error(I(200));return Cc(null,e,t,!1,r)};yt.unmountComponentAtNode=function(e){if(!kc(e))throw Error(I(40));return e._reactRootContainer?(us(function(){Cc(null,null,e,!1,function(){e._reactRootContainer=null,e[Pr]=null})}),!0):!1};yt.unstable_batchedUpdates=yf;yt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!kc(r))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return Cc(e,t,r,!1,n)};yt.version="18.3.1-next-f1338f8080-20240426";function F0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(F0)}catch(e){console.error(e)}}F0(),Fv.exports=yt;var ca=Fv.exports;const z0=Rv(ca);var B0,Nm=ca;B0=Nm.createRoot,Nm.hydrateRoot;const hE=1,fE=1e6;let Tu=0;function pE(){return Tu=(Tu+1)%Number.MAX_SAFE_INTEGER,Tu.toString()}const Ru=new Map,Pm=e=>{if(Ru.has(e))return;const t=setTimeout(()=>{Ru.delete(e),vo({type:"REMOVE_TOAST",toastId:e})},fE);Ru.set(e,t)},mE=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,hE)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Pm(r):e.toasts.forEach(n=>{Pm(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,905 bytes, line 41
41n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},fl=[];let pl={toasts:[]};function vo(e){pl=mE(pl,e),fl.forEach(t=>{t(pl)})}function gE({...e}){const t=pE(),r=s=>vo({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>vo({type:"DISMISS_TOAST",toastId:t});return vo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function ua(){const[e,t]=y.useState(pl);return y.useEffect(()=>(fl.push(t),()=>{const r=fl.indexOf(t);r>-1&&fl.splice(r,1)}),[e]),{...e,toast:gE,dismiss:r=>vo({type:"DISMISS_TOAST",toastId:r})}}function ne(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Am(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function H0(...e){return t=>{let r=!1;const n=e.map(s=>{const i=Am(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():Am(e[s],null)}}}}function ge(...e){return y.useCallback(H0(...e),e)}function vE(e,t){const r=y.createContext(t),n=i=>{const{children:o,...a}=i,l=y.useMemo(()=>a,Object.values(a));return d.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function s(i){const o=y.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,s]}function Mr(e,t=[]){let r=[];function n(i,o){const a=y.createContext(o),l=r.length;r=[...r,o];const c=u=>{var v;const{scope:p,children:f,...x}=u,m=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,b=y.useMemo(()=>x,Object.values(x));return d.jsx(m.Provider,{value:b,children:f})};c.displayName=i+"Provider";function h(u,p){var m;const f=((m=p==null?void 0:p[e])==null?void 0:m[l])||a,x=y.useContext(f);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[c,h]}const s=()=>{const i=r.map(o=>y.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,yE(s,...t)]}function yE(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Do(e){const t=bE(e),r=y.forwardRef((n,s)=>{const{children:i,...o}=n,a=y.Children.toArray(i),l=a.find(_E);if(l){const c=l.props.children,h=a.map(u=>u===l?y.Children.count(c)>1?y.Children.only(null):y.isValidElement(c)?c.props.children:null:u);return d.jsx(t,{...o,ref:s,children:y.isValidElement(c)?y.cloneElement(c,void 0,h):null})}return d.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var wE=Do("Slot");function bE(e){const t=y.forwardRef((r,n)=>{const{children:s,...i}=r;if(y.isValidElement(s)){const o=EE(s),a=SE(i,s.props);return s.type!==y.Fragment&&(a.ref=n?H0(n,o):o),y.cloneElement(s,a)}return y.Children.count(s)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var W0=Symbol("radix.slottable");function xE(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=W0,t}function _E(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===W0}function SE(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function EE(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function V0(e){const t=e+"CollectionProvider",[r,n]=Mr(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:b,children:v}=m,g=O.useRef(null),w=O.useRef(new Map).current;return d.jsx(s,{scope:b,itemMap:w,collectionRef:g,children:v})};o.displayName=t;const a=e+"CollectionSlot",l=Do(a),c=O.forwardRef((m,b)=>{const{scope:v,children:g}=m,w=i(a,v),_=ge(b,w.collectionRef);return d.jsx(l,{ref:_,children:g})});c.displayName=a;const h=e+"CollectionItemSlot",u="data-radix-collection-item",p=Do(h),f=O.forwardRef((m,b)=>{const{scope:v,children:g,...w}=m,_=O.useRef(null),S=ge(b,_),E=i(h,v);return O.useEffect(()=>(E.itemMap.set(_,{ref:_,...w}),()=>void E.itemMap.delete(_))),d.jsx(p,{[u]:"",ref:S,children:g})});f.displayName=h;function x(m){const b=i(e+"CollectionConsumer",m);return O.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(b.itemMap.values()).sort((E,C)=>w.indexOf(E.ref.current)-w.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},x,n]}var kE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],se=kE.reduce((e,t)=>{const r=Do(`Primitive.${t}`),n=y.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function q0(e,t){e&&ca.flushSync(()=>e.dispatchEvent(t))}function Ue(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function CE(e,t=globalThis==null?void 0:globalThis.document){const r=Ue(e);y.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var TE="DismissableLayer",Vd="dismissableLayer.update",RE="dismissableLayer.pointerDownOutside",jE="dismissableLayer.focusOutside",Om,K0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tc=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,c=y.useContext(K0),[h,u]=y.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=y.useState({}),x=ge(t,C=>u(C)),m=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(b),g=h?m.indexOf(h):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,_=g>=v,S=PE(C=>{const T=C.target,R=[...c.branches].some(P=>P.contains(T));!_||R||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},p),E=AE(C=>{const T=C.target;[...c.branches].some(P=>P.contains(T))||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},p);return CE(C=>{g===c.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},p),y.useEffect(()=>{if(h)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Om=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),Im(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Om)}},[h,p,r,c]),y.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),Im())},[h,c]),y.useEffect(()=>{const C=()=>f({});return document.addEventListener(Vd,C),()=>document.removeEventListener(Vd,C)},[]),d.jsx(se.div,{...l,ref:x,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:ne(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ne(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ne(e.onPointerDownCapture,S.onPointerDownCapture)})});Tc.displayName=TE;var NE="DismissableLayerBranch",G0=y.forwardRef((e,t)=>{const r=y.useContext(K0),n=y.useRef(null),s=ge(t,n);return y.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),d.jsx(se.div,{...e,ref:s})});G0.displayName=NE;function PE(e,t=globalThis==null?void 0:globalThis.document){const r=Ue(e),n=y.useRef(!1),s=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Q0(RE,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function AE(e,t=globalThis==null?void 0:globalThis.document){const r=Ue(e),n=y.useRef(!1);return y.useEffect(()=>{const s=i=>{i.target&&!n.current&&Q0(jE,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Im(){const e=new CustomEvent(Vd);document.dispatchEvent(e)}function Q0(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?q0(s,i):s.dispatchEvent(i)}var OE=Tc,IE=G0,Qt=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},LE="Portal",Cf=y.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=y.useState(!1);Qt(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?z0.createPortal(d.jsx(se.div,{...n,ref:t}),o):null});Cf.displayName=LE;function $E(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var Nt=e=>{const{present:t,children:r}=e,n=DE(t),s=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),i=ge(n.ref,ME(s));return typeof r=="function"||n.isPresent?y.cloneElement(s,{ref:i}):null};Nt.displayName="Presence";function DE(e){const[t,r]=y.useState(),n=y.useRef(null),s=y.useRef(e),i=y.useRef("none"),o=e?"mounted":"unmounted",[a,l]=$E(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const c=Ma(n.current);i.current=a==="mounted"?c:"none"},[a]),Qt(()=>{const c=n.current,h=s.current;if(h!==e){const p=i.current,f=Ma(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(h&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Qt(()=>{if(t){let c;const h=t.ownerDocument.defaultView??window,u=f=>{const m=Ma(n.current).includes(f.animationName);if(f.target===t&&m&&(l("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=f=>{f.target===t&&(i.current=Ma(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{h.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Ma(e){return(e==null?void 0:e.animationName)||"none"}function ME(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var UE=Ih[" useInsertionEffect ".trim().toString()]||Qt;function Oi({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,o]=FE({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const h=y.useRef(e!==void 0);y.useEffect(()=>{const u=h.current;u!==a&&console.warn(`${n} is changing from ${u?"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.`),h.current=a},[a,n])}const c=y.useCallback(h=>{var u;if(a){const p=zE(h)?h(e):h;p!==e&&((u=o.current)==null||u.call(o,p))}else i(h)},[a,e,i,o]);return[l,c]}function FE({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),s=y.useRef(r),i=y.useRef(t);return UE(()=>{i.current=t},[t]),y.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function zE(e){return typeof e=="function"}var BE=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"}),HE="VisuallyHidden",Rc=y.forwardRef((e,t)=>d.jsx(se.span,{...e,ref:t,style:{...BE,...e.style}}));Rc.displayName=HE;var WE=Rc,Tf="ToastProvider",[Rf,VE,qE]=V0("Toast"),[J0,l4]=Mr("Toast",[qE]),[KE,jc]=J0(Tf),Y0=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=y.useState(null),[c,h]=y.useState(0),u=y.useRef(!1),p=y.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Tf}\`. Expected non-empty \`string\`.`),d.jsx(Rf.Provider,{scope:t,children:d.jsx(KE,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:y.useCallback(()=>h(f=>f+1),[]),onToastRemove:y.useCallback(()=>h(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:u,isClosePausedRef:p,children:o})})};Y0.displayName=Tf;var X0="ToastViewport",GE=["F8"],qd="toast.viewportPause",Kd="toast.viewportResume",Z0=y.forwardRef((e,t)=>
41{const{__scopeToast:r,hotkey:n=GE,label:s="Notifications ({hotkey})",...i}=e,o=jc(X0,r),a=VE(r),l=y.useRef(null),c=y.useRef(null),h=y.useRef(null),u=y.useRef(null),p=ge(t,u,o.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=o.toastCount>0;y.useEffect(()=>{const b=v=>{var w;n.length!==0&&n.every(_=>v[_]||v.code===_)&&((w=u.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),y.useEffect(()=>{const b=l.current,v=u.current;if(x&&b&&v){const g=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(qd);v.dispatchEvent(E),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Kd);v.dispatchEvent(E),o.isClosePausedRef.current=!1}},_=E=>{!b.contains(E.relatedTarget)&&w()},S=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",g),b.addEventListener("focusout",_),b.addEventListener("pointermove",g),b.addEventListener("pointerleave",S),window.addEventListener("blur",g),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",g),b.removeEventListener("focusout",_),b.removeEventListener("pointermove",g),b.removeEventListener("pointerleave",S),window.removeEventListener("blur",g),window.removeEventListener("focus",w)}}},[x,o.isClosePausedRef]);const m=y.useCallback(({tabbingDirection:b})=>{const g=a().map(w=>{const _=w.ref.current,S=[_,...ak(_)];return b==="forwards"?S:S.reverse()});return(b==="forwards"?g.reverse():g).flat()},[a]);return y.useEffect(()=>{const b=u.current;if(b){const v=g=>{var S,E,C;const w=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!w){const T=document.activeElement,R=g.shiftKey;if(g.target===b&&R){(S=c.current)==null||S.focus();return}const N=m({tabbingDirection:R?"backwards":"forwards"}),$=N.findIndex(L=>L===T);ju(N.slice($+1))?g.preventDefault():R?(E=c.current)==null||E.focus():(C=h.current)==null||C.focus()}};return b.addEventListener("keydown",v),()=>b.removeEventListener("keydown",v)}},[a,m]),d.jsxs(IE,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&d.jsx(Gd,{ref:c,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"forwards"});ju(b)}}),d.jsx(Rf.Slot,{scope:r,children:d.jsx(se.ol,{tabIndex:-1,...i,ref:p})}),x&&d.jsx(Gd,{ref:h,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"backwards"});ju(b)}})]})});Z0.displayName=X0;var ew="ToastFocusProxy",Gd=y.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=jc(ew,r);return d.jsx(Rc,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&n()}})});Gd.displayName=ew;var da="Toast",QE="toast.swipeStart",JE="toast.swipeMove",YE="toast.swipeCancel",XE="toast.swipeEnd",tw=y.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=Oi({prop:n,defaultProp:s??!0,onChange:i,caller:da});return d.jsx(Nt,{present:r||a,children:d.jsx(tk,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Ue(e.onPause),onResume:Ue(e.onResume),onSwipeStart:ne(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ne(e.onSwipeMove,c=>{const{x:h,y:u}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${h}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${u}px`)}),onSwipeCancel:ne(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ne(e.onSwipeEnd,c=>{const{x:h,y:u}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${h}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${u}px`),l(!1)})})})});tw.displayName=da;var[ZE,ek]=J0(da,{onClose(){}}),tk=y.forwardRef((e,t)=>
41{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:h,onSwipeMove:u,onSwipeCancel:p,onSwipeEnd:f,...x}=e,m=jc(da,r),[b,v]=y.useState(null),g=ge(t,L=>v(L)),w=y.useRef(null),_=y.useRef(null),S=s||m.duration,E=y.useRef(0),C=y.useRef(S),T=y.useRef(0),{onToastAdd:R,onToastRemove:P}=m,B=Ue(()=>{var q;(b==null?void 0:b.contains(document.activeElement))&&((q=m.viewport)==null||q.focus()),o()}),N=y.useCallback(L=>{!L||L===1/0||(window.clearTimeout(T.current),E.current=new Date().getTime(),T.current=window.setTimeout(B,L))},[B]);y.useEffect(()=>{const L=m.viewport;if(L){const q=()=>{N(C.current),c==null||c()},K=()=>{const Q=new Date().getTime()-E.current;C.current=C.current-Q,window.clearTimeout(T.current),l==null||l()};return L.addEventListener(qd,K),L.addEventListener(Kd,q),()=>{L.removeEventListener(qd,K),L.removeEventListener(Kd,q)}}},[m.viewport,S,l,c,N]),y.useEffect(()=>{i&&!m.isClosePausedRef.current&&N(S)},[i,S,m.isClosePausedRef,N]),y.useEffect(()=>(R(),()=>P()),[R,P]);const $=y.useMemo(()=>b?lw(b):null,[b]);return m.viewport?d.jsxs(d.Fragment,{children:[$&&d.jsx(rk,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),d.jsx(ZE,{scope:r,onClose:B,children:ca.createPortal(d.jsx(Rf.ItemSlot,{scope:r,children:d.jsx(OE,{asChild:!0,onEscapeKeyDown:ne(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||B(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(se.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...x,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ne(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,B()))}),onPointerDown:ne(e.onPointerDown,L=>{L.button===0&&(w.current={x:L.clientX,y:L.clientY})}),onPointerMove:ne(e.onPointerMove,L=>{if(!w.current)return;const q=L.clientX-w.current.x,K=L.clientY-w.current.y,Q=!!_.current,j=["left","right"].includes(m.swipeDirection),A=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,M=j?A(0,q):0,W=j?0:A(0,K),H=L.pointerType==="touch"?10:2,X={x:M,y:W},ee={originalEvent:L,delta:X};Q?(_.current=X,Ua(JE,u,ee,{discrete:!1})):Lm(X,m.swipeDirection,H)?(_.current=X,Ua(QE,h,ee,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(q)>H||Math.abs(K)>H)&&(w.current=null)}),onPointerUp:ne(e.onPointerUp,L=>{const q=_.current,K=L.target;if(K.hasPointerCapture(L.pointerId)&&K.releasePointerCapture(L.pointerId),_.current=null,w.current=null,q){const Q=L.currentTarget,j={originalEvent:L,delta:q};Lm(q,m.swipeDirection,m.swipeThreshold)?Ua(XE,f,j,{discrete:!0}):Ua(YE,p,j,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),rk=e=>{const{__scopeToast:t,children:r,...n}=e,s=jc(da,t),[i,o]=y.useState(!1),[a,l]=y.useState(!1);return ik(()=>o(!0)),y.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:d.jsx(Cf,{asChild:!0,children:d.jsx(Rc,{...n,children:i&&d.jsxs(d.Fragment,{children:[s.label," ",r]})})})},nk="ToastTitle",rw=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return d.jsx(se.div,{...n,ref:t})});rw.displayName=nk;var sk="ToastDescription",nw=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return d.jsx(se.div,{...n,ref:t})});nw.displayName=sk;var sw="ToastAction",iw=y.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?d.jsx(aw,{altText:r,asChild:!0,children:d.jsx(jf,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${sw}\`. Expected non-empty \`string\`.`),null)});iw.displayName=sw;var ow="ToastClose",jf=y.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=ek(ow,r);return d.jsx(aw,{asChild:!0,children:d.jsx(se.button,{type:"button",...n,ref:t,onClick:ne(e.onClick,s.onClose)})})});jf.displayName=ow;var aw=y.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return d.jsx(se.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function lw(e){const t=[];
vendor: 5,227 bytes, lines 41-80
41return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),ok(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...lw(n))}}),t}function Ua(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?q0(s,i):s.dispatchEvent(i)}var Lm=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function ik(e=()=>{}){const t=Ue(e);Qt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function ok(e){return e.nodeType===e.ELEMENT_NODE}function ak(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ju(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var lk=Y0,cw=Z0,uw=tw,dw=rw,hw=nw,fw=iw,pw=jf;function mw(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=mw(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function gw(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=mw(e))&&(n&&(n+=" "),n+=t);return n}const $m=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dm=gw,Nf=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Dm(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const h=r==null?void 0:r[c],u=i==null?void 0:i[c];if(h===null)return null;const p=$m(h)||$m(u);return s[c][p]}),a=r&&Object.entries(r).reduce((c,h)=>{let[u,p]=h;return p===void 0||(c[u]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,h)=>{let{class:u,className:p,...f}=h;return Object.entries(f).every(x=>{let[m,b]=x;return Array.isArray(b)?b.includes({...i,...a}[m]):{...i,...a}[m]===b})?[...c,u,p]:c},[]);return Dm(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const ck=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vw=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var uk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const dk=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>y.createElement("svg",{ref:l,...uk,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:vw("lucide",s),...a},[...o.map(([c,h])=>y.createElement(c,h)),...Array.isArray(i)?i:[i]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const oe=(e,t)=>{const r=y.forwardRef(({className:n,...s},i)=>y.createElement(dk,{ref:i,iconNode:t,className:vw(`lucide-${ck(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const Mo=oe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const hk=oe("Bath",[["path",{d:"M10 4 8 6",key:"1rru8s"}],["path",{d:"M17 19v2",key:"ts1sot"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M7 19v2",key:"12npes"}],["path",{d:"M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5",key:"14ym8i"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const yw=oe("Bed",[["path",{d:"M2 4v16",key:"vw9hq8"}],["path",{d:"M2 8h18a2 2 0 0 1 2 2v10",key:"1dgv2r"}],["path",{d:"M2 17h20",key:"18nfp3"}],["path",{d:"M6 8v9",key:"1yriud"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree.
81 */const fk=oe("Blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const pk=oe("Bus",[["path",{d:"M8 6v6",key:"18i7km"}],["path",{d:"M15 6v6",key:"1sg6z9"}],["path",{d:"M2 12h19.6",key:"de5uta"}],["path",{d:"M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3",key:"1wwztk"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}],["path",{d:"M9 18h5",key:"lrx6i"}],["circle",{cx:"16",cy:"18",r:"2",key:"1v4tcr"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const mk=oe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const gk=oe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const vk=oe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const yk=oe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree. 111 */const wk=oe("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const Mm=oe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const bk=oe("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"}]]);/** 122 * @license lucide-react v0.462.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const Nu=oe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 127 * @license lucide-react v0.462.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const xk=oe("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"}]]);/** 132 * @license lucide-react v0.462.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const _k=oe("HardHat",[["path",{d:"M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5",key:"1p9q5i"}],["path",{d:"M14 6a6 6 0 0 1 6 6v3",key:"1hnv84"}],["path",{d:"M4 15v-3a6 6 0 0 1 6-6",key:"9ciidu"}],["rect",{x:"2",y:"15",width:"20",height:"4",rx:"1",key:"g3x8cw"}]]);/** 137 * @license lucide-react v0.462.0 - ISC 138 * 139 * This source code is licensed under the ISC license. 140 * See the LICENSE file in the root directory of this source tree. 141 */const ww=oe("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"}]]);/** 142 * @license lucide-react v0.462.0 - ISC 143 * 144 * This source code is licensed under the ISC license. 145 * See the LICENSE file in the root directory of this source tree. 146 */const Sk=oe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** 147 * @license lucide-react v0.462.0 - ISC 148 * 149 * This source code is licensed under the ISC license. 150 * See the LICENSE file in the root directory of this source tree. 151 */const bw=oe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 152 * @license lucide-react v0.462.0 - ISC 153 * 154 * This source code is licensed under the ISC license. 155 * See the LICENSE file in the root directory of this source tree. 156 */const Pf=oe("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 157 * @license lucide-react v0.462.0 - ISC 158 * 159 * This source code is licensed under the ISC license. 160 * See the LICENSE file in the root directory of this source tree. 161 */const Uo=oe("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"}]]);/** 162 * @license lucide-react v0.462.0 - ISC 163 * 164 * This source code is licensed under the ISC license. 165 * See the LICENSE file in the root directory of this source tree. 166 */const Ek=oe("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"}]]);/** 167 * @license lucide-react v0.462.0 - ISC 168 * 169 * This source code is licensed under the ISC license. 170 * See the LICENSE file in the root directory of this source tree. 171 */const kk=oe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 172 * @license lucide-react v0.462.0 - ISC 173 * 174 * This source code is licensed under the ISC license. 175 * See the LICENSE file in the root directory of this source tree. 176 */const Ck=oe("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** 177 * @license lucide-react v0.462.0 - ISC 178 * 179 * This source code is licensed under the ISC license. 180 * See the LICENSE file in the root directory of this source tree. 181 */const Tk=oe("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}
vendor: 10,389 bytes, lines 181-216
181],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);/** 182 * @license lucide-react v0.462.0 - ISC 183 * 184 * This source code is licensed under the ISC license. 185 * See the LICENSE file in the root directory of this source tree. 186 */const xw=oe("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 187 * @license lucide-react v0.462.0 - ISC 188 * 189 * This source code is licensed under the ISC license. 190 * See the LICENSE file in the root directory of this source tree. 191 */const Rk=oe("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"}]]);/** 192 * @license lucide-react v0.462.0 - ISC 193 * 194 * This source code is licensed under the ISC license. 195 * See the LICENSE file in the root directory of this source tree. 196 */const Af=oe("Trees",[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]]);/** 197 * @license lucide-react v0.462.0 - ISC 198 * 199 * This source code is licensed under the ISC license. 200 * See the LICENSE file in the root directory of this source tree. 201 */const jk=oe("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 202 * @license lucide-react v0.462.0 - ISC 203 * 204 * This source code is licensed under the ISC license. 205 * See the LICENSE file in the root directory of this source tree. 206 */const Nk=oe("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/** 207 * @license lucide-react v0.462.0 - ISC 208 * 209 * This source code is licensed under the ISC license. 210 * See the LICENSE file in the root directory of this source tree. 211 */const Nc=oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 212 * @license lucide-react v0.462.0 - ISC 213 * 214 * This source code is licensed under the ISC license. 215 * See the LICENSE file in the root directory of this source tree. 216 */const _w=oe("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"}]]),Of="-",Pk=e=>{const t=Ok(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(Of);return a[0]===""&&a.length!==1&&a.shift(),Sw(a,t)||Ak(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},Sw=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?Sw(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Of);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Um=/^\[(.+)\]$/,Ak=e=>{if(Um.test(e)){const t=Um.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ok=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Lk(Object.entries(e.classGroups),r).forEach(([i,o])=>{Qd(o,n,i,t)}),n},Qd=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Fm(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(Ik(s)){Qd(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{Qd(o,Fm(t,i),r,n)})})},Fm=(e,t)=>{let r=e;return t.split(Of).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Ik=e=>e.isThemeGetter,Lk=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e,$k=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},Ew="!",Dk=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,h=0,u;for(let b=0;b<a.length;b++){let v=a[b];if(c===0){if(v===s&&(n||a.slice(b,b+i)===t)){l.push(a.slice(h,b)),h=b+i;continue}if(v==="/"){u=b;continue}}v==="["?c++:v==="]"&&c--}const p=l.length===0?a:a.substring(h),f=p.startsWith(Ew),x=f?p.substring(1):p,m=u&&u>h?u-h:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:x,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:o}):o},Mk=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Uk=e=>({cache:$k(e.cacheSize),parseClassName:Dk(e),...Pk(e)}),Fk=/\s+/,zk=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(Fk);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:h,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:f}=r(c);let x=!!f,m=n(x?p.substring(0,f):p);if(!m){if(!x){a=c+(a.length>0?" "+a:a);continue}if(m=n(p),!m){a=c+(a.length>0?" "+a:a);continue}x=!1}const b=Mk(h).join(":"),v=u?b+Ew:b,g=v+m;if(i.includes(g))continue;i.push(g);const w=s(m,x);for(let _=0;_<w.length;++_){const S=w[_];i.push(v+S)}a=c+(a.length>0?" "+a:a)}return a};function Bk(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=kw(t))&&(n&&(n+=" "),n+=r);return n}const kw=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=kw(e[n]))&&(r&&(r+=" "),r+=t);return r};function Hk(e,...t){let r,n,s,i=o;function o(l){const c=t.reduce((h,u)=>u(h),e());return r=Uk(c),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const h=zk(l,r);return s(l,h),h}return function(){return i(Bk.apply(null,arguments))}}const fe=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Cw=/^\[(?:([a-z-]+):)?(.+)\]$/i,Wk=/^\d+\/\d+$/,Vk=new Set(["px","full","screen"]),qk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kk=/\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$/,Gk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gr=e=>Zs(e)||Vk.has(e)||Wk.test(e),qr=e=>Ii(e,"length",sC),Zs=e=>!!e&&!Number.isNaN(Number(e)),Pu=e=>Ii(e,"number",Zs),Qi=e=>!!e&&Number.isInteger(Number(e)),Yk=e=>e.endsWith("%")&&Zs(e.slice(0,-1)),Y=e=>Cw.test(e),Kr=e=>qk.test(e),Xk=new Set(["length","size","percentage"]),Zk=e=>Ii(e,Xk,Tw),eC=e=>Ii(e,"position",Tw),tC=new Set(["image","url"]),rC=e=>Ii(e,tC,oC),nC=e=>Ii(e,"",iC),Ji=()=>!0,Ii=(e,t,r)=>{const n=Cw.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},sC=e=>Kk.test(e)&&!Gk.test(e),Tw=()=>!1,iC=e=>Qk.test(e),oC=e=>Jk.test(e),aC=()=>{const e=fe("colors"),t=fe("spacing"),r=fe("blur"),n=fe("brightness"),s=fe("borderColor"),i=fe("borderRadius"),o=fe("borderSpacing"),a=fe("borderWidth"),l=fe("contrast"),c=fe("grayscale"),h=fe("hueRotate"),u=fe("invert"),p=fe("gap"),f=fe("gradientColorStops"),x=fe("gradientColorStopPositions"),m=fe("inset"),b=fe("margin"),v=fe("opacity"),g=fe("padding"),w=fe("saturate"),_=fe("scale"),S=fe("sepia"),E=fe("skew"),C=fe("space"),T=fe("translate"),R=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto",Y,t],N=()=>[Y,t],$=()=>["",gr,qr],L=()=>["auto",Zs,Y],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",Y],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[Zs,Y];return{cacheSize:500,separator:":",theme:{colors:[Ji],spacing:[gr,qr],blur:["none","",Kr,Y],brightness:W(),borderColor:[e],borderRadius:["none","","full",Kr,Y],borderSpacing:N(),borderWidth:$(),contrast:W(),grayscale:A(),hueRotate:W(),invert:A(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Yk,qr],inset:B(),margin:B(),opacity:W(),padding:N(),saturate:W(),scale:W(),sepia:A(),skew:W(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[Kr]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...q(),Y]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}
vendor: 9,916 bytes, line 216
216],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qi,Y]}],basis:[{basis:B()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Qi,Y]}],"grid-cols":[{"grid-cols":[Ji]}],"col-start-end":[{col:["auto",{span:["full",Qi,Y]},Y]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Ji]}],"row-start-end":[{row:["auto",{span:[Qi,Y]},Y]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[Kr]},Kr]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kr,qr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pu]}],"font-family":[{font:[Ji]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",Zs,Pu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gr,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gr,qr]}],"underline-offset":[{"underline-offset":["auto",gr,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),eC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:K()}],"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:["",...K()]}],"outline-offset":[{"outline-offset":[gr,Y]}],"outline-w":[{outline:[gr,qr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[gr,qr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kr,nC]}],"shadow-color":[{shadow:[Ji]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kr,Y]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Qi,Y]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,646 bytes, line 216
216],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gr,qr,Pu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},lC=Hk(aC);function _e(...e){return lC(gw(e))}const cC=lk,Rw=y.forwardRef(({className:e,...t},r)=>d.jsx(cw,{ref:r,className:_e("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}));Rw.displayName=cw.displayName;const uC=Nf("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"}}),jw=y.forwardRef(({className:e,variant:t,...r},n)=>d.jsx(uw,{ref:n,className:_e(uC({variant:t}),e),...r}));jw.displayName=uw.displayName;const dC=y.forwardRef(({className:e,...t},r)=>d.jsx(fw,{ref:r,className:_e("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 hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));dC.displayName=fw.displayName;const Nw=y.forwardRef(({className:e,...t},r)=>d.jsx(pw,{ref:r,className:_e("absolute right-2 top-2 rounded-md p-1 text-foreground
216/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:d.jsx(Nc,{className:"h-4 w-4"})}));Nw.displayName=pw.displayName;const Pw=y.forwardRef(({className:e,...t},r)=>d.jsx(dw,{ref:r,className:_e("text-sm font-semibold",e),...t}));Pw.displayName=dw.displayName;const Aw=y.forwardRef(({className:e,...t},r)=>d.jsx(hw,{ref:r,className:_e("text-sm opacity-90",e),...t}));Aw.displayName=hw.displayName;function hC(){const{toasts:e}=ua();return d.jsxs(cC,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return d.jsxs(jw,{...i,children:[d.jsxs("div",{className:"grid gap-1",children:[r&&d.jsx(Pw,{children:r}),n&&d.jsx(Aw,{children:n})]}),s,d.jsx(Nw,{})]},t)}),d.jsx(Rw,{})]})}var zm=["light","dark"],fC="(prefers-color-scheme: dark)",pC=y.createContext(void 0),mC={setTheme:e=>{},themes:[]},gC=()=>{var e;return(e=y.useContext(pC))!=null?e:mC};y.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",h=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,u=s?zm.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(x,m=!1,b=!0)=>{let v=o?o[x]:x,g=m?x+"|| ''":`'${v}'`,w="";return s&&b&&!m&&zm.includes(x)&&(w+=`d.style.colorScheme = '${x}';`),r==="class"?m||v?w+=`c.add(${g})`:w+="null":v&&(w+=`d[s](n,${g})`),w},f=e?`!function(){${h}${p(e)}}()`:n?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${fC}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${c?"":"else{"+p(i,!1,!1)+"}"}${u}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${u}}catch(t){}}();`;return y.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var vC=e=>{switch(e){case"success":return bC;case"info":return _C;case"warning":return xC;case"error":return SC;default:return null}},yC=Array(12).fill(0),wC=({visible:e,className:t})=>O.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},O.createElement("div",{className:"sonner-spinner"},yC.map((r,n)=>O.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),bC=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),xC=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},O.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"})),_C=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),SC=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),EC=O.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"},O.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),kC=()=>{let[e,t]=O.useState(document.hidden);return O.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Jd=1,CC=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 216
216{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Jd++,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:r}),{...a,...e,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
216this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],O.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(RC(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:c,description:h})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,h=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:c,description:h})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,h=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:c,description:h})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Jd++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},nt=new CC,TC=(e,t)=>{let r=(t==null?void 0:t.id)||Jd++;return nt.addToast({title:e,...t,id:r}),r},RC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",jC=TC,NC=()=>nt.toasts,PC=()=>nt.getActiveToasts();Object.assign(jC,{success:nt.success,info:nt.info,warning:nt.warning,error:nt.error,custom:nt.custom,message:nt.message,promise:nt.promise,dismiss:nt.dismiss,loading:nt.loading},{getHistory:NC,getToasts:PC});function AC(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}AC(`: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;
216left: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}
216: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%);
216--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%)} 217`);function Fa(e){return e.label!==void 0}var OC=3,IC="32px",LC="16px",Bm=4e3,$C=356,DC=14,MC=20,UC=200;function $t(...e){return e.filter(Boolean).join(" ")}function FC(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var zC=e=>{var t,r,n,s,i,o,a,l,c,h,u;let{invert:p,toast:f,unstyled:x,interacting:m,setHeights:b,visibleToasts:v,heights:g,index:w,toasts:_,expanded:S,removeToast:E,defaultRichColors:C,closeButton:T,style:R,cancelButtonStyle:P,actionButtonStyle:B,className:N="",descriptionClassName:$="",duration:L,position:q,gap:K,loadingIcon:Q,expandByDefault:j,classNames:A,icons:M,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:H}=e,[X,ee]=O.useState(null),[Te,Be]=O.useState(null),[ae,ys]=O.useState(!1),[Ur,Ln]=O.useState(!1),[Fr,ws]=O.useState(!1),[zr,va]=O.useState(!1),[Jc,ya]=O.useState(!1),[Yc,Ui]=O.useState(0),[bs,mp]=O.useState(0),Fi=O.useRef(f.duration||L||Bm),gp=O.useRef(null),$n=O.useRef(null),P1=w===0,A1=w+1<=v,bt=f.type,xs=f.dismissible!==!1,O1=f.className||"",I1=f.descriptionClassName||"",wa=O.useMemo(()=>g.findIndex(J=>J.toastId===f.id)||0,[g,f.id]),L1=O.useMemo(()=>{var J;return(J=f.closeButton)!=null?J:T},[f.closeButton,T]),vp=O.useMemo(()=>f.duration||L||Bm,[f.duration,L]),Xc=O.useRef(0),_s=O.useRef(0),yp=O.useRef(0),Ss=O.useRef(null),[$1,D1]=q.split("-"),wp=O.useMemo(()=>g.reduce((J,ue,ve)=>ve>=wa?J:J+ue.height,0),[g,wa]),bp=kC(),M1=f.invert||p,Zc=bt==="loading";_s.current=O.useMemo(()=>wa*K+wp,[wa,wp]),O.useEffect(()=>{Fi.current=vp},[vp]),O.useEffect(()=>{ys(!0)},[]),O.useEffect(()=>{let J=$n.current;if(J){let ue=J.getBoundingClientRect().height;return mp(ue),b(ve=>[{toastId:f.id,height:ue,position:f.position},...ve]),()=>b(ve=>ve.filter(At=>At.toastId!==f.id))}},[b,f.id]),O.useLayoutEffect(()=>{if(!ae)return;let J=$n.current,ue=J.style.height;J.style.height="auto";let ve=J.getBoundingClientRect().height;J.style.height=ue,mp(ve),b(At=>At.find(Ot=>Ot.toastId===f.id)?At.map(Ot=>Ot.toastId===f.id?{...Ot,height:ve}:Ot):[{toastId:f.id,height:ve,position:f.position},...At])},[ae,f.title,f.description,b,f.id]);let Br=O.useCallback(()=>{Ln(!0),Ui(_s.current),b(J=>J.filter(ue=>ue.toastId!==f.id)),setTimeout(()=>{E(f)},UC)},[f,E,b,_s]);O.useEffect(()=>{if(f.promise&&bt==="loading"||f.duration===1/0||f.type==="loading")return;let J;return S||m||H&&bp?(()=>{if(yp.current<Xc.current){let ue=new Date().getTime()-Xc.current;Fi.current=Fi.current-ue}
217yp.current=new Date().getTime()})():Fi.current!==1/0&&(Xc.current=new Date().getTime(),J=setTimeout(()=>{var ue;(ue=f.onAutoClose)==null||ue.call(f,f),Br()},Fi.current)),()=>clearTimeout(J)},[S,m,f,bt,H,bp,Br]),O.useEffect(()=>{f.delete&&Br()},[Br,f.delete]);function U1(){var J,ue,ve;return M!=null&&M.loading?O.createElement("div",{className:$t(A==null?void 0:A.loader,(J=f==null?void 0:f.classNames)==null?void 0:J.loader,"sonner-loader"),"data-visible":bt==="loading"},M.loading):Q?O.createElement("div",{className:$t(A==null?void 0:A.loader,(ue=f==null?void 0:f.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":bt==="loading"},Q):O.createElement(wC,{className:$t(A==null?void 0:A.loader,(ve=f==null?void 0:f.classNames)==null?void 0:ve.loader),visible:bt==="loading"})}return O.createElement("li",{tabIndex:0,ref:$n,className:$t(N,O1,A==null?void 0:A.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[bt],(r=f==null?void 0:f.classNames)==null?void 0:r[bt]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:C,"data-styled":!(f.jsx||f.unstyled||x),"data-mounted":ae,"data-promise":!!f.promise,"data-swiped":Jc,"data-removed":Ur,"data-visible":A1,"data-y-position":$1,"data-x-position":D1,"data-index":w,"data-front":P1,"data-swiping":Fr,"data-dismissible":xs,"data-type":bt,"data-invert":M1,"data-swipe-out":zr,"data-swipe-direction":Te,"data-expanded":!!(S||j&&ae),style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${Ur?Yc:_s.current}px`,"--initial-height":j?"auto":`${bs}px`,...R,...f.style},onDragEnd:()=>{ws(!1),ee(null),Ss.current=null},onPointerDown:J=>{Zc||!xs||(gp.current=new Date,Ui(_s.current),J.target.setPointerCapture(J.pointerId),J.target.tagName!=="BUTTON"&&(ws(!0),Ss.current={x:J.clientX,y:J.clientY}))},onPointerUp:()=>{var J,ue,ve,At;if(zr||!xs)return;Ss.current=null;let Ot=Number(((J=$n.current)==null?void 0:J.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Hr=Number(((ue=$n.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Dn=new Date().getTime()-((ve=gp.current)==null?void 0:ve.getTime()),It=X==="x"?Ot:Hr,Wr=Math.abs(It)/Dn;if(Math.abs(It)>=MC||Wr>.11){Ui(_s.current),(At=f.onDismiss)==null||At.call(f,f),Be(X==="x"?Ot>0?"right":"left":Hr>0?"down":"up"),Br(),va(!0),ya(!1);return}ws(!1),ee(null)},onPointerMove:J=>{var ue,ve,At,Ot;if(!Ss.current||!xs||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;let Hr=J.clientY-Ss.current.y,Dn=J.clientX-Ss.current.x,It=(ve=e.swipeDirections)!=null?ve:FC(q);!X&&(Math.abs(Dn)>1||Math.abs(Hr)>1)&&ee(Math.abs(Dn)>Math.abs(Hr)?"x":"y");let Wr={x:0,y:0};X==="y"?(It.includes("top")||It.includes("bottom"))&&(It.includes("top")&&Hr<0||It.includes("bottom")&&Hr>0)&&(Wr.y=Hr):X==="x"&&(It.includes("left")||It.includes("right"))&&(It.includes("left")&&Dn<0||It.includes("right")&&Dn>0)&&(Wr.x=Dn),(Math.abs(Wr.x)>0||Math.abs(Wr.y)>0)&&ya(!0),(At=$n.current)==null||At.style.setProperty("--swipe-amount-x",`${Wr.x}px`),(Ot=$n.current)==null||Ot.style.setProperty("--swipe-amount-y",`${Wr.y}px`)}},L1&&!f.jsx?O.createElement("button",{"aria-label":W,"data-disabled":Zc,"data-close-button":!0,onClick:Zc||!xs?()=>{}:()=>{var J;Br(),(J=f.onDismiss)==null||J.call(f,f)},className:$t(A==null?void 0:A.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=M==null?void 0:M.close)!=null?i:EC):null,f.jsx||y.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:O.createElement(O.Fragment,null,bt||f.icon||f.promise?O.createElement("div",{"data-icon":"",className:$t(A==null?void 0:A.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||U1():null,f.type!=="loading"?f.icon||(M==null?void 0:M[bt])||vC(bt):null):null,O.createElement("div",{"data-content":"",className:$t(A==null?void 0:A.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},O.createElement("div",{"data-title":"",className:$t(A==null?void 0:A.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?O.createElement("div",{"data-description":"",className:$t($,I1,A==null?void 0:A.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),y.isValidElement(f.cancel)?f.cancel:f.cancel&&Fa(f.cancel)?O.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||P,onClick:J=>{var ue,ve;Fa(f.cancel)&&xs&&((ve=(ue=f.cancel).onClick)==null||ve.call(ue,J),Br())},className:$t(A==null?void 0:A.cancelButton,(h=f==null?void 0:f.classNames)==null?void 0:h.cancelButton)},f.cancel.label):null,y.isValidElement(f.action)?f.action:f.action&&Fa(f.action)?O.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||B,onClick:J=>{var ue,ve;Fa(f.action)&&((ve=(ue=f.action).onClick)==null||ve.call(ue,J),!J.defaultPrevented&&Br())},className:$t(A==null?void 0:A.actionButton,(u=f==null?void 0:f.classNames)==null?void 0:u.actionButton)},f.action.label):null))};function Hm(){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 BC(e,t){let r={};return[e,t].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?LC:IC;function l(c){["top","right","bottom","left"].forEach(h=>{r[`${o}-${h}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${o}-${c}`]=a:r[`${o}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var HC=y.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:h="light",richColors:u,duration:p,style:f,visibleToasts:x=OC,toastOptions:m,dir:b=Hm(),gap:v=DC,loadingIcon:g,icons:w,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[E,C]=O.useState([]),T=O.useMemo(()=>Array.from(new Set([n].concat(E.filter(H=>H.position).map(H=>H.position)))),[E,n]),[R,P]=O.useState([]),[B,N]=O.useState(!1),[$,L]=O.useState(!1),[q,K]=O.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
217k":"light"),Q=O.useRef(null),j=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=O.useRef(null),M=O.useRef(!1),W=O.useCallback(H=>{C(X=>{var ee;return(ee=X.find(Te=>Te.id===H.id))!=null&&ee.delete||nt.dismiss(H.id),X.filter(({id:Te})=>Te!==H.id)})},[]);return O.useEffect(()=>nt.subscribe(H=>{if(H.dismiss){C(X=>X.map(ee=>ee.id===H.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{z0.flushSync(()=>{C(X=>{let ee=X.findIndex(Te=>Te.id===H.id);return ee!==-1?[...X.slice(0,ee),{...X[ee],...H},...X.slice(ee+1)]:[H,...X]})})})}),[]),O.useEffect(()=>{if(h!=="system"){K(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:X})=>{K(X?"dark":"light")})}catch{H.addListener(({matches:ee})=>{try{K(ee?"dark":"light")}catch(Te){console.error(Te)}})}},[h]),O.useEffect(()=>{E.length<=1&&N(!1)},[E]),O.useEffect(()=>{let H=X=>{var ee,Te;s.every(Be=>X[Be]||X.code===Be)&&(N(!0),(ee=Q.current)==null||ee.focus()),X.code==="Escape"&&(document.activeElement===Q.current||(Te=Q.current)!=null&&Te.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),O.useEffect(()=>{if(Q.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,M.current=!1)}},[Q.current]),O.createElement("section",{ref:t,"aria-label":`${_} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((H,X)=>{var ee;let[Te,Be]=H.split("-");return E.length?O.createElement("ol",{key:H,dir:b==="auto"?Hm():b,tabIndex:-1,ref:Q,className:a,"data-sonner-toaster":!0,"data-theme":q,"data-y-position":Te,"data-lifted":B&&E.length>1&&!i,"data-x-position":Be,style:{"--front-toast-height":`${((ee=R[0])==null?void 0:ee.height)||0}px`,"--width":`${$C}px`,"--gap":`${v}px`,...f,...BC(l,c)},onBlur:ae=>{M.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(M.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||M.current||(M.current=!0,A.current=ae.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{$||N(!1)},onDragEnd:()=>N(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},E.filter(ae=>!ae.position&&X===0||ae.position===H).map((ae,ys)=>{var Ur,Ln;return O.createElement(zC,{key:ae.id,icons:w,index:ys,toast:ae,defaultRichColors:u,duration:(Ur=m==null?void 0:m.duration)!=null?Ur:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:x,closeButton:(Ln=m==null?void 0:m.closeButton)!=null?Ln:o,interacting:$,position:H,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:W,toasts:E.filter(Fr=>Fr.position==ae.position),heights:R.filter(Fr=>Fr.position==ae.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:g,expanded:B,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const WC=({...e})=>{const{theme:t="system"}=gC();return d.jsx(HC,{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 VC=Ih[" useId ".trim().toString()]||(()=>{}),qC=0;function yo(e){const[t,r]=y.useState(VC());return Qt(()=>{r(n=>n??String(qC++))},[e]),t?`radix-${t}`:""}const KC=["top","right","bottom","left"],Tn=Math.min,ht=Math.max,Vl=Math.round,za=Math.floor,Rn=e
vendor: 2,294 bytes, line 217
217=>({x:e,y:e}),GC={left:"right",right:"left",bottom:"top",top:"bottom"},QC={start:"end",end:"start"};function Yd(e,t,r){return ht(e,Tn(t,r))}function Ir(e,t){return typeof e=="function"?e(t):e}function Lr(e){return e.split("-")[0]}function Li(e){return e.split("-")[1]}function If(e){return e==="x"?"y":"x"}function Lf(e){return e==="y"?"height":"width"}function jn(e){return["top","bottom"].includes(Lr(e))?"y":"x"}function $f(e){return If(jn(e))}function JC(e,t,r){r===void 0&&(r=!1);const n=Li(e),s=$f(e),i=Lf(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=ql(o)),[o,ql(o)]}function YC(e){const t=ql(e);return[Xd(e),t,Xd(t)]}function Xd(e){return e.replace(/start|end/g,t=>QC[t])}function XC(e,t,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?s:n:t?n:s;case"left":case"right":return t?i:o;default:return[]}}function ZC(e,t,r,n){const s=Li(e);let i=XC(Lr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Xd)))),i}function ql(e){return e.replace(/left|right|bottom|top/g,t=>GC[t])}function eT(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ow(e){return typeof e!="number"?eT(e):{top:e,right:e,bottom:e,left:e}}function Kl(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Wm(e,t,r){let{reference:n,floating:s}=e;const i=jn(t),o=$f(t),a=Lf(o),l=Lr(t),c=i==="y",h=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let f;switch(l){case"top":f={x:h,y:n.y-s.height};break;case"bottom":f={x:h,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-s.width,y:u};break;default:f={x:n.x,y:n.y}}switch(Li(t)){case"start":f[o]-=p*(r&&c?-1:1);break;case"end":f[o]+=p*(r&&c?-1:1);break}return f}const tT=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:u}=Wm(c,n,l),p=n,f={},x=0;for(let m=0;m<a.length;m++){const{name:b,fn:v}=a[m],{x:g,y:w,data:_,reset:S}=await v({x:h,y:u,initialPlacement:n,placement:p,strategy:s,middlewareData:f,re
vendor: 9,374 bytes, line 217
217cts:c,platform:o,elements:{reference:e,floating:t}});h=g??h,u=w??u,f={...f,[b]:{...f[b],..._}},S&&x<=50&&(x++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:h,y:u}=Wm(c,p,l)),m=-1)}return{x:h,y:u,placement:p,strategy:s,middlewareData:f}};async function Fo(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=Ir(t,e),x=Ow(f),b=a[p?u==="floating"?"reference":"floating":u],v=Kl(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),g=u==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},S=Kl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:(v.top-S.top+x.top)/_.y,bottom:(S.bottom-v.bottom+x.bottom)/_.y,left:(v.left-S.left+x.left)/_.x,right:(S.right-v.right+x.right)/_.x}}const rT=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:h=0}=Ir(e,t)||{};if(c==null)return{};const u=Ow(h),p={x:r,y:n},f=$f(s),x=Lf(f),m=await o.getDimensions(c),b=f==="y",v=b?"top":"left",g=b?"bottom":"right",w=b?"clientHeight":"clientWidth",_=i.reference[x]+i.reference[f]-p[f]-i.floating[x],S=p[f]-i.reference[f],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=E?E[w]:0;(!C||!await(o.isElement==null?void 0:o.isElement(E)))&&(C=a.floating[w]||i.floating[x]);const T=_/2-S/2,R=C/2-m[x]/2-1,P=Tn(u[v],R),B=Tn(u[g],R),N=P,$=C-m[x]-B,L=C/2-m[x]/2+T,q=Yd(N,L,$),K=!l.arrow&&Li(s)!=null&&L!==q&&i.reference[x]/2-(L<N?P:B)-m[x]/2<0,Q=K?L<N?L-N:L-$:0;return{[f]:p[f]+Q,data:{[f]:q,centerOffset:L-q-Q,...K&&{alignmentOffset:Q}},reset:K}}}),nT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:m=!0,...b}=Ir(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=Lr(s),g=jn(a),w=Lr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(w||!m?[ql(a)]:YC(a)),E=x!=="none";!p&&E&&S.push(...ZC(a,m,x,_));const C=[a,...S],T=await Fo(t,b),R=[];let P=((n=i.flip)==null?void 0:n.overflows)||[];if(h&&R.push(T[v]),u){const L=JC(s,o,_);R.push(T[L[0]],T[L[1]])}if(P=[...P,{placement:s,overflows:R}],!R.every(L=>L<=0)){var B,N;const L=(((B=i.flip)==null?void 0:B.index)||0)+1,q=C[L];if(q)return{data:{index:L,overflows:P},reset:{placement:q}};let K=(N=P.filter(Q=>Q.overflows[0]<=0).sort((Q,j)=>Q.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!K)switch(f){case"bestFit":{var $;const Q=($=P.filter(j=>{if(E){const A=jn(j.placement);return A===g||A==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(A=>A>0).reduce((A,M)=>A+M,0)]).sort((j,A)=>j[1]-A[1])[0])==null?void 0:$[0];Q&&(K=Q);break}case"initialPlacement":K=a;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function Vm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qm(e){return KC.some(t=>e[t]>=0)}const sT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Ir(e,t);switch(n){case"referenceHidden":{const i=await Fo(t,{...s,elementContext:"reference"}),o=Vm(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:qm(o)}}}case"escaped":{const i=await Fo(t,{...s,altBoundary:!0}),o=Vm(i,r.floating);return{data:{escapedOffsets:o,escaped:qm(o)}}}default:return{}}}}};async function iT(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Lr(r),a=Li(r),l=jn(r)==="y",c=["left","top"].includes(o)?-1:1,h=i&&l?-1:1,u=Ir(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:x}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof x=="number"&&(f=a==="end"?x*-1:x),l?{x:f*h,y:p*c}:{x:p*c,y:f*h}}const oT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await iT(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},aT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:v,y:g}=b;return{x:v,y:g}}},...l}=Ir(e,t),c={x:r,y:n},h=await Fo(t,l),u=jn(Lr(s)),p=If(u);let f=c[p],x=c[u];if(i){const b=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=f+h[b],w=f-h[v];f=Yd(g,f,w)}if(o){const b=u==="y"?"top":"left",v=u==="y"?"bottom":"right",g=x+h[b],w=x-h[v];x=Yd(g,x,w)}const m=a.fn({...t,[p]:f,[u]:x});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:i,[u]:o}}}}}},lT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ir(e,t),h={x:r,y:n},u=jn(s),p=If(u);let f=h[p],x=h[u];const m=Ir(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=p==="y"?"height":"width",_=i.reference[p]-i.floating[w]+b.mainAxis,S=i.reference[p]+i.reference[w]-b.mainAxis;f<_?f=_:f>S&&(f=S)}if(c){var v,g;const w=p==="y"?"width":"height",_=["top","left"].includes(Lr(s)),S=i.reference[u]-i.floating[w]+(_&&((v=o.offset)==null?void 0:v[u])||0)+(_?0:b.crossAxis),E=i.reference[u]+i.reference[w]+(_?0:((g=o.offset)==null?void 0:g[u])||0)-(_?b.crossAxis:0);x<S?x=S:x>E&&(x=E)}return{[p]:f,[u]:x}}}},cT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=Ir(e,t),h=await Fo(t,c),u=Lr(s),p=Li(s),f=jn(s)==="y",{width:x,height:m}=i.floating;let b,v;u==="top"||u==="bottom"?(b=u,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=u,b=p==="end"?"top":"bottom");const g=m-h.top-h.bottom,w=x-h.left-h.right,_=Tn(m-h[b],g),S=Tn(x-h[v],w),E=!t.middlewareData.shift;let C=_,T=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=g),E&&!p){const P=ht(h.left,0),B=ht(h.right,0),N=ht(h.top,0),$=ht(h.bottom,0);f?T=x-2*(P!==0||B!==0?P+B:ht(h.left,h.right)):C=m-2*(N!==0||$!==0?N+$:ht(h.top,h.bottom))}await l({...t,availableWidth:T,availableHeight:C});const R=await o.getDimensions(a.floating);return x!==R.width||m!==R.height?{reset:{rects:!0}}:{}}}};function Pc(){return typeof window<"u"}function $i(e){return Iw(e)?(e.nodeName||"").toLowerCase():"#document"}function gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fr(e){var t;return(t=(Iw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Iw(e){return Pc()?e instanceof Node||e instanceof gt(e).Node:!1}function Jt(e){return Pc()?e instanceof Element||e instanceof gt(e).Element:!1}function hr(e){return Pc()?e instanceof HTMLElement||e instanceof gt(e).HTMLElement:!1}function Km(e){return!Pc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gt(e).ShadowRoot}function ha(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(s)}function uT(e){return["table","td","th"].includes($i(e))}function Ac(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Df(e){const t=Mf(),r=Jt(e)?Yt(e):e;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function dT(e){let t=Nn(e);for(;hr(t)&&!Ci(t);){if(Df(t))return t;if(Ac(t))return null;t=Nn(t)}return null}function Mf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ci(e){return["html","body","#document"].includes($i(e))}function Yt(e){return gt(e).getComputedStyle(e)}function Oc(e){return Jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nn(e){if($i(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Km(e)&&e.host||fr(e);return Km(t)?t.host:t}function Lw(e){const t=Nn(e);return Ci(t)?e.ownerDocument?e.ownerDocument.body:e.body:hr(t)&&ha(t)?t:Lw(t)}function zo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Lw(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=gt(s);if(i){const a=Zd(o);
vendor: 7,125 bytes, line 217
217return t.concat(o,o.visualViewport||[],ha(s)?s:[],a&&r?zo(a):[])}return t.concat(s,zo(s,[],r))}function Zd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $w(e){const t=Yt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=hr(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Vl(r)!==i||Vl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Uf(e){return Jt(e)?e:e.contextElement}function ei(e){const t=Uf(e);if(!hr(t))return Rn(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=$w(t);let o=(i?Vl(r.width):r.width)/n,a=(i?Vl(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const hT=Rn(0);function Dw(e){const t=gt(e);return!Mf()||!t.visualViewport?hT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fT(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==gt(e)?!1:t}function ds(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Uf(e);let o=Rn(1);t&&(n?Jt(n)&&(o=ei(n)):o=ei(e));const a=fT(i,r,n)?Dw(i):Rn(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,h=s.width/o.x,u=s.height/o.y;if(i){const p=gt(i),f=n&&Jt(n)?gt(n):n;let x=p,m=Zd(x);for(;m&&n&&f!==x;){const b=ei(m),v=m.getBoundingClientRect(),g=Yt(m),w=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*b.x,_=v.top+(m.clientTop+parseFloat(g.paddingTop))*b.y;l*=b.x,c*=b.y,h*=b.x,u*=b.y,l+=w,c+=_,x=gt(m),m=Zd(x)}}return Kl({width:h,height:u,x:l,y:c})}function pT(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=fr(n),a=t?Ac(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Rn(1);const h=Rn(0),u=hr(n);if((u||!u&&!i)&&(($i(n)!=="body"||ha(o))&&(l=Oc(n)),hr(n))){const p=ds(n);c=ei(n),h.x=p.x+n.clientLeft,h.y=p.y+n.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+h.x,y:r.y*c.y-l.scrollTop*c.y+h.y}}function mT(e){return Array.from(e.getClientRects())}function eh(e,t){const r=Oc(e).scrollLeft;return t?t.left+r:ds(fr(e)).left+r}function gT(e){const t=fr(e),r=Oc(e),n=e.ownerDocument.body,s=ht(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ht(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+eh(e);const a=-r.scrollTop;return Yt(n).direction==="rtl"&&(o+=ht(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function vT(e,t){const r=gt(e),n=fr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Mf();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function yT(e,t){const r=ds(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=hr(e)?ei(e):Rn(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function Gm(e,t,r){let n;if(t==="viewport")n=vT(e,r);else if(t==="document")n=gT(fr(e));else if(Jt(t))n=yT(t,r);else{const s=Dw(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return Kl(n)}function Mw(e,t){const r=Nn(e);return r===t||!Jt(r)||Ci(r)?!1:Yt(r).position==="fixed"||Mw(r,t)}function wT(e,t){const r=t.get(e);if(r)return r;let n=zo(e,[],!1).filter(a=>Jt(a)&&$i(a)!=="body"),s=null;const i=Yt(e).position==="fixed";let o=i?Nn(e):e;for(;Jt(o)&&!Ci(o);){const a=Yt(o),l=Df(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ha(o)&&!l&&Mw(e,o))?n=n.filter(h=>h!==o):s=a,o=Nn(o)}return t.set(e,n),n}function bT(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?Ac(t)?[]:wT(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,h)=>{const u=Gm(t,h,s);return c.top=ht(u.top,c.top),c.right=Tn(u.right,c.right),c.bottom=Tn(u.bottom,c.bottom),c.left=ht(u.left,c.left),c},Gm(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xT(e){const{width:t,height:r}=$w(e);return{width:t,height:r}}function _T(e,t,r){const n=hr(t),s=fr(t),i=r==="fixed",o=ds(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Rn(0);if(n||!n&&!i)if(($i(t)!=="body"||ha(s))&&(a=Oc(t)),n){const f=ds(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&(l.x=eh(s));let c=0,h=0;if(s&&!n&&!i){const f=s.getBoundingClientRect();h=f.top+a.scrollTop,c=f.left+a.scrollLeft-eh(s,f)}const u=o.left+a.scrollLeft-l.x-c,p=o.top+a.scrollTop-l.y-h;return{x:u,y:p,width:o.width,height:o.height}}function Au(e){return Yt(e).position==="static"}function Qm(e,t){if(!hr(e)||Yt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return fr(e)===r&&(r=r.ownerDocument.body),r}function Uw(e,t){const r=gt(e);if(Ac(e))return r;if(!hr(e)){let s=Nn(e);for(;s&&!Ci(s);){if(Jt(s)&&!Au(s))return s;s=Nn(s)}return r}let n=Qm(e,t);for(;n&&uT(n)&&Au(n);)n=Qm(n,t);return n&&Ci(n)&&Au(n)&&!Df(n)?r:n||dT(e)||r}const ST=async function(e){const t=this.getOffsetParent||Uw,r=this.getDimensions,n=await r(e.floating);return{reference:_T(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ET(e){return Yt(e).direction==="rtl"}const kT={convertOffsetParentRelativeRectToViewportRelativeRect:pT,getDocumentElement:fr,getClippingRect:bT,getOffsetParent:Uw,getElementRects:ST,getClientRects:mT,getDimensions:xT,getScale:ei,isElement:Jt,isRTL:ET};function CT(e,t){let r=null,n;const s=fr(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:h,width:u,height:p}=e.getBoundingClientRect();if(a||t(),!u||!p)return;const f=za(h),x=za(s.clientWidth-(c+u)),m=za(s.clientHeight-(h+p)),b=za(c),g={rootMargin:-f+"px "+-x+"px "+-m+"px "+-b+"px",threshold:ht(0,Tn(1,l))||1};let w=!0;function _(S){const E=S[0].intersectionRatio;if(E!==l){if(!w)return o();E?o(!1,E):n=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(_,{...g,root:s.ownerDocument})}catch{r=new IntersectionObserver(_,g)}r.observe(e)}return o(!0),i}function TT(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Uf(e),h=s||i?[...c?zo(c):[],...zo(t)]:[];h.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const u=c&&a?CT(c,r):null;let p=-1,f=null;o&&(f=new ResizeObserver(v=>{let[g]=v;g&&g.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),r()}),c&&!l&&f.observe(c),f.observe(t));let x,m=l?ds(e):null;l&&b();function b(){const v=ds(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&r(),m=v,x=requestAnimationFrame(b)}return r(),()=>{var v;h.forEach(g=>{s&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),u==null||u(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(x)}}const RT=oT,jT=aT,NT=nT,PT=cT,AT=sT,Jm=rT,OT=lT,IT=(e,t,r)=>{const n=new Map,s={platform:kT,...r},i={...s.platform,_c:n};return tT(e,t,{...s,platform:i})};var ml=typeof document<"u"?y.useLayoutEffect:y.useEffect;function Gl(e,t){if(e===t)return!0;
vendor: 4,133 bytes, line 217
217if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Gl(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!Gl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Fw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ym(e,t){const r=Fw(e);return Math.round(t*r)/r}function Ou(e){const t=y.useRef(e);return ml(()=>{t.current=e}),t}function LT(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[h,u]=y.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=y.useState(n);Gl(p,n)||f(n);const[x,m]=y.useState(null),[b,v]=y.useState(null),g=y.useCallback(j=>{j!==E.current&&(E.current=j,m(j))},[]),w=y.useCallback(j=>{j!==C.current&&(C.current=j,v(j))},[]),_=i||x,S=o||b,E=y.useRef(null),C=y.useRef(null),T=y.useRef(h),R=l!=null,P=Ou(l),B=Ou(s),N=Ou(c),$=y.useCallback(()=>{if(!E.current||!C.current)return;const j={placement:t,strategy:r,middleware:p};B.current&&(j.platform=B.current),IT(E.current,C.current,j).then(A=>{const M={...A,isPositioned:N.current!==!1};L.current&&!Gl(T.current,M)&&(T.current=M,ca.flushSync(()=>{u(M)}))})},[p,t,r,B,N]);ml(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(j=>({...j,isPositioned:!1})))},[c]);const L=y.useRef(!1);ml(()=>(L.current=!0,()=>{L.current=!1}),[]),ml(()=>{if(_&&(E.current=_),S&&(C.current=S),_&&S){if(P.current)return P.current(_,S,$);$()}},[_,S,$,P,R]);const q=y.useMemo(()=>({reference:E,floating:C,setReference:g,setFloating:w}),[g,w]),K=y.useMemo(()=>({reference:_,floating:S}),[_,S]),Q=y.useMemo(()=>{const j={position:r,left:0,top:0};if(!K.floating)return j;const A=Ym(K.floating,h.x),M=Ym(K.floating,h.y);return a?{...j,transform:"translate("+A+"px, "+M+"px)",...Fw(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:M}},[r,a,K.floating,h.x,h.y]);return y.useMemo(()=>({...h,update:$,refs:q,elements:K,floatingStyles:Q}),[h,$,q,K,Q])}const $T=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Jm({element:n.current,padding:s}).fn(r):{}:n?Jm({element:n,padding:s}).fn(r):{}}}},DT=(e,t)=>({...RT(e),options:[e,t]}),MT=(e,t)=>({...jT(e),options:[e,t]}),UT=(e,t)=>({...OT(e),options:[e,t]}),FT=(e,t)=>({...NT(e),options:[e,t]}),zT=(e,t)=>({...PT(e),options:[e,t]}),BT=(e,t)=>({...AT(e),options:[e,t]}),HT=(e,t)=>({...$T(e),options:[e,t]});var WT="Arrow",zw=y.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return d.jsx(se.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});zw.displayName=WT;var VT=zw;function Bw(e){const[t,r]=y.useState(void 0);return Qt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Hw="Popper",[Ww,Vw]=Mr(Hw),[c4,qw]=Ww(Hw),Kw="PopperAnchor",Gw=y.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=qw(Kw,r),o=y.useRef(null),a=ge(t,o);return y.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:d.jsx(se.div,{...s,ref:a})});Gw.displayName=Kw;var Ff="PopperContent",[qT,KT]=Ww(Ff),Qw=y.forwardRef((e,t)=>{var ae,ys,Ur,Ln,Fr,ws;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l
vendor: 4,304 bytes, line 217
217=!0,collisionBoundary:c=[],collisionPadding:h=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:x,...m}=e,b=qw(Ff,r),[v,g]=y.useState(null),w=ge(t,zr=>g(zr)),[_,S]=y.useState(null),E=Bw(_),C=(E==null?void 0:E.width)??0,T=(E==null?void 0:E.height)??0,R=n+(i!=="center"?"-"+i:""),P=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},B=Array.isArray(c)?c:[c],N=B.length>0,$={padding:P,boundary:B.filter(QT),altBoundary:N},{refs:L,floatingStyles:q,placement:K,isPositioned:Q,middlewareData:j}=LT({strategy:"fixed",placement:R,whileElementsMounted:(...zr)=>TT(...zr,{animationFrame:f==="always"}),elements:{reference:b.anchor},middleware:[DT({mainAxis:s+T,alignmentAxis:o}),l&&MT({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?UT():void 0,...$}),l&&FT({...$}),zT({...$,apply:({elements:zr,rects:va,availableWidth:Jc,availableHeight:ya})=>{const{width:Yc,height:Ui}=va.reference,bs=zr.floating.style;bs.setProperty("--radix-popper-available-width",`${Jc}px`),bs.setProperty("--radix-popper-available-height",`${ya}px`),bs.setProperty("--radix-popper-anchor-width",`${Yc}px`),bs.setProperty("--radix-popper-anchor-height",`${Ui}px`)}}),_&&HT({element:_,padding:a}),JT({arrowWidth:C,arrowHeight:T}),p&&BT({strategy:"referenceHidden",...$})]}),[A,M]=Xw(K),W=Ue(x);Qt(()=>{Q&&(W==null||W())},[Q,W]);const H=(ae=j.arrow)==null?void 0:ae.x,X=(ys=j.arrow)==null?void 0:ys.y,ee=((Ur=j.arrow)==null?void 0:Ur.centerOffset)!==0,[Te,Be]=y.useState();return Qt(()=>{v&&Be(window.getComputedStyle(v).zIndex)},[v]),d.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:Q?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Te,"--radix-popper-transform-origin":[(Ln=j.transformOrigin)==null?void 0:Ln.x,(Fr=j.transformOrigin)==null?void 0:Fr.y].join(" "),...((ws=j.hide)==null?void 0:ws.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(qT,{scope:r,placedSide:A,onArrowChange:S,arrowX:H,arrowY:X,shouldHideArrow:ee,children:d.jsx(se.div,{"data-side":A,"data-align":M,...m,ref:w,style:{...m.style,animation:Q?void 0:"none"}})})})});Qw.displayName=Ff;var Jw="PopperArrow",GT={top:"bottom",right:"left",bottom:"top",left:"right"},Yw=y.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=KT(Jw,n),o=GT[i.placedSide];return d.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:d.jsx(VT,{...s,ref:r,style:{...s.style,display:"block"}})})});Yw.displayName=Jw;function QT(e){return e!==null}var JT=e=>({name:"transformOrigin",options:e,fn(t){var b,v,g;const{placement:r,rects:n,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,h]=Xw(r),u={start:"0%",center:"50%",end:"100%"}[h],p=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,f=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let x="",m="";return c==="bottom"?(x=o?u:`${p}px`,m=`${-l}px`):c==="top"?(x=o?u:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(x=`${-l}px`,m=o?u:`${f}px`):c==="left"&&(x=`${n.floating.width+l}px`,m=o?u:`${f}px`),{data:{x,y:m}}}});function Xw(e){const[t,r="center"]=e.split("-");return[t,r]}var YT=Gw,XT=Qw,ZT=Yw,[Ic,u4]=Mr("Tooltip",[Vw]),zf=Vw(),Zw="TooltipProvider",eR=700,Xm="tooltip.open",[tR,eb]=Ic(Zw),tb=e=>{const{__scopeTooltip:t,delayDuration:r=eR,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,o=y.useRef(!0),a=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),d.jsx(tR,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:y.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};tb.displayName=Zw;var rb="Tooltip",[d4,Lc]=Ic(rb),th="TooltipTrigger",rR=y.forwardRef((e,t)=>
vendor: 4,484 bytes, line 217
217{const{__scopeTooltip:r,...n}=e,s=Lc(th,r),i=eb(th,r),o=zf(r),a=y.useRef(null),l=ge(t,a,s.onTriggerChange),c=y.useRef(!1),h=y.useRef(!1),u=y.useCallback(()=>c.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),d.jsx(YT,{asChild:!0,...o,children:d.jsx(se.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ne(e.onPointerMove,p=>{p.pointerType!=="touch"&&!h.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),h.current=!0)}),onPointerLeave:ne(e.onPointerLeave,()=>{s.onTriggerLeave(),h.current=!1}),onPointerDown:ne(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:ne(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:ne(e.onBlur,s.onClose),onClick:ne(e.onClick,s.onClose)})})});rR.displayName=th;var nR="TooltipPortal",[h4,sR]=Ic(nR,{forceMount:void 0}),Ti="TooltipContent",nb=y.forwardRef((e,t)=>{const r=sR(Ti,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=Lc(Ti,e.__scopeTooltip);return d.jsx(Nt,{present:n||o.open,children:o.disableHoverableContent?d.jsx(sb,{side:s,...i,ref:t}):d.jsx(iR,{side:s,...i,ref:t})})}),iR=y.forwardRef((e,t)=>{const r=Lc(Ti,e.__scopeTooltip),n=eb(Ti,e.__scopeTooltip),s=y.useRef(null),i=ge(t,s),[o,a]=y.useState(null),{trigger:l,onClose:c}=r,h=s.current,{onPointerInTransitChange:u}=n,p=y.useCallback(()=>{a(null),u(!1)},[u]),f=y.useCallback((x,m)=>{const b=x.currentTarget,v={x:x.clientX,y:x.clientY},g=uR(v,b.getBoundingClientRect()),w=dR(v,g),_=hR(m.getBoundingClientRect()),S=pR([...w,..._]);a(S),u(!0)},[u]);return y.useEffect(()=>()=>p(),[p]),y.useEffect(()=>{if(l&&h){const x=b=>f(b,h),m=b=>f(b,l);return l.addEventListener("pointerleave",x),h.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",x),h.removeEventListener("pointerleave",m)}}},[l,h,f,p]),y.useEffect(()=>{if(o){const x=m=>{const b=m.target,v={x:m.clientX,y:m.clientY},g=(l==null?void 0:l.contains(b))||(h==null?void 0:h.contains(b)),w=!fR(v,o);g?p():w&&(p(),c())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,h,o,c,p]),d.jsx(sb,{...e,ref:i})}),[oR,aR]=Ic(rb,{isInside:!1}),lR=xE("TooltipContent"),sb=y.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Lc(Ti,r),c=zf(r),{onClose:h}=l;return y.useEffect(()=>(document.addEventListener(Xm,h),()=>document.removeEventListener(Xm,h)),[h]),y.useEffect(()=>{if(l.trigger){const u=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&h()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,h]),d.jsx(Tc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:u=>u.preventDefault(),onDismiss:h,children:d.jsxs(XT,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(lR,{children:n}),d.jsx(oR,{scope:r,isInside:!0,children:d.jsx(WE,{id:l.contentId,role:"tooltip",children:s||n})})]})})});nb.displayName=Ti;var ib="TooltipArrow",cR=y.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=zf(r);return aR(ib,r).isInside?null:d.jsx(ZT,{...s,...n,ref:t})});cR.displayName=ib;function uR(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function dR(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function hR(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function fR(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],c=a.x,h=a.y,u=l.x,p=l.y;h>n!=p>
217n&&r<(u-c)*(n-h)/(p-h)+c&&(s=!s)}return s}function pR(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),mR(t)}function mR(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const 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 r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var gR=tb,ob=nb;const vR=gR,yR=y.forwardRef(({className:e,sideOffset:t=4,...r},n)=>d.jsx(ob,{ref:n,sideOffset:t,className:_e("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));yR.displayName=ob.displayName;var fa=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(){}},hs=typeof window>"u"||"Deno"in globalThis;function st(){}function wR(e,t){return typeof e=="function"?e(t):e}function rh(e){return typeof e=="number"&&e>=0&&e!==1/0}function ab(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _n(e,t){return typeof e=="function"?e(t):e}function St(e,t){return typeof e=="function"?e(t):e}function Zm(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Bf(o,t.options))return!1}else if(!Ho(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function eg(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Bo(t.options.mutationKey)!==Bo(i))return!1}else if(!Ho(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Bf(e,t){return((t==null?void 0:t.queryKeyHashFn)||Bo)(e)}function Bo(e){return JSON.stringify(e,(t,r)=>sh(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Ho(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ho(e[r],t[r])):!1}function lb(e,t){if(e===t)return e;const r=tg(e)&&tg(t);if(r||sh(e)&&sh(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},l=new Set(n);let c=0;for(let h=0;h<o;h++){const u=r?h:i[h];(!r&&l.has(u)||r)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,c++):(a[u]=lb(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&c++)}return s===o&&c===s?e:a}return t}function nh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function tg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sh(e){if(!rg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!rg(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function rg(e){return Object.prototype.toString.call(e)==="[object Object]"}function bR(e){return new Promise(t=>{setTimeout(t,e)})}function ih(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?lb(e,t):t}function xR(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function _R(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Hf=Symbol();function cb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Hf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function SR(e,t){return typeof e=="function"?e(...t):!!e}var Qn,rn,ai,wv,ER=(wv=class extends fa{constructor(){super();G(this,Qn);G(this,rn);G(this,ai);z(this,ai,t=>{if(!hs&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){k(this,rn)||this.setEventListener(k(this,ai))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,rn))==null||t.call(this),z(this,rn,void 0))}setEventListener(t){var r;z(this,ai,t),(r=k(this,rn))==null||r.call(this),z(this,rn,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){k(this,Qn)!==t&&(z(this,Qn,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 13,589 bytes, line 217
217this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof k(this,Qn)=="boolean"?k(this,Qn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qn=new WeakMap,rn=new WeakMap,ai=new WeakMap,wv),Wf=new ER,li,nn,ci,bv,kR=(bv=class extends fa{constructor(){super();G(this,li,!0);G(this,nn);G(this,ci);z(this,ci,t=>{if(!hs&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){k(this,nn)||this.setEventListener(k(this,ci))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,nn))==null||t.call(this),z(this,nn,void 0))}setEventListener(t){var r;z(this,ci,t),(r=k(this,nn))==null||r.call(this),z(this,nn,t(this.setOnline.bind(this)))}setOnline(t){k(this,li)!==t&&(z(this,li,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return k(this,li)}},li=new WeakMap,nn=new WeakMap,ci=new WeakMap,bv),Ql=new kR;function oh(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function CR(e){return Math.min(1e3*2**e,3e4)}function ub(e){return(e??"online")==="online"?Ql.isOnline():!0}var db=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Iu(e){return e instanceof db}function hb(e){let t=!1,r=0,n=!1,s;const i=oh(),o=m=>{var b;n||(p(new db(m)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Wf.isFocused()&&(e.networkMode==="always"||Ql.isOnline())&&e.canRun(),h=()=>ub(e.networkMode)&&e.canRun(),u=m=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,m),s==null||s(),i.resolve(m))},p=m=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,m),s==null||s(),i.reject(m))},f=()=>new Promise(m=>{var b;s=v=>{(n||c())&&m(v)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;s=void 0,n||(m=e.onContinue)==null||m.call(e)}),x=()=>{if(n)return;let m;const b=r===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(u).catch(v=>{var E;if(n)return;const g=e.retry??(hs?0:3),w=e.retryDelay??CR,_=typeof w=="function"?w(r,v):w,S=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,v);if(t||!S){p(v);return}r++,(E=e.onFail)==null||E.call(e,r,v),bR(_).then(()=>c()?void 0:f()).then(()=>{t?p(v):x()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:h,start:()=>(h()?x():f().then(x),i)}}var TR=e=>setTimeout(e,0);function RR(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=TR;const i=a=>{t?e.push(a):s(()=>{r(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Me=RR(),Jn,xv,fb=(xv=class{constructor(){G(this,Jn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rh(this.gcTime)&&z(this,Jn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hs?1/0:5*60*1e3))}clearGcTimeout(){k(this,Jn)&&(clearTimeout(k(this,Jn)),z(this,Jn,void 0))}},Jn=new WeakMap,xv),ui,Yn,_t,Xn,Ve,ea,Zn,Ft,yr,_v,jR=(_v=class extends fb{constructor(t){super();G(this,Ft);G(this,ui);G(this,Yn);G(this,_t);G(this,Xn);G(this,Ve);G(this,ea);G(this,Zn);z(this,Zn,!1),z(this,ea,t.defaultOptions),this.setOptions(t.options),this.observers=[],z(this,Xn,t.client),z(this,_t,k(this,Xn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,z(this,ui,NR(this.options)),this.state=t.state??k(this,ui),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,Ve))==null?void 0:t.promise}setOptions(t){this.options={...k(this,ea),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,_t).remove(this)}setData(t,r){const n=ih(this.state.data,t,this.options);return te(this,Ft,yr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){te(this,Ft,yr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=k(this,Ve))==null?void 0:n.promise;return(s=k(this,Ve))==null||s.cancel(t),r?r.then(st).catch(st):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,ui))}isActive(){return this.observers.some(t=>St(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>_n(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:!ab(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,Ve))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=k(this,Ve))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,_t).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(k(this,Ve)&&(k(this,Zn)?k(this,Ve).cancel({revert:!0}):k(this,Ve).cancelRetry()),this.scheduleGc()),k(this,_t).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||te(this,Ft,yr).call(this,{type:"invalidate"})}fetch(t,r){var c,h,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(k(this,Ve))return k(this,Ve).continueRetry(),k(this,Ve).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(z(this,Zn,!0),n.signal)})},i=()=>{const p=cb(this.options,r),x=(()=>{const m={client:k(this,Xn),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return z(this,Zn,!1),this.options.persister?this.options.persister(p,x,this):p(x)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:k(this,Xn),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),z(this,Yn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=a.fetchOptions)==null?void 0:h.meta))&&te(this,Ft,yr).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const l=p=>{var f,x,m,b;Iu(p)&&p.silent||te(this,Ft,yr).call(this,{type:"error",error:p}),Iu(p)||((x=(f=k(this,_t).config).onError)==null||x.call(f,p,this),(b=(m=k(this,_t).config).onSettled)==null||b.call(m,this.state.data,p,this)),this.scheduleGc()};return z(this,Ve,hb({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var f,x,m,b;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(v){l(v);return}(x=(f=k(this,_t).config).onSuccess)==null||x.call(f,p,this),(b=(m=k(this,_t).config).onSettled)==null||b.call(m,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{te(this,Ft,yr).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{te(this,Ft,yr).call(this,{type:"pause"})},onContinue:()=>{te(this,Ft,yr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),k(this,Ve).start()}},ui=new WeakMap,Yn=new WeakMap,_t=new WeakMap,Xn=new WeakMap,Ve=new WeakMap,ea=new WeakMap,Zn=new WeakMap,Ft=new WeakSet,yr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...pb(n.data,this.options),fetchMeta:t.meta??null};case"success":return z(this,Yn,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Iu(s)&&s.revert&&k(this,Yn)?{...k(this,Yn),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Me.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),k(this,_t).notify({query:this,type:"updated",action:t})})},_v);function pb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ub(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function NR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var nr,Sv,PR=(Sv=class extends fa{constructor(t={}){super();G(this,nr);this.config=t,z(this,nr,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??Bf(s,r);let o=this.get(i);return o||(o=new jR({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){k(this,nr).has(t.queryHash)||(k(this,nr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=k(this,nr).get(t.queryHash);r&&(t.destroy(),r===t&&k(this,nr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,nr).get(t)}getAll(){return[...k(this,nr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Zm(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Zm(t,n)):r}notify(t){Me.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nr=new WeakMap,Sv),sr,Qe,es,ir,Gr,Ev,AR=(Ev=class extends fb{constructor(t){super();G(this,ir);G(this,sr);G(this,Qe);G(this,es);this.mutationId=t.mutationId,z(this,Qe,t.mutationCache),z(this,sr,[]),this.state=t.state||OR(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,sr).includes(t)||(k(this,sr).push(t),this.clearGcTimeout(),k(this,Qe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){z(this,sr,k(this,sr).filter(r=>r!==t)),this.scheduleGc(),k(this,Qe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,sr).length||(this.state.status==="pending"?this.scheduleGc():k(this,Qe).remove(this))}continue(){var t;return((t=k(this,es))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,c,h,u,p,f,x,m,b,v,g,w,_,S,E,C,T;const r=()=>{te(this,ir,Gr).call(this,{type:"continue"})};z(this,es,hb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,P)=>{te(this,ir,Gr).call(this,{type:"failed",failureCount:R,error:P})},onPause:()=>{te(this,ir,Gr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,Qe).canRun(this)}));const n=this.state.status==="pending",s=!k(this,es).canStart();try{if(n)r();else{te(this,ir,Gr).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=k(this,Qe).config).onMutate)==null?void 0:o.call(i,t,this));const P=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));P!==this.state.context&&te(this,ir,Gr).call(this,{type:"pending",context:P,variables:t,isPaused:s})}const R=await k(this,es).start();return await((h=(c=k(this,Qe).config).onSuccess)==null?void 0:h.call(c,R,t,this.state.context,this)),await((p=(u=this.options).onSuccess)==null?void 0:p.call(u,R,t,this.state.context)),await((x=(f=k(this,Qe).config).onSettled)==null?void 0:x.call(f,R,null,this.state.variables,this.state.context,this)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,R,null,t,this.state.context)),te(this,ir,Gr).call(this,{type:"success",data:R}),R}catch(R){try{throw await((g=(v=k(this,Qe).config).onError)==null?void 0:g.call(v,R,t,this.state.context,this)),await((_=(w=this.options).onError)==null?void 0:_.call(w,R,t,this.state.context)),await((E=(S=k(this,Qe).config).onSettled)==null?void 0:E.
217call(S,void 0,R,this.state.variables,this.state.context,this)),await((T=(C=this.options).onSettled)==null?void 0:T.call(C,void 0,R,t,this.state.context)),R}finally{te(this,ir,Gr).call(this,{type:"error",error:R})}}finally{k(this,Qe).runNext(this)}}},sr=new WeakMap,Qe=new WeakMap,es=new WeakMap,ir=new WeakSet,Gr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Me.batch(()=>{k(this,sr).forEach(n=>{n.onMutationUpdate(t)}),k(this,Qe).notify({mutation:this,type:"updated",action:t})})},Ev);function OR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kr,zt,ta,kv,IR=(kv=class extends fa{constructor(t={}){super();G(this,kr);G(this,zt);G(this,ta);this.config=t,z(this,kr,new Set),z(this,zt,new Map),z(this,ta,0)}build(t,r,n){const s=new AR({mutationCache:this,mutationId:++ba(this,ta)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){k(this,kr).add(t);const r=Ba(t);if(typeof r=="string"){const n=k(this,zt).get(r);n?n.push(t):k(this,zt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(k(this,kr).delete(t)){const r=Ba(t);if(typeof r=="string"){const n=k(this,zt).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&k(this,zt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Ba(t);if(typeof r=="string"){const n=k(this,zt).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Ba(t);if(typeof r=="string"){const s=(n=k(this,zt).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Me.batch(()=>{k(this,kr).forEach(t=>{this.notify({type:"removed",mutation:t})}),k(this,kr).clear(),k(this,zt).clear()})}getAll(){return Array.from(k(this,kr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>eg(r,n))}findAll(t={}){return this.getAll().filter(r=>eg(t,r))}notify(t){Me.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 14,724 bytes, line 217
217r.state.isPaused);return Me.batch(()=>Promise.all(t.map(r=>r.continue().catch(st))))}},kr=new WeakMap,zt=new WeakMap,ta=new WeakMap,kv);function Ba(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ng(e){return{onFetch:(t,r)=>{var h,u,p,f,x;const n=t.options,s=(p=(u=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:u.fetchMore)==null?void 0:p.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=cb(t.options,t.fetchOptions),g=async(w,_,S)=>{if(m)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const C=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return b(B),B})(),T=await v(C),{maxPages:R}=t.options,P=S?_R:xR;return{pages:P(w.pages,T,R),pageParams:P(w.pageParams,_,R)}};if(s&&i.length){const w=s==="backward",_=w?LR:sg,S={pages:i,pageParams:o},E=_(n,S);a=await g(S,E,w)}else{const w=e??i.length;do{const _=l===0?o[0]??n.initialPageParam:sg(n,a);if(l>0&&_==null)break;a=await g(a,_),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function sg(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function LR(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Se,sn,on,di,hi,an,fi,pi,Cv,$R=(Cv=class{constructor(e={}){G(this,Se);G(this,sn);G(this,on);G(this,di);G(this,hi);G(this,an);G(this,fi);G(this,pi);z(this,Se,e.queryCache||new PR),z(this,sn,e.mutationCache||new IR),z(this,on,e.defaultOptions||{}),z(this,di,new Map),z(this,hi,new Map),z(this,an,0)}mount(){ba(this,an)._++,k(this,an)===1&&(z(this,fi,Wf.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Se).onFocus())})),z(this,pi,Ql.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,Se).onOnline())})))}unmount(){var e,t;ba(this,an)._--,k(this,an)===0&&((e=k(this,fi))==null||e.call(this),z(this,fi,void 0),(t=k(this,pi))==null||t.call(this),z(this,pi,void 0))}isFetching(e){return k(this,Se).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,sn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,Se).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=k(this,Se).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(_n(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return k(this,Se).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=k(this,Se).get(n.queryHash),i=s==null?void 0:s.state.data,o=wR(t,i);if(o!==void 0)return k(this,Se).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Me.batch(()=>k(this,Se).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=k(this,Se).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=k(this,Se);Me.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=k(this,Se);return Me.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Me.batch(()=>k(this,Se).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(st).catch(st)}invalidateQueries(e,t={}){return Me.batch(()=>(k(this,Se).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Me.batch(()=>k(this,Se).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(st)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(st)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=k(this,Se).build(this,t);return r.isStaleByTime(_n(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(st).catch(st)}fetchInfiniteQuery(e){return e.behavior=ng(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(st).catch(st)}ensureInfiniteQueryData(e){return e.behavior=ng(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ql.isOnline()?k(this,sn).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,Se)}getMutationCache(){return k(this,sn)}getDefaultOptions(){return k(this,on)}setDefaultOptions(e){z(this,on,e)}setQueryDefaults(e,t){k(this,di).set(Bo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,di).values()],r={};return t.forEach(n=>{Ho(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){k(this,hi).set(Bo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,hi).values()],r={};return t.forEach(n=>{Ho(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,on).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Bf(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===Hf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,on).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,Se).clear(),k(this,sn).clear()}},Se=new WeakMap,sn=new WeakMap,on=new WeakMap,di=new WeakMap,hi=new WeakMap,an=new WeakMap,fi=new WeakMap,pi=new WeakMap,Cv),rt,re,ra,Je,ts,mi,ln,cn,na,gi,vi,rs,ns,un,yi,le,no,ah,lh,ch,uh,dh,hh,fh,mb,Tv,DR=(Tv=class extends fa{constructor(t,r){super();G(this,le);G(this,rt);G(this,re);G(this,ra);G(this,Je);G(this,ts);G(this,mi);G(this,ln);G(this,cn);G(this,na);G(this,gi);G(this,vi);G(this,rs);G(this,ns);G(this,un);G(this,yi,new Set);this.options=r,z(this,rt,t),z(this,cn,null),z(this,ln,oh()),this.options.experimental_prefetchInRender||k(this,ln).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,re).addObserver(this),ig(k(this,re),this.options)?te(this,le,no).call(this):this.updateResult(),te(this,le,uh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ph(k(this,re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ph(k(this,re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,te(this,le,dh).call(this),te(this,le,hh).call(this),k(this,re).removeObserver(this)}setOptions(t){const r=this.options,n=k(this,re);if(this.options=k(this,rt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof St(this.options.enabled,k(this,re))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");te(this,le,fh).call(this),k(this,re).setOptions(this.options),r._defaulted&&!nh(this.options,r)&&k(this,rt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,re),observer:this});const s=this.hasListeners();s&&og(k(this,re),n,this.options,r)&&te(this,le,no).call(this),this.updateResult(),s&&(k(this,re)!==n||St(this.options.enabled,k(this,re))!==St(r.enabled,k(this,re))||_n(this.options.staleTime,k(this,re))!==_n(r.staleTime,k(this,re)))&&te(this,le,ah).call(this);const i=te(this,le,lh).call(this);s&&(k(this,re)!==n||St(this.options.enabled,k(this,re))!==St(r.enabled,k(this,re))||i!==k(this,un))&&te(this,le,ch).call(this,i)}getOptimisticResult(t){const r=k(this,rt).getQueryCache().build(k(this,rt),t),n=this.createResult(r,t);return UR(this,n)&&(z(this,Je,n),z(this,mi,this.options),z(this,ts,k(this,re).state)),n}getCurrentResult(){return k(this,Je)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),Reflect.get(n,s))})}trackProp(t){k(this,yi).add(t)}getCurrentQuery(){return k(this,re)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=k(this,rt).defaultQueryOptions(t),n=k(this,rt).getQueryCache().build(k(this,rt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return te(this,le,no).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,Je)))}createResult(t,r){var R;const n=k(this,re),s=this.options,i=k(this,Je),o=k(this,ts),a=k(this,mi),c=t!==n?t.state:k(this,ra),{state:h}=t;let u={...h},p=!1,f;if(r._optimisticResults){const P=this.hasListeners(),B=!P&&ig(t,r),N=P&&og(t,n,r,s);(B||N)&&(u={...u,...pb(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:x,errorUpdatedAt:m,status:b}=u;f=u.data;let v=!1;if(r.placeholderData!==void 0&&f===void 0&&b==="pending"){let P;i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData)?(P=i.data,v=!0):P=typeof r.placeholderData=="function"?r.placeholderData((R=k(this,vi))==null?void 0:R.state.data,k(this,vi)):r.placeholderData,P!==void 0&&(b="success",f=ih(i==null?void 0:i.data,P,r),p=!0)}if(r.select&&f!==void 0&&!v)if(i&&f===(o==null?void 0:o.data)&&r.select===k(this,na))f=k(this,gi);else try{z(this,na,r.select),f=r.select(f),f=ih(i==null?void 0:i.data,f,r),z(this,gi,f),z(this,cn,null)}catch(P){z(this,cn,P)}k(this,cn)&&(x=k(this,cn),f=k(this,gi),m=Date.now(),b="error");const g=u.fetchStatus==="fetching",w=b==="pending",_=b==="error",S=w&&g,E=f!==void 0,T={status:b,fetchStatus:u.fetchStatus,isPending:w,isSuccess:b==="success",isError:_,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:u.dataUpdatedAt,error:x,errorUpdatedAt:m,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:_&&!E,isPaused:u.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:_&&E,isStale:Vf(t,r),refetch:this.refetch,promise:k(this,ln),isEnabled:St(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=$=>{T.status==="error"?$.reject(T.error):T.data!==void 0&&$.resolve(T.data)},B=()=>{const $=z(this,ln,T.promise=oh());P($)},N=k(this,ln);switch(N.status){case"pending":t.queryHash===n.queryHash&&P(N);break;case"fulfilled":(T.status==="error"||T.data!==N.value)&&B();break;case"rejected":(T.status!=="error"||T.error!==N.reason)&&B();break}}return T}updateResult(){const t=k(this,Je),r=this.createResult(k(this,re),this.options);if(z(this,ts,k(this,re).state),z(this,mi,this.options),k(this,ts).data!==void 0&&z(this,vi,k(this,re)),nh(r,t))return;z(this,Je,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!k(this,yi).size)return!0;const o=new Set(i??k(this,yi));return this.options.throwOnError&&o.add("error"),Object.keys(k(this,Je)).some(a=>{const l=a;return k(this,Je)[l]!==t[l]&&o.has(l)})};te(this,le,mb).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&te(this,le,uh).call(this)}},rt=new WeakMap,re=new WeakMap,ra=new WeakMap,Je=new WeakMap,ts=new WeakMap,mi=new WeakMap,ln=new WeakMap,cn=new WeakMap,na=new WeakMap,gi=new WeakMap,vi=new WeakMap,rs=new WeakMap,ns=new WeakMap,un=new WeakMap,yi=new WeakMap,le=new WeakSet,no=function(t){te(this,le,fh).call(this);let r=k(this,re).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(st)),r},ah=function(){te(this,le,dh).call(this);const t=_n(this.options.staleTime,k(this,re));if(hs||k(this,Je).isStale||!rh(t))return;const n=ab(k(this,Je).dataUpdatedAt,t)+1;z(this,rs,setTimeout(()=>{k(this,Je).isStale||this.updateResult()},n))},lh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,re)):this.options.refetchInterval)??!1},ch=function(t){te(this,le,hh).call(this),z(this,un,t),!(hs||St(this.options.enabled,k(this,re))===!1||!rh(k(this,un))||k(this,un)===0)&&z(this,ns,setInterval(()=>{(this.options.refetchIntervalInBackground||Wf.isFocused())&&te(this,le,no).call(this)},k(this,un)))},uh=function(){te(this,le,ah).call(this),te(this,le,ch).call(this,te(this,le,lh).call(this))},dh=function(){k(this,rs)&&(clearTimeout(k(this,rs)),z(this,rs,void 0))},hh=function(){k(this,ns)&&(clearInterval(k(this,ns)),z(this,ns,void 0))},fh=function(){const t=k(this,rt).getQueryCache().build(k(this,rt),this.options);if(t===k(this,re))return;const r=k(this,re);z(this,re,t),z(this,ra,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},mb=function(t){Me.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(k(this,Je))}),k(this,rt).getQueryCache().notify({query:k(this,re),type:"observerResultsUpdated"})})},Tv);function MR(e,t){return St(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ig(e,t){return MR(e,t)||e.state.data!==void 0&&ph(e,t,t.refetchOnMount)}function ph(e,t,r){if(St(t.enabled,e)!==!1&&_n(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Vf(e,t)}return!1}function og(e,t,r,n){return(e!==t||St(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Vf(e,r)}function Vf(e,t){return St(t.enabled,e)!==!1&&e.isStaleByTime(_n(t.staleTime,e))}function UR(e,t){return!nh(e.getCurrentResult(),t)}var gb=y.createContext(void 0),FR=e=>{const t=y.useContext(gb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},zR=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(gb.Provider,{value:e,children:t})),vb=y.createContext(!1),BR=()=>y.useContext(vb);vb.Provider;function HR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
217var WR=y.createContext(HR()),VR=()=>y.useContext(WR),qR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},KR=e=>{y.useEffect(()=>{e.clearReset()},[e])},GR=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||SR(r,[e.error,n])),QR=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},JR=(e,t)=>e.isLoading&&e.isFetching&&!t,YR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ag=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function XR(e,t,r){var u,p,f,x,m;const n=BR(),s=VR(),i=FR(),o=i.defaultQueryOptions(e);(p=(u=i.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||p.call(u,o),o._optimisticResults=n?"isRestoring":"optimistic",QR(o),qR(o,s),KR(s);const a=!i.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),h=!n&&e.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(b=>{const v=h?l.subscribe(Me.batchCalls(b)):st;return l.updateResult(),v},[l,h]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o)},[o,l]),YR(o,c))throw ag(o,l,s);if(GR({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((x=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||x.call(f,o,c),o.experimental_prefetchInRender&&!hs&&JR(c,n)){const b=a?ag(o,l,s):(m=i.getQueryCache().get(o.queryHash))==null?void 0:m.promise;b==null||b.catch(st).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function yb(e,t){return XR(e,DR)}/** 218 * @remix-run/router v1.23.0 219 * 220 * Copyright (c) Remix Software Inc. 221 * 222 * This source code is licensed under the MIT license found in the 223 * LICENSE.md file in the root directory of this source tree. 224 * 225 * @license MIT 226 */function Wo(){return Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wo.apply(this,arguments)}var fn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(fn||(fn={}));const lg="popstate";function ZR(e){e===void 0&&(e={});function t(n,s){let{pathname:i,search:o,hash:a}=n.location;return mh("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Jl(s)}return tj(t,r,null,e)}function Ne(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wb(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ej(){return Math.random().toString(36).substr(2,8)}function cg(e,t){return{usr:e.state,key:e.key,idx:t}}function mh(e,t,r,n){return r===void 0&&(r=null),Wo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Di(t):t,{state:r,key:t&&t.key||n||ej()})}function Jl(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Di(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function tj(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=fn.Pop,l=null,c=h();c==null&&(c=0,o.replaceState(Wo({},o.state,{idx:c}),""));function h(){return(o.state||{idx:null}).idx}function u(){a=fn.Pop;let b=h(),v=b==null?null:b-c;c=b,l&&l({action:a,location:m.location,delta:v})}function p(b,v){a=fn.Push;let g=mh(m.location,b,v);c=h()+1;let w=cg(g,c),_=m.createHref(g);try{o.pushState(w,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:m.location,delta:1})}function f(b,v){a=fn.Replace;let g=mh(m.location,b,v);c=h();let w=cg(g,c),_=m.createHref(g);o.replaceState(w,"",_),i&&l&&l({action:a,location:m.location,delta:0})}function x(b){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof b=="string"?b:Jl(b);return g=g.replace(/ $/,"%20"),Ne(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let m={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(lg,u),l=b,()=>{s.removeEventListener(lg,u),l=null}},createHref(b){return t(s,b)},createURL:x,encodeLocation(b){let v=x(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:f,go(b){return o.go(b)}};return m}var ug;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ug||(ug={}));function rj(e,t,r){return r===void 0&&(r="/"),nj(e,t,r,!1)}function nj(e,t,r,n){let s=typeof t=="string"?Di(t):t,i=qf(s.pathname||"/",r);if(i==null)return null;let o=bb(e);sj(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=mj(i);a=fj(o[l],c,n)}return a}function bb(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");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("/")&&(Ne(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
226id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Sn([n,l.relativePath]),h=r.concat(l);i.children&&i.children.length>0&&(Ne(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),bb(i.children,t,h,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:dj(c,i.index),routesMeta:h})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of xb(i.path))s(i,o,l)}),t}function xb(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=xb(n.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 sj(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:hj(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const ij=/^:[\w-]+$/,oj=3,aj=2,lj=1,cj=10,uj=-2,dg=e=>e==="*";function dj(e,t){let r=e.split("/"),n=r.length;return r.some(dg)&&(n+=uj),t&&(n+=aj),r.filter(s=>!dg(s)).reduce((s,i)=>s+(ij.test(i)?oj:i===""?lj:cj),n)}function hj(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function fj(e,t,r){let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,h=i==="/"?t:t.slice(i.length)||"/",u=hg({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},h),p=l.route;if(!u&&c&&r&&!n[n.length-1].route.index&&(u=hg({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},h)),!u)return null;
vendor: 13,539 bytes, lines 226-244
226Object.assign(s,u.params),o.push({params:s,pathname:Sn([i,u.pathname]),pathnameBase:wj(Sn([i,u.pathnameBase])),route:p}),u.pathnameBase!=="/"&&(i=Sn([i,u.pathnameBase]))}return o}function hg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=pj(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,h,u)=>{let{paramName:p,isOptional:f}=h;if(p==="*"){let m=a[u]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const x=a[u];return f&&!x?c[p]=void 0:c[p]=(x||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function pj(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),wb(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function mj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wb(!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 qf(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function gj(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Di(e):e;return{pathname:r?r.startsWith("/")?r:vj(r,t):t,search:bj(n),hash:xj(s)}}function vj(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Lu(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function yj(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function _b(e,t){let r=yj(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Sb(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Di(e):(s=Wo({},e),Ne(!s.pathname||!s.pathname.includes("?"),Lu("?","pathname","search",s)),Ne(!s.pathname||!s.pathname.includes("#"),Lu("#","pathname","hash",s)),Ne(!s.search||!s.search.includes("#"),Lu("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let u=t.length-1;if(!n&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),u-=1;s.pathname=p.join("/")}a=u>=0?t[u]:"/"}let l=gj(s,a),c=o&&o!=="/"&&o.endsWith("/"),h=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||h)&&(l.pathname+="/"),l}const Sn=e=>e.join("/").replace(/\/\/+/g,"/"),wj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function _j(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Eb=["post","put","patch","delete"];new Set(Eb);const Sj=["get",...Eb];new Set(Sj);/** 227 * React Router v6.30.1 228 * 229 * Copyright (c) Remix Software Inc. 230 * 231 * This source code is licensed under the MIT license found in the 232 * LICENSE.md file in the root directory of this source tree. 233 * 234 * @license MIT 235 */function Vo(){return Vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vo.apply(this,arguments)}const Kf=y.createContext(null),Ej=y.createContext(null),vs=y.createContext(null),$c=y.createContext(null),In=y.createContext({outlet:null,matches:[],isDataRoute:!1}),kb=y.createContext(null);function kj(e,t){let{relative:r}=t===void 0?{}:t;pa()||Ne(!1);let{basename:n,navigator:s}=y.useContext(vs),{hash:i,pathname:o,search:a}=Tb(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Sn([n,o])),s.createHref({pathname:l,search:a,hash:i})}function pa(){return y.useContext($c)!=null}function ma(){return pa()||Ne(!1),y.useContext($c).location}function Cb(e){y.useContext(vs).static||y.useLayoutEffect(e)}function Cj(){let{isDataRoute:e}=y.useContext(In);return e?Fj():Tj()}function Tj(){pa()||Ne(!1);let e=y.useContext(Kf),{basename:t,future:r,navigator:n}=y.useContext(vs),{matches:s}=y.useContext(In),{pathname:i}=ma(),o=JSON.stringify(_b(s,r.v7_relativeSplatPath)),a=y.useRef(!1);return Cb(()=>{a.current=!0}),y.useCallback(function(c,h){if(h===void 0&&(h={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let u=Sb(c,JSON.parse(o),i,h.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Sn([t,u.pathname])),(h.replace?n.replace:n.push)(u,h.state,h)},[t,n,o,i,e])}function Rj(){let{matches:e}=y.useContext(In),t=e[e.length-1];return t?t.params:{}}function Tb(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=y.useContext(vs),{matches:s}=y.useContext(In),{pathname:i}=ma(),o=JSON.stringify(_b(s,n.v7_relativeSplatPath));return y.useMemo(()=>Sb(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function jj(e,t){return Nj(e,t)}function Nj(e,t,r,n){pa()||Ne(!1);let{navigator:s}=y.useContext(vs),{matches:i}=y.useContext(In),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=ma(),h;if(t){var u;let b=typeof t=="string"?Di(t):t;l==="/"||(u=b.pathname)!=null&&u.startsWith(l)||Ne(!1),h=b}else h=c;let p=h.pathname||"/",f=p;if(l!=="/"){let b=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=rj(e,{pathname:f}),m=Lj(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Sn([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Sn([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,r,n);return t&&m?y.createElement($c.Provider,{value:{location:Vo({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:fn.Pop}},m):m}function Pj(){let e=Uj(),t=_j(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),r?y.createElement("pre",{style:s},r):null,null)}const Aj=y.createElement(Pj,null);class Oj extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(In.Provider,{value:this.props.routeContext},y.createElement(kb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ij(e){let{routeContext:t,match:r,children:n}=e,s=y.useContext(Kf);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(In.Provider,{value:t},n)}function Lj(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let h=o.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);h>=0||Ne(!1),o=o.slice(0,Math.min(o.length,h+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let h=0;h<o.length;h++){let u=o[h];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(c=h),u.route.id){let{loaderData:p,errors:f}=r,x=u.route.loader&&p[u.route.id]===void 0&&(!f||f[u.route.id]===void 0);if(u.route.lazy||x){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((h,u,p)=>{let f,x=!1,m=null,b=null;r&&(f=a&&u.route.id?a[u.route.id]:void 0,m=u.route.errorElement||Aj,l&&(c<0&&p===0?(x=!0,b=null):c===p&&(x=!0,b=u.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,p+1)),g=()=>{let w;return f?w=m:x?w=b:u.route.Component?w=y.createElement(u.route.Component,null):u.route.element?w=u.route.element:w=h,y.createElement(Ij,{match:u,routeContext:{outlet:h,matches:v,isDataRoute:r!=null},children:w})};return r&&(u.route.ErrorBoundary||u.route.errorElement||p===0)?y.createElement(Oj,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var Rb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Rb||{}),Yl=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}(Yl||{});function $j(e){let t=y.useContext(Kf);return t||Ne(!1),t}function Dj(e){let t=y.useContext(Ej);return t||Ne(!1),t}function Mj(e){let t=y.useContext(In);return t||Ne(!1),t}function jb(e){let t=Mj(),r=t.matches[t.matches.length-1];return r.route.id||Ne(!1),r.route.id}function Uj(){var e;let t=y.useContext(kb),r=Dj(Yl.UseRouteError),n=jb(Yl.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Fj(){let{router:e}=$j(Rb.UseNavigateStable),t=jb(Yl.UseNavigateStable),r=y.useRef(!1);return Cb(()=>{r.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Vo({fromRouteId:t},i)))},[e,t])}function zj(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function As(e){Ne(!1)}function Bj(e){let{basename:t="/",children:r=null,location:n,navigationType:s=fn.Pop,navigator:i,static:o=!1,future:a}=e;pa()&&Ne(!1);let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:i,static:o,future:Vo({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Di(n));let{pathname:h="/",search:u="",hash:p="",state:f=null,key:x="default"}=n,m=y.useMemo(()=>{let b=qf(h,l);return b==null?null:{location:{pathname:b,search:u,hash:p,state:f,key:x},navigationType:s}},[l,h,u,p,f,x,s]);return m==null?null:y.createElement(vs.Provider,{value:c},y.createElement($c.Provider,{children:r,value:m}))}function Hj(e){let{children:t,location:r}=e;return jj(gh(t),r)}new Promise(()=>{});function gh(e,t){t===void 0&&(t=[]);let r=[];return y.Children.forEach(e,(n,s)=>{if(!y.isValidElement(n))return;let i=[...t,s];if(n.type===y.Fragment){r.push.apply(r,gh(n.props.children,i));return}n.type!==As&&Ne(!1),!n.props.index||!n.props.children||Ne(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=gh(n.props.children,i)),r.push(o)}),r}/** 236 * React Router DOM v6.30.1 237 * 238 * Copyright (c) Remix Software Inc. 239 * 240 * This source code is licensed under the MIT license found in the 241 * LICENSE.md file in the root directory of this source tree. 242 * 243 * @license MIT 244 */function vh(){return vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vh.apply(this,arguments)}function Wj(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function Vj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qj(e,t){return e.button===0&&(!t||t==="_self")&&!Vj(e)}const Kj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Gj="6";try{window.__reactRouterVersion=Gj}catch{}const Qj="startTransition",fg=Ih[Qj];function Jj(e){let{basename:t,children:r,future:n,window:s}=e,i=y.useRef();i.current==null&&(i.current=ZR({window:s,v5Compat:!0}));let o=i.current,[a,l]=y.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},h=y.useCallback(u=>{c&&fg?fg(()=>l(u)):l(u)},[l,c]);return y.useLayoutEffect(()=>o.listen(h),[o,h]),y.useEffect(()=>
244zj(n),[n]),y.createElement(Bj,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const Yj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Xj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$r=y.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:h,viewTransition:u}=t,p=Wj(t,Kj),{basename:f}=y.useContext(vs),x,m=!1;if(typeof c=="string"&&Xj.test(c)&&(x=c,Yj))try{let w=new URL(window.location.href),_=c.startsWith("//")?new URL(w.protocol+c):new URL(c),S=qf(_.pathname,f);_.origin===w.origin&&S!=null?c=S+_.search+_.hash:m=!0}catch{}let b=kj(c,{relative:s}),v=Zj(c,{replace:o,state:a,target:l,preventScrollReset:h,relative:s,viewTransition:u});function g(w){n&&n(w),w.defaultPrevented||v(w)}return y.createElement("a",vh({},p,{href:x||b,onClick:m||i?n:g,ref:r,target:l}))});var pg;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(pg||(pg={}));var mg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mg||(mg={}));function Zj(e,t){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=Cj(),c=ma(),h=Tb(e,{relative:o});return y.useCallback(u=>{if(qj(u,r)){u.preventDefault();let p=n!==void 0?n:Jl(c)===Jl(h);l(e,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,h,n,s,r,e,i,o,a])}const eN=Nf("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"}}),dr=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?wE:"button";return d.jsx(o,{className:_e(eN({variant:t,size:r,className:e})),ref:i,...s})});dr.displayName="Button";const Vt=y.forwardRef(({className:e,type:t,...r},n)=>d.jsx("input",{type:t,className:_e("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));Vt.displayName="Input";const Gf=y.forwardRef(({className:e,...t},r)=>d.jsx("textarea",{className:_e("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
244ing-offset-background 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",e),ref:r,...t}));Gf.displayName="Textarea";function tN(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dc="Checkbox",[rN,f4]=Mr(Dc),[nN,Qf]=rN(Dc);function sN(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:l,required:c,value:h="on",internal_do_not_use_render:u}=e,[p,f]=Oi({prop:r,defaultProp:s??!1,onChange:l,caller:Dc}),[x,m]=y.useState(null),[b,v]=y.useState(null),g=y.useRef(!1),w=x?!!o||!!x.closest("form"):!0,_={checked:p,disabled:i,setChecked:f,control:x,setControl:m,name:a,form:o,value:h,hasConsumerStoppedPropagationRef:g,required:c,defaultChecked:En(s)?!1:s,isFormControl:w,bubbleInput:b,setBubbleInput:v};return d.jsx(nN,{scope:t,..._,children:iN(u)?u(_):n})}var Nb="CheckboxTrigger",Pb=y.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:i,value:o,disabled:a,checked:l,required:c,setControl:h,setChecked:u,hasConsumerStoppedPropagationRef:p,isFormControl:f,bubbleInput:x}=Qf(Nb,e),m=ge(s,h),b=y.useRef(l);return y.useEffect(()=>{const v=i==null?void 0:i.form;if(v){const g=()=>u(b.current);return v.addEventListener("reset",g),()=>v.removeEventListener("reset",g)}},[i,u]),d.jsx(se.button,{type:"button",role:"checkbox","aria-checked":En(l)?"mixed":l,"aria-required":c,"data-state":$b(l),"data-disabled":a?"":void 0,disabled:a,value:o,...n,ref:m,onKeyDown:ne(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:ne(r,v=>{u(g=>En(g)?!0:!g),x&&f&&(p.current=v.isPropagationStopped(),p.current||v.stopPropagation())})})});Pb.displayName=Nb;var Jf=y.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l,onCheckedChange:c,form:h,...u}=e;return d.jsx(sN,{__scopeCheckbox:r,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:c,name:n,form:h,value:l,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(Pb,{...u,ref:t,__scopeCheckbox:r}),p&&d.jsx(Lb,{__scopeCheckbox:r})]})})});Jf.displayName=Dc;var Ab="CheckboxIndicator",Ob=y.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,i=Qf(Ab,r);return d.jsx(Nt,{present:n||En(i.checked)||i.checked===!0,children:d.jsx(se.span,{"data-state":$b(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});Ob.displayName=Ab;var Ib="CheckboxBubbleInput",Lb=y.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:l,name:c,value:h,form:u,bubbleInput:p,setBubbleInput:f}=Qf(Ib,e),x=ge(r,f),m=tN(i),b=Bw(n);y.useEffect(()=>{const g=p;if(!g)return;const w=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(w,"checked").set,E=!s.current;if(m!==i&&S){const C=new Event("click",{bubbles:E});g.indeterminate=En(i),S.call(g,En(i)?!1:i),g.dispatchEvent(C)}},[p,m,i,s]);const v=y.useRef(En(i)?!1:i);return d.jsx(se.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??v.current,required:a,disabled:l,name:c,value:h,form:u,...t,tabIndex:-1,ref:x,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Lb.displayName=Ib;function iN(e){return typeof e=="function"}function En(e){return e==="indeterminate"}function $b(e){return En(e)?"indeterminate":e?"checked":"unchecked"}const qo=y.forwardRef(({className:e,...t},r)=>d.jsx(Jf,{ref:r,className:_e("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:d.jsx(Ob,{className:_e("flex items-center justify-center text-current"),children:d.jsx(mk,{className:"h-4 w-4"})})}));qo.displayName=Jf.displayName;var $u="focusScope.autoFocusOnMount",Du="focusScope.autoFocusOnUnmount",gg={bubbles:!1,cancelable:!0},oN="FocusScope",Db=y.forwardRef((e,t)=>
vendor: 5,004 bytes, line 244
244{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=y.useState(null),c=Ue(s),h=Ue(i),u=y.useRef(null),p=ge(t,m=>l(m)),f=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let m=function(w){if(f.paused||!a)return;const _=w.target;a.contains(_)?u.current=_:Qr(u.current,{select:!0})},b=function(w){if(f.paused||!a)return;const _=w.relatedTarget;_!==null&&(a.contains(_)||Qr(u.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Qr(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const g=new MutationObserver(v);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),g.disconnect()}}},[n,a,f.paused]),y.useEffect(()=>{if(a){yg.add(f);const m=document.activeElement;if(!a.contains(m)){const v=new CustomEvent($u,gg);a.addEventListener($u,c),a.dispatchEvent(v),v.defaultPrevented||(aN(hN(Mb(a)),{select:!0}),document.activeElement===m&&Qr(a))}return()=>{a.removeEventListener($u,c),setTimeout(()=>{const v=new CustomEvent(Du,gg);a.addEventListener(Du,h),a.dispatchEvent(v),v.defaultPrevented||Qr(m??document.body,{select:!0}),a.removeEventListener(Du,h),yg.remove(f)},0)}}},[a,c,h,f]);const x=y.useCallback(m=>{if(!r&&!n||f.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(b&&v){const g=m.currentTarget,[w,_]=lN(g);w&&_?!m.shiftKey&&v===_?(m.preventDefault(),r&&Qr(w,{select:!0})):m.shiftKey&&v===w&&(m.preventDefault(),r&&Qr(_,{select:!0})):v===g&&m.preventDefault()}},[r,n,f.paused]);return d.jsx(se.div,{tabIndex:-1,...o,ref:p,onKeyDown:x})});Db.displayName=oN;function aN(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Qr(n,{select:t}),document.activeElement!==r)return}function lN(e){const t=Mb(e),r=vg(t,e),n=vg(t.reverse(),e);return[r,n]}function Mb(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function vg(e,t){for(const r of e)if(!cN(r,{upTo:t}))return r}function cN(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 uN(e){return e instanceof HTMLInputElement&&"select"in e}function Qr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&uN(e)&&t&&e.select()}}var yg=dN();function dN(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=wg(e,t),e.unshift(t)},remove(t){var r;e=wg(e,t),(r=e[0])==null||r.resume()}}}function wg(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hN(e){return e.filter(t=>t.tagName!=="A")}var Mu=0;function fN(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bg()),document.body.insertAdjacentElement("beforeend",e[1]??bg()),Mu++,()=>{Mu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Mu--}},[])}function bg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var lr=function(){return lr=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},lr.apply(this,arguments)};function Ub(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function pN(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,i;n<s;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var gl="right-scroll-bar-position",vl="width-before-scroll-bar",mN="with-scroll-bars-hidden",gN="--removed-body-scroll-bar-size";function Uu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vN(e,t){var r=y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var yN=typeof window<"u"?y.useLayoutEffect:y.useEffect,xg=new WeakMap;function wN(e,t){var r=vN(null,function(n){return e.forEach(function(s){return Uu(s,n)})});return yN(function(){var n=xg.get(r);if(n){var s=new Set(n),i=new Set(e),o=r.current;
vendor: 4,196 bytes, lines 244-259
244s.forEach(function(a){i.has(a)||Uu(a,null)}),i.forEach(function(a){s.has(a)||Uu(a,o)})}xg.set(r,e)},[e]),r}function bN(e){return e}function xN(e,t){t===void 0&&(t=bN);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var h=o;o=[],h.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(h){o.push(h),c()},filter:function(h){return o=o.filter(h),r}}}};return s}function _N(e){e===void 0&&(e={});var t=xN(null);return t.options=lr({async:!0,ssr:!1},e),t}var Fb=function(e){var t=e.sideCar,r=Ub(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,lr({},r))};Fb.isSideCarExport=!0;function SN(e,t){return e.useMedium(t),Fb}var zb=_N(),Fu=function(){},Mc=y.forwardRef(function(e,t){var r=y.useRef(null),n=y.useState({onScrollCapture:Fu,onWheelCapture:Fu,onTouchMoveCapture:Fu}),s=n[0],i=n[1],o=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,h=e.enabled,u=e.shards,p=e.sideCar,f=e.noRelative,x=e.noIsolation,m=e.inert,b=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,w=e.gapMode,_=Ub(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,E=wN([r,t]),C=lr(lr({},_),s);return y.createElement(y.Fragment,null,h&&y.createElement(S,{sideCar:zb,removeScrollBar:c,shards:u,noRelative:f,noIsolation:x,inert:m,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:w}),o?y.cloneElement(y.Children.only(a),lr(lr({},C),{ref:E})):y.createElement(g,lr({},C,{className:l,ref:E}),a))});Mc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mc.classNames={fullWidth:vl,zeroRight:gl};var EN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function kN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=EN();return t&&e.setAttribute("nonce",t),e}function CN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function TN(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var RN=function(){var e=0,t=null;return{add:function(r){e==0&&(t=kN())&&(CN(t,r),TN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jN=function(){var e=RN();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Bb=function(){var e=jN(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},NN={left:0,top:0,right:0,gap:0},zu=function(e){return parseInt(e||"",10)||0},PN=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[zu(r),zu(n),zu(s)]},AN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return NN;var t=PN(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ON=Bb(),ti="data-scroll-locked",IN=function(e,t,r,n){var s=e.left,i=e.top,o=e.right,a=e.gap;return r===void 0&&(r="margin"),` 245 .`.concat(mN,` { 246 overflow: hidden `).concat(n,`; 247 padding-right: `).concat(a,"px ").concat(n,`; 248 } 249 body[`).concat(ti,`] { 250 overflow: hidden `).concat(n,`; 251 overscroll-behavior: contain; 252 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 253 padding-left: `.concat(s,`px; 254 padding-top: `).concat(i,`px; 255 padding-right: `).concat(o,`px; 256 margin-left:0; 257 margin-top:0; 258 margin-right: `).concat(a,"px ").concat(n,`; 259 `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";
259")].filter(Boolean).join(""),` 260 } 261 262 .`).concat(gl,` { 263 right: `).concat(a,"px ").concat(n,`; 264 } 265 266 .`).concat(vl,` { 267 margin-right: `).concat(a,"px ").concat(n,`; 268 } 269 270 .`).concat(gl," .").concat(gl,` { 271 right: 0 `).concat(n,`; 272 } 273 274 .`).concat(vl," .").concat(vl,` { 275 margin-right: 0 `).concat(n,`; 276 } 277 278 body[`).concat(ti,`] { 279 `).concat(gN,": ").concat(a,`px; 280 } 281`)},_g=function(){var e=parseInt(document.body.getAttribute(ti)||"0",10);return isFinite(e)?e:0},LN=function(){y.useEffect(function(){return document.body.setAttribute(ti,(_g()+1).toString()),function(){var e=_g()-1;e<=0?document.body.removeAttribute(ti):document.body.setAttribute(ti,e.toString())}},[])},$N=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;LN();var i=y.useMemo(function(){return AN(s)},[s]);return y.createElement(ON,{styles:IN(i,!t,s,r?"":"!important")})},yh=!1;if(typeof window<"u")try{var Ha=Object.defineProperty({},"passive",{get:function(){return yh=!0,!0}});window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch{yh=!1}var ks=yh?{passive:!1}:!1,DN=function(e){return e.tagName==="TEXTAREA"},Hb=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!DN(e)&&r[t]==="visible")},MN=function(e){return Hb(e,"overflowY")},UN=function(e){return Hb(e,"overflowX")},Sg=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Wb(e,n);if(s){var i=Vb(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},FN=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},zN=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Wb=function(e,t){return e==="v"?MN(t):UN(t)},Vb=function(e,t){return e==="v"?FN(t):zN(t)},BN=function(e,t){return e==="h"&&t==="rtl"?-1:1},HN=function(e,t,r,n,s){var i=BN(e,window.getComputedStyle(t).direction),o=i*n,a=r.target,l=t.contains(a),c=!1,h=o>0,u=0,p=0;do{if(!a)break;var f=Vb(e,a),x=f[0],m=f[1],b=f[2],v=m-b-i*x;(x||v)&&Wb(e,a)&&(u+=v,p+=x);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(h&&(Math.abs(u)<1||!s)||!h&&(Math.abs(p)<1||!s))&&(c=!0),c},Wa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Eg=function(e){return[e.deltaX,e.deltaY]},kg=function(e){return e&&"current"in e?e.current:e},WN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VN=function(e){return` 282 .block-interactivity-`.concat(e,` {pointer-events: none;} 283 .allow-interactivity-`).concat(e,` {pointer-events: all;} 284`)},qN=0,Cs=[];function KN(e){var t=y.useRef([]),r=y.useRef([0,0]),n=y.useRef(),s=y.useState(qN++)[0],i=y.useState(Bb)[0],o=y.useRef(e);y.useEffect(function(){o.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=pN([e.lockRef.current],(e.shards||[]).map(kg),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var v=Wa(m),g=r.current,w="deltaX"in m?m.deltaX:g[0]-v[0],_="deltaY"in m?m.deltaY:g[1]-v[1],S,E=m.target,C=Math.abs(w)>Math.abs(_)?"h":"v";if("touches"in m&&C==="h"&&E.type==="range")return!1;var T=Sg(C,E);if(!T)return!0;if(T?S=C:(S=C==="v"?"h":"v",T=Sg(C,E)),!T)return!1;if(!n.current&&"changedTouches"in m&&(w||_)&&(n.current=S),!S)return!0;var R=n.current||S;return HN(R,b,m,R==="h"?w:_,!0)},[]),l=y.useCallback(function(m){var b=m;if(!(!Cs.length||Cs[Cs.length-1]!==i)){var v="deltaY"in b?Eg(b):Wa(b),g=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&WN(S.delta,v)}
vendor: 4,137 bytes, line 284
284)[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var w=(o.current.shards||[]).map(kg).filter(Boolean).filter(function(S){return S.contains(b.target)}),_=w.length>0?a(b,w[0]):!o.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),c=y.useCallback(function(m,b,v,g){var w={name:m,delta:b,target:v,should:g,shadowParent:GN(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(_){return _!==w})},1)},[]),h=y.useCallback(function(m){r.current=Wa(m),n.current=void 0},[]),u=y.useCallback(function(m){c(m.type,Eg(m),m.target,a(m,e.lockRef.current))},[]),p=y.useCallback(function(m){c(m.type,Wa(m),m.target,a(m,e.lockRef.current))},[]);y.useEffect(function(){return Cs.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:p}),document.addEventListener("wheel",l,ks),document.addEventListener("touchmove",l,ks),document.addEventListener("touchstart",h,ks),function(){Cs=Cs.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,ks),document.removeEventListener("touchmove",l,ks),document.removeEventListener("touchstart",h,ks)}},[]);var f=e.removeScrollBar,x=e.inert;return y.createElement(y.Fragment,null,x?y.createElement(i,{styles:VN(s)}):null,f?y.createElement($N,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function GN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const QN=SN(zb,KN);var qb=y.forwardRef(function(e,t){return y.createElement(Mc,lr({},e,{ref:t,sideCar:QN}))});qb.classNames=Mc.classNames;var JN=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ts=new WeakMap,Va=new WeakMap,qa={},Bu=0,Kb=function(e){return e&&(e.host||Kb(e.parentNode))},YN=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Kb(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},XN=function(e,t,r,n){var s=YN(t,Array.isArray(e)?e:[e]);qa[r]||(qa[r]=new WeakMap);var i=qa[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var h=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(p){if(a.has(p))h(p);else try{var f=p.getAttribute(n),x=f!==null&&f!=="false",m=(Ts.get(p)||0)+1,b=(i.get(p)||0)+1;Ts.set(p,m),i.set(p,b),o.push(p),m===1&&x&&Va.set(p,!0),b===1&&p.setAttribute(r,"true"),x||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return h(t),a.clear(),Bu++,function(){o.forEach(function(u){var p=Ts.get(u)-1,f=i.get(u)-1;Ts.set(u,p),i.set(u,f),p||(Va.has(u)||u.removeAttribute(n),Va.delete(u)),f||u.removeAttribute(r)}),Bu--,Bu||(Ts=new WeakMap,Ts=new WeakMap,Va=new WeakMap,qa={})}},ZN=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=JN(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),XN(n,s,r,"aria-hidden")):function(){return null}},Uc="Dialog",[Gb,p4]=Mr(Uc),[eP,Xt]=Gb(Uc),Qb=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=y.useRef(null),l=y.useRef(null),[c,h]=Oi({prop:n,defaultProp:s??!1,onChange:i,caller:Uc});return d.jsx(eP,{scope:t,triggerRef:a,contentRef:l,contentId:yo(),titleId:yo(),descriptionId:yo(),open:c,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(u=>!u),[h]),modal:o,children:r})};Qb.displayName=Uc;var Jb="DialogTrigger",Yb=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(Jb,r),i=ge(t,s.triggerRef);return d.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Zf(s.open),...n,ref:i,onClick:ne(e.onClick,s.onOpenToggle)})});Yb.displayName=Jb;var Yf="DialogPortal",[tP,Xb]=Gb(Yf,{forceMount:void 0}),Zb=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,i=Xt(Yf,t);return d.jsx(tP,{scope:t,forceMount:r,children:y.Children.map(n,o=>d.jsx(Nt,{present:r||i.open,children:d.jsx(Cf,{asChild:!0,container:s,children:o})}))})};Zb.displayName=Yf;var Xl="DialogOverlay",ex=y.forwardRef((e,t)=>
vendor: 4,898 bytes, lines 284-288
284{const r=Xb(Xl,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Xt(Xl,e.__scopeDialog);return i.modal?d.jsx(Nt,{present:n||i.open,children:d.jsx(nP,{...s,ref:t})}):null});ex.displayName=Xl;var rP=Do("DialogOverlay.RemoveScroll"),nP=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(Xl,r);return d.jsx(qb,{as:rP,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(se.div,{"data-state":Zf(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),fs="DialogContent",tx=y.forwardRef((e,t)=>{const r=Xb(fs,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,i=Xt(fs,e.__scopeDialog);return d.jsx(Nt,{present:n||i.open,children:i.modal?d.jsx(sP,{...s,ref:t}):d.jsx(iP,{...s,ref:t})})});tx.displayName=fs;var sP=y.forwardRef((e,t)=>{const r=Xt(fs,e.__scopeDialog),n=y.useRef(null),s=ge(t,r.contentRef,n);return y.useEffect(()=>{const i=n.current;if(i)return ZN(i)},[]),d.jsx(rx,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ne(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ne(e.onFocusOutside,i=>i.preventDefault())})}),iP=y.forwardRef((e,t)=>{const r=Xt(fs,e.__scopeDialog),n=y.useRef(!1),s=y.useRef(!1);return d.jsx(rx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),rx=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Xt(fs,r),l=y.useRef(null),c=ge(t,l);return fN(),d.jsxs(d.Fragment,{children:[d.jsx(Db,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:d.jsx(Tc,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Zf(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(oP,{titleId:a.titleId}),d.jsx(lP,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Xf="DialogTitle",nx=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(Xf,r);return d.jsx(se.h2,{id:s.titleId,...n,ref:t})});nx.displayName=Xf;var sx="DialogDescription",ix=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(sx,r);return d.jsx(se.p,{id:s.descriptionId,...n,ref:t})});ix.displayName=sx;var ox="DialogClose",ax=y.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Xt(ox,r);return d.jsx(se.button,{type:"button",...n,ref:t,onClick:ne(e.onClick,()=>s.onOpenChange(!1))})});ax.displayName=ox;function Zf(e){return e?"open":"closed"}var lx="DialogTitleWarning",[m4,cx]=vE(lx,{contentName:fs,titleName:Xf,docsSlug:"dialog"}),oP=({titleId:e})=>{const t=cx(lx),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 285 286If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 287 288For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},aP="DialogDescriptionWarning",lP=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cx(aP).contentName}}.`;return y.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},cP=Qb,uP=Yb,dP=Zb,ux=ex,dx=tx,hx=nx,fx=ix,hP=ax;const px=cP,fP=uP,pP=dP,mx=y.forwardRef(({className:e,...t},r)=>d.jsx(ux,{ref:r,className:_e("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}));mx.displayName=ux.displayName;const ep=y.forwardRef(({className:e,children:t,...r},n)=>d.jsxs(pP,{children:[d.jsx(mx,{}),d.jsxs(dx,{ref:n,className:_e("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
288nded-lg",e),...r,children:[t,d.jsxs(hP,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(Nc,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ep.displayName=dx.displayName;const tp=({className:e,...t})=>d.jsx("div",{className:_e("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});tp.displayName="DialogHeader";const rp=y.forwardRef(({className:e,...t},r)=>d.jsx(hx,{ref:r,className:_e("text-lg font-semibold leading-none tracking-tight",e),...t}));rp.displayName=hx.displayName;const mP=y.forwardRef(({className:e,...t},r)=>d.jsx(fx,{ref:r,className:_e("text-sm text-muted-foreground",e),...t}));mP.displayName=fx.displayName;const gP=Symbol.for("@supabase/supabase-js.traceContextExtractor");function vP(){return globalThis[gP]}function yP(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(h){try{c(n.next(h))}catch(u){o(u)}}function l(h){try{c(n.throw(h))}catch(u){o(u)}}function c(h){h.done?i(h.value):s(h.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}const wP=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class np extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class bP extends np{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Cg extends np{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Tg extends np{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var wh;(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"})(wh||(wh={}));class xP{constructor(t,{headers:r={},customFetch:n,region:s=wh.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=wP(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return yP(this,arguments,void 0,function*(r,n={}){var s,i;let o,a,l;try{const{headers:c,method:h,body:u,signal:p,timeout:f}=n;let x={},{region:m}=n;m||(m=this.region);const b=new URL(`${this.url}/${r}`);m&&m!=="any"&&(x["x-region"]=m,b.searchParams.set("forceFunctionRegion",m));let v;const g=!!c&&Object.keys(c).some(T=>T.toLowerCase()==="content-type");u&&!g?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(x["Content-Type"]="application/octet-stream",v=u):typeof u=="string"?(x["Content-Type"]="text/plain",v=u):typeof FormData<"u"&&u instanceof FormData?v=u:(x["Content-Type"]="application/json",v=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?v=JSON.stringify(u):v=u;let w=p;f&&(a=new AbortController,o=setTimeout(()=>a.abort(),f),p?(w=a.signal,l=()=>a.abort(),p.addEventListener("abort",l)):w=a.signal);const _=yield this.fetch(b.toString(),{method:h||"POST",headers:Object.assign(Object.assign(Object.assign({},x),this.headers),c),body:v,signal:w}).catch(T=>{throw new bP(T)}),S=_.headers.get("x-relay-error");if(S&&S==="true")throw new Cg(_);if(!_.ok)throw new Tg(_);let E=((s=_.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim().toLowerCase(),C;return E==="application/json"?C=yield _.json():E==="application/octet-stream"||E==="application/pdf"?C=yield _.blob():E==="text/event-stream"?C=_:E==="multipart/form-data"?C=yield _.formData():C=yield _.text(),{data:C,error:null,response:_}}catch(c){return{data:null,error:c,response:c instanceof Tg||c instanceof Cg?c.context:void 0}}finally{o&&clearTimeout(o),l&&((i=n.signal)===null||i===void 0||i.removeEventListener("abort",l))}})}}
288var ri=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};const gx=3,Rg=e=>Math.min(1e3*2**e,3e4),_P=[520,503],vx=["GET","HEAD","OPTIONS"];function Ko(e){"@babel/helpers - typeof";return Ko=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},Ko(e)}function SP(e,t){if(Ko(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ko(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EP(e){var t=SP(e,"string");return Ko(t)=="symbol"?t:t+""}function kP(e,t,r){return(t=EP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function qn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jg(Object(r),!0).forEach(function(n){kP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ng(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),r()},e);function s(){clearTimeout(n),r()}t==null||t.addEventListener("abort",s)})}function CP(e,t,r,n){return!(!n||r>=gx||!vx.includes(e)||!_P.includes(t))}async function yx(e,t,r,n){let s=0;for(;;){const a=qn({},r.headers);s>0&&(a["X-Retry-Count"]=String(s));let l;try{l=await e(t,{method:r.method,headers:a,body:r.body,signal:r.signal})}catch(c){if((c==null?void 0:c.name)==="AbortError"||(c==null?void 0:c.code)==="ABORT_ERR"||!vx.includes(r.method))throw c;if(n&&s<gx){const h=Rg(s);s++,await Ng(h,r.signal);continue}throw c}if(CP(r.method,l.status,s,n)){var i,o;const c=(i=(o=l.headers)===null||o===void 0?void 0:o.get("Retry-After"))!==null&&i!==void 0?i:null,h=c!==null?Math.max(0,parseInt(c,10)||0)*1e3:Rg(s);await l.text(),s++,await Ng(h,r.signal);continue}return l}}var TP=class{constructor(e){var t,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{const o={};r.headers.forEach((l,c)=>{o[c]=l});const a=await yx(n,r.url.toString(),{method:r.method,headers:o,body:JSON.stringify(r.body,(l,c)=>typeof c=="bigint"?c.toString():c),signal:r.signal},r.retryEnabled);
288return await r.processResponse(a)})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",h="";const u=o==null?void 0:o.cause;if(u){var p,f,x,m;const g=(p=u==null?void 0:u.message)!==null&&p!==void 0?p:"",w=(f=u==null?void 0:u.code)!==null&&f!==void 0?f:"";l=`${(x=o==null?void 0:o.name)!==null&&x!==void 0?x:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 289 290Caused by: ${(m=u==null?void 0:u.name)!==null&&m!==void 0?m:"Error"}: ${g}`,w&&(l+=` (${w})`),u!=null&&u.stack&&(l+=` 291${u.stack}`)}else{var b;l=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const v=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(h="",c="Request was aborted (timeout or manual cancellation)",v>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${v} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((u==null?void 0:u.name)==="HeadersOverflowError"||(u==null?void 0:u.code)==="UND_ERR_HEADERS_OVERFLOW")&&(h="",c="HTTP headers exceeded server limits (typically 16KB)",v>this.urlLengthLimit&&(c+=`. Your request URL is ${v} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:h},data:null,count:null,status:0,statusText:""}})),i.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var c;const f=await e.text();if(f!=="")if(t.headers.get("Accept")==="text/csv")n=f;else if(t.headers.get("Accept")&&(!((c=t.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text")))n=f;else try{n=JSON.parse(f)}catch{if(r={message:f},n=null,t.shouldThrowOnError)throw new ri({message:f,details:"",hint:"",code:""})}}const u=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),p=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");if(u&&p&&p.length>1&&(s=parseInt(p[1])),t.isMaybeSingle&&Array.isArray(n))if(n.length>1){if(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,i=406,o="Not Acceptable",t.shouldThrowOnError){var h;throw new ri(qn(qn({},r),{},{hint:(h=r.hint)!==null&&h!==void 0?h:""}))}}else n.length===1?n=n[0]:n=null}else{const u=await e.text();try{r=JSON.parse(u),Array.isArray(r)&&e.status===404&&(n=[],r=null,i=200,o="OK")}catch{e.status===404&&u===""?(i=204,o="No Content"):r={message:u}}if(r&&t.shouldThrowOnError)throw new ri(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},RP=class extends TP{throwOnError(){return super.throwOnError()}select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
291explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"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 Pg=new RegExp("[,()]");var Os=class extends RP{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Pg.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&Pg.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},jP=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new Os({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
2910){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new Os({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((h,u)=>h.concat(Object.keys(u)),[]);if(c.length>0){const h=[...new Set(c)].map(u=>`"${u}"`);a.searchParams.set("columns",h.join(","))}}return new Os({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Os({method:n,url:s,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Os({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function NP(e,t){try{const o=JSON.parse(e);if(o&&typeof o=="object"&&!Array.isArray(o)){var r,n,s,i;return new ri({message:String((r=o.message)!==null&&r!==void 0?r:e),details:(n=o.details)!==null&&n!==void 0?n:"",hint:(s=o.hint)!==null&&s!==void 0?s:"",code:(i=o.code)!==null&&i!==void 0?i:""})}}catch{}return new ri({message:e||t,details:"",hint:"",code:""})}function Ag(e,t,r){var n;const s=e;return{success:!1,error:new ri({message:`${(n=s==null?void 0:s.name)!==null&&n!==void 0?n:"FetchError"}: ${s==null?void 0:s.message}`,details:"",hint:"",code:""}),data:null,count:null,status:t,statusText:r}}var PP=class wx{constructor(t,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,h)=>{const u=new AbortController,p=setTimeout(()=>u.abort(),i),f=h==null?void 0:h.signal;if(f){if(f.aborted)return clearTimeout(p),l(c,h);const x=()=>{clearTimeout(p),u.abort()};return f.addEventListener("abort",x,{once:!0}),l(c,qn(qn({},h),{},{signal:u.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",x)})}return l(c,qn(qn({},h),{},{signal:u.signal})).finally(()=>clearTimeout(p))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new jP(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new wx(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}async getOpenApiSpec(){var t=this,r;const n=new Headers(t.headers);n.set("Accept","application/openapi+json"),t.schemaName&&n.set("Accept-Profile",t.schemaName);const s={};n.forEach((c,h)=>{s[h]=c});const i=(r=t.fetch)!==null&&r!==void 0?r:globalThis.fetch;let o;try{var a;o=await yx(i,`${t.url}/`,{method:"GET",headers:s},(a=t.retry)!==null&&a!==void 0?a:!0)}catch(c){return Ag(c,0,"")}let l;try{l=await o.text()}catch(c){return Ag(c,o.status,o.statusText)}if(o.ok)try{return{success:!0,error:null,data:JSON.parse(l),count:null,status:o.status,statusText:o.statusText}}catch{}return{success:!1,error:NP(l,o.statusText),data:null,count:null,status:o.status,statusText:o.statusText}}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const h=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(h)),u=n&&Object.values(r).some(h);u?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([f,x])=>x!==void 0).map(([f,x])=>[f,Array.isArray(x)?`{${x.join(",")}}`:`${x}
291`]).forEach(([f,x])=>{l.searchParams.append(f,x)})):(a="POST",c=r);const p=new Headers(this.headers);return u?p.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&p.set("Prefer",`count=${i}`),new Os({method:a,url:l,headers:p,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class AP{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.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"&&r.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 s=globalThis.process;if(s){const i=s.versions;if(i&&i.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}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.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 292 293Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const OP="2.117.0",IP=`realtime-js/${OP}`,LP="1.0.0",bx="2.0.0",$P=bx,DP=1e4,MP=15e3,UP=1e4,FP=100,en={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},xx={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},bh={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class zP{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,i;const o=new TextEncoder,a=o.encode(t.topic),l=o.encode((s=t.ref)!==null&&s!==void 0?s:""),c=o.encode((i=t.join_ref)!==null&&i!==void 0?i:""),h=o.encode(t.payload.event),u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},p=o.encode(Object.keys(u).length===0?"":JSON.stringify(u));if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`userEvent length ${h.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`metadata length ${p.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+a.length+h.length+p.length,x=new ArrayBuffer(this.HEADER_LENGTH+f),m=new DataView(x),b=new Uint8Array(x);let v=0;m.setUint8(v++,this.KINDS.userBroadcastPush),m.setUint8(v++,c.length),m.setUint8(v++,l.length),m.setUint8(v++,a.length),m.setUint8(v++,h.length),m.setUint8(v++,p.length),m.setUint8(v++,r),b.set(c,v),v+=c.length,b.set(l,v),v+=l.length,b.set(a,v),v+=a.length,b.set(h,v),v+=h.length,b.set(p,v),v+=p.length;var g=new Uint8Array(x.byteLength+n.byteLength);return g.set(new Uint8Array(x),0),g.set(new Uint8Array(n),x.byteLength),g.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(t.slice(l,l+s));l=l+s;const h=n.decode(t.slice(l,l+i));l=l+i;
293const u=n.decode(t.slice(l,l+o));l=l+o;const p=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,x={type:this.BROADCAST_EVENT,event:h,payload:f};return o>0&&(x.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:x}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var de;(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"})(de||(de={}));const Og=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=BP(o,e,t,s),i),{}):{}},BP=(e,t,r,n)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=r[e];return i&&!n.includes(i)?_x(i,o):xh(o)},_x=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return qP(t,r)}switch(e){case de.bool:return HP(t);case de.float4:case de.float8:case de.int2:case de.int4:case de.int8:case de.numeric:case de.oid:return WP(t);case de.json:case de.jsonb:return VP(t);case de.timestamp:return KP(t);case de.abstime:case de.date:case de.daterange:case de.int4range:case de.int8range:case de.money:case de.reltime:case de.text:case de.time:case de.timestamptz:case de.timetz:case de.tsrange:case de.tstzrange:return xh(t);default:return xh(t)}},xh=e=>e,HP=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},WP=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},VP=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},qP=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>_x(t,a))}return e},KP=e=>typeof e=="string"?e.replace(" ","T"):e,Sx=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var ni=e=>typeof e=="function"?e:function(){return e},GP=typeof self<"u"?self:null,Is=typeof window<"u"?window:null,rr=GP||Is||globalThis,QP="2.0.0",JP=1e4,YP=1e3,XP=100,or={connecting:0,open:1,closing:2,closed:3},tt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},br={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},_h={longpoll:"longpoll",websocket:"websocket"},ZP={complete:4},Sh="base64url.bearer.phx.",Ka=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Ex=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},e2=class{constructor(e,t,r){this.state=tt.closed,this.topic=e,this.params=ni(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ka(this,br.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Ex(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=tt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=tt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=tt.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=tt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Ka(this,br.leave,ni({}),this.timeout).send(),this.state=tt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(br.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}
vendor: 19,019 bytes, lines 293-294
293teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=tt.closed,this.bindings=[]}onClose(e){this.on(br.close,e)}onError(e){return this.on(br.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Ka(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=tt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(br.close,"leave")},r=new Ka(this,br.leave,ni({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=tt.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let s=this.onMessage(e,t,r,n);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<i.length;o++)i[o].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===tt.closed}isErrored(){return this.state===tt.errored}isJoined(){return this.state===tt.joined}isJoining(){return this.state===tt.joining}isLeaving(){return this.state===tt.leaving}},Zl=class{static request(e,t,r,n,s,i,o){if(rr.XDomainRequest){let a=new rr.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,i,o)}else if(rr.XMLHttpRequest){let a=new rr.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,i,o)}else{if(rr.fetch&&rr.AbortController)return this.fetchRequest(e,t,r,n,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,i,o){let a={method:e,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),rr.fetch(t,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,r,n,s,i,o){return e.timeout=s,e.open(t,r),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,i,o,a){e.open(t,r,!0),e.timeout=i;for(let[l,c]of Object.entries(n))e.setRequestHeader(l,c);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===ZP.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let s=t?`${t}[${n}]`:n,i=e[n];typeof i=="object"?r.push(this.serialize(i,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},t2=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let s=0;s<n;s++)t+=String.fromCharCode(r[s]);return btoa(t)},Rs=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Sh)&&(this.authToken=atob(t[1].slice(Sh.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=or.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+_h.websocket),"$1/"+_h.longpoll)}endpointURL(){return Zl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=or.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===or.open||this.readyState===or.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:s}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=or.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=t2(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;const r=t+XP,n=e.slice(t,r);this.ajax("POST",{"Content-Type":"application/x-ndjson"},n.join(` 294`),()=>this.onerror("timeout"),s=>{!s||s.status!==200?(this.awaitingBatchAck=!1,this.onerror(s&&s.status),this.closeAndRetry(1011,"internal server error",!1)):r<e.length?this.batchSend(e,r):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,r){for(let s of this.reqs)s.abort();this.readyState=or.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,s){let i,o=()=>{this.reqs.delete(i),n()};i=Zl.request(e,this.endpointURL(),t,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},r2=class so{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=so.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=so.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(n.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=so.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return so.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let i=this.toNullProtoObj(this.clone(t));r=this.toNullProtoObj(r);let o=Object.create(null),a=Object.create(null);return this.map(i,(l,c)=>{r[l]||(a[l]=c)}),this.map(r,(l,c)=>{let h=i[l];if(h){let u=c.metas.map(m=>m.phx_ref),p=h.metas.map(m=>m.phx_ref),f=c.metas.filter(m=>p.indexOf(m.phx_ref)<0),x=h.metas.filter(m=>u.indexOf(m.phx_ref)<0);f.length>0&&(o[l]=c,o[l].metas=f),x.length>0&&(a[l]=this.clone(h),a[l].metas=x)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(t,r,n,s){t=this.toNullProtoObj(t);let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=t[a];if(t[a]=this.clone(l),c){let h=t[a].metas.map(p=>p.phx_ref),u=c.metas.filter(p=>h.indexOf(p.phx_ref)<0);t[a].metas.unshift(...u)}n(a,c,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;let h=l.metas.map(u=>u.phx_ref);c.metas=c.metas.filter(u=>h.indexOf(u.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete t[a]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static toNullProtoObj(t){if(Object.getPrototypeOf(t)===null)return t;let r=Object.create(null);return Object.getOwnPropertyNames(t).forEach(n=>{r[n]=t[n]}),r}static clone(t){return JSON.parse(JSON.stringify(t))}},Ga={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,s,i,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:i}=e,o=new TextEncoder,a=o.encode(t),l=o.encode(r),c=o.encode(s),h=o.encode(n);this.assertFieldSize(a.byteLength,"join_ref"),this.assertFieldSize(l.byteLength,"ref"),this.assertFieldSize(c.byteLength,"topic"),this.assertFieldSize(h.byteLength,"event");let u=this.META_LENGTH+a.byteLength+l.byteLength+c.byteLength+h.byteLength,p=new ArrayBuffer(this.HEADER_LENGTH+u),f=new Uint8Array(p),x=new DataView(p),m=0;x.setUint8(m++,this.KINDS.push),x.setUint8(m++,a.byteLength),x.setUint8(m++,l.byteLength),x.setUint8(m++,c.byteLength),x.setUint8(m++,h.byteLength),f.set(a,m),m+=a.byteLength,f.set(l,m),m+=l.byteLength,f.set(c,m),m+=c.byteLength,f.set(h,m),m+=h.byteLength;var b=new Uint8Array(p.byteLength+i.byteLength);return b.set(f,0),b.set(new Uint8Array(i),p.byteLength),b.buffer},assertFieldSize(e,t){if(e>255)throw new Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(e.slice(o,o+n));o=o+n;let l=r.decode(e.slice(o,o+s));o=o+s;let c=r.decode(e.slice(o,o+i));o=o+i;let h=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:h}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(a,a+n));a=a+n;let c=r.decode(e.slice(a,a+s));a=a+s;let h=r.decode(e.slice(a,a+i));a=a+i;let u=r.decode(e.slice(a,a+o));a=a+o;let p=e.slice(a,e.byteLength),f={status:u,response:p};return{join_ref:l,ref:c,topic:h,event:br.reply,payload:f}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(e.slice(i,i+n));i=i+n;let a=r.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},n2=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||JP,this.transport=t.transport||rr.WebSocket||Rs,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=rr&&rr.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Ga.encode.bind(Ga),this.defaultDecoder=Ga.decode.bind(Ga),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Rs?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;Is&&Is.addEventListener&&(Is.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),Is.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),Is.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ni(t.params||{}),this.endPoint=`${e}/${_h.websocket}`,this.vsn=t.vsn||QP,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Ex(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken&&ni(t.authToken)}getLongPollTransport(){return Rs}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Zl.appendParams(Zl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ni(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Rs?this.connectWithFallback(Rs,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(s=>{s.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case Rs:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Sh}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),YP,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===or.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
vendor: 4,209 bytes, line 294
294triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(br.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case or.connecting:return"connecting";case or.open:return"open";case or.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new e2(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:s,join_ref:i}=e;this.log("push",`${t} ${r} (${i}, ${s})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,o)&&l.trigger(n,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class wo{constructor(t,r){const n=i2(r);this.presence=new r2(t.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=wo.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=wo.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return wo.transformState(this.presence.state)}static transformState(t){return t=s2(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=yl(s),r},{})}static onJoinPayload(t,r,n){const s=Ig(r),i=yl(n);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,r,n){const s=Ig(r),i=yl(n);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function yl(e){return e.metas.map(t=>{const r=Object.getOwnPropertyDescriptors(t),n=Object.defineProperties({},r);return n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n})}function s2(e){return JSON.parse(JSON.stringify(e))}function i2(e){return(e==null?void 0:e.events)&&{events:e.events}}function Ig(e){return e!=null&&e.metas?yl(e):[]}var Lg;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Lg||(Lg={}));class o2{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new wo(this.channel.channelAdapter,r)}}function a2(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
294if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class l2{constructor(t,r,n){const s=c2(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>FP){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===en.joined}isJoined(){return this.state===en.joined}isJoining(){return this.state===en.joining}isClosed(){return this.state===en.closed}isLeaving(){return this.state===en.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function c2(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}const u2=/[,()"\\]/,d2=e=>u2.test(e)||e!==e.trim(),h2=e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,$g=e=>{const t=e===null?"null":String(e);return d2(t)?h2(t):t},f2=e=>e===null?"null":String(e),p2=(e,t)=>{if(e==="in"){const r=Array.isArray(t)?t:[t];if(r.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(r)).map(s=>$g(s)).join(",")})`}return e==="is"?`is.${f2(t)}`:`${e}.${$g(t)}`};class m2{constructor(){this.filters=[]}add(t,r,n,s=!1){const i=s?"not.":"";return this.filters.push(`${t}=${i}${p2(r,n)}`),this}eq(t,r){return this.add(t,"eq",r)}neq(t,r){return this.add(t,"neq",r)}gt(t,r){return this.add(t,"gt",r)}gte(t,r){return this.add(t,"gte",r)}lt(t,r){return this.add(t,"lt",r)}lte(t,r){return this.add(t,"lte",r)}in(t,r){return this.add(t,"in",r)}like(t,r){return this.add(t,"like",r)}ilike(t,r){return this.add(t,"ilike",r)}match(t,r){return this.add(t,"match",r)}imatch(t,r){return this.add(t,"imatch",r)}is(t,r){return this.add(t,"is",r)}isDistinct(t,r){return this.add(t,"isdistinct",r)}not(t,r,n){return this.add(t,r,n,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var Dg;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Dg||(Dg={}));var Bn;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Bn||(Bn={}));var xr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(xr||(xr={}));class _r{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var s,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new l2(this.socket.socketAdapter,t,this.params),this.presence=new o2(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Sx(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var n,s,i,o;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:a,presence:l,private:c,postgres_changes_options:h}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(b=>b.filter))!==null&&s!==void 0?s:[],p=!!this.bindings[Bn.PRESENCE]&&this.bindings[Bn.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,f={},x=Object.assign({broadcast:a,presence:Object.assign(Object.assign({},l),{enabled:p}),postgres_changes:u,private:c},h?{postgres_changes_options:h}:{});this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(b=>{t==null||t(xr.CHANNEL_ERROR,a2(b))}),this._onClose(()=>t==null?void 0:t(xr.CLOSED)),this.updateJoinPayload(Object.assign({config:x},f)),this._updateFilterMessage();const m=h!=null&&h.wait&&u.length>0?Math.max(r,((o=h.timeout)!==null&&o!==void 0?o:MP)+UP):r;this.channelAdapter.subscribe(m).receive("ok",async({postgres_changes:b})=>{if(this.socket._isManualToken()||this.socket.setAuth(),b===void 0){t==null||t(xr.SUBSCRIBED);return}this._updatePostgresBindings(b,t)}).receive("error",b=>{this.state=en.errored;const v=Object.values(b).join(", ")||"error";t==null||t(xr.CHANNEL_ERROR,new Error(v,{cause:b}))}).receive("timeout",()=>{t==null||t(xr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,i=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:c,schema:h,table:u,filter:p}}=l,f=t&&t[a];if(f&&f.event===c&&_r.isFilterValueEqual(f.schema,h)&&_r.isFilterValueEqual(f.table,u)&&_r.isFilterValueEqual(f.filter,p))o.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=en.errored,r==null||r(xr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=en.errored&&r&&r(xr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===Bn.PRESENCE||t===Bn.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i=r instanceof ArrayBuffer||ArrayBuffer.isView(r),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":i?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&a.searchParams.set("private","true");const l={method:"POST",headers:o,body:i?r:JSON.stringify(r)},c=await this._fetchWithTimeout(a.toString(),l,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(c.status===202)return{success:!0};if(c.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
294ime-js/migrations/httpsend-server-version.md"));let h=c.statusText;try{const u=await c.json();h=u.error||u.message||h}catch{}return Promise.reject(new Error(h))}async send(t,r={}){var n,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){const i="Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.";this.socket.hasLogger()?this.socket.log("channel",i):console.warn(i);const{event:o,payload:a}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:a,private:this.private}]})};try{const h=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=h.body)===null||s===void 0?void 0:s.cancel()),h.ok?"ok":"error"}catch(h){return h instanceof Error&&h.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(t,r,n){var s;const i=t.toLocaleLowerCase(),o=r==null?void 0:r.filter;if((o instanceof m2||typeof o=="object"&&o!==null&&typeof o.build=="function")&&(r=Object.assign(Object.assign({},r),{filter:o.build()})),i===Bn.POSTGRES_CHANGES&&((s=this.bindings[i])===null||s===void 0?void 0:s.find(h=>_r.isSamePostgresFilter(h.filter,r))))return this.socket.log("error",`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,r),this;const a=this.channelAdapter.on(t,n),l={type:i,filter:r,callback:n,ref:a};return this.bindings[i]?this.bindings[i].push(l):this.bindings[i]=[l],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,i,o,a,l,c,h;const u=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(u,n))return!1;const p=(s=this.bindings[u])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!p)return!0;if(["broadcast","presence","postgres_changes"].includes(u))if("id"in p){const f=p.id,x=(i=p.filter)===null||i===void 0?void 0:i.event;return f&&((o=r.ids)===null||o===void 0?void 0:o.includes(f))&&(x==="*"||(x==null?void 0:x.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const f=(c=(l=p==null?void 0:p.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return f==="*"||f===((h=r==null?void 0:r.event)===null||h===void 0?void 0:h.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===u})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:i,join:o}=xx;return r&&[n,s,i,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(s))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}static isSamePostgresFilter(t,r){var n,s,i,o;const a=(s=(n=t==null?void 0:t.select)===null||n===void 0?void 0:n.join())!==null&&s!==void 0?s:void 0,l=(o=(i=r==null?void 0:r.select)===null||i===void 0?void 0:i.join())!==null&&o!==void 0?o:void 0;return(t==null?void 0:t.event)===(r==null?void 0:r.event)&&_r.isFilterValueEqual(t==null?void 0:t.schema,r==null?void 0:r.schema)&&_r.isFilterValueEqual(t==null?void 0:t.table,r==null?void 0:r.table)&&_r.isFilterValueEqual(t==null?void 0:t.filter,r==null?void 0:r.filter)&&a===l}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Og(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Og(t.columns,t.old_record)),r}}class g2{constructor(t,r){this.socket=new n2(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}hasLogger(){return this.socket.hasLogger()}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==bh.connecting}isDisconnecting(){return this.socket.connectionState()==bh.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Mg={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100}
294,v2=[1e3,2e3,5e3,1e4],y2=1e4;function w2(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function b2(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return w2()}const x2=` 295 addEventListener("message", (e) => { 296 if (e.data.event === "start") { 297 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 298 } 299 });`;class _2{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new zP,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const s=this._initializeOptions(r);this.socketAdapter=new g2(t,s),this.httpEndpoint=Sx(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}hasLogger(){return this.socketAdapter.hasLogger()}connectionState(){return this.socketAdapter.connectionState()||bh.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new _r(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){const r=++this._authGeneration,n=this._performAuth(t,r);r===this._authGeneration&&(this._authPromise=n);try{await n}finally{this._authPromise===n&&(this._authPromise=null)}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
299this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t,r){let n,s=!1;if(t)n=t,s=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),n=this.accessTokenValue}else n=this.accessTokenValue;r===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:s&&(this._manuallySetToken=!0),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(i=>{const o={access_token:n,version:IP};i.updateJoinPayload(o),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(xx.access_token,{access_token:n})})))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r!=="disconnected"&&(r=="sent"&&this._setAuthSafely(),t&&t(r,n))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([x2],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,i,o,a,l,c,h,u,p,f;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const x={};x.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:DP,x.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:Mg.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:Mg.HEARTBEAT_INTERVAL),x.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:AP.getWebSocketConstructor(),x.params=t==null?void 0:t.params,x.logger=t==null?void 0:t.logger,x.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),x.sessionStorage=(c=t==null?void 0:t.sessionStorage)!==null&&c!==void 0?c:b2(),x.reconnectAfterMs=(h=t==null?void 0:t.reconnectAfterMs)!==null&&h!==void 0?h:g=>v2[g-1]||y2;let m,b;const v=(u=t==null?void 0:t.vsn)!==null&&u!==void 0?u:$P;switch(v){case LP:m=(g,w)=>w(JSON.stringify(g)),b=(g,w)=>w(JSON.parse(g));break;case bx:m=this.serializer.encode.bind(this.serializer),b=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${x.vsn}`)}if(x.vsn=v,x.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:m,x.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:b,x.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,x.params=Object.assign(Object.assign({},x.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,x.autoSendHeartbeat=!this.worker}return x}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
299var Go=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function S2(e,t,r){const n=new URL(t,e);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function E2(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 k2(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=S2(e.baseUrl,n,s),l=await E2(e.auth),c=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),h=await c.text(),u=(c.headers.get("content-type")||"").includes("application/json"),p=u&&h?JSON.parse(h):h;if(!c.ok){const f=u?p:void 0,x=f==null?void 0:f.error;throw new Go((x==null?void 0:x.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:x==null?void 0:x.type,icebergCode:x==null?void 0:x.code,details:f})}return{status:c.status,headers:c.headers,data:p}}}}function Qa(e){return e.join("�")}var C2=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Qa(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Qa(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qa(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Qa(e.namespace)}`}),!0}catch(t){if(t instanceof Go&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Go&&r.status===409)return;throw r}}};function js(e){return e.join("�")}var T2=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${js(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${js(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${js(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${js(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/${js(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/${js(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Go&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Go&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},R2=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=k2({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new C2(this.client,t),this.tableOps=new T2(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)}
299async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function Qo(e){"@babel/helpers - typeof";return Qo=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},Qo(e)}function j2(e,t){if(Qo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function N2(e){var t=j2(e,"string");return Qo(t)=="symbol"?t:t+""}function P2(e,t,r){return(t=N2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ug(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ug(Object(r),!0).forEach(function(n){P2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ug(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Fc=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function zc(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Eh=class extends Fc{constructor(e,t,r,n="storage",s){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r,this.co
299de=s}toJSON(){return V(V({},super.toJSON()),{},{code:this.code})}},kx=class extends Fc{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function ec(e,t,r){const n=V({},e),s=t.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function A2(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const O2=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),I2=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)},kh=e=>{if(Array.isArray(e))return e.map(r=>kh(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=kh(n)}),t},L2=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Ch=e=>e.split("/").map(encodeURIComponent).join("/"),Fg=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},$2=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Eh(Fg(o),i,a,n,o==null?void 0:o.code))}).catch(()=>{const o=i+"";t(new Eh(s.statusText||`HTTP ${i} error`,i,o,n))})}else t(new kx(Fg(e),e,n))},D2=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return V(V({},s),r);if(I2(n)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=ec(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),V(V({},s),r)};async function Yi(e,t,r,n,s,i,o){return new Promise((a,l)=>{e(r,D2(t,n,s,i)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;if(o==="vectors"){const h=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!h||!h.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>$2(c,l,n,o))})}function Cx(e="storage"){return{get:async(t,r,n,s)=>Yi(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,i)=>Yi(t,"POST",r,s,i,n,e),put:async(t,r,n,s,i)=>Yi(t,"PUT",r,s,i,n,e),head:async(t,r,n,s)=>Yi(t,"HEAD",r,V(V({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,i)=>Yi(t,"DELETE",r,s,i,n,e)}}const M2=Cx("storage"),{get:si,post:Ut,put:tc,head:U2,remove:ii}=M2,ft=Cx("vectors");var Mi=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=A2(t),this.fetch=O2(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=ec(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(zc(r))return{data:null,error:r};throw r}}};let Tx;Tx=Symbol.toStringTag;var F2=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Tx]="StreamDownloadBuilder",this.promise=null}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 e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(zc(t))return{data:null,error:t};throw t}}};let Rx;Rx=Symbol.toStringTag;var z2=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Rx]="BlobDownloadBuilder",this.promise=null}asStream(){return new F2(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(zc(t))return{data:null,error:t};throw t}}};const Hu={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},zg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var B2=class extends Mi{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=V(V({},zg),n);let a=V(V({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,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")),n!=null&&n.headers)for(const[p,f]of Object.entries(n.headers))a=ec(a,p,f);const c=s._removeEmptyFolders(t),h=s._getFinalPath(c),u=await(e=="PUT"?tc:Ut)(s.fetch,`${s.url}/object/${h}`,i,V({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:u.Id,fullPath:u.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const c=V(V({},zg),n);let h=V(V({},s.headers),{"x-upsert":String(c.upsert)});const u=c.metadata;if(typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),u&&l.append("metadata",s.encodeMetadata(u)),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),u&&!l.has("metadata")&&l.a
299ppend("metadata",s.encodeMetadata(u))):(l=r,h["cache-control"]=`max-age=${c.cacheControl}`,h["content-type"]=c.contentType,u&&(h["x-metadata"]=s.toBase64(s.encodeMetadata(u))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!c.duplex&&(c.duplex="half")),n!=null&&n.headers)for(const[p,f]of Object.entries(n.headers))h=ec(h,p,f);return{path:i,fullPath:(await tc(s.fetch,a.toString(),l,V({headers:h},c!=null&&c.duplex?{duplex:c.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=V({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Ut(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+i.url),a=o.searchParams.get("token");if(!a)throw new Fc("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await Ut(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
299stinationBucket:r==null?void 0:r.destinationBucket,sourceVersionId:r==null?void 0:r.sourceVersionId},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Ut(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket,sourceVersionId:r==null?void 0:r.sourceVersionId},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await Ut(n.fetch,`${n.url}/object/sign/${s}`,V(V({expiresIn:t},i?{transform:r.transform}:{}),(r==null?void 0:r.versionId)!=null?{versionId:r.versionId}:{}),{headers:n.headers});const a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${n.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Ut(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=new URLSearchParams;r!=null&&r.download&&i.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&i.set("cacheNonce",String(r.cacheNonce));const o=i.toString();return s.map(a=>V(V({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce)),(t==null?void 0:t.versionId)!=null&&s.set("versionId",String(t.versionId));const i=s.toString(),o=this._getFinalPath(e),a=()=>si(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new z2(a,this.shouldThrowOnError)}async info(e,t){var r=this;const n=r._getFinalPath(e),s=new URLSearchParams;(t==null?void 0:t.versionId)!=null&&s.set("versionId",String(t.versionId));const i=s.toString();return r.handleOperation(async()=>kh(await si(r.fetch,`${r.url}/object/info/${n}${i?`?${i}`:""}`,{headers:r.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await U2(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(zc(s)){var n;const i=s instanceof Eh?s.status:s instanceof kx?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce)),(t==null?void 0:t.versionId)!=null&&n.set("versionId",String(t.versionId));const s=n.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await ii(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,r){var n=this;return n.handleOperation(async()=>{const s=Ch(n._getFinalPath(e)),i=new URLSearchParams;t!=null&&t.transformations&&i.set("transformations","true");const o=i.toString();return await ii(n.fetch,`${n.url}/cdn/${s}${o?`?${o}`:""}`,{},{headers:n.headers},r)})}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=t!=null&&t.sortBy?V(V({},Hu.sortBy),t.sortBy):Hu.sortBy,i=V(V(V({},Hu),t),{},{sortBy:s,prefix:e||""});return await Ut(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=V({},e);return await Ut(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("qual
299ity",t.quality.toString()),e}};const H2="2.117.0",ga={"X-Client-Info":`storage-js/${H2}`};var W2=class extends Mi{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=V(V({},ga),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await si(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await si(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Ut(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes,versioning_status:t.versioningStatus},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await tc(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes,versioning_status:t.versioningStatus},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Ut(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ii(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async getBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await si(t.fetch,t.bucketLifecycleUrl(e),{headers:t.headers}))}async updateBucketLifecycle(e,t){var r=this;return r.handleOperation(async()=>await tc(r.fetch,r.bucketLifecycleUrl(e),t,{headers:r.headers}))}async deleteBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await ii(t.fetch,t.bucketLifecycleUrl(e),{},{headers:t.headers}))}async purgeBucketCache(e,t,r){var n=this;return n.handleOperation(async()=>{const s=new URLSearchParams;t!=null&&t.transformations&&s.set("transformations","true");const i=s.toString();return await ii(n.fetch,`${n.url}/cdn/${Ch(e)}${i?`?${i}`:""}`,{},{headers:n.headers},r)})}bucketLifecycleUrl(e){return`${this.url}/bucket/${Ch(e)}/lifecycle`}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():""}},V2=class extends Mi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=V(V({},ga),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ut(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await si(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ii(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!L2(e))throw new Fc("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new R2({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{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(n)throw l;return{data:null,error:l}}}}})}},q2=class extends Mi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=V(V({},ga),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await ft.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await ft.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await ft.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await ft.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},K2=class extends Mi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=V(V({},ga),{},{"Content-Type":"application/json"},t);super(n,s,r,"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 ft.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await ft.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");
299if(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 ft.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await ft.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 ft.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},G2=class extends Mi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=V(V({},ga),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await ft.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ft.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await ft.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ft.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Q2=class extends G2{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new J2(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},J2=class extends q2{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new Y2(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Y2=class extends K2{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,V(V({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},X2=class extends W2{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new B2(this.url,this.headers,e,this.fetch)}get vectors(){return new Q2(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new V2(this.url+"/iceberg",this.headers,this.fetch)}};function Bc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}const jx="2.117.0",Sr=30*1e3,io=3,Wu=io*Sr,Z2=2*Sr,eA="http://localhost:9999",tA="supabase.auth.token",rA={"X-Client-Info":`gotrue-js/${jx}`},Th="X-Supabase-Api-Version",Nx={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},nA=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Kn="sb_flow_id",sA=5,iA=10*60*1e3;
299class Jo extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function D(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class oA extends Jo{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function Bg(e){return D(e)&&e.name==="AuthApiError"}class Wt extends Jo{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class pr extends Jo{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Oe extends pr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Ja(e){return D(e)&&e.name==="AuthSessionMissingError"}class Ns extends pr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Ya extends pr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Xa extends pr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function aA(e){return D(e)&&e.name==="AuthImplicitGrantRedirectError"}class Hg extends pr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class lA extends pr{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 wl extends pr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Za(e){return D(e)&&e.name==="AuthRetryableFetchError"}class Wg extends pr{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function Vg(e){return D(e)&&e.name==="AuthRefreshDiscardedError"}class qg extends pr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class rc extends pr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const nc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Kg=` 300\r=`.split(""),cA=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Kg.length;t+=1)e[Kg[t].charCodeAt(0)]=-2;for(let t=0;t<nc.length;t+=1)e[nc[t].charCodeAt(0)]=t;return e})();function Gg(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(nc[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(nc[n]),t.queuedBits-=6}}function Px(e,t,r){const n=cA[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Qg(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{hA(o,n,r)};for(let o=0;o<e.length;o+=1)Px(e.charCodeAt(o),s,i);return t.join("")}function uA(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 dA(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}uA(n,t)}}function hA(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function oi(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;
300s+=1)Px(e.charCodeAt(s),r,n);return new Uint8Array(t)}function fA(e){const t=[];return dA(e,r=>t.push(r)),new Uint8Array(t)}function Gn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Gg(s,r,n)),Gg(null,r,n),t.join("")}function Ax(e){return Math.round(Date.now()/1e3)+e}function pA(){return Symbol("auth-callback")}const $e=()=>typeof window<"u"&&typeof document<"u",Mn={tested:!1,writable:!1},Ox=()=>{if(!$e())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Mn.tested)return Mn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Mn.tested=!0,Mn.writable=!0}catch{Mn.tested=!0,Mn.writable=!1}return Mn.writable};function Jg(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const Ix=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),mA=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Cr=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},qe=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},ot=async(e,t)=>{await e.removeItem(t)};class Hc{constructor(){this.promise=new Hc.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Hc.promiseConstructor=Promise;function el(e){const t=e.split(".");if(t.length!==3)throw new rc("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!nA.test(t[n]))throw new rc("JWT not in base64url format");return{header:JSON.parse(Qg(t[0])),payload:JSON.parse(Qg(t[1])),signature:oi(t[2]),raw:{header:t[0],payload:t[1]}}}async function gA(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function vA(e,t){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function Lx(e){return("0"+e.toString(16)).substr(-2)}function yA(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,Lx).join("")}async function wA(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function bA(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await wA(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const xA=/^[a-zA-Z0-9_-]{8,64}$/;function bl(e){return typeof e=="string"&&xA.test(e)?e:null}function _A(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,Lx).join("")}let e="";for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}const Ri=(e,t)=>`${e}-flow-${t}-code-verifier`,Yo=e=>`${e}-flows-code-verifier`;async function sp(e,t){const r=await qe(e,Yo(t));return Array.isArray(r)?r.filter(n=>bl(n)!==null):[]}async function SA(e,t,r,n,s){await Cr(e,Ri(t,r),n);const i=(await sp(e,t)).filter(o=>o!==r);for(i.push(r);i.length>sA;){const o=i.shift();await ot(e,Ri(t,o)),s==null||s(o)}await Cr(e,Yo(t),i),await Cr(e,`${t}-code-verifier`,n)}async function EA(e,t,r){if(r){const s=await qe(e,Ri(t,r));return{verifier:typeof s=="string"?s:null,flowId:r}}const n=await qe(e,`${t}-code-verifier`);return{verifier:typeof n=="string"?n:null,flowId:null}}async function Dt(e,t,r){const n=`${t}-code-verifier`;if(!r){await ot(e,n);return}const s=Ri(t,r),i=await qe(e,s);await ot(e,s);const o=await sp(e,t),a=o.filter(l=>l!==r);a.length!==o.length&&(a.length>0?await Cr(e,Yo(t),a):await ot(e,Yo(t))),i!=null&&i===await qe(e,n)&&await ot(e,n)}async function kA(e,t){const r=await sp(e,t);for(const n of r)await ot(e,Ri(t,n));await ot(e,Yo(t)),await ot(e,`${t}-code-verifier`)}function CA(e,t){const r=e.indexOf("#");let n=r===-1?e:e.slice(0,r);const s=r===-1?"":e.slice(r),i=n.indexOf("?");if(i!==-1){const a=n.slice(0,i),l=n.slice(i+1).split("&").filter(c=>c!==""&&c!==Kn&&!c.startsWith(`${Kn}=`));n=l.length>0?`${a}?${l.join("&")}`:a}const o=n.includes("?")?"&":"?";return`${n}${o}${Kn}=${encodeURIComponent(t)}${s}`}async function TA(e,t,r=!1,n){const s=yA();let i=s;r&&(i+="/recovery");const o=_A();await SA(e,t,o,i,n);const a=await bA(s);return[a,s===a?"plain":"s256",o]}const RA=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function jA(e){const t=e.headers.get(Th);if(!t||!t.match(RA))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function NA(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 PA(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 AA=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function vr(e){if(!AA.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Xi(e){if(!e.recoveryCodes)throw new Error("@supabase/auth-js: the MFA recovery codes API is experimental and disabled by default. Enable it by passing `auth: { experimental: { recoveryCodes: true } }` to createClient (or to the GoTrueClient constructor).")}function Vu(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;
300if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function OA(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function Yg(e){return JSON.parse(JSON.stringify(e))}const zn=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},Xg=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Zg(e){var t;if(!mA(e))throw new wl(zn(e),0);let r;try{r=await e.json()}catch(i){throw Xg.includes(e.status)?new wl(e.statusText||`HTTP ${e.status}`,e.status):new Wt(zn(i),i)}if(Xg.includes(e.status))throw new wl(zn(r),e.status);let n;const s=jA(e);if(s&&s.getTime()>=Nx["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new qg(zn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Oe}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new qg(zn(r),e.status,r.weak_password.reasons);throw new oA(zn(r),e.status||500,n)}const IA=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function U(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Th]||(i[Th]=Nx["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await LA(e,t,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function LA(e,t,r,n,s,i){const o=IA(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw new wl(zn(l),0)}if(a.ok||await Zg(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Zg(l)}}function xt(e){var t;let r=null;MA(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=Ax(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:typeof(e==null?void 0:e.id)=="string"?e:null;return{data:{session:r,user:n},error:null}}function ev(e){const t=xt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function tn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function $A(e){return{data:e,error:null}}function DA(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=Bc(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function tv(e){return e}function MA(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const qu=["global","local","others"];class UA{constructor({url:t="",headers:r={},fetch:n,experimental:s}){this.url=t,this.headers=r,this.fetch=Ix(n),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(t,r=qu[0]){if(qu.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${qu.join(", ")}`);try{return await U(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(D(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await U(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:tn})}catch(n){if(D(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Bc(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await U(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:DA,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(D(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await U(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:tn})}catch(r){if(D(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},h=await U(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:tv});if(h.error)throw h.error;const u=await h.json(),p=(o=h.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=h.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(x=>{const m=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(x.split(";")[1].split("=")[1]);c[`${b}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},u),c),error:null}}catch(c){if(D(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){vr(t);try{return await U(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:tn})}catch(r){if(D(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){vr(t);try{return await U(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:tn})}catch(n){if(D(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){vr(t);
300try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:tn})}catch(n){if(D(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){vr(t.userId);try{const{data:r,error:n}=await U(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(D(r))return{data:null,error:r};throw r}}async _deleteFactor(t){vr(t.userId),vr(t.id);try{return{data:await U(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(D(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},h=await U(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:tv});if(h.error)throw h.error;const u=await h.json(),p=(o=h.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=h.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(x=>{const m=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(x.split(";")[1].split("=")[1]);c[`${b}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},u),c),error:null}}catch(c){if(D(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(D(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await U(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(D(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await U(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(D(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await U(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(D(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await U(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(D(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await U(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(D(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await U(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(D(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await U(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(D(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await U(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(D(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await U(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(D(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){vr(t.userId);try{return await U(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(D(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){vr(t.userId),vr(t.passkeyId);
300try{return await U(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(D(r))return{data:null,error:r};throw r}}}function rv(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&Ox()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class FA extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function zA(){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 $x(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function BA(e){return parseInt(e,16)}function HA(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function WA(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:h,uri:u,version:p}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(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(!u)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 301`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=$x(e.address),x=h?`${h}://${n}`:n,m=e.statement?`${e.statement} 302`:"",b=`${x} wants you to sign in with your Ethereum account: 303${f} 304 305${m}`;let v=`URI: ${u} 306Version: ${p} 307Chain ID: ${r}${o?` 308Nonce: ${o}`:""} 309Issued At: ${i.toISOString()}`;if(s&&(v+=` 310Expiration Time: ${s.toISOString()}`),a&&(v+=` 311Not Before: ${a.toISOString()}`),l&&(v+=` 312Request ID: ${l}`),c){let g=` 313Resources:`;for(const w of c){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);g+=` 314- ${w}`}v+=g}return`${b} 315${v}`}class Re extends Error{constructor({message:t,code:r,cause:n,name:s}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class sc extends Re{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function VA({error:e,options:t}){var r,n,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 Re({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Re({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Re({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 Re({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 Re({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Re({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 Re({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Re({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(Dx(o)){if(i.rp.id!==o)return new Re({message:`The RP ID "${i.rp.id}
315" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Re({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 Re({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 Re({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 Re({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function qA({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Re({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Re({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(Dx(n)){if(r.rpId!==n)return new Re({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Re({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Re({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 Re({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class KA{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Rh=new KA;function nv(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=Bc(e,["challenge","user","excludeCredentials"]),i=oi(t).buffer,o=Object.assign(Object.assign({},r),{id:oi(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:oi(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function sv(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Bc(e,["challenge","allowCredentials"]),s=oi(t).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:oi(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function iv(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Gn(new Uint8Array(e.response.attestationObject)),clientDataJSON:Gn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function ov(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Gn(new Uint8Array(s.authenticatorData)),clientDataJSON:Gn(new Uint8Array(s.clientDataJSON)),signature:Gn(new Uint8Array(s.signature)),userHandle:s.userHandle?Gn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Dx(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function ic(){var e,t;return!!($e()&&"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 Mx(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new sc("Browser returned unexpected credential type",t)}:{data:null,error:new sc("Empty credential response",t)}}
315catch(t){return{data:null,error:VA({error:t,options:e})}}}async function Ux(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new sc("Browser returned unexpected credential type",t)}:{data:null,error:new sc("Empty credential response",t)}}catch(t){return{data:null,error:qA({error:t,options:e})}}}const GA={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},QA={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function oc(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(t(o)){const a=n[i];t(a)?n[i]=oc(a,o):n[i]=oc(o)}else n[i]=o}return n}function JA(e,t){return oc(GA,e,t||{})}function YA(e,t){return oc(QA,e,t||{})}class XA{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const c=s??Rh.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:h}=a.webauthn.credential_options.publicKey;if(!h.name){const u=n;if(u)h.name=`${h.id}:${u}`;else{const f=(await this.client.getUser()).data.user,x=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";h.name=`${h.id}:${x}`}}h.displayName||(h.displayName=h.name)}switch(a.webauthn.type){case"create":{const h=JA(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:u,error:p}=await Mx({publicKey:h,signal:c});return u?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:u}},error:null}:{data:null,error:p}}case"request":{const h=YA(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:u,error:p}=await Ux(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:h,signal:c}));return u?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:u}},error:null}:{data:null,error:p}}}}catch(a){return D(a)?{data:null,error:a}:{data:null,error:new Wt("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Jo("rpId is required for WebAuthn authentication")};try{if(!ic())return{data:null,error:new Wt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},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:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return D(o)?{data:null,error:o}:{data:null,error:new Wt("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new Jo("rpId is required for WebAuthn registration")};try{if(!ic())return{data:null,error:new Wt("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(h=>{var u;return(u=h.data)===null||u===void 0?void 0:u.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status==="unverified")}).then(h=>h?this.client.mfa.unenroll({factorId:h==null?void 0:h.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return D(o)?{data:null,error:o}:{data:null,error:new Wt("Unexpected error in register",o)}}}}zA();const ZA={url:eA,storageKey:tA,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:rA,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Ps={};let av=!1;class Xo{get jwks(){var t,r;return(r=(t=Ps[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Ps[this.storageKey]=Object.assign(Object.assign({},Ps[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Ps[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ps[this.storageKey]=Object.assign(Object.assign({},Ps[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},ZA),t);if(this.storageKey=i.storageKey,this.instanceID=(r=Xo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Xo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&$e()){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.experimental=(n=i.experimental)!==null&&n!==void 0?n:{},this.admin=new UA({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=Ix(i.fetch),this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock!=null&&(this.lock=i.lock,av||(av=!0,console.warn(`${this._logPrefix()} The "lock" option is deprecated and will be removed in v3. The client now coordinates session refreshes without a lock, so most apps can drop the option. See https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/migrations/lockless-coordination.md`))),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 XA(this),recoveryCodes:{getStatus:this._getRecoveryCodesStatus.bind(this),generate:this._generateRecoveryCodes.bind(this),verify:this._verifyRecoveryCode.bind(this),regenerate:this._regenerateRecoveryCodes.bind(this),unenroll:this._unenrollRecoveryCodes.bind(this)}}
315,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:Ox()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=rv(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=rv(this.memoryStorage)),$e()&&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),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);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} (${jx}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){var t;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();
315const r=await this.initializePromise,n=(t=this._pendingInitNotifications)!==null&&t!==void 0?t:[];this._pendingInitNotifications=null;for(const s of n)await this._notifyAllSubscribers(s.event,s.session,s.broadcast);return r}async _initialize(){var t;try{let r={},n="none";if($e()&&(r=Jg(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),$e()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),aA(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(r){return D(r)?this._returnResult({error:r}):this._returnResult({error:new Wt("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:xt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(D(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;let i=null;try{let o;if("email"in t){const{email:u,password:p,options:f}=t;let x=null,m=null;this.flowType==="pkce"&&([x,m,i]=await this._getCodeChallengeAndMethod()),o=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(f==null?void 0:f.emailRedirectTo,i),body:{email:u,password:p,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:x,code_challenge_method:m},xform:xt})}else if("phone"in t){const{phone:u,password:p,options:f}=t;o=await U(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:p,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:xt})}else throw new Ya("You must provide either an email or phone number and a password");const{data:a,error:l}=o;if(l||!a)return await Dt(this.storage,this.storageKey,i),this._returnResult({data:{user:null,session:null},error:l});const c=a.session,h=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:h,session:c},error:null})}catch(o){if(await Dt(this.storage,this.storageKey,i),D(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:a}=t;r=await U(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:ev})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await U(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:ev})}else throw new Ya("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new Ns;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(D(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t,r){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t,r)):this._exchangeCodeForSession(t,r)}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,o,a,l,c,h,u,p;let f,x;if("message"in t)f=t.message,x=t.signature;else{const{chain:m,wallet:b,statement:v,options:g}=t;let w;if($e())if(typeof b=="object")w=b;else{const R=window;if("ethereum"in R&&typeof R.ethereum=="object"&&"request"in R.ethereum&&typeof R.ethereum.request=="function")w=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 b!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=b}const _=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href),S=await w.request({method:"eth_requestAccounts"}).then(R=>R).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=$x(S[0]);let C=(n=g==null?void 0:g.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!C){const R=await w.request({method:"eth_chainId"});C=BA(R)}const T={domain:_.host,address:E,statement:v,uri:_.href,version:"1",chainId:C,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(h=g==null?void 0:g.signInWithEthereum)===null||h===void 0?void 0:h.resources};f=WA(T),x=await w.request({method:"personal_sign",params:[HA(f),E]})}try{const{data:m,error:b}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:x},!((u=t.options)===null||u===void 0)&&u.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:xt});if(b)throw b;if(!m||!m.session||!m.user){const v=new Ns;return this._returnResult({data:{user:null,session:null},error:v})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:b})}catch(m){if(D(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var r,n,s,i,o,a,l,c,h,u,p,f;let x,m;if("message"in t)x=t.message,m=t.signature;else{const{chain:b,wallet:v,statement:g,options:w}=t;let _;if($e())if(typeof v=="object")_=v;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))_=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=v}const S=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const E=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),g?{statement:g}:null));let C;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")C=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)C=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)x=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),m=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");x=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((u=(h=w==null?void 0:w.signInWithSolana)===null||h===void 0?void 0:h.resources)===null||u===void 0)&&u.length?["Resources",...w.sign
315InWithSolana.resources.map(C=>`- ${C}`)]:[]].join(` 316`);const E=await _.signMessage(new TextEncoder().encode(x),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=E}}try{const{data:b,error:v}=await U(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:x,signature:Gn(m)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:xt});if(v)throw v;if(!b||!b.session||!b.user){const g=new Ns;return this._returnResult({data:{user:null,session:null},error:g})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:v})}catch(b){if(D(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t,r){const n=(r==null?void 0:r.flowId)!=null,s=n?bl(r==null?void 0:r.flowId):$e()?bl(Jg(window.location.href)[Kn]):null;n&&!s&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",r==null?void 0:r.flowId);const{verifier:i,flowId:o}=n&&!s?{verifier:null,flowId:null}:await EA(this.storage,this.storageKey,s),[a,l]=(i??"").split("/");try{if(!a&&this.flowType==="pkce")throw new lA;const{data:c,error:h}=await U(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:xt});if(await Dt(this.storage,this.storageKey,o),h)throw h;if(!c||!c.session||!c.user){const u=new Ns;return this._returnResult({data:{user:null,session:null,redirectType:null},error:u})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c.session)),this._returnResult({data:Object.assign(Object.assign({},c),{redirectType:l??null}),error:h})}catch(c){if(await Dt(this.storage,this.storageKey,o),D(c))return this._returnResult({data:{user:null,session:null,redirectType:null},error:c});throw c}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=t,a=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:xt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const h=new Ns;return this._returnResult({data:{user:null,session:null},error:h})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(D(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,o;let a=null;try{if("email"in t){const{email:l,options:c}=t;let h=null,u=null;this.flowType==="pkce"&&([h,u,a]=await this._getCodeChallengeAndMethod());const{error:p}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:h,code_challenge_method:u},redirectTo:this._maybeAppendFlowIdToRedirect(c==null?void 0:c.emailRedirectTo,a)});return this._returnResult({data:{user:null,session:null},error:p})}if("phone"in t){const{phone:l,options:c}=t,{data:h,error:u}=await U(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:h==null?void 0:h.message_id},error:u})}throw new Ya("You must provide either an email or phone number.")}catch(l){if(await Dt(this.storage,this.storageKey,a),D(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var r,n;try{let s,i;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await U(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:xt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(D(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,i;let o=null;try{let a=null,l=null;this.flowType==="pkce"&&([a,l,o]=await this._getCodeChallengeAndMethod());const c=await U(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:this._maybeAppendFlowIdToRedirect((r=t.options)===null||r===void 0?void 0:r.redirectTo,o)}),!((n=t==null?void 0:t.options)===null||n===void 0)&&n.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:$A});return!((s=c.data)===null||s===void 0)&&s.url&&$e()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Dt(this.storage,this.storageKey,o),D(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Oe;const{error:s}=await U(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(D(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){let r=null;try{const n=`${this.url}/resend`;if("email"in t){const{email:s,type:i,options:o}=t;let a=null,l=null;this.flowType==="pkce"&&([a,l,r]=await this._getCodeChallengeAndMethod());const{error:c}=await U(this.fetch,"POST",n,{headers:this.headers,body:{email:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken},code_challenge:a,code_challenge_method:l},redirectTo:this._maybeAppendFlowIdToRedirect(o==null?void 0:o.emailRedirectTo,r)});return c&&await Dt(this.storage,this.storageKey,r),this._returnResult({data:{user:null,session:null},error:c})}else if("phone"in t){const{phone:s,type:i,options:o}=t,{data:a,error:l}=await U(this.fetch,"POST",n,{headers:this.headers,body:{phone:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l})}throw new Ya("You must provide either an email or phone number and a type")}catch(n){if(await Dt(this.storage,this.storageKey,r),D(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await qe(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
316id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Wu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await qe(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Vu()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=OA(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);if(i){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const a=await qe(this.storage,this.storageKey);if(a&&a.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:i})}return 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;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await U(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:tn}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Oe}:await U(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:tn})})}catch(r){if(D(r))return Ja(r)&&await this._removeSession(),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r)):await this._updateUser(t,r)}async _updateUser(t,r={}){let n=null;try{return await this._useSession(async s=>{const{data:i,error:o}=s;if(o)throw o;if(!i.session)throw new Oe;const a=i.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c,n]=await this._getCodeChallengeAndMethod());const{data:h,error:u}=await U(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(r==null?void 0:r.emailRedirectTo,n),body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:a.access_token,xform:tn});if(u)throw u;return a.user=h.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(s){if(await Dt(this.storage,this.storageKey,n),D(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Oe;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=el(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};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:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(D(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:a}=r;if(a)throw a;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Oe;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(r){if(D(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;try{if(!$e())throw new Xa("No browser detected.");
316if(t.error||t.error_description||t.error_code)throw new Xa(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Hg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Xa("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Hg("No code detected.");const{data:w,error:_}=await this._exchangeCodeForSession(t.code,{flowId:t[Kn]});if(_)throw _;const S=new URL(window.location.href);return S.searchParams.delete("code"),S.searchParams.delete(Kn),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:w.session,redirectType:(n=w.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:h}=t;if(!o||!l||!a||!h)throw new Xa("No session defined in URL");const u=Math.round(Date.now()/1e3),p=parseInt(l);let f=u+p;c&&(f=parseInt(c));const x=f-u;x*1e3<=Sr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${x}s, should have been closer to ${p}s`);const m=f-p;u-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,f,u):u-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,f,u);const{data:b,error:v}=await this._getUser(o);if(v)throw v;const g={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:p,expires_at:f,refresh_token:a,token_type:h,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:t.type},error:null})}catch(s){if(D(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){if(!t.code)return!1;const r=bl(t[Kn]);return r&&await qe(this.storage,Ri(this.storageKey,r))?!0:!!await qe(this.storage,`${this.storageKey}-code-verifier`)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const s=async()=>{await this._removeSession()},{data:i,error:o}=r;if(o&&!Ja(o))return this._returnResult({error:o});const a=(n=i.session)===null||n===void 0?void 0:n.access_token;if(a){const{error:l}=await this.admin.signOut(a,t);if(l&&!(Bg(l)&&(l.status===404||l.status===401||l.status===403)||Ja(l)))return t!=="others"&&await s(),this._returnResult({error:l})}return t!=="others"&&await s(),this._returnResult({error:null})})}onAuthStateChange(t){const r=pA(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){if(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),Vg(i))return;Ja(i)||Za(i)||Bg(i)&&(i.code==="refresh_token_not_found"||i.code==="refresh_token_already_used"||i.code==="session_expired")?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null,i=null;this.flowType==="pkce"&&([n,s,i]=await this._getCodeChallengeAndMethod(!0));try{return await U(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(r.redirectTo,i)})}catch(o){if(await Dt(this.storage,this.storageKey,i),D(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;let n=null;try{const{data:s,error:i}=await this._useSession(async o=>{var a,l,c,h,u;const{data:p,error:f}=o;if(f)throw f;const{url:x,flowId:m}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return n=m,await U(this.fetch,"GET",x,{headers:this.headers,jwt:(u=(
316h=p.session)===null||h===void 0?void 0:h.access_token)!==null&&u!==void 0?u:void 0})});if(i)throw i;return $e()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(s==null?void 0:s.url),this._returnResult({data:{provider:t.provider,url:s==null?void 0:s.url,flowId:n},error:null})}catch(s){if(D(s))return this._returnResult({data:{provider:t.provider,url:null,flowId:n},error:s});throw s}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:h}=t,u=await U(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:h,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:xt}),{data:p,error:f}=u;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new Ns}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await Dt(this.storage,this.storageKey,null),D(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;return await U(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const n=Date.now();return await vA(async s=>(s>0&&await gA(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await U(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:xt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Za(i)&&Date.now()+o-n<Sr})}catch(n){if(this._debug(r,"error",n),D(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const{url:n,flowId:s}=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),$e()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n,flowId:s},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await qe(this.storage,this.storageKey);if(s&&this.userStorage){let o=await qe(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Cr(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Vu()}else if(s&&!s.user&&!s.user){const o=await qe(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await ot(this.storage,this.storageKey+"-user"),await Cr(this.storage,this.storageKey,s)):s.user=Vu()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Wu;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Wu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(Vg(o)?this._debug(n,"refresh discarded by commit guard",o):this._debug(n,"refresh failed",o))}}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(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),Za(s)?console.warn(s):console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Oe;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning c
316ached failure (cooldown active)"),this.lastRefreshFailure.result;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new Hc,this.refreshingDeferred.promise.then(void 0,()=>{});const i=await qe(this.storage,this.storageKey),{data:o,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!o.session)throw new Oe;const l=await qe(this.storage,this.storageKey);if(i!==null&&(l===null||l.refresh_token!==i.refresh_token)){this._debug(s,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:l?"replaced":"cleared"});const p={data:null,error:new Wg};return this.refreshingDeferred.resolve(p),p}const h=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==h){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await ot(this.storage,this.storageKey),this.userStorage&&await ot(this.userStorage,this.storageKey+"-user");const p={data:null,error:new Wg};return this.refreshingDeferred.resolve(p),p}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const u={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(u),u}catch(i){if(this._debug(s,"error",i),D(i)){const o={data:null,error:i};if(!Za(i)){const a=await qe(this.storage,this.storageKey);!!(a!=null&&a.expires_at&&a.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:o,expiresAt:Date.now()+Z2},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){if(this._pendingInitNotifications!==null&&n){this._pendingInitNotifications.push({event:t,session:r,broadcast:n});return}const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}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;const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Cr(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=Yg(s);await Cr(this.storage,this.storageKey,i)}else{const s=Yg(r);await Cr(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await ot(this.storage,this.storageKey),await kA(this.storage,this.storageKey),await ot(this.storage,this.storageKey+"-user"),this.userStorage&&await ot(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&$e()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Sr);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/Sr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Sr}ms, refresh threshold is ${io} ticks`),s<=io&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof FA)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/Sr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Sr}ms, refresh threshold is ${io} ticks`),s<=io&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!$e()||!(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 r=`#_onVisibilityChanged(${t})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
316{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){let s=n==null?void 0:n.redirectTo,i=null,o=null,a=null;this.flowType==="pkce"&&([i,o,a]=await this._getCodeChallengeAndMethod(),s=this._maybeAppendFlowIdToRedirect(s,a));const l=[`provider=${encodeURIComponent(r)}`];if(s&&l.push(`redirect_to=${encodeURIComponent(s)}`),n!=null&&n.scopes&&l.push(`scopes=${encodeURIComponent(n.scopes)}`),i!=null&&o!=null){const c=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});l.push(c.toString())}if(n!=null&&n.queryParams){const c=new URLSearchParams(n.queryParams);l.push(c.toString())}return n!=null&&n.skipBrowserRedirect&&l.push(`skip_http_redirect=${n.skipBrowserRedirect}`),{url:`${t}?${l.join("&")}`,flowId:a}}_maybeAppendFlowIdToRedirect(t,r){return!t||!r||!this.experimental.appendPkceFlowIdToRedirects?t??void 0:CA(t,r)}async _getCodeChallengeAndMethod(t=!1){return TA(this.storage,this.storageKey,t,r=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",r))}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await U(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await U(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?iv(t.webauthn.credential_response):ov(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=await U(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:nv(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:sv(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[],recovery_code:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&i.factor_type in s&&Array.isArray(s[i.factor_type])&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,i;if(t)try{const{payload:f}=el(t);let x=null;f.aal&&(x=f.aal);let m=x;const{data:{user:b},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((n=(r=b==null?void 0:b.factors)===null||r===void 0?void 0:r.filter(_=>_.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(m="aal2");const w=f.amr||[];return{data:{currentLevel:x,nextLevel:m,currentAuthenticationMethods:w},error:null}}catch(f){if(D(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}
316=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}=el(o.access_token);let c=null;l.aal&&(c=l.aal);let h=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(h="aal2");const p=l.amr||[];return{data:{currentLevel:c,nextLevel:h,currentAuthenticationMethods:p},error:null}}async _getRecoveryCodesStatus(){Xi(this.experimental);try{return await this._useSession(async t=>{var r;const{data:n,error:s}=t;if(s)return this._returnResult({data:null,error:s});const{data:i,error:o}=await U(this.fetch,"GET",`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(t){if(D(t))return this._returnResult({data:null,error:t});throw t}}async _generateRecoveryCodes(t){Xi(this.experimental);try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const{data:o,error:a}=await U(this.fetch,"POST",`${this.url}/factors/recovery-codes`,{body:t!=null&&t.friendlyName?{friendly_name:t.friendlyName}:void 0,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return a?this._returnResult({data:null,error:a}):this._returnResult({data:o,error:null})})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _verifyRecoveryCode(t){Xi(this.experimental);const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const{data:a,error:l}=await U(this.fetch,"POST",`${this.url}/factors/recovery-codes/verify`,{body:{code:t.code},headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(l)return this._returnResult({data:null,error:l});const c=Object.assign({expires_at:Ax(a.expires_in)},a);return await this._saveSession(c),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",c),this._returnResult({data:a,error:null})})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _regenerateRecoveryCodes(){Xi(this.experimental);try{return await this._useSession(async t=>{var r;const{data:n,error:s}=t;if(s)return this._returnResult({data:null,error:s});const{data:i,error:o}=await U(this.fetch,"POST",`${this.url}/factors/recovery-codes/regenerate`,{headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(t){if(D(t))return this._returnResult({data:null,error:t});throw t}}async _unenrollRecoveryCodes(){Xi(this.experimental);try{return await this._useSession(async t=>{var r;const{data:n,error:s}=t;if(s)return this._returnResult({data:null,error:s});const{data:i,error:o}=await U(this.fetch,"DELETE",`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:(r=n==null?void 0:n.session)===null||r===void 0?void 0:r.access_token});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(t){if(D(t))return this._returnResult({data:null,error:t});throw t}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await U(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Oe})})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Oe});const o=await U(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&&$e()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Oe});const o=await U(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&&$e()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await U(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Oe})})}catch(t){if(D(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}
316):n?(await U(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Oe})})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+iA>s)return n;const{data:i,error:o}=await U(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,n=i.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:f,error:x}=await this.getSession();if(x||!f.session)return this._returnResult({data:null,error:x});n=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=el(n);if(!(r!=null&&r.allowExpired))try{NA(i.exp)}catch(f){throw new rc(f instanceof Error?f.message:"JWT validation failed")}const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const h=PA(s.alg),u=await crypto.subtle.importKey("jwk",c,h,!0,["verify"]);if(!await crypto.subtle.verify(h,u,o,fA(`${a}.${l}`)))throw new rc("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(t){var r,n,s,i;try{if(!ic())return this._returnResult({data:null,error:new Wt("Browser does not support WebAuthn",null)});const{data:o,error:a}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}});if(a||!o)return this._returnResult({data:null,error:a});const l=sv(o.options),c=(s=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:Rh.createNewAbortSignal(),{data:h,error:u}=await Ux({publicKey:l,signal:c,mediation:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.mediation});if(u||!h)return this._returnResult({data:null,error:u??new Wt("WebAuthn ceremony failed",null)});const p=ov(h);return this._verifyPasskeyAuthentication({challengeId:o.challenge_id,credential:p})}catch(o){if(D(o))return this._returnResult({data:null,error:o});throw o}}async registerPasskey(t){var r,n;try{if(!ic())return this._returnResult({data:null,error:new Wt("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=nv(s.options),a=(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:Rh.createNewAbortSignal(),{data:l,error:c}=await Mx({publicKey:o,signal:a});if(c||!l)return this._returnResult({data:null,error:c??new Wt("WebAuthn ceremony failed",null)});const h=iv(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:h})}catch(s){if(D(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Oe});const{data:s,error:i}=await U(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(D(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Oe});const{data:i,error:o}=await U(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;try{const{data:n,error:s}=await U(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(t){try{const{data:r,error:n}=await U(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:xt});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Oe});const{data:s,error:i}=await U(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(D(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Oe});const{data:i,error:o}=await U(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Oe});const{error:i}
316=await U(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}}Xo.nextInstanceID={};const eO=Xo,tO="2.117.0";let oo="",ac;if(typeof Deno<"u"){var Ku;oo="deno",ac=(Ku=Deno.version)===null||Ku===void 0?void 0:Ku.deno}else if(typeof document<"u")oo="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")oo="react-native";else{var Gu;oo="node";const e=globalThis.process;ac=e==null||(Gu=e.version)===null||Gu===void 0?void 0:Gu.replace(/^v/,"")}const Fx=[`runtime=${oo}`];ac&&Fx.push(`runtime-version=${ac}`);const rO={"X-Client-Info":`supabase-js/${tO}; ${Fx.join("; ")}`},nO={headers:rO},sO={schema:"public"},iO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},oO={},aO={enabled:!1,respectSamplingDecision:!0};function lO(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,n,s,i]=t;if(r.length!==2||n.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(r)||!o.test(n)||!o.test(s)||!o.test(i)||n==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:r,traceId:n,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function cO(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const n of t)try{if(typeof n=="string"){if(uO(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function uO(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function dO(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Zo(e){"@babel/helpers - typeof";return Zo=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},Zo(e)}function hO(e,t){if(Zo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fO(e){var t=hO(e,"string");return Zo(t)=="symbol"?t:t+""}function pO(e,t,r){return(t=fO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lv(Object(r),!0).forEach(function(n){pO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const mO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),gO=()=>Headers,zx=e=>e.startsWith("sb_publishable_")||e.startsWith("sb_secret_"),vO="sb_temp_",cv=new Set,yO=e=>{var t,r;if(!e.startsWith("sb_")||zx(e)||e.startsWith(vO))return;const n=(t=(r=e.match(/^sb_[a-zA-Z0-9]+_/))===null||r===void 0?void 0:r[0])!==null&&t!==void 0?t:"unknown";cv.has(n)||(cv.add(n),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},uv=(e,t,r,n,s,i)=>{const o=mO(n),a=gO(),l=(s==null?void 0:s.enabled)===!0,c=(s==null?void 0:s.respectSamplingDecision)!==!1,h=l?dO(t):null,u=!(i!=null&&i.omitApiKeyAsBearer&&zx(e));return async(p,f)=>{const x=await r();let m=new a(f==null?void 0:f.headers);if(m.has("apikey")||m.set("apikey",e),!m.has("Authorization")){const b=x??(u?e:null);b&&m.set("Authorization",`Bearer ${b}`)}if(h){const b=wO(p,h,c);b&&(b.traceparent&&!m.has("traceparent")&&m.set("traceparent",b.traceparent),b.tracestate&&!m.has("tracestate")&&m.set("tracestate",b.tracestate),b.baggage&&!m.has("baggage")&&m.set("baggage",b.baggage))}return o(p,Ee(Ee({},f),{},{headers:m}))}};let dv=!1,hv=!1;function wO(e,t,r){const n=vP();if(!n)return dv||(dv=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!cO(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const s=n();if(!s||!s.traceparent){var i;if(!(s==null||(i=s.carrierKeys)===null||i===void 0)&&i.length&&!hv){hv=!0;const o=s.carrierKeys.includes("sentry-trace")?" Sentry detected: set `propagateTraceparent: true` in Sentry.init() to emit it."
316:" Configure your tracing SDK to emit W3C trace context on outgoing requests.";console.warn(`@supabase/supabase-js: tracePropagation is enabled and a tracing SDK is active, but its propagator wrote [${s.carrierKeys.join(", ")}] and no W3C traceparent header, so trace headers will not be attached.`+o)}return null}if(r){const o=lO(s.traceparent);if(o&&!o.isSampled)return{traceparent:s.traceparent}}return s}function fv(e){return typeof e=="boolean"?{enabled:e}:e}function bO(e){return e.endsWith("/")?e:e+"/"}let pv=!1;function xO(e){pv||typeof e!="object"||e===null||!("schema"in e)||e.schema===void 0||(pv=!0,console.warn(`@supabase/supabase-js: The "schema" option must be nested under "db", e.g. createClient(url, key, { db: { schema: 'myschema' } }). A top-level "schema" is ignored and queries go to the default schema.`))}function _O(e,t){var r,n,s,i,o,a;const{db:l,auth:c,realtime:h,global:u}=e,{db:p,auth:f,realtime:x,global:m}=t,b=fv(e.tracePropagation),v=fv(t.tracePropagation),g={db:Ee(Ee({},p),l),auth:Ee(Ee({},f),c),realtime:Ee(Ee({},x),h),storage:{},global:Ee(Ee(Ee({},m),u),{},{headers:Ee(Ee({},(r=m==null?void 0:m.headers)!==null&&r!==void 0?r:{}),(n=u==null?void 0:u.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(s=(i=b==null?void 0:b.enabled)!==null&&i!==void 0?i:v==null?void 0:v.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=b==null?void 0:b.respectSamplingDecision)!==null&&a!==void 0?a:v==null?void 0:v.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return e.accessToken?g.accessToken=e.accessToken:delete g.accessToken,g}function SO(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(bO(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var EO=class extends eO{constructor(e){super(e)}},kO=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=SO(e);if(!t)throw new Error("supabaseKey is required.");yO(t),xO(r),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:sO,realtime:oO,auth:Ee(Ee({},iO),{},{storageKey:o}),global:nO,tracePropagation:aO},l=_O(r??{},a);if(this.settings=l,this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(h,u)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(u)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=uv(t,e,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation),this.functionsFetch=uv(t,e,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(Ee({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(h=>this.realtime.setAuth(h)).catch(h=>console.warn("Failed to set initial Realtime auth token:",h)),this.rest=new PP(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit,retry:l.db.retry}),this.storage=new X2(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new xP(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}getOpenApiSpec(){return this.rest.getOpenApiSpec()}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
316channel(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 _getSessionToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:null}async _getAccessToken(){var e=this,t;return(t=await e._getSessionToken())!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c,experimental:h,lockAcquireTimeout:u,skipAutoInitialize:p},f,x){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new EO({url:this.authUrl.href,headers:Ee(Ee({},m),f),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,experimental:h,fetch:x,lockAcquireTimeout:u,skipAutoInitialize:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new _2(this.realtimeUrl.href,Ee(Ee({},e),{},{params:Ee(Ee({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN"||e==="INITIAL_SESSION")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Bx=(e,t,r)=>new kO(e,t,r);function CO(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=20:!1}CO()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");function TO(){var b,v;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(g=>e===g||e.endsWith("."+g)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((b=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:b[1])??((v=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:v[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],h="lovable-preview-auth:result",u=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(g,w,_)=>new Promise(S=>{const E=p();let C=!1,T;const R=N=>{C||(C=!0,clearTimeout(T),window.removeEventListener("message",P),S(N))},P=N=>{if(c.indexOf(N.origin)<0)return;const $=N.data;$&&$.type===h&&$.requestId===E&&R($)};window.addEventListener("message",P);const B={type:g,requestId:E,projectId:s,key:w};_!==void 0&&(B.value=_);for(const N of c)window.parent.postMessage(B,N);T=setTimeout(()=>R(null),u)});let x=!0;const m=250;return{getItem:async g=>{let w=await f("lovable-preview-auth:get",g);return!w&&x&&(await new Promise(_=>setTimeout(_,m)),w=await f("lovable-preview-auth:get",g)),x=!1,w&&w.ok&&typeof w.value=="string"?w.value===""?(localStorage.removeItem(g),null):w.value:localStorage.getItem(g)},setItem:(g,w)=>(localStorage.setItem(g,w),f("lovable-preview-auth:set",g,w).then(()=>{})),removeItem:g=>(localStorage.removeItem(g),f("lovable-preview-auth:remove",g).then(()=>{}))}}const RO="https://oovsenoqllohheqlhuqq.supabase.co",jO="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9vdnNlbm9xbGxvaGhlcWxodXFxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjI2MDAwODMsImV4cCI6MjAzODE3NjA4M30.gC9ZjcZ7lRio3XQiq0vVscVr51GnBG_OtLaBmZ8i0HY",ps=Bx(RO,jO,{auth:{storage:TO(),persistSession:!0,autoRefreshToken:!0}}),Wc=({isOpen:e,onClose:t})=>{const[r,n]=y.useState({nombre:"",apellidos:"",telefono:"",email:"",mensaje:""}),[s,i]=y.useState(!1),[o,a]=y.useState(!1),[l,c]=y.useState(!1),[h,u]=y.useState(""),{toast:p}=ua(),f=v=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v),x=r.nombre.trim()&&r.telefono.trim()&&r.email.trim()&&f(r.email)&&s,m=async v=>{if(v.preventDefault(),!s){p({title:"Error",description:"Debes aceptar la polÃtica de privacidad para continuar.",variant:"destructive"});return}if(!(!x||l)){c(!0);try{const{data:g,error:w}
316=await ps.functions.invoke("handle-contact-form",{body:{first_name:r.nombre,last_name:r.apellidos,email:r.email,phone_number:r.telefono,comments:r.mensaje,source:"form_ribadesella"}});w?(console.error("Error calling handle-contact-form:",w),p({title:"Error",description:"Hubo un problema al enviar tu solicitud. Inténtalo de nuevo.",variant:"destructive"})):(p({title:"¡Solicitud enviada!",description:"Nos pondremos en contacto contigo en las próximas 24 horas."}),n({nombre:"",apellidos:"",telefono:"",email:"",mensaje:""}),i(!1),a(!1),t())}catch(g){console.error("Unexpected error:",g),p({title:"Error",description:"Hubo un problema inesperado. Inténtalo de nuevo.",variant:"destructive"})}finally{c(!1)}}},b=v=>{const{name:g,value:w}=v.target;n(_=>({..._,[g]:w})),g==="email"&&(w&&!f(w)?u("Por favor, introduce un email válido"):u(""))};return d.jsx(px,{open:e,onOpenChange:t,children:d.jsx(ep,{className:"sm:max-w-[600px] max-h-[90vh] overflow-y-auto p-0 bg-white rounded-2xl border-0 w-[calc(100vw-3rem)] mx-auto sm:mx-auto my-8 sm:my-auto",children:d.jsxs("div",{className:"relative p-6 sm:p-8",children:[d.jsx(tp,{className:"mb-6 sm:mb-8",children:d.jsx(rp,{className:"text-xl sm:text-2xl font-gazpacho font-semibold text-gray-800 text-left",children:"Solicitar información"})}),d.jsxs("form",{onSubmit:m,className:"space-y-4 sm:space-y-6",children:[d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"nombre",className:"block text-sm font-medium text-gray-700 mb-2 font-raleway",children:"Nombre *"}),d.jsx(Vt,{id:"nombre",name:"nombre",type:"text",required:!0,value:r.nombre,onChange:b,className:"w-full h-12 border border-input bg-white rounded-lg font-raleway focus:border-primary focus:ring-0",placeholder:"Tu nombre"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"apellidos",className:"block text-sm font-medium text-gray-700 mb-2 font-raleway",children:"Apellidos"}),d.jsx(Vt,{id:"apellidos",name:"apellidos",type:"text",value:r.apellidos,onChange:b,className:"w-full h-12 border border-input bg-white rounded-lg font-raleway focus:border-primary focus:ring-0",placeholder:"Tus apellidos"})]})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"telefono",className:"block text-sm font-medium text-gray-700 mb-2 font-raleway",children:"Teléfono *"}),d.jsx(Vt,{id:"telefono",name:"telefono",type:"tel",required:!0,value:r.telefono,onChange:b,className:"w-full h-12 border border-input bg-white rounded-lg font-raleway focus:border-primary focus:ring-0",placeholder:"984 123 456"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2 font-raleway",children:"Email *"}),d.jsx(Vt,{id:"email",name:"email",type:"email",required:!0,value:r.email,onChange:b,className:`w-full h-12 border bg-white rounded-lg font-raleway focus:ring-0 ${h?"border-red-500 focus:border-red-500":"border-input focus:border-primary"}`,placeholder:"[email protected]"}),h&&d.jsx("p",{className:"text-red-500 text-sm mt-1 font-raleway",children:h})]})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"mensaje",className:"block text-sm font-medium text-gray-700 mb-2 font-raleway",children:"Mensaje"}),d.jsx(Gf,{id:"mensaje",name:"mensaje",rows:4,value:r.mensaje,onChange:b,className:"w-full border border-input bg-white rounded-lg font-raleway focus:border-primary focus:ring-0 resize-none",placeholder:"Cuéntanos más detalles de lo que estás buscando para que podamos ayudarte"})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-start space-x-3",children:[d.jsx(qo,{id:"policy",checked:s,onCheckedChange:v=>i(v===!0),className:"mt-1"}),d.jsxs("label",{htmlFor:"policy",className:"text-sm text-gray-600 font-raleway leading-relaxed",children:["He leÃdo y acepto la"," ",d.jsx("a",{href:"#",className:"text-gray-800 underline hover:no-underline",children:"PolÃtica de privacidad"}),".*"]})]}),d.jsxs("div",{className:"flex items-start space-x-3",children:[d.jsx(qo,{id:"news",checked:o,onCheckedChange:v=>a(v===!0),className:"mt-1"}),d.jsx("label",{htmlFor:"news",className:"text-sm text-gray-600 font-raleway leading-relaxed",children:"Deseo re
316cibir novedades sobre nuevos proyectos y promociones."})]})]}),d.jsxs(dr,{type:"submit",disabled:!x||l,className:`w-full h-14 text-base font-raleway font-medium rounded-lg flex items-center justify-center gap-2 transition-colors ${x&&!l?"text-white":"cursor-not-allowed"}`,style:{backgroundColor:x&&!l?"#2B433A":"#D2D7D3",color:x&&!l?"white":"#6B7280"},children:[d.jsx(xw,{className:"w-4 h-4"}),l?"Enviando...":"Enviar"]}),d.jsx("p",{className:"text-xs text-gray-500 text-center font-raleway leading-relaxed",children:"Al enviar este formulario, aceptas ser contactado por nuestro equipo comercial"})]})]})})})},NO=1,PO="ecaf1792-d45e-460b-95f3-73d620b3cd21",AO="6128a34d-2826-4913-910c-55e5d1f17310",OO="/__l5e/assets-v1/ecaf1792-d45e-460b-95f3-73d620b3cd21/Ribadesella_principal_limpia.jpg",IO="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/ecaf1792-d45e-460b-95f3-73d620b3cd21/Ribadesella_principal_limpia.jpg",LO="Ribadesella_principal_limpia.jpg",$O=600595,DO="image/jpeg",MO="2026-09-22T13:09:25Z",Hx={version:NO,asset_id:PO,project_id:AO,url:OO,r2_key:IO,original_filename:LO,size:$O,content_type:DO,created_at:MO},UO=()=>{const[e,t]=y.useState(!1);return d.jsxs("section",{className:"relative overflow-hidden min-h-[100vh] md:min-h-screen",children:[d.jsx("div",{className:"absolute inset-0 bg-cover bg-center bg-no-repeat",style:{backgroundImage:`url(${Hx.url})`},children:d.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-black/60 via-black/40 to-transparent"})}),d.jsx("div",{className:"relative z-10 flex items-start justify-center px-4 pt-20 pb-48 md:pt-16 md:pb-16 md:items-center min-h-[100vh] md:min-h-screen",children:d.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center text-white",children:[d.jsx("h1",{className:"text-4xl md:text-6xl font-raleway font-bold leading-tight md:leading-tight mb-4",children:"Tu nuevo hogar en Ribadesella con vistas al mar"}),d.jsx("p",{className:"text-lg md:text-xl mb-6 text-white/90 max-w-2xl mx-auto font-raleway font-light",children:"Una vivienda unifamiliar de diseño moderno con 4 dormitorios y 4 baños, ideal para disfrutar de la naturaleza y la tranquilidad de la costa asturiana."}),d.jsxs("div",{className:"flex items-center justify-center mb-8",children:[d.jsx(Uo,{className:"w-4 h-4 text-white/80 mr-2"}),d.jsx("span",{className:"text-white/80 text-sm font-raleway",children:"Ribadesella, Asturias (Tezangos)"})]}),d.jsx("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 mb-4 md:mb-8",children:d.jsx(dr,{size:"lg",onClick:()=>t(!0),className:"text-lg px-8 py-4 h-auto font-raleway font-semibold transition-all duration-300 hover:scale-105 text-[hsl(var(--button-orange-text))] bg-[hsl(var(--button-orange))] hover:bg-[hsl(var(--button-orange-hover))] rounded-[8px]",children:"Solicitar información"})}),d.jsx("div",{className:"p-6 mx-auto max-w-2xl mb-16 md:mb-0",children:d.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6 sm:flex sm:flex-row items-center justify-center sm:divide-y-0 sm:divide-x sm:divide-white/30 text-center",children:[d.jsxs("div",{className:"flex flex-col items-center py-4 sm:py-0 sm:px-6",children:[d.jsx("div",{className:"font-raleway font-bold text-white leading-none whitespace-nowrap text-2xl md:text-3xl",children:"200 m²"}),d.jsx("div",{className:"text-sm text-white/70 font-raleway leading-none mt-1",children:"Construidos"})]}),d.jsxs("div",{className:"flex flex-col items-center py-4 sm:py-0 sm:px-6",children:[d.jsx("div",{className:"font-raleway font-bold text-white leading-none text-2xl md:text-3xl",children:"4"}),d.jsx("div",{className:"text-sm text-white/70 font-raleway leading-none mt-1",children:"Dormitorios"})]}),d.jsxs("div",{className:"flex flex-col items-center py-4 sm:py-0 sm:px-6",children:[d.jsx("div",{className:"font-raleway font-bold text-white leading-none whitespace-nowrap text-2xl md:text-3xl",children:"1.250 m²"}),d.jsx("div",{className:"text-sm text-white/70 font-raleway leading-none mt-1",children:"Parcela"})]}),d.jsxs("div",{className:"flex flex-col items-center py-4 sm:py-0 sm:px-6",children:[d.jsx("div",{className:"font-raleway font-bold text-white leading-none text-2xl md:text-3xl",children:"595.000â¬"}),d.jsx("div",{className:"text-sm text-white/70 font-raleway leading-none mt-1",children:"IVA no inc."})]})]})})]})}),d.jsx(Wc,{isOpen:e,onClose:()=>t(!1)})]})},FO=()=>{const[e,t]=y.useState(""),[r,n]=y.useState(!1),s=[{name:"DETALLES",id:"project-description"},{name:"CARACTERÃSTICAS",id:"features"},{name:"GALERÃA",id:"gallery"},{name:"UBICACIÃN",id:"location"},{name:"FAQs",id:"faq"}],i=o=>{const a=document.getElementById(o);a&&a.scrollIntoView({behavior:"smooth"})};return y.useEffect(()=>{const o=()=>{const a=window.scrollY+100;for(const l of s){const c=document.getElementById(l.id);if(c){const h=c.offsetTop,u=h+c.offsetHeight;if(a>=h&&a<u){t(l.id);break}}}};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[s]),d.jsxs(d.Fragment,{children:[d.jsx("nav",{className:"sticky top-0 z-50 bg-white shadow-sm border-b border-gray-100",children:d.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-0",children:[d.jsxs("div",{className:"flex items-center justify-center h-16",children:[d.jsx("div",{className:"hidden md:block",children:d.jsxs("div",{className:"flex items-center space-x-8",children:[s.map(o=>d.jsx("button",{onClick:()=>i(o.id),className:`px-3 py-2 text-sm font-raleway font-medium transition-colors duration-200 hover:text-primary ${e===o.id?"text-primary border-b-2 border-primary":"text-gray-600"}`,children:o.name},o.id)),d.jsx($r,{to:"/blog",className:"px-3 py-2 text-sm font-raleway font-medium transition-colors duration-200 hover:text-primary text-gray-600",children:"BLOG"}),d.jsx("button",{onClick:()=>n(!0),className:"bg-primary text-primary-foreground hover:bg-primary/90 px-6 py-2 rounded-[8px] text-sm font-raleway font-medium transition-colors duration-200",children:"CONTACTO"})]})}),d.jsx("div",{className:"md:hidden",children:d.jsx("button",{className:"text-gray-600 hover:text-primary p-2",onClick:()=>{const o=document.getElementById("mobile-menu");o==null||o.classList.toggle("hidden")},children:d.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})})]}),d.jsx("div",{id:"mobile-menu",className:"hidden md:hidden pb-4",children:d.jsxs("div",{className:"space-y-2",children:[s.map(o=>d.jsx("button",{onClick:()=>{var a;i(o.id),(a=document.getElementById("mobile-menu"))==null||a.classList.add("hidden")},className:`block w-full text-left px-3 py-2 text-sm font-raleway font-medium transition-colors duration-200 hover:text-primary ${e===o.id?"text-primary bg-primary/5":"text-gray-600"}`,children:o.name},o.id)),d.jsx($r,{to:"/blog",onClick:()=>{var o;return(o=document.getElementById("mobile-menu"))==null?void 0:o.classList.add("hidden")},className:"block w-full text-left px-3 py-2 text-sm font-raleway font-medium transition-colors duration-200 hover:text-primary text-gray-600",children:"BLOG"}),d.jsx("button",{onClick:()=>{var o;
316n(!0),(o=document.getElementById("mobile-menu"))==null||o.classList.add("hidden")},className:"block w-full bg-primary text-primary-foreground hover:bg-primary/90 px-3 py-2 rounded-[8px] text-sm font-raleway font-medium transition-colors duration-200 mt-4",children:"CONTACTO"})]})})]})}),d.jsx(Wc,{isOpen:r,onClose:()=>n(!1)})]})},zO=()=>d.jsx("section",{id:"project-description",className:"py-24 bg-background",children:d.jsx("div",{className:"max-w-4xl mx-auto px-6",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h2",{className:"text-4xl md:text-5xl font-raleway font-bold text-foreground mb-8",children:"CaracterÃsticas exclusivas de la unifamiliar FindNido en Ribadesella"}),d.jsxs("div",{className:"text-lg text-muted-foreground font-raleway leading-relaxed space-y-6 text-left",children:[d.jsx("p",{children:"La nueva promoción de FindNido en Ribadesella (Tezangos) reúne lo mejor de Asturias: mar, naturaleza y una arquitectura contemporánea pensada para el bienestar de toda la familia."}),d.jsx("p",{children:"Se trata de una vivienda unifamiliar de 200 m², con 4 dormitorios y 4 baños, situada en una parcela privada de 1.250 m². El diseño ofrece porche, terraza y la posibilidad de añadir piscina propia, con estancias luminosas que se abren a impresionantes vistas al mar, a solo 7 minutos de la playa."}),d.jsx("p",{children:"Su fachada con sistema SATE y la certificación energética A+ garantizan confort, eficiencia y sostenibilidad en el dÃa a dÃa."}),d.jsx("p",{className:"font-raleway font-medium text-foreground",children:"Ubicada en una de las zonas más privilegiadas de Asturias, Ribadesella combina mar, montaña, playas y tradición cultural. Un entorno perfecto tanto para residencia habitual como para segunda vivienda."})]})]})})}),BO=()=>{const e=[{icon:Tk,title:"200 m² construidos",description:"Amplios espacios para el confort familiar"},{icon:yw,title:"4 dormitorios, 4 baños",description:"Máximo confort para toda la familia"},{icon:wk,title:"Parcela de 1.250 m²",description:"Gran terreno para disfrutar al aire libre"},{icon:Af,title:"Porche y terraza",description:"Estancias exteriores para el clima asturiano"},{icon:Nk,title:"Piscina opcional",description:"Posibilidad de añadir piscina privada"},{icon:_w,title:"Certificación energética A+",description:"Eficiencia y sostenibilidad diarias"}];return d.jsx("section",{id:"features",className:"py-24 bg-gradient-subtle",children:d.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[d.jsxs("div",{className:"text-center mb-20",children:[d.jsx("h2",{className:"text-4xl md:text-5xl font-raleway font-bold text-foreground mb-6",children:"CaracterÃsticas principales"}),d.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto font-raleway font-medium",children:"Cada detalle ha sido pensado para ofrecerte la mejor calidad de vida en un entorno privilegiado"})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:e.map((t,r)=>{const n=t.icon;return d.jsxs("div",{className:"group bg-card p-8 rounded-[8px] border border-muted/30 hover:shadow-card transition-all duration-300 flex items-start gap-6",children:[d.jsx("div",{className:"bg-[hsl(var(--cta-green))]/10 w-16 h-16 rounded-[8px] flex items-center justify-center flex-shrink-0 group-hover:bg-[hsl(var(--cta-green))]/20 transition-colors",children:d.jsx(n,{className:"w-8 h-8 text-[hsl(var(--cta-green))]"})}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h3",{className:"text-xl font-raleway font-bold text-foreground mb-3",children:t.title}),d.jsx("p",{className:"text-muted-foreground leading-relaxed font-raleway",children:t.description})]})]},r)})})]})})},HO=1,WO="cd66c2e8-9e4f-4353-adf8-499fe561cc3d",VO="6128a34d-2826-4913-910c-55e5d1f17310",qO="/__l5e/assets-v1/cd66c2e8-9e4f-4353-adf8-499fe561cc3d/Ribadesella_frontal.png",KO="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/cd66c2e8-9e4f-4353-adf8-499fe561cc3d/Ribadesella_frontal.png",GO="Ribadesella_frontal.png",QO=2272599,JO="image/png",YO="2026-09-22T13:09:30Z",XO={version:HO,asset_id:WO,project_id:VO,url:qO,r2_key:KO,original_filename:GO,size:QO,content_type:JO,created_at:YO},ZO=1,eI="c24488e8-eabc-491c-8569-9ae60dcf25a2",tI="6128a34d-2826-4913-910c-55e5d1f17310",rI="/__l5e/assets-v1/c24488e8-eabc-491c-8569-9ae60dcf25a2/Ribadesella_lateral.png",nI="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/c24488e8-eabc-491c-8569-9ae60dcf25a2/Ribadesella_lateral.png",sI="Ribadesella_lateral.png",iI=2556525,oI="image/png",aI="2026-09-22T13:09:34Z",lI={version:ZO,asset_id:eI,project_id:tI,url:rI,r2_key:nI,original_filename:sI,size:iI,content_type:oI,created_at:aI},cI=1,uI="a3fb448a-fadd-4126-9449-bf32364cdeaa",dI="6128a34d-2826-4913-910c-55e5d1f17310",hI="/__l5e/assets-v1/a3fb448a-fadd-4126-9449-bf32364cdeaa/Ribadesella_terraza.png",fI="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/a3fb448a-fadd-4126-9449-bf32364cdeaa/Ribadesella_terraza.png",pI="Ribadesella_terraza.png",mI=2579459,gI="image/png",vI="2026-09-22T13:09:38Z",yI={version:cI,asset_id:uI,project_id:dI,url:hI,r2_key:fI,original_filename:pI,size:mI,content_type:gI,created_at:vI},wI=1,bI="2d34cbd4-1c91-4282-8fe2-53836da57062",xI="6128a34d-2826-4913-910c-55e5d1f17310",_I="/__l5e/assets-v1/2d34cbd4-1c91-4282-8fe2-53836da57062/Ribadesella_trasero.png",SI="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/2d34cbd4-1c91-4282-8fe2-53836da57062/Ribadesella_trasero.png",EI="Ribadesella_trasero.png",kI=2497542,CI="image/png",TI="2026-09-22T13:09:42Z",RI={version:wI,asset_id:bI,project_id:xI,url:_I,r2_key:SI,original_filename:EI,size:kI,content_type:CI,created_at:TI},jI=1,NI="1bc1e0be-8750-4ebe-9260-7ebbae41b619",PI="6128a34d-2826-4913-910c-55e5d1f17310",AI="/__l5e/assets-v1/1bc1e0be-8750-4ebe-9260-7ebbae41b619/Ribadesella-baño.png",OI="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/1bc1e0be-8750-4ebe-9260-7ebbae41b619/Ribadesella-baño.png",II="Ribadesella-baño.png",LI=2146104,$I="image/png",DI="2026-09-22T13:09:44Z",MI={version:jI,asset_id:NI,project_id:PI,url:AI,r2_key:OI,original_filename:II,size:LI,content_type:$I,
316created_at:DI},UI=1,FI="f4512157-7f2f-4b26-87ef-56e5f89e0585",zI="6128a34d-2826-4913-910c-55e5d1f17310",BI="/__l5e/assets-v1/f4512157-7f2f-4b26-87ef-56e5f89e0585/Ribadesella-dormitorio_2-v2.png",HI="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/f4512157-7f2f-4b26-87ef-56e5f89e0585/Ribadesella-dormitorio_2-v2.png",WI="Ribadesella-dormitorio_2-v2.png",VI=2590665,qI="image/png",KI="2026-09-22T13:09:47Z",GI={version:UI,asset_id:FI,project_id:zI,url:BI,r2_key:HI,original_filename:WI,size:VI,content_type:qI,created_at:KI},QI=1,JI="9c7ad22a-4c7a-43d9-9f6e-4fe4dede488a",YI="6128a34d-2826-4913-910c-55e5d1f17310",XI="/__l5e/assets-v1/9c7ad22a-4c7a-43d9-9f6e-4fe4dede488a/Ribadesella-interiores-1.png",ZI="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/9c7ad22a-4c7a-43d9-9f6e-4fe4dede488a/Ribadesella-interiores-1.png",eL="Ribadesella-interiores-1.png",tL=732004,rL="image/png",nL="2026-09-22T13:29:21Z",sL={version:QI,asset_id:JI,project_id:YI,url:XI,r2_key:ZI,original_filename:eL,size:tL,content_type:rL,created_at:nL},iL=1,oL="dd6ff172-6c02-4116-92a3-5e53da3a3835",aL="6128a34d-2826-4913-910c-55e5d1f17310",lL="/__l5e/assets-v1/dd6ff172-6c02-4116-92a3-5e53da3a3835/salon-comedor-v1.png",cL="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/dd6ff172-6c02-4116-92a3-5e53da3a3835/salon-comedor-v1.png",uL="salon-comedor-v1.png",dL=648284,hL="image/png",fL="2026-09-22T13:29:23Z",pL={version:iL,asset_id:oL,project_id:aL,url:lL,r2_key:cL,original_filename:uL,size:dL,content_type:hL,created_at:fL},mL=1,gL="cf116310-a2d0-4061-943d-5eabc5143da1",vL="6128a34d-2826-4913-910c-55e5d1f17310",yL="/__l5e/assets-v1/cf116310-a2d0-4061-943d-5eabc5143da1/Ribadesella-interiores-2.png",wL="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/cf116310-a2d0-4061-943d-5eabc5143da1/Ribadesella-interiores-2.png",bL="Ribadesella-interiores-2.png",xL=486189,_L="image/png",SL="2026-09-22T13:29:26Z",EL={version:mL,asset_id:gL,project_id:vL,url:yL,r2_key:wL,original_filename:bL,size:xL,content_type:_L,created_at:SL},kL=1,CL="3eeb48ec-d62c-41d1-baf1-944856b8438a",TL="6128a34d-2826-4913-910c-55e5d1f17310",RL="/__l5e/assets-v1/3eeb48ec-d62c-41d1-baf1-944856b8438a/Ribadesella-interiores-3.png",jL="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/3eeb48ec-d62c-41d1-baf1-944856b8438a/Ribadesella-interiores-3.png",NL="Ribadesella-interiores-3.png",PL=608160,AL="image/png",OL="2026-09-22T13:29:28Z",IL={version:kL,asset_id:CL,project_id:TL,url:RL,r2_key:jL,original_filename:NL,size:PL,content_type:AL,created_at:OL},LL=1,$L="99682ff7-eb35-4140-8feb-d738dfe7f375",DL="6128a34d-2826-4913-910c-55e5d1f17310",ML="/__l5e/assets-v1/99682ff7-eb35-4140-8feb-d738dfe7f375/Ribadesella-interiores-4.png",UL="a/v1/6128a34d-2826-4913-910c-55e5d1f17310/99682ff7-eb35-4140-8feb-d738dfe7f375/Ribadesella-interiores-4.png",FL="Ribadesella-interiores-4.png",zL=621435,BL="image/png",HL="2026-09-22T13:29:31Z",WL={version:LL,asset_id:$L,project_id:DL,url:ML,r2_key:UL,original_filename:FL,size:zL,content_type:BL,created_at:HL},VL=()=>{var h;const[e,t]=y.useState(null),[r,n]=y.useState(0),s=[{src:Hx.url,title:"Vista principal de la vivienda"},{src:XO.url,title:"Vista frontal de la vivienda"},{src:lI.url,title:"Vista lateral de la vivienda"},{src:yI.url,title:"Terraza exterior"},{src:RI.url,title:"Vista posterior de la vivienda"},{src:MI.url,title:"Baño"},{src:GI.url,title:"Dormitorio"},{src:sL.url,title:"Interior con zona de trabajo"},{src:pL.url,title:"Salón comedor"},{src:EL.url,title:"Entrada de la vivienda"},{src:IL.url,title:"Dormitorio con techo de madera"},{src:WL.url,title:"Dormitorio principal"}],i=s.slice(1,5),o=s.length-5,a=(u,p)=>{t(u),n(p)},l=u=>{const p=u==="next"?(r+1)%s.length:(r-1+s.length)%s.length;t(s[p].src),n(p)},c=()=>{t(null),n(0)};return y.useEffect(()=>{const u=p=>{e&&(p.key==="ArrowRight"?l("next"):p.key==="ArrowLeft"?l("prev"):p.key==="Escape"&&c())};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,r]),d.jsx("section",{id:"gallery",className:"py-24 bg-background",children:d.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[d.jsxs("div",{className:"text-center mb-20",children:[d.jsx("h2",{className:"text-4xl md:text-5xl font-raleway font-bold text-foreground mb-6",children:"GalerÃa de imágenes"}),d.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto font-raleway font-medium",children:"Descubre cada rincón de tu futuro hogar. Espacios diseña
316dos para vivir con comodidad y estilo"})]}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"group relative bg-card rounded-[8px] overflow-hidden border border-muted/30 hover:shadow-card transition-all duration-300 cursor-pointer h-[300px] md:h-[500px]",onClick:()=>a(s[0].src,0),children:[d.jsx("div",{className:"h-full overflow-hidden",children:d.jsx("img",{src:s[0].src,alt:s[0].title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}),d.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-all duration-300 flex items-center justify-center",children:d.jsx(Nu,{className:"w-6 h-6 text-white opacity-0 group-hover:opacity-100 transition-opacity duration-300"})})]}),d.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:i.map((u,p)=>{const f=p===i.length-1&&o>0;return d.jsxs("div",{className:"group relative bg-card rounded-[8px] overflow-hidden border border-muted/30 hover:shadow-card transition-all duration-300 cursor-pointer h-48",onClick:()=>a(u.src,p+1),children:[d.jsx("div",{className:"h-full overflow-hidden",children:d.jsx("img",{src:u.src,alt:u.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}),d.jsx("div",{className:`absolute inset-0 transition-all duration-300 flex items-center justify-center ${f?"bg-foreground
316/65":"bg-foreground/0 group-hover:bg-foreground/40"}`,children:f?d.jsxs("div",{className:"flex flex-col items-center gap-2 text-background",children:[d.jsx(Nu,{className:"w-7 h-7"}),d.jsxs("span",{className:"text-base font-semibold",children:["Ver ",o," más"]})]}):d.jsx(Nu,{className:"w-6 h-6 text-background opacity-0 group-hover:opacity-100 transition-opacity duration-300"})})]},p+1)})})]}),e&&d.jsx("div",{className:"fixed inset-0 bg-black/80 z-50 flex items-center justify-center p-4",onClick:c,children:d.jsxs("div",{className:"relative flex h-[100dvh] w-full items-center justify-center px-4 py-16 md:px-20 md:py-12",onClick:u=>u.stopPropagation(),children:[d.jsx("img",{src:e,alt:((h=s[r])==null?void 0:h.title)||"Selected image",className:"block h-auto w-auto max-h-[calc(100dvh-8rem)] max-w-full object-contain rounded-lg md:max-h-[calc(100dvh-6rem)]"}),d.jsx("button",{onClick:()=>l("prev"),className:"absolute left-4 top-1/2 -translate-y-1/2 bg-black/50 backdrop-blur-sm text-white w-12 h-12 rounded-full flex items-center justify-center hover:bg-black/70 transition-colors",children:d.jsx(vk,{className:"w-6 h-6"})}),d.jsx("button",{onClick:()=>l("next"),className:"absolute right-4 top-1/2 -translate-y-1/2 bg-black/50 backdrop-blur-sm text-white w-12 h-12 rounded-full flex items-center justify-center hover:bg-black/70 transition-colors",children:d.jsx(yk,{className:"w-6 h-6"})}),d.jsx("button",{onClick:c,className:"absolute top-4 right-4 bg-black/50 backdrop-blur-sm text-white w-10 h-10 rounded-full flex items-center justify-center hover:bg-black/70 transition-colors",children:"â"}),d.jsxs("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 bg-black/50 backdrop-blur-sm text-white px-4 py-2 rounded-full text-sm",children:[r+1," / ",s.length]})]})})]})})},qL="modulepreload",KL=function(e){return"/"+e},mv={},gv=function(t,r,n){let s=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(r.map(l=>{if(l=KL(l),l in mv)return;mv[l]=!0;const c=l.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${h}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":qL,c||(u.as="script"),u.crossOrigin="",u.href=l,a&&u.setAttribute("nonce",a),document.head.appendChild(u),c)return new Promise((p,f)=>{u.addEventListener("load",p),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},GL=()=>{const e=y.useRef(null),t=y.useRef(null),r=()=>{!e.current||t.current||gv(()=>import("./mapbox-gl-DG6pbBKr.js").then(s=>s.m),[]).then(s=>{gv(()=>Promise.resolve({}),__vite__mapDeps([0])),s.default.accessToken="pk.eyJ1IjoibG9yZWVib3giLCJhIjoiY21mNTZlNjJoMDIyZDJqczh3anl6ODZ0MSJ9.83qVFLH9G2P5wdqXbsDByw";const i=[-5.080924,43.443522];t.current=new s.default.Map({container:e.current,style:"mapbox://styles/mapbox/light-v11",center:i,zoom:17,pitch:0,attributionControl:!1}),t.current.on("load",()=>{new s.default.Marker({color:"#2B433A",scale:1.2,draggable:!1}).setLngLat(i).setPopup(new s.default.Popup({offset:25,closeOnClick:!0,closeButton:!1}).setHTML(` 317 <div style="padding: 14px 16px; font-family: system-ui; text-align: center;"> 318 <div style="color: #0f172a; font-weight: 700; font-size: 16px;">Ribadesella · Tezangos</div> 319 <div style="color: #475569; font-size: 14px; margin-top: 4px;">Lugar Tezangos, 2</div> 320 <div style="color: #64748b; font-size: 12px; margin-top: 2px;">33588 Ribadesella, Asturias</div> 321 </div> 322 `)).addTo(t.current)}),t.current.addControl(new s.default.NavigationControl,"top-right")}).catch(s=>{console.error("Error loading mapbox:",s),e.current&&(e.current.innerHTML=` 323 <div class="flex flex-col items-center justify-center h-full text-center p-8"> 324 <div class="bg-[#2B433A] text-white p-3 rounded-full mb-4"> 325 <svg width="24" height="24" fill="currentColor" viewBox="0 0 24 24"> 326 <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/> 327 </svg> 328 </div> 329 <h3 class="font-bold text-foreground mb-2">Lugar Tezangos, 2</h3> 330 <p class="text-muted-foreground">33588 Ribadesella, Asturias</p>
331 <p class="text-sm text-muted-foreground/80 mt-2">Mapa no disponible - Token de Mapbox requerido</p> 332 </div> 333 `)})},n=[{icon:Uo,title:"Ubicación estratégica",description:"Vive en plena tranquilidad, a solo 7 minutos de la playa"},{icon:Af,title:"Naturaleza a tu alrededor",description:"Montañas, bosques y aire puro en el corazón de Asturias"},{icon:pk,title:"Bien conectado",description:"Acceso cómodo con opciones de transporte público cercanas"}];return y.useEffect(()=>(r(),()=>{t.current&&(t.current.remove(),t.current=null)}),[]),d.jsx("section",{id:"location",className:"py-24 bg-background",children:d.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[d.jsxs("div",{className:"text-center mb-20",children:[d.jsx("h2",{className:"text-4xl md:text-5xl font-raleway font-bold text-foreground mb-6",children:"Ubicación privilegiada"}),d.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto font-raleway font-medium",children:"En el corazón de Ribadesella, donde el mar y la montaña se encuentran. Tu nuevo hogar en un entorno natural único"}),d.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6",children:[d.jsx(Uo,{className:"w-5 h-5 text-[#2B433A]"}),d.jsx("span",{className:"text-lg font-raleway font-medium text-foreground",children:"Ribadesella, Asturias (Tezangos)"})]})]}),d.jsx("div",{className:"bg-gradient-to-br from-muted to-muted/60 rounded-[8px] h-96 mb-12 flex items-center justify-center border border-muted/30 relative overflow-hidden",children:d.jsx("div",{ref:e,className:"w-full h-full rounded-[8px]",style:{minHeight:"384px"}})}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:n.map((s,i)=>{const o=s.icon;return d.jsxs("div",{className:"text-center group bg-card p-8 rounded-[8px] border border-muted/30 hover:shadow-card transition-all duration-300",children:[d.jsx("div",{className:"bg-[hsl(var(--cta-green))]/10 w-16 h-16 rounded-[8px] flex items-center justify-center mb-6 mx-auto group-hover:bg-[hsl(var(--cta-green))]/20 transition-colors",children:d.jsx(o,{className:"w-8 h-8 text-[hsl(var(--cta-green))]"})}),d.jsx("h3",{className:"font-raleway font-bold text-foreground mb-3 text-xl",children:s.title}),d.jsx("p",{className:"text-muted-foreground font-raleway leading-relaxed",children:s.description})]},i)})})]})})};var QL="Label",Wx=y.forwardRef((e,t)=>d.jsx(se.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Wx.displayName=QL;var Vx=Wx;const JL=Nf("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),qx=y.forwardRef(({className:e,...t},r)=>d.jsx(Vx,{ref:r,className:_e(JL(),e),...t}));qx.displayName=Vx.displayName;const YL=()=>{const[e,t]=y.useState({name:"",email:""}),[r,n]=y.useState(!1),[s,i]=y.useState(!1),[o,a]=y.useState(!1),[l,c]=y.useState(!1),{toast:h}=ua(),u=b=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b.trim()),p=e.email.trim()!==""&&u(e.email),f=async b=>{if(b.preventDefault(),!l)if(e.email&&u(e.email)){c(!0);try{const{data:v,error:g}=await ps.from("leads").select("email").eq("email",e.email).limit(1);if(g){console.error("Error checking existing email:",g),h({title:"Error",description:"No se pudo verificar el email. Inténtalo de nuevo.",variant:"destructive"});return}if(!v||v.length===0){const{error:E}=await ps.from("leads").insert({first_name:"",last_name:"",email:e.email,comments:"Solicitó descarga de planos",source:"form_ribadesella",status:"new"});if(E){console.error("Error saving to database:",E),h({title:"Error",description:"No se pudo registrar tu email. Inténtalo de nuevo.",variant:"destructive"});return}}const _="https://drive.google.com/uc?export=download&id=1eqo2dLZmHMell29dRAhzTuU5BDfxdSr9",S=document.createElement("a");S.href=_,S.download="planos-ribadesella.pdf",document.body.appendChild(S),S.click(),document.body.removeChild(S),h({title:"¡Ãxito!",description:"Descarga iniciada."}),n(!1),t({name:"",email:""}),a(!1)}catch(v){console.error("Unexpected error:",v),h({title:"Error",description:"Ha ocurrido un error inesperado.",variant:"destructive"})}finally{c(!1)}}else e.email&&!u(e.email)&&a(!0)},x=b=>{const v=b.target.value;t({...e,email:v}),v.trim()!==""&&!u(v)?a(!0):a(!1)},m=()=>{e.email.trim()!==""&&!u(e.email)&&a(!0)};return d.jsxs("section",{className:"py-16 bg-[hsl(var(--cta-green))]",children:[d.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",children:[d.jsx("h2",{className:"text-3xl md:text-4xl font-raleway font-bold text-white mb-4",children:"¿Estás interesado?"}),d.jsx("p",{className:"text-lg text-white/90 mb-8 max-w-2xl mx-auto font-raleway font-medium",children:"No dejes pasar esta oportunidad única de vivir en la costa asturiana. Contáctanos y te ayudaremos a hacer realidad tu nuevo hogar."}),d.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[d.jsxs(dr,{size:"lg",onClick:()=>i(!0),className:"bg-[hsl(var(--button-orange))] hover:bg-[hsl(var(--button-orange-hover))] text-[hsl(var(--button-orange-text))] px-8 py-4 h-auto font-raleway font-semibold text-lg rounded-[8px] flex items-center gap-2",children:[d.jsx(Pf,{className:"w-5 h-5"}),"Solicitar información"]}),d.jsxs(px,{open:r,onOpenChange:n,children:[d.jsx(fP,{asChild:!0,children:d.jsxs(dr,{size:"lg",variant:"outline",className:"bg-white text-[hsl(var(--cta-green))] border-white hover:bg-white/90 hover:text-[hsl(var(--cta-green))] px-8 py-4 h-auto font-raleway font-semibold text-lg rounded-[8px] flex items-center gap-2",children:[d.jsx(Mm,{className:"w-5 h-5"}),"Descargar planos"]})}),d.jsxs(ep,{className:"sm:max-w-md rounded-[8px]",children:[d.jsxs(tp,{children:[d.jsx(rp,{className:"font-raleway font-bold",children:"Descargar planos"}),d.jsx("p",{className:"text-sm text-muted-foreground font-raleway mt-2",children:"Introduce tu email para descargar al instante los planos."})]}),d.jsxs("form",{onSubmit:f,className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx(qx,{htmlFor:"email",className:"font-raleway font-medium",children:"Email *"}),d.jsx(Vt,{id:"email",type:"email",value:e.email,onChange:x,onBlur:m,className:`rounded-[8px] font-raleway ${o?"border-red-500":""}`,required:!0}),o&&d.jsx("p",{className:"text-red-500 text-sm mt-1 font-raleway",children:"Por favor, introduce un email válido"})]}),d.jsxs(dr,{type:"submit",disabled:!p||l,className:`w-full rounded-[8px] font-raleway font-semibold flex items-center justify-center gap-2 transition-all duration-200 ${p?"bg-[hsl(var(--cta-green))] hover:bg-[hsl(var(--cta-green))]/90 text-white":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:[d.jsx(Mm,{className:"w-4 h-4"}),l?"Procesando...":"Descargar"]})]})]})]})]})]}),d.jsx(Wc,{isOpen:s,onClose:()=>i(!1)})]})},XL=()=>{const e=[{name:"Comienzo de obra",icon:_k,completed:!0,date:"Junio 2025",status:"Completado"},{name:"Cimentación y estructura",icon:fk,completed:!0,date:"Septiembre 2025",status:"Completado"},{name:"Fachada",icon:ww,completed:!0,date:"Octubre 2025",status:"Completado"},{name:"Obra terminada",icon:Sk,completed:!0,date:"Diciembre 2025",status:"Completado"}];return d.jsx("section",{id:"construction-progress",className:"py-24 bg-gradient-subtle",children:d.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[d.jsxs("div",{className:"text-center mb-20",children:[d.jsx("h2",{className:"text-4xl md:text-5xl font-raleway font-bold text-foreground mb-6",children:"Estado de la obra"}),d.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto font-raleway font-medium",children:"Seguimiento transparente del progreso de construcción de tu futura casa"})]}),d.jsxs("div",{className:"mb-20",children:[d.jsxs("div",{className:"text-center mb-8",children:[d.jsx("span",{className:"inline-block px-4 py-1.5 bg-[#D6DCB5] text-[#2B433A] rounded-full text-sm font-raleway font-bold mb-4",children:"Behind the scenes"}),d.jsx("h3",{className:"text-2xl md:text-3xl font-raleway font-bold text-foreground mb-3",children:"Asà fue tomando forma"}),d.jsx("p",{className:"text-center text-muted-foreground font-raleway max-w-3xl mx-auto",children:"Una mirada a la construcción de esta vivienda."})]}),d.jsx("div",{className:"max-w-4xl mx-auto",children:d.jsx("div",{className:"relative aspect-video rounded-2xl overflow-hidden shadow-xl border border-border",children:d.jsx("iframe",{src:"https://drive.google.com/file/d/1Q8hlP4rzjyfRR1gnqy5DfLBizt1W2MZD/preview",className:"w-full h-full",allow:"autoplay",allowFullScreen:!0})})})]}),d.jsx("div",{className:"relative",children:d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute left-8 w-0.5 bg-muted-foreground
333/20 z-0 md:hidden",style:{top:"2rem",bottom:"2rem"}}),d.jsx("div",{className:"absolute top-8 h-0.5 bg-muted-foreground/20 z-0 hidden md:block",style:{left:"2rem",right:"2rem"}}),d.jsx("div",{className:"flex flex-col gap-8 md:flex-row md:items-start md:justify-between relative z-10",children:e.map((t,r)=>{const n=t.icon,s=t.status==="En curso",i=t.completed;return d.jsxs("div",{className:"flex items-start gap-4 md:flex-col md:items-center md:text-center md:flex-1",children:[d.jsx("div",{className:`w-16 h-16 rounded-[8px] flex items-center justify-center flex-shrink-0 border-2 z-10 ${i?"bg-[#D6DCB5] border-[#2B433A]/30":s?"bg-[#F8D5CB] border-[hsl(var(--button-orange))]":"bg-card border-muted"}`,children:d.jsx(n,{className:`w-8 h-8 ${i?"text-[#2B433A]":s?"text-[hsl(var(--button-orange))]":"text-muted-foreground"}`})}),d.jsxs("div",{className:"flex-1 md:flex-none md:mt-4",children:[d.jsx("h3",{className:"font-raleway font-bold text-foreground mb-2 text-lg",children:t.name}),d.jsx("div",{className:"text-sm text-muted-foreground font-raleway mb-3",children:t.date}),d.jsx("span",{className:`inline-block px-3 py-1 rounded-full text-xs font-raleway font-medium ${i?"bg-[#D6DCB5] text-[#2B433A]":s?"bg-[hsl(var(--button-orange))]/10 text-[hsl(var(--button-orange))]":"bg-muted/50 text-muted-foreground"}`,children:t.status})]})]},r)})})]})})]})})},ZL=()=>{const e=[{icon:Rk,title:"Calidad constructiva superior",badge:"20 años de garantÃa",description:"Materiales de primera calidad y acabados premium. Certificación de calidad ISO 9001 en todos nuestros procesos constructivos."},{icon:_w,title:"Eficiencia energética máxima",badge:"Ahorro de hasta 1.200â¬/año",description:"Calificación energética A que te permitirá ahorrar hasta un 70% en tu factura energética. Aerotermia y domótica incluidas."}
333,{icon:Uo,title:"Ubicación estratégica única",badge:"PlusvalÃa garantizada",description:"En Ribadesella, con mar y montaña, a solo 7 minutos de la playa."},{icon:ww,title:"Diseño pensado para vivir",badge:"Diseño exclusivo",description:"Espacios amplios, luminosos y funcionales. Cada detalle ha sido cuidado para maximizar tu comodidad y bienestar familiar."},{icon:jk,title:"Inversión inteligente",badge:"Revalorización del 15% anual",description:"Ribadesella es una zona en crecimiento con alta demanda. Tu inversión se revalorizará con el tiempo en una de las mejores zonas de Asturias."},{icon:Af,title:"Parcela exclusiva",badge:"Espacio privado",description:"Disfruta de 1.250 m² de parcela privada, un espacio único para relajarte, crear tu propio jardÃn o añadir una piscina, rodeado de tranquilidad y naturaleza."}];return d.jsx("section",{id:"why-choose-findnido",className:"py-24 bg-background",children:d.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[d.jsxs("div",{className:"text-center mb-20",children:[d.jsx("h2",{className:"text-4xl md:text-5xl font-raleway font-bold text-foreground mb-6",children:"¿Por qué elegir una unifamiliar de Findnido?"}),d.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto font-raleway font-medium",children:"Mucho más que una casa: tu refugio en plena naturaleza. Descubre por qué somos la mejor elección para tu primera o segunda vivienda."})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:e.map((t,r)=>{const n=t.icon;return d.jsxs("div",{className:"group bg-card p-8 rounded-[8px] border border-muted/30 hover:shadow-card transition-all duration-300 text-center",children:[d.jsx("div",{style:{backgroundColor:"#e3e7ca"},className:"w-16 h-16 rounded-[8px] flex items-center justify-center mb-6 mx-auto group-hover:opacity-90 transition-opacity",children:d.jsx(n,{className:"w-8 h-8",style:{color:"#7D8458"}})}),d.jsx("span",{className:"inline-block px-3 py-1 rounded-full text-xs font-raleway font-medium mb-4",style:{backgroundColor:"#FCB09C",color:"#B7553B"},children:t.badge}),d.jsx("h3",{className:"text-xl font-raleway font-bold text-foreground mb-4",children:t.title}),d.jsx("p",{className:"text-muted-foreground leading-relaxed font-raleway",children:t.description})]},r)})})]})})},e$=()=>{const[e,t]=y.useState(!1);return d.jsxs("section",{className:"py-16 bg-[hsl(var(--cta-green))]",children:[d.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",children:[d.jsx("h2",{className:"text-3xl md:text-4xl font-raleway font-bold text-white mb-4",children:"¿Estás interesado?"}),d.jsx("p",{className:"text-lg text-white/90 mb-8 max-w-2xl mx-auto font-raleway font-medium",children:"No dejes pasar esta oportunidad única de vivir en la costa asturiana. Contáctanos y te ayudaremos a hacer realidad tu nuevo hogar."}),d.jsxs(dr,{size:"lg",onClick:()=>t(!0),className:"bg-[hsl(var(--button-orange))] hover:bg-[hsl(var(--button-orange-hover))] text-[hsl(var(--button-orange-text))] px-8 py-4 h-auto font-raleway font-semibold text-lg rounded-[8px] inline-flex items-center gap-2 mx-auto",children:[d.jsx(Pf,{className:"w-5 h-5"}),"Solicitar información"]})]}),d.jsx(Wc,{isOpen:e,onClose:()=>t(!1)})]})};var Vc="Collapsible",[t$,Kx]=Mr(Vc),[r$,ip]=t$(Vc),Gx=y.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:i,onOpenChange:o,...a}=e,[l,c]=Oi({prop:n,defaultProp:s??!1,onChange:o,caller:Vc});return d.jsx(r$,{scope:r,disabled:i,contentId:yo(),open:l,onOpenToggle:y.useCallback(()=>c(h=>!h),[c]),children:d.jsx(se.div,{"data-state":ap(l),"data-disabled":i?"":void 0,...a,ref:t})})});Gx.displayName=Vc;var Qx="CollapsibleTrigger",Jx=y.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,s=ip(Qx,r);return d.jsx(se.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":ap(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:t,onClick:ne(e.onClick,s.onOpenToggle)})});Jx.displayName=Qx;var op="CollapsibleContent",Yx=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=ip(op,e.__scopeCollapsible);return d.jsx(Nt,{present:r||s.open,children:({present:i})=>d.jsx(n$,{...n,ref:t,present:i})})});Yx.displayName=op;var n$=y.forwardRef((e,t)=>
vendor: 4,291 bytes, line 333
333{const{__scopeCollapsible:r,present:n,children:s,...i}=e,o=ip(op,r),[a,l]=y.useState(n),c=y.useRef(null),h=ge(t,c),u=y.useRef(0),p=u.current,f=y.useRef(0),x=f.current,m=o.open||a,b=y.useRef(m),v=y.useRef(void 0);return y.useEffect(()=>{const g=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(g)},[]),Qt(()=>{const g=c.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const w=g.getBoundingClientRect();u.current=w.height,f.current=w.width,b.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),l(n)}},[o.open,n]),d.jsx(se.div,{"data-state":ap(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...i,ref:h,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:m&&s})});function ap(e){return e?"open":"closed"}var s$=Gx,i$=Jx,o$=Yx,a$=y.createContext(void 0);function Xx(e){const t=y.useContext(a$);return e||t||"ltr"}var Zt="Accordion",l$=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[lp,c$,u$]=V0(Zt),[qc,g4]=Mr(Zt,[u$,Kx]),cp=Kx(),Zx=O.forwardRef((e,t)=>{const{type:r,...n}=e,s=n,i=n;return d.jsx(lp.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?d.jsx(p$,{...i,ref:t}):d.jsx(f$,{...s,ref:t})})});Zx.displayName=Zt;var[e1,d$]=qc(Zt),[t1,h$]=qc(Zt,{collapsible:!1}),f$=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:i=!1,...o}=e,[a,l]=Oi({prop:r,defaultProp:n??"",onChange:s,caller:Zt});return d.jsx(e1,{scope:e.__scopeAccordion,value:O.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:O.useCallback(()=>i&&l(""),[i,l]),children:d.jsx(t1,{scope:e.__scopeAccordion,collapsible:i,children:d.jsx(r1,{...o,ref:t})})})}),p$=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...i}=e,[o,a]=Oi({prop:r,defaultProp:n??[],onChange:s,caller:Zt}),l=O.useCallback(h=>a((u=[])=>[...u,h]),[a]),c=O.useCallback(h=>a((u=[])=>u.filter(p=>p!==h)),[a]);return d.jsx(e1,{scope:e.__scopeAccordion,value:o,onItemOpen:l,onItemClose:c,children:d.jsx(t1,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(r1,{...i,ref:t})})})}),[m$,Kc]=qc(Zt),r1=O.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:i="vertical",...o}=e,a=O.useRef(null),l=ge(a,t),c=c$(r),u=Xx(s)==="ltr",p=ne(e.onKeyDown,f=>{var T;if(!l$.includes(f.key))return;const x=f.target,m=c().filter(R=>{var P;return!((P=R.ref.current)!=null&&P.disabled)}),b=m.findIndex(R=>R.ref.current===x),v=m.length;if(b===-1)return;f.preventDefault();let g=b;const w=0,_=v-1,S=()=>{g=b+1,g>_&&(g=w)},E=()=>{g=b-1,g<w&&(g=_)};switch(f.key){case"Home":g=w;break;case"End":g=_;break;case"ArrowRight":i==="horizontal"&&(u?S():E());break;case"ArrowDown":i==="vertical"&&S();break;case"ArrowLeft":i==="horizontal"&&(u?E():S());break;case"ArrowUp":i==="vertical"&&E();break}const C=g%v;(T=m[C].ref.current)==null||T.focus()});return d.jsx(m$,{scope:r,disabled:n,direction:s,orientation:i,children:d.jsx(lp.Slot,{scope:r,children:d.jsx(se.div,{...o,"data-orientation":i,ref:l,onKeyDown:n?void 0:p})})})}),lc="AccordionItem",[g$,up]=qc(lc),n1=O.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...s}=e,i=Kc(lc,r),o=d$(lc,r),a=cp(r),l=yo(),c=n&&o.value.includes(n)||!1,h=i.disabled||e.disabled;return d.jsx(g$,{scope:r,open:c,disabled:h,triggerId:l,children:d.jsx(s$,{"data-orientation":i.orientation,"data-state":c1(c),...a,...s,ref:t,disabled:h,open:c,onOpenChange:u=>{u?o.onItemOpen(n):o.onItemClose(n)}})})});n1.displayName=lc;var s1="AccordionHeader",i1=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Kc(Zt,r),i=up(s1,r);return d.jsx(se.h3,{"data-orientation":s.orientation,"data-state":c1(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});i1.displayName=s1;var jh="AccordionTrigger",o1=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,s=Kc(Zt,r),i=up(jh,r),o=h$(jh,r),a=cp(r);return d.jsx(lp.ItemSlot,{scope:r,children:d.jsx(i$,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...n,ref:t})})});o1.displayName=jh;var a1="AccordionContent",l1=O.forwardRef((e,t)=>
333{const{__scopeAccordion:r,...n}=e,s=Kc(Zt,r),i=up(a1,r),o=cp(r);return d.jsx(o$,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});l1.displayName=a1;function c1(e){return e?"open":"closed"}var v$=Zx,y$=n1,w$=i1,u1=o1,d1=l1;const b$=v$,h1=y.forwardRef(({className:e,...t},r)=>d.jsx(y$,{ref:r,className:_e("border-b",e),...t}));h1.displayName="AccordionItem";const f1=y.forwardRef(({className:e,children:t,...r},n)=>d.jsx(w$,{className:"flex",children:d.jsxs(u1,{ref:n,className:_e("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,d.jsx(gk,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));f1.displayName=u1.displayName;const p1=y.forwardRef(({className:e,children:t,...r},n)=>d.jsx(d1,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:d.jsx("div",{className:_e("pb-4 pt-0",e),children:t})}));p1.displayName=d1.displayName;const x$=()=>{const e=[{question:"¿Qué incluye la vivienda?",answer:"La vivienda incluye 4 dormitorios, 4 baños completos, cocina equipada, porche, terraza y jardÃn privado. También cuenta con certificación energética A+ y todos los acabados de alta calidad. Opcionalmente se puede añadir piscina en la amplia parcela de 1.250 m²."},{question:"¿Cuándo estará lista la entrega?",answer:"La construcción está actualmente en fase de estructura. Estimamos que la entrega se realizará en el segundo trimestre de 2025, sujeto a las condiciones climatológicas y permisos correspondientes."},{question:"¿Es posible añadir piscina?",answer:"SÃ, la amplia parcela de 1.250 m² permite la instalación de piscina. Esta opción se puede incluir durante el proceso de construcción o añadir posteriormente. Nuestro equipo puede asesorarte sobre las mejores opciones y costos adicionales."},{question:"¿Qué incluye el precio desde 595.000â¬?",answer:"El precio base incluye la vivienda completa de 200 m² construidos, parcela de 1.250 m², acabados de calida
333d, instalaciones completas y todos los permisos de obra. No incluye piscina, que es opcional, ni muebles. El IVA no está incluido en el precio."},{question:"¿Cómo puedo solicitar más información?",answer:"Puedes contactarnos a través del formulario en esta página, llamando directamente o visitando nuestra oficina. Nuestro equipo estará encantado de resolver todas tus dudas y programar una visita al terreno."}];return d.jsx("section",{id:"faq",className:"py-24 bg-gradient-subtle",children:d.jsxs("div",{className:"max-w-4xl mx-auto px-6",children:[d.jsxs("div",{className:"text-center mb-20",children:[d.jsx("h2",{className:"text-4xl md:text-5xl font-raleway font-bold text-foreground mb-6",children:"Preguntas frecuentes"}),d.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto font-raleway font-medium",children:"Resolvemos las dudas más comunes sobre tu futuro hogar en Ribadesella"})]}),d.jsx(b$,{type:"single",collapsible:!0,className:"space-y-4",children:e.map((t,r)=>d.jsxs(h1,{value:`item-${r}`,className:"bg-card border border-muted/30 rounded-2xl px-6 shadow-sm",children:[d.jsx(f1,{className:"text-left py-6 font-raleway font-bold text-lg text-foreground hover:text-primary",children:t.question}),d.jsx(p1,{className:"pb-6 text-muted-foreground font-raleway leading-relaxed",children:t.answer})]},r))})]})})},_$=()=>{const[e,t]=y.useState({nombre:"",apellidos:"",telefono:"",email:"",mensaje:""}),[r,n]=y.useState(!1),[s,i]=y.useState(!1),[o,a]=y.useState(!1),{toast:l}=ua(),c=e.nombre.trim()&&e.telefono.trim()&&e.email.trim()&&r,h=async p=>{if(p.preventDefault(),!r){l({title:"Error",description:"Debes aceptar la polÃtica de privacidad para continuar.",variant:"destructive"});return}if(!(!c||o)){a(!0);try{const{data:f,error:x}=await ps.functions.invoke("handle-contact-form",{body:{first_name:e.nombre,last_name:e.apellidos,email:e.email,phone_number:e.telefono,comments:e.mensaje,source:"form_ribadesella"}});x?(console.error("Error calling handle-contact-form:",x),l({title:"Error",description:"Hubo un problema al enviar tu solicitud. Inténtalo de nuevo.",variant:"destructive"})):(l({title:"¡Solicitud enviada!",description:"Nos pondremos en contacto contigo en las próximas 24 horas."}),t({nombre:"",apellidos:"",telefono:"",email:"",mensaje:""}),n(!1),i(!1))}catch(f){console.error("Unexpected error:",f),l({title:"Error",description:"Hubo un problema inesperado. Inténtalo de nuevo.",variant:"destructive"})}finally{a(!1)}}},u=p=>{t(f=>({...f,[p.target.name]:p.target.value}))};return d.jsx("section",{id:"contact-form",className:"py-24 bg-background",children:d.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[d.jsxs("div",{className:"text-center mb-20",children:[d.jsx("h2",{className:"text-4xl md:text-5xl font-gazpacho font-bold text-foreground mb-6",children:"¿Quieres más información?"}),d.jsxs("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto font-raleway font-light",children:["Ponte en contacto con nosotros y te enviaremos toda la documentación de esta exclusiva ",d.jsx("strong",{children:"vivienda en Ribadesella"})]})]}),d.jsxs("div",{className:"grid lg:grid-cols-2 gap-16",children:[d.jsxs("div",{className:"space-y-10",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-2xl font-gazpacho font-semibold text-foreground mb-8",children:"Información de contacto"}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center gap-5",children:[d.jsx("div",{className:"bg-primary/10 w-14 h-14 rounded-2xl flex items-center justify-center",children:d.jsx(Pf,{className:"w-7 h-7 text-primary"})}),d.jsxs("div",{children:[d.jsx("div",{className:"font-gazpacho font-medium text-foreground",children:"Email"}),d.jsx("a",{href:"mailto:[email protected]",className:"text-muted-foreground font-raleway hover:text-primary transition-colors cursor-pointer",children:"[email protected]"})]})]}),d.jsxs("div",{className:"flex items-center gap-5",children:[d.jsx("div",{className:"bg-primary/10 w-14 h-14 rounded-2xl flex items-center justify-center",children:d.jsx(Uo,{className:"w-7 h-7 text-primary"})}),d.jsxs("div",{children:[d.jsx("div",{className:"font-gazpacho font-medium text-foreground",children:"Ubicación"}),d.jsxs("div",{className:"text-muted-foreground font-raleway",children:["Tezangos, 2",d.jsx("br",{}),"Ribadesella, Asturias"]})]})]})]})]}),d.jsxs("div",{className:"bg-secondary/30 p-8 rounded-3xl border border-secondary/60",children:[d.jsx("h4",{className:"font-gazpacho font-semibold text-foreground mb-5",children:"¿Qué incluye nuestro dossier informativo?"}),d.jsxs("ul",{className:"space-y-3 text-muted-foreground",children:[d.jsxs("li",{className:"flex items-center gap-3 font-raleway",children:[d.jsx("span",{className:"w-2 h-2 bg-primary rounded-full"}),"Planos arquitectónicos completos"]}),d.jsxs("li",{className:"flex items-center gap-3 font-raleway",children:[d.jsx("span",{className:"w-2 h-2 bg-primary rounded-full"}),"Renders 3D interiores y exteriores"]}),d.jsxs("li",{className:"flex items-center gap-3 font-raleway",children:[d.jsx("span",{className:"w-2 h-2 bg-primary rounded-full"}),"Información financiera detallada"]}),d.jsxs("li",{className:"flex items-center gap-3 font-raleway",children:[d.jsx("span",{className:"w-2 h-2 bg-primary rounded-full"}),"Cronograma de construcción"]}),d.jsxs("li",{className:"flex items-center gap-3 font-raleway",children:[d.jsx("span",{className:"w-2 h-2 bg-primary rounded-full"}),"Documentación legal completa"]})]})]})]}),d.jsx("div",{className:"bg-card p-10 rounded-3xl shadow-premium border border-muted/30",children:d.jsxs("form",{onSubmit:h,className:"space-y-6",children:[d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"nombre",className:"block text-sm font-gazpacho font-medium text-foreground mb-3",children:"Nombre *"}),d.jsx(Vt,{id:"nombre",name:"nombre",type:"text",required:!0,value:e.nombre,onChange:u,className:"w-full h-12 font-raleway",placeholder:"Tu nombre"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"apellidos",className:"block text-sm font-gazpacho font-medium text-foreground mb-3",children:"Apellidos"}),d.jsx(Vt,{id:"apellidos",name:"apellidos",type:"text",value:e.apellidos,onChange:u,className:"w-full h-12 font-raleway",placeholder:"Tus apellidos"})]})]}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"telefono",className:"block text-sm font-gazpacho font-medium text-foreground mb-3",children:"Teléfono *"}),d.jsx(Vt,{id:"telefono",name:"telefono",type:"tel",required:!0,value:e.telefono,onChange:u,className:"w-full h-12 font-raleway",placeholder:"984 123 456"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"email",className:"block text-sm font-gazpacho font-medium text-foreground mb-3",children:"Email *"}),d.jsx(Vt,{id:"email",name:"email",type:"email",required:!0,value:e.email,onChange:u,className:"w-full h-12 font-raleway",placeholder:"[email protected]"})]})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"mensaje",className:"block text-sm font-gazpacho font-medium text-foreground mb-3",children:"Mensaje"}),d.jsx(Gf,{id:"mensaje",name:"mensaje",rows:4,value:e.mensaje,onChange:u,className:"w-full font-raleway resize-none",placeholder:"Cuéntanos más detalles de lo que estás buscando para que podamos ayudarte"})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-start space-x-3",children:[d.jsx(qo,{id:"policy",checked:r,onCheckedChange:p=>n(p===!0),className:"mt-1"}),d.jsxs("label",{htmlFor:"policy",className:"text-sm text-muted-foreground font-raleway leading-relaxed",children:["He leÃdo y acepto la"," ",d.jsx("a",{href:"#",className:"text-foreground underline hover:no-underline",children:"PolÃtica de privacidad"}),".*"]})]}),d.jsxs("div",{className:"flex items-start space-x-3",children:[d.jsx(qo,{id:"news",checked:s,onCheckedChange:p=>i(p===!0),className:"mt-1"}),d.jsx("label",{htmlFor:"news",className:"text-sm text-muted-foreground font-raleway leading-relaxed",children:"Deseo re
333cibir novedades sobre nuevos proyectos y promociones."})]})]}),d.jsxs(dr,{type:"submit",disabled:!c||o,className:`w-full h-14 text-lg font-raleway font-semibold rounded-lg transition-all duration-200 flex items-center justify-center gap-2 ${c&&!o?"text-white shadow-lg":"cursor-not-allowed"}`,style:{backgroundColor:c&&!o?"#2B433A":"#D2D7D3",color:c&&!o?"white":"#6B7280"},children:[d.jsx(xw,{className:"w-5 h-5"}),o?"Enviando...":"Enviar"]}),d.jsx("p",{className:"text-xs text-muted-foreground text-center font-raleway leading-relaxed",children:"Al enviar este formulario, aceptas ser contactado por nuestro equipo comercial"})]})})]})]})})};function S$(e,[t,r]){return Math.min(r,Math.max(t,e))}function E$(e,t){return y.useReducer((r,n)=>t[r][n]??r,e)}var dp="ScrollArea",[m1,v4]=Mr(dp),[k$,Pt]=m1(dp),g1=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,l]=y.useState(null),[c,h]=y.useState(null),[u,p]=y.useState(null),[f,x]=y.useState(null),[m,b]=y.useState(null),[v,g]=y.useState(0),[w,_]=y.useState(0),[S,E]=y.useState(!1),[C,T]=y.useState(!1),R=ge(t,B=>l(B)),P=Xx(s);return d.jsx(k$,{scope:r,type:n,dir:P,scrollHideDelay:i,scrollArea:a,viewport:c,onViewportChange:h,content:u,onContentChange:p,scrollbarX:f,onScrollbarXChange:x,scrollbarXEnabled:S,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:C,onScrollbarYEnabledChange:T,onCornerWidthChange:g,onCornerHeightChange:_,children:d.jsx(se.div,{dir:P,...o,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});g1.displayName=dp;var v1="ScrollAreaViewport",y1=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...i}=e,o=Pt(v1,r),a=y.useRef(null),l=ge(t,a,o.onViewportChange);return d.jsxs(d.Fragment,{children:[d.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}),d.jsx(se.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:d.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});y1.displayName=v1;var mr="ScrollAreaScrollbar",hp=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Pt(mr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return y.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?d.jsx(C$,{...n,ref:t,forceMount:r}):s.type==="scroll"?d.jsx(T$,{...n,ref:t,forceMount:r}):s.type==="auto"?d.jsx(w1,{...n,ref:t,forceMount:r}):s.type==="always"?d.jsx(fp,{...n,ref:t}):null});hp.displayName=mr;var C$=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Pt(mr,e.__scopeScrollArea),[i,o]=y.useState(!1);return y.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),o(!0)},h=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",h),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",h)}}},[s.scrollArea,s.scrollHideDelay]),d.jsx(Nt,{present:r||i,children:d.jsx(w1,{"data-state":i?"visible":"hidden",...n,ref:t})})}),T$=y.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Pt(mr,e.__scopeScrollArea),i=e.orientation==="horizontal",o=Qc(()=>l("SCROLL_END"),100),[a,l]=E$("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 y.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,s.scrollHideDelay,l]),y.useEffect(()=>{const c=s.viewport,h=i?"scrollLeft":"scrollTop";if(c){let u=c[h];const p=()=>{const f=c[h];u!==f&&(l("SCROLL"),o()),u=f};return c.addEventListener("scroll",p),()=>c.removeEventListener("scroll",p)}},[s.viewport,i,l,o]),d.jsx(Nt,{present:r||a!=="hidden",children:d.jsx(fp,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ne(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ne(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),w1=y.forwardRef((e,t)=>
vendor: 4,774 bytes, line 333
333{const r=Pt(mr,e.__scopeScrollArea),{forceMount:n,...s}=e,[i,o]=y.useState(!1),a=e.orientation==="horizontal",l=Qc(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,h=r.viewport.offsetHeight<r.viewport.scrollHeight;o(a?c:h)}},10);return ji(r.viewport,l),ji(r.content,l),d.jsx(Nt,{present:n||i,children:d.jsx(fp,{"data-state":i?"visible":"hidden",...s,ref:t})})}),fp=y.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=Pt(mr,e.__scopeScrollArea),i=y.useRef(null),o=y.useRef(0),[a,l]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=E1(a.viewport,a.content),h={...n,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:p=>o.current=p};function u(p,f){return O$(p,o.current,a,f)}return r==="horizontal"?d.jsx(R$,{...h,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const p=s.viewport.scrollLeft,f=vv(p,a,s.dir);i.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:p=>{s.viewport&&(s.viewport.scrollLeft=p)},onDragScroll:p=>{s.viewport&&(s.viewport.scrollLeft=u(p,s.dir))}}):r==="vertical"?d.jsx(j$,{...h,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const p=s.viewport.scrollTop,f=vv(p,a);i.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:p=>{s.viewport&&(s.viewport.scrollTop=p)},onDragScroll:p=>{s.viewport&&(s.viewport.scrollTop=u(p))}}):null}),R$=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=Pt(mr,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),c=ge(t,l,i.onScrollbarXChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),d.jsx(x1,{"data-orientation":"horizontal",...s,ref:c,sizes:r,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":Gc(r)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,u)=>{if(i.viewport){const p=i.viewport.scrollLeft+h.deltaX;e.onWheelScroll(p),C1(p,u)&&h.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:uc(o.paddingLeft),paddingEnd:uc(o.paddingRight)}})}})}),j$=y.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,i=Pt(mr,e.__scopeScrollArea),[o,a]=y.useState(),l=y.useRef(null),c=ge(t,l,i.onScrollbarYChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),d.jsx(x1,{"data-orientation":"vertical",...s,ref:c,sizes:r,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":Gc(r)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,u)=>{if(i.viewport){const p=i.viewport.scrollTop+h.deltaY;e.onWheelScroll(p),C1(p,u)&&h.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:uc(o.paddingTop),paddingEnd:uc(o.paddingBottom)}})}})}),[N$,b1]=m1(mr),x1=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:h,onResize:u,...p}=e,f=Pt(mr,r),[x,m]=y.useState(null),b=ge(t,R=>m(R)),v=y.useRef(null),g=y.useRef(""),w=f.viewport,_=n.content-n.viewport,S=Ue(h),E=Ue(l),C=Qc(u,10);function T(R){if(v.current){const P=R.clientX-v.current.left,B=R.clientY-v.current.top;c({x:P,y:B})}}return y.useEffect(()=>{const R=P=>{const B=P.target;(x==null?void 0:x.contains(B))&&S(P,_)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[w,x,_,S]),y.useEffect(E,[n,E]),ji(x,C),ji(f.content,C),d.jsx(N$,{scope:r,scrollbar:x,hasThumb:s,onThumbChange:Ue(i),onThumbPointerUp:Ue(o),onThumbPositionChange:E,onThumbPointerDown:Ue(a),children:d.jsx(se.div,{...p,ref:b,style:{position:"absolute",...p.style},onPointerDown:ne(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),v.current=x.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),T(R))}),onPointerMove:ne(e.onPointerMove,T),onPointerUp:ne(e.onPointerUp,R=>{const P=R.target;P.hasPointerCapture(R.pointerId)&&P.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=g.current,f.viewport&&(f.viewport.style.scrollBehavior=""),v.current=null})})})}),cc="ScrollAreaThumb",_1=y.forwardRef((e,t)=>
vendor: 8,174 bytes, lines 333-339
333{const{forceMount:r,...n}=e,s=b1(cc,e.__scopeScrollArea);return d.jsx(Nt,{present:r||s.hasThumb,children:d.jsx(P$,{ref:t,...n})})}),P$=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,i=Pt(cc,r),o=b1(cc,r),{onThumbPositionChange:a}=o,l=ge(t,u=>o.onThumbChange(u)),c=y.useRef(void 0),h=Qc(()=>{c.current&&(c.current(),c.current=void 0)},100);return y.useEffect(()=>{const u=i.viewport;if(u){const p=()=>{if(h(),!c.current){const f=I$(u,a);c.current=f,a()}};return a(),u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[i.viewport,h,a]),d.jsx(se.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)",...n},onPointerDownCapture:ne(e.onPointerDownCapture,u=>{const f=u.target.getBoundingClientRect(),x=u.clientX-f.left,m=u.clientY-f.top;o.onThumbPointerDown({x,y:m})}),onPointerUp:ne(e.onPointerUp,o.onThumbPointerUp)})});_1.displayName=cc;var pp="ScrollAreaCorner",S1=y.forwardRef((e,t)=>{const r=Pt(pp,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?d.jsx(A$,{...e,ref:t}):null});S1.displayName=pp;var A$=y.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=Pt(pp,r),[i,o]=y.useState(0),[a,l]=y.useState(0),c=!!(i&&a);return ji(s.scrollbarX,()=>{var u;const h=((u=s.scrollbarX)==null?void 0:u.offsetHeight)||0;s.onCornerHeightChange(h),l(h)}),ji(s.scrollbarY,()=>{var u;const h=((u=s.scrollbarY)==null?void 0:u.offsetWidth)||0;s.onCornerWidthChange(h),o(h)}),c?d.jsx(se.div,{...n,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 uc(e){return e?parseInt(e,10):0}function E1(e,t){const r=e/t;return isNaN(r)?0:r}function Gc(e){const t=E1(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function O$(e,t,r,n="ltr"){const s=Gc(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,h=r.content-r.viewport,u=n==="ltr"?[0,h]:[h*-1,0];return k1([l,c],u)(e)}function vv(e,t,r="ltr"){const n=Gc(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],c=S$(e,l);return k1([0,o],[0,a])(c)}function k1(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function C1(e,t){return e>0&&e<t}var I$=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Qc(e,t){const r=Ue(e),n=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(n.current),[]),y.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ji(e,t){const r=Ue(t);Qt(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var T1=g1,L$=y1,$$=S1;const R1=y.forwardRef(({className:e,children:t,...r},n)=>d.jsxs(T1,{ref:n,className:_e("relative overflow-hidden",e),...r,children:[d.jsx(L$,{className:"h-full w-full rounded-[inherit]",children:t}),d.jsx(j1,{}),d.jsx($$,{})]}));R1.displayName=T1.displayName;const j1=y.forwardRef(({className:e,orientation:t="vertical",...r},n)=>d.jsx(hp,{ref:n,orientation:t,className:_e("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),...r,children:d.jsx(_1,{className:"relative flex-1 rounded-full bg-border"})}));j1.displayName=hp.displayName;const Qu=768;function N1(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Qu-1}px)`),n=()=>{t(window.innerWidth<Qu)};return r.addEventListener("change",n),t(window.innerWidth<Qu),()=>r.removeEventListener("change",n)},[]),!!e}const D$="/assets/ribadesella-cocina-grafito-BwMIb5EM.png",M$="/assets/ribadesella-cocina-roble-B1iuwk9i.png",U$="/assets/ribadesella-cocina-calacatta-DZGJGDmM.png",F$="/assets/ribadesella-bano-grafito-B1gkfGVL.png",z$="/assets/ribadesella-bano-beige-CWQCF0KS.png",B$="/assets/ribadesella-bano-perla-BTNzsz37.png",yv=(e,t)=>{const r=()=>Math.random().toString(36).substr(2,9);switch(e){case"initial":return[{id:r(),type:"bot",content:"Hola ð Soy el asistente de Findnido para la vivienda unifamiliar de Ribadesella."},{id:r(),type:"bot",content:"¿Te gustarÃa recibir más información sobre esta vivienda con vistas al mar?",options:[{label:"SÃ, quiero más información",value:"yes-info"},{label:"Solo estoy mirando",value:"just-looking"}]}];case"just-looking":return[{id:r(),type:"bot",content:"¡Sin problema! Te cuento lo esencial: esta vivienda tiene vistas al mar, parcela privada de 1.250 m² y 200 m² construidos con certificación energética A+."},{id:r(),type:"bot",content:"¿Te gustarÃa conocer más detalles?",options:[{label:"SÃ, cuéntame más",value:"yes-info"},{label:"No, gracias",value:"no-thanks"}]}];case"intended-use":return[{id:r(),type:"bot",content:"¿Para qué estás valorando esta vivienda?",options:[{label:"Vivienda habitual",value:"habitual"},{label:"Segunda residencia",value:"segunda-residencia"},{label:"Inversión",value:"inversion"},{label:"Aún no lo tengo claro",value:"no-claro"}]}];case"model-presentation":return[{id:r(),type:"bot",content:"En Ribadesella ofrecemos una vivienda unifamiliar exclusiva, diseñada para disfrutar del entorno natural, la privacidad y el confort durante todo el año.",showCard:!0},{id:r(),type:"bot",content:"¿Te gustarÃa personalizarla?",options:[{label:"Quiero personalizarla",value:"customize"}]}];case"kitchen-finish":return[{id:r(),type:"bot",content:"Vamos a personalizarla. ¿Qué estilo de cocina encaja más contigo?",imageOptions:[{label:"Grafito (Básica)",value:"grafito",image:D$},{label:"Roble (Medium)",value:"roble",image:M$},{label:"Blanco Calacatta (Premium)",value:"calacatta",image:U$}]}];case"bathroom-finish":return[{id:r(),type:"bot",content:"¿Qué acabado prefieres para los baños?",imageOptions:[{label:"Grafito (Básica)",value:"grafito",image:F$},{label:"Beige (Media)",value:"beige",image:z$},{label:"Perla (Premium)",value:"perla",image:B$}]}];case"pool-option":return[{id:r(),type:"bot",content:"¿Te interesarÃa añadir piscina privada a la vivienda?",options:[{label:"SÃ, me interesa",value:"yes-pool"},{label:"No, no la necesito",value:"no-pool"},{label:"Quiero más información",value:"info-pool"}]}];case"pool-info":return[{id:r(),type:"bot",content:"La piscina privada es una opción que se puede adaptar perfectamente al proyecto. Nuestro equipo puede asesorarte sobre las mejores opciones según tus preferencias."},{id:r(),type:"bot",content:"¿Continuamos con la configuración?",options:[{label:"SÃ, continuemos",value:"continue"}]}];case"key-info":return[{id:r(),type:"bot",content:`ð **Ubicación privilegiada** en Ribadesella: mar y montaña a tu alcance. 334 335ðï¸ **Calidad constructiva Findnido**: materiales premium y atención al detalle. 336 337â¡ **Eficiencia energética A+**: bajo consumo y sostenibilidad. 338 339ð¤ **Acompañamiento integral**: te guiamos durante todo el proceso.`},{id:r(),type:"bot",content:"¿Qué te gustarÃa hacer ahora?",options:[{label:"Perfecto, seguimos",value:"continue"},{label:"Quiero que me expliquéis mejor el proceso",value:"explain-process"}]}];case"process-info":return[{id:r(),type:"bot",content:"En Findnido trabajamos con total **transparencia**. Tendrás control sobre cada fase del proyecto, con un seguimiento personalizado y comunicación constante. Nuestro objetivo es que disfrutes del proceso tanto como del resultado final."},{id:r(),type:"bot",content:"¿Continuamos?",options:[{label:"SÃ, continuemos",value:"continue"}]}];case"collect-name":return[{id:r(),type:"bot",content:"Para enviarte el dosier completo (planos, renders, memoria de calida
339des) y contactar contigo sin compromiso, necesito algunos datos."},{id:r(),type:"bot",content:"¿Cuál es tu nombre?",showInput:!0,inputType:"text",inputPlaceholder:"Escribe tu nombre..."}];case"collect-email":return[{id:r(),type:"bot",content:`Encantado, ${t.name}. ¿Cuál es tu email?`,showInput:!0,inputType:"email",inputPlaceholder:"[email protected]"}];case"collect-phone":return[{id:r(),type:"bot",content:"¿Y tu teléfono de contacto?",showInput:!0,inputType:"tel",inputPlaceholder:"+34 600 000 000"}];case"summary":const n=t.poolInterest==="yes-pool"?"SÃ":t.poolInterest==="no-pool"?"No":"Info solicitada",s={habitual:"Vivienda habitual","segunda-residencia":"Segunda residencia",inversion:"Inversión","no-claro":"Por decidir"}[t.intendedUse]||t.intendedUse,i={grafito:"Grafito (Básica)",roble:"Roble (Medium)",calacatta:"Blanco Calacatta (Premium)"}[t.kitchenFinish]||t.kitchenFinish,o={grafito:"Grafito (Básica)",beige:"Beige (Media)",perla:"Perla (Premium)"}[t.bathroomFinish]||t.bathroomFinish;return[{id:r(),type:"bot",content:`**Resumen de tu configuración:** 340 341ð **Vivienda:** Unifamiliar Findnido en Ribadesella (200 m²) 342ð¯ **Uso previsto:** ${s} 343ð³ **Cocina:** ${i} 344ð¿ **Baños:** ${o} 345ð **Piscina:** ${n} 346 347ð¤ **Nombre:** ${t.name} 348ð§ **Email:** ${t.email} 349ð± **Teléfono:** ${t.phone}`},{id:r(),type:"bot",content:"¿Está todo correcto?",options:[{label:"SÃ, todo correcto",value:"correct"},{label:"Quiero modificar algo",value:"modify"}]}];case"final-decision":return[{id:r(),type:"bot",content:"Si ya lo tienes claro, ahora puedes hacer una pre-reserva para que nadie más se la quede mientras te enviamos la información completa."},{id:r(),type:"bot",content:`**¿Qué te garantiza la pre-reserva?** 350 351â Una posición prioritaria en el orden de reserva de la vivienda seleccionada. 352 353â Preferencia para formalizar la reserva cuando el proyecto esté confirmado. 354 355â Si finalmente la vivienda no puede ofrecerse, puedes mantener tu prioridad en otra promoción similar o recuperar tu dinero (descontando únicamente la comisión de pago).`},{id:r(),type:"bot",content:"Antes de continuar, revisa nuestros términos y condiciones.",link:{text:"Ver términos y condiciones",url:"/terminos-y-condiciones"}},{id:r(),type:"bot",content:"¿Qué te gustarÃa hacer?",options:[{label:"Quiero hacer una prereserva",value:"prereserva",action:"open-link",actionUrl:"https://checkout.revolut.com/pay/c42a56c9-986f-4e31-8de4-111c612f1ba4"},{label:"Prefiero que me llaméis antes",value:"llamada"},{label:"Solo quiero recibir la información",value:"info"}]}];case"thank-you":const a={prereserva:"¡Excelente decisión! Nos pondremos en contacto contigo muy pronto para formalizar la prereserva.",llamada:"Perfecto, te llamaremos en breve para resolver todas tus dudas.",info:"Te enviaremos toda la información a tu email. ¡Gracias por tu interés!"}[t.finalDecision]||"¡Gracias por tu interés!";return[{id:r(),type:"bot",content:`${a} 356 357¡Gracias por confiar en Findnido! ð¡`}];default:return[]}},Ju=(e,t)=>{switch(e){case"initial":return t==="yes-info"?"intended-use":"just-looking";case"just-looking":return t==="yes-info"?"intended-use":"thank-you";case"intended-use":return"model-presentation";case"model-presentation":return"kitchen-finish";case"kitchen-finish":return"bathroom-finish";case"bathroom-finish":return"pool-option";case"pool-option":return t==="info-pool"?"pool-info":"key-info";case"pool-info":return"key-info";case"key-info":return t==="explain-process"?"process-info":"collect-name";case"process-info":return"collect-name";case"collect-name":return"collect-email";case"collect-email":return"collect-phone";case"collect-phone":return"summary";case"summary":return t==="correct"?"final-decision":"kitchen-finish";case"final-decision":return"thank-you";default:return e}},H$="/assets/ribadesella-exterior-C4ASByH-.png",W$=()=>d.jsx("div",{className:"w-full md:w-[50%]",children:d.jsxs("div",{className:"bg-background rounded-xl border border-border overflow-hidden shadow-sm max-h-[60vh] md:max-h-none",children:[d.jsxs("div",{className:"relative h-32 md:h-auto md:aspect-[4/3]",children:[d.jsx("img",{src:H$,alt:"Vivienda Ribadesella",className:"w-full h-full object-cover"}),d.jsx("div",{className:"absolute top-2 right-2 bg-primary text-primary-foreground text-sm md:text-base px-2.5 md:px-3 py-1 md:py-1.5 rounded-full font-semibold",children:"A+"})]}),d.jsxs("div",{className:"p-3 md:p-4",children:[d.jsx("h4",{className:"font-bold text-base md:text-lg text-foreground mb-2 md:mb-3",children:"Vivienda Unifamiliar - 200 m²"}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 md:gap-4 text-xs md:text-sm text-foreground mb-3 md:mb-4",children:[d.jsxs("div",{className:"flex items-center gap-1.5 md:gap-2",children:[d.jsx(yw,{className:"w-3.5 h-3.5 md:w-4 md:h-4 text-muted-foreground"}),d.jsx("span",{children:"4 dormitorios"})]}),d.jsxs("div",{className:"flex items-center gap-1.5 md:gap-2",children:[d.jsx(hk,{className:"w-3.5 h-3.5 md:w-4 md:h-4 text-muted-foreground"}),d.jsx("span",{children:"4 baños"})]}),d.jsxs("div",{className:"flex items-center gap-1.5 md:gap-2",children:[d.jsx(Ek,{className:"w-3.5 h-3.5 md:w-4 md:h-4 text-muted-foreground"}),d.jsx("span",{children:"Parcela 1.250 m²"})]}),d.jsxs("div",{className:"flex items-center gap-1.5 md:gap-2",children:[d.jsx(Ck,{className:"w-3.5 h-3.5 md:w-4 md:h-4 text-muted-foreground"}),d.jsx("span",{children:"Vistas al mar"})]})]}),d.jsx("p",{className:"text-[10px] md:text-xs text-muted-foreground",children:"Facha
357da con sistema SATE ⢠Arquitectura moderna y eficiente"})]})]})}),V$=({message:e,onOptionSelect:t,onImageOptionSelect:r,isLatest:n=!1})=>{const s=e.type==="bot",i=N1(),[o,a]=y.useState(null),l=u=>u.split(/(\*\*.*?\*\*)/g).map((f,x)=>f.startsWith("**")&&f.endsWith("**")?d.jsx("strong",{className:"font-semibold",children:f.slice(2,-2)},x):f.split(` 358`).map((m,b)=>d.jsxs(O.Fragment,{children:[b>0&&d.jsx("br",{}),m]},`${x}-${b}`))),c=u=>{i?a(u):r==null||r(u.value,e.id)},h=()=>{o&&(r==null||r(o.value,e.id),a(null))};return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:`flex ${s?"justify-start":"justify-end"}`,children:d.jsxs("div",{className:`${s?"w-full":""}`,children:[d.jsx("div",{className:`px-4 py-3 rounded-2xl text-sm leading-relaxed ${s?"bg-[#E8E8E8] text-foreground rounded-tl-sm":"bg-primary text-primary-foreground rounded-tr-sm"}`,children:l(e.content)}),e.link&&d.jsxs($r,{to:e.link.url,target:"_blank",className:"mt-2 inline-flex items-center gap-1.5 text-sm text-primary hover:text-primary/80 underline underline-offset-2 transition-colors",children:[e.link.text,d.jsx(bk,{className:"w-3.5 h-3.5"})]}),e.showCard&&d.jsx("div",{className:"mt-3",children:d.jsx(W$,{})}),e.options&&n&&d.jsx("div",{className:"mt-3 mb-6 space-y-2",children:e.options.map(u=>d.jsx("button",{onClick:()=>{u.action==="open-link"&&u.actionUrl&&window.open(u.actionUrl,"_blank"),t==null||t(u.value)},className:"w-full px-4 py-2.5 text-sm font-medium text-primary bg-background border border-primary/30 rounded-xl hover:bg-primary/5 transition-colors text-left",children:u.label},u.value))}),e.imageOptions&&d.jsx("div",{className:"mt-3 mb-6 grid grid-cols-3 gap-2",children:e.imageOptions.map(u=>{const p=e.selectedImageOption===u.value;return d.jsxs("button",{onClick:()=>c(u),className:`group relative flex flex-col overflow-hidden rounded-xl border-2 transition-all duration-200 bg-background cursor-pointer ${p?"border-primary ring-2 ring-primary shadow-lg shadow-primary/25 scale-[1.02]":"border-border hover:border-primary/50"}`,children:[p&&d.jsx("div",{className:"absolute top-2 right-2 z-10 w-6 h-6 bg-primary rounded-full flex items-center justify-center",children:d.jsx("span",{className:"text-primary-foreground text-sm font-bold",children:"â"})}),d.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:d.jsx("img",{src:u.image,alt:u.label,className:`w-full h-full object-cover transition-transform duration-300 ${p?"":"group-hover:scale-105"}`})}),d.jsx("div",{className:`p-2 text-xs md:text-base font-medium text-center transition-colors ${p?"text-primary font-semibold":"text-foreground"}`,children:u.label})]},u.value)})})]})}),o&&i&&d.jsx("div",{className:"fixed inset-0 z-[100] bg-black/80 flex flex-col items-center justify-center p-4",onClick:()=>a(null),children:d.jsxs("div",{className:"relative w-full max-w-sm bg-background rounded-2xl overflow-hidden shadow-2xl",onClick:u=>u.stopPropagation(),children:[d.jsx("button",{onClick:()=>a(null),className:"absolute top-3 right-3 z-10 p-1.5 bg-black/50 rounded-full text-white hover:bg-black/70 transition-colors","aria-label":"Cerrar",children:d.jsx(Nc,{className:"w-5 h-5"})}),d.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:d.jsx("img",{src:o.image,alt:o.label,className:"w-full h-full object-cover"})}),d.jsxs("div",{className:"p-4 space-y-3",children:[d.jsx("h3",{className:"text-lg font-semibold text-center text-foreground",children:o.label}),d.jsx(dr,{onClick:h,className:"w-full",size:"lg",children:"Seleccionar"})]})]})})]})},q$="https://oovsenoqllohheqlhuqq.supabase.co",K$="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9vdnNlbm9xbGxvaGhlcWxodXFxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjI2MDAwODMsImV4cCI6MjAzODE3NjA4M30.gC9ZjcZ7lRio3XQiq0vVscVr51GnBG_OtLaBmZ8i0HY",Yu=Bx(q$,K$),G$={intendedUse:{question:"¿Para qué uso?",options:{habitual:"Vivienda habitual","segunda-residencia":"Segunda residencia",inversion:"Inversión","no-claro":"Por decidir"},type:"select"},kitchenFinish:{question:"Acabado de cocina",options:{grafito:"Grafito (Básica)",roble:"Roble (Medium)",calacatta:"Blanco Calacatta (Premium)"},type:"image-select"},bathroomFinish:{question:"Acabado de baños",options:{grafito:"Grafito (Básica)",beige:"Be
358ige (Media)",perla:"Perla (Premium)"},type:"image-select"},poolInterest:{question:"¿Interés en piscina?",options:{"yes-pool":"SÃ, me interesa","no-pool":"No, no la necesito","info-pool":"Quiero más información"},type:"select"},finalDecision:{question:"Decisión final",options:{prereserva:"Quiero hacer una prereserva",llamada:"Prefiero que me llaméis antes",info:"Solo quiero recibir la información"},type:"select"},name:{question:"Nombre",type:"text"},email:{question:"Email",type:"email"},phone:{question:"Teléfono",type:"tel"}},Xu={name:/name/i,email:/email/i,phone:/phone|tel/i};function Q$(e){const t=[],r={name:"",email:"",phone:""},n={};return Object.keys(e).forEach(s=>{var a;const i=e[s];if(!i)return;n[s]=i,Xu.name.test(s)&&(r.name=i),Xu.email.test(s)&&(r.email=i),Xu.phone.test(s)&&(r.phone=i);const o=G$[s];if(o){const l=((a=o.options)==null?void 0:a[i])||i;t.push({step_key:s,question:o.question,answer_label:l,answer_value:i,type:o.type})}}),{meta:{form_id:"landing-chatbot-v1",submitted_at:new Date().toISOString(),url_source:typeof window<"u"?window.location.href:""},contact:r,transcript:t,raw_data:n}}function J$(e){const t=e.trim().split(" ");return{firstName:t[0]||"",lastName:t.slice(1).join(" ")||""}}async function Y$(e){try{const t=Q$(e),{firstName:r,lastName:n}=J$(e.name),s=new Date().toISOString(),{data:i,error:o}=await Yu.from("leads").select("id, first_name, last_name, phone_number").eq("email",e.email.toLowerCase().trim()).limit(1).single();if(o&&o.code!=="PGRST116")throw console.error("Error checking existing lead:",o),new Error("Error al verificar el lead");if(i){const a={form_data:t,last_contact:s,updated_at:s};r&&(!i.first_name||i.first_name.trim()==="")&&(a.first_name=r),n&&(!i.last_name||i.last_name.trim()==="")&&(a.last_name=n),e.phone&&(!i.phone_number||i.phone_number.trim()==="")&&(a.phone_number=e.phone);const{error:l}=await Yu.from("leads").update(a).eq("id",i.id);if(l)throw console.error("Error updating lead:",l),new Error("Error al actualizar el lead");return console.log("Lead updated successfully:",i.id),{success:!0,leadId:i.id,isUpdate:!0}}else{const a={email:e.email.toLowerCase().trim(),first_name:r,last_name:n,phone_number:e.phone||null,form_data:t,source:"form_ribadesella",buyer_persona:"Cliente - Promociones",last_contact:s,status:"new"},{data:l,error:c}=await Yu.from("leads").insert(a).select("id").single();if(c)throw console.error("Error inserting lead:",c),new Error("Error al crear el lead");return console.log("Lead created successfully:",l==null?void 0:l.id),{success:!0,leadId:l==null?void 0:l.id,isUpdate:!1}}}catch(t){return console.error("submitLead error:",t),{success:!1,error:t instanceof Error?t.message:"Error desconocido"}}}const X$=()=>{const{toast:e}=ua(),[t,r]=y.useState(!1),[n,s]=y.useState(!1),[i,o]=y.useState(!1),[a,l]=y.useState("initial"),[c,h]=y.useState([]),[u,p]=y.useState(""),[f,x]=y.useState({intendedUse:"",kitchenFinish:"",bathroomFinish:"",poolInterest:"",name:"",email:"",phone:"",finalDecision:""}),m=N1(),b=y.useRef(null),v=y.useRef(null);y.useEffect(()=>{if(i)return;const N=()=>{const $=window.scrollY,L=document.documentElement.scrollHeight-window.innerHeight,q=$/L*100;m?q>=50&&(r(!0),o(!0)):$>=300&&(r(!0),o(!0))};return window.addEventListener("scroll",N),()=>window.removeEventListener("scroll",N)},[m,i]),y.useEffect(()=>{if(t&&c.length===0){const N=yv("initial",f);h(N)}t&&m&&s(!0)},[t,m]),y.useEffect(()=>{w()},[c]),y.useEffect(()=>{const N=c[c.length-1];N!=null&&N.showInput&&v.current&&setTimeout(()=>{var $;return($=v.current)==null?void 0:$.focus()},100)},[c]);const g=N=>{const $={id:Math.random().toString(36).substr(2,9),type:"user",content:N};h(L=>[...L,$])},w=()=>{[50,150,300].forEach(N=>{setTimeout(()=>{if(b.current){const $=b.current.querySelector("[data-radix-scroll-area-viewport]");$?$.scrollTop=$.scrollHeight:b.current.scrollTop=b.current.scrollHeight}},N)})},_=(N,$)=>{setTimeout(()=>{const L=yv(N,$);h(q=>[...q,...L]),l(N),w()},500)},S=N=>{var Q;const L=(Q=c[c.length-1].options)==null?void 0:Q.find(j=>j.value===N);L&&g(L.label),N==="yes-info"&&a==="initial"&&s(!0);let q={...f};a==="intended-use"?q.intendedUse=N:a==="pool-option"?q.poolInterest=N:a==="final-decision"&&(q.finalDecision=N,T(q)),x(q);const K=Ju(a,N);_(K,q)},E=(N,$)=>{var A,M;const L=c.find(W=>W.id===$);if(!L)return;const q=(A=L.imageOptions)==null?void 0:A.find(W=>W.value===N),K=!L.selectedImageOption;h(W=>W.map(H=>H.id===$?{...H,selectedImageOption:N}:H));const Q=(M=L.imageOptions)==null?void 0:M.some(W=>W.value.includes("grafito")||W.value.includes("roble")||W.value.includes("calacatta"));let j={...f};if(Q?j.kitchenFinish=N:j.bathroomFinish=N,x(j),K&&q){g(q.label);const W=Ju(a,N);_(W,j)}},C=N=>{if(N.preventDefault(),!u.trim())return;g(u);let $={...f};a==="collect-name"?$.name=u:a==="collect-email"?$.email=u:a==="collect-phone"&&($.phone=u),x($),p("");const L=Ju(a,u);_(L,$)},T=async N=>{const $=await Y$(N);$.success?(e({title:$.isUpdate?"Datos actualizados":"¡Gracias por tu interés!",description:"Hemos recibido tu información correctamente."}),console.log("Lead submitted:",$.leadId,$.isUpdate?"(updated)":"(created)")):(e({title:"Error",description:$.error||"No se pudo enviar la información.",variant:"destructive"}),console.error("Lead submission failed:",$.error))},R=()=>{r(!1),s(!1)},P=c[c.length-1],B=P==null?void 0:P.showInput;return d.jsxs(d.Fragment,{children:[!t&&d.jsx("button",{onClick:()=>r(!0),className:"fixed bottom-6 right-6 z-50 w-14 h-14 bg-primary text-primary-foreground rounded-full shadow-lg flex items-center justify-center hover:bg-primary/90 transition-colors animate-bounce","aria-label":"Abrir chat",children:d.jsx(kk,{className:"w-6 h-6"})}),t&&d.jsxs("div",{className:`fixed z-50 bg-background shadow-2xl flex flex-col transition-all duration-300 ${n?"inset-0 rounded-none":m?"bottom-0 left-0 right-0 h-[70vh] rounded-t-2xl":"bottom-6 right-6 w-[380px] h-[600px] rounded-2xl"}`,children:[d.jsxs("div",{className:`bg-primary text-primary-foreground px-4 py-3 flex items-center justify-between shrink-0 ${n?"":"rounded-t-2xl"}`,children:[d.jsx("h3",{className:"font-semibold text-sm",children:"Te ayudamos a configurar tu casa en Ribadesella"}),d.jsx("button",{onClick:R,className:"p-1 hover:bg-white/20 rounded-full transition-colors","aria-label":"Cerrar chat",children:d.jsx(Nc,{className:"w-5 h-5"})})]}),d.jsx(R1,{className:"flex-1 p-4",ref:b,children:d.jsx("div",{className:"space-y-4",children:c.map((N,$)=>d.jsx(V$,{message:N,onOptionSelect:S,onImageOptionSelect:E,isLatest:$===c.length-1},N.id))})}),B&&d.jsx("form",{onSubmit:C,className:"p-4 mb-6 border-t border-border shrink-0",children:d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Vt,{ref:v,type:P.inputType||"text",value:u,onChange:N=>p(N.target.value),placeholder:P.inputPlaceholder,className:"flex-1"}),d.jsx(dr,{type:"submit",size:"sm",className:"px-4",children:"Enviar"})]})})]})]})},Z$=()=>d.jsxs("div",{className:"min-h-screen",children:[d.jsx(UO,{}),d.jsx(FO,{}),d.jsx(zO,{}),d.jsx(BO,{}),d.jsx(VL,{}),d.jsx(GL,{}),d.jsx(YL,{}),d.jsx(XL,{}),d.jsx(ZL,{}),d.jsx(e$,{}),d.jsx(x$,{}),d.jsx(_$,{}),d.jsx(X$,{})]}),e4=()=>{const{data:e=[],isLoading:t,error:r}=yb({queryKey:["blog-posts-ribadesella"],queryFn:async()=>{const{data:n,error:s}=await ps.from("blog_clients").select("id").eq("name","ribadesella").maybeSingle();if(s)throw s;if(!n)return[];const{data:i,error:o}=await ps.from("blog_posts").select("id, title_es, excerpt_es, image_url, slug, published_at").eq("blog_client",n.id).eq("status","published").order("published_at",{ascending:!1});if(o)throw o;return i||[]}});return d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx("header",{className:"bg-card border-b border-border",children:d.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-6",children:[d.jsxs($r,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors font-raleway text-sm mb-6",children:[d.jsx(Mo,{className:"w-4 h-4"}),"Volver al proyecto"]}),d.jsx("h1",{className:"text-4xl md:text-5xl font-raleway font-bold text-foreground",children:"Blog"}),d.jsx("p",{className:"text-lg text-muted-foreground mt-3 font-raleway",children:"Noticias y actualizaciones sobre el proyecto Ribadesella"})]})}),d.jsx("main",{className:"max-w-6xl mx-auto px-6 py-16",children:t?d.jsx("div",{className:"flex items-center justify-center py-20",children:d.jsx(bw,{className:"w-8 h-8 animate-spin text-primary"})}):r?d.jsx("div",{className:"text-center py-20",children:d.jsx("p",{className:"text-destructive font-raleway",children:"Error al cargar los artÃculos"})}):e.length===0?d.jsxs("div",{className:"text-center py-20",children:[d.jsx("div",{className:"w-20 h-20 mx-auto mb-6 rounded-2xl bg-muted flex items-center justify-center",children:d.jsx(xk,{className:"w-10 h-10 text-muted-foreground"})}),d.jsx("h2",{className:"text-2xl font-raleway font-bold text-foreground mb-3",children:"Próximamente"}),d.jsx("p",{className:"text-muted-foreground font-raleway max-w-md mx-auto",children:"Estamos preparando contenido interesante sobre el proyecto. Vuelve pronto para ver las últimas novedades."})]}):d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:e.map(n=>d.jsxs("article",{className:"bg-card rounded-2xl overflow-hidden border border-border hover:shadow-lg transition-shadow",children:[n.image_url&&d.jsx("img",{src:n.image_url,alt:n.title_es,className:"w-full h-48 object-cover"}),d.jsxs("div",{className:"p-6",children:[n.published_at&&d.jsx("time",{className:"text-sm text-muted-foreground font-raleway",children:new Date(n.published_at).toLocaleDateString("es-ES",{day:"numeric",month:"long",year:"numeric"})}),d.jsx("h3",{className:"text-xl font-raleway font-bold text-foreground mt-2 mb-3",children:n.title_es}),d.jsx("p",{className:"text-muted-foreground font-raleway text-sm line-clamp-3",children:n.excerpt_es}),d.jsx($r,{to:`/blog/${n.slug}`,className:"inline-block mt-4 text-primary font-raleway font-medium text-sm hover:underline",children:"Leer más â"})]})]},n.id))})})]})},t4=()=>{const{slug:e}=Rj(),{data:t,isLoading:r,error:n}=yb({queryKey:["blog-post",e],queryFn:async()=>{const{data:s,error:i}=await ps.from("blog_posts").select("id, title_es, content_es, excerpt_es, image_url, published_at, meta_description_es").eq("slug",e).eq("status","published").maybeSingle();if(i)throw i;return s},enabled:!!e});return r?d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:d.jsx(bw,{className:"w-8 h-8 animate-spin text-primary"})}):n||!t?d.jsx("div",{className:"min-h-screen bg-background",children:d.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-16",children:[d.jsxs($r,{to:"/blog",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors mb-8",children:[d.jsx(Mo,{className:"w-4 h-4"}),d.jsx("span",{className:"font-raleway",children:"Volver al blog"})]}),d.jsxs("div",{className:"text-center py-20",children:[d.jsx("h1",{className:"text-2xl font-raleway font-bold text-foreground mb-4",children:"ArtÃculo no encontrado"}),d.jsx("p",{className:"text-muted-foreground font-raleway",children:"El artÃculo que buscas no existe o ha sido eliminado."})]})]})}):d.jsx("div",{className:"min-h-screen bg-background",children:d.jsxs("article",{className:"max-w-4xl mx-auto px-6 py-16",children:[d.jsxs($r,{to:"/blog",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors mb-8",children:[d.jsx(Mo,{className:"w-4 h-4"}),d.jsx("span",{className:"font-raleway",children:"Volver al blog"})]}),t.image_url&&d.jsx("img",{src:t.image_url,alt:t.title_es,className:"w-full h-64 md:h-96 object-cover rounded-2xl mb-8"}),t.published_at&&d.jsx("time",{className:"text-sm text-muted-foreground font-raleway",children:new Date(t.published_at).toLocaleDateString("es-ES",{day:"numeric",month:"long",year:"numeric"})}),d.jsx("h1",{className:"text-3xl md:text-4xl font-raleway font-bold text-foreground mt-4 mb-6",children:t.title_es}),d.jsx("div",{className:`font-raleway text-foreground space-y-6 359 [&>h1]:text-3xl [&>h1]:font-bold [&>h1]:mt-10 [&>h1]:mb-4 360 [&>h2]:text-2xl [&>h2]:font-bold [&>h2]:mt-8 [&>h2]:mb-3 [&>h2]:text-primary 361 [&>h3]:text-xl [&>h3]:font-semibold [&>h3]:mt-6 [&>h3]:mb-2 362 [&>p]:leading-relaxed [&>p]:text-muted-foreground 363 [&>ul]:list-disc [&>ul]:pl-6 [&>ul]:space-y-2 [&>ul]:text-muted-foreground 364 [&>ol]:list-decimal [&>ol]:pl-6 [&>ol]:space-y-2 [&>ol]:text-muted-foreground 365 [&>li]:leading-relaxed 366 [&>blockquote]:border-l-4 [&>blockquote]:border-primary [&>blockquote]:pl-4 [&>blockquote]:italic [&>blockquote]:text-muted-foreground 367 [&>a]:text-primary [&>a]:underline [&>a]:hover:text-primary/80 368 [&>strong]:font-semibold [&>strong]:text-foreground 369 [&>img]:rounded-xl [&>img]:my-6`,dangerouslySetInnerHTML:{__html:t.content_es}})]})})},r4=()=>d.jsx("div",{className:"min-h-screen bg-background",children:d.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-12",children:[d.jsxs($r,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-primary transition-colors mb-8",children:[d.jsx(Mo,{className:"w-4 h-4"}),"Volver al inicio"]}),d.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground mb-8",children:"TÃRMINOS Y CONDICIONES DE LA PRE-RESERVA DE VIVIENDA"}),d.jsxs("div",{className:"prose prose-gray max-w-none space-y-8",children:[d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Objeto de la pre-reserva"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"La presente pre-reserva tiene como finalidad otorgar al comprador una posición prioritaria para la futura reserva y/o formalización contractual de una vivienda concreta promovida por FindNido."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"La pre-reserva no constituye en ningún caso un contrato de compraventa, ni un compromiso firme de venta o adquisición de la vivienda, ni implica la adjudicación definitiva de la misma, limitándose exclusivamente al otorgamiento del derecho preferente descrito en el presente documento."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"Asimismo, la pre-reserva no tiene la consideración de señal, arras ni anticipo del precio de compraventa, ni podrá ser interpretada como tal a ningún efecto."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Derechos que otorga la pre-reserva"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Mediante el abono del importe correspondiente a la pre-reserva, el comprador adquiere el derecho a:"}),d.jsxs("ul",{className:"list-disc pl-6 mt-4 space-y-2 text-muted-foreground",children:[d.jsx("li",{children:"Ocupar una posición prioritaria concreta en la lista de personas interesadas en la reserva de la vivienda indicada, conforme al orden temporal de realización de las pre-reservas."}),d.jsx("li",{children:"Ser la primera persona en ser contactada, de acuerdo con dicho orden de prioridad, para formalizar la reserva y, en su caso, el posterior contrato privado de compraventa y/o escritura pública, cuando estos se encuentren disponibles."})]}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"La pre-reserva no tiene carácter exclusivo ni implica el bloqueo o inmovilización de la vivienda, pudiendo FindNido aceptar otras pre-reservas sobre la misma unidad. Dichas pre-reservas serán gestionadas conforme a un criterio objetivo de orden temporal, respetando en todo caso la prioridad adquirida por el comprador."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Alcance y garantÃas de la pre-reserva"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"La pre-reserva garantiza al comprador la posición prioritaria adquirida en el orden de reserva de la vivienda seleccionad
369a y su preferencia para avanzar en el proceso de reserva y compraventa una vez confirmadas las condiciones finales del proyecto."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"La finalidad de la pre-reserva es permitir a FindNido confirmar la viabilidad técnica, urbanÃstica, administrativa, financiera y comercial de la promoción, asà como definir las condiciones finales de la vivienda, incluido su precio definitivo."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"En caso de que dicha viabilidad no pudiera confirmarse o de que no sea posible ofrecer finalmente la vivienda en las condiciones previstas, el comprador tendrá derecho a las alternativas reguladas en el apartado 4 de estos términos y condiciones, incluida, en su caso, la devolución del importe abonado en concepto de pre-reserva."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"La pre-reserva no implica, por sà sola, la formalización automática de un contrato de compraventa, que quedará supeditada a la confirmación de las condiciones finales del proyecto y a la posterior firma de los documentos contractuales correspondientes."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Alternativas en caso de no disponibilidad de la vivienda"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"En el supuesto de que, tras la fase de pre-reserva, no sea posible ofrecer finalmente la vivienda seleccionada en las condiciones previstas, por c
369ausas no imputables al comprador (incluyendo, a tÃtulo meramente enunciativo y no limitativo, la falta de viabilidad técnica, urbanÃstica, administrativa o comercial del proyecto, o que otra persona haya formalizado legÃtimamente la reserva con anterioridad), el comprador podrá optar por una de las siguientes alternativas:"}),d.jsx("h3",{className:"text-lg font-medium text-foreground mt-6 mb-2",children:"a) Mantenimiento del derecho preferente"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Mantener su posición prioritaria para la reserva de una vivienda en una futura promoción de caracterÃsticas equivalentes, conservando el orden de prioridad adquirido mediante la pre-reserva."}),d.jsx("h3",{className:"text-lg font-medium text-foreground mt-6 mb-2",children:"b) Devolución del importe de la pre-reserva"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Solicitar la devolución Ãntegra del importe abonado en concepto de pre-reserva. Ãnicamente se deducirán, en su caso, las comisiones aplicadas por la plataforma de pago (Stripe), las cuales son gestionadas directamente por dicha plataforma y no dependen ni están bajo el control de FindNido."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Forma de pago"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El pago de la pre-reserva se realiza mediante enlace de pago seguro gestionado por Stripe, plataforma externa de servicios de pago."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"El comprador reconoce y acepta expresamente que las comisiones derivadas de la operación de pago son aplicadas directamente por la plataforma de pago y no son reembolsables en caso de devolución del importe de la pre-reserva."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"FindNido no actúa como entidad de depósito ni de custodia de fondos, siendo el pago gestionado Ãntegramente a través de la plataforma externa de pago."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Carácter personal e intransferible"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"La pre-reserva tiene carácter personal e intransferible, no pudiendo ser cedida a terceros sin la autorización previa, expresa y por escrito de FindNido."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Carácter no contractual de imágenes, renders y material comercial"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Las imágenes, renders, planos, infografÃas, recreaciones virtuales, superficies, distribuciones, memorias de calida
369des, acabados, dimensiones, equipamientos y cualquier otro material gráfico o descriptivo mostrado en el sitio web, materiales comerciales o publicitarios tienen carácter meramente orientativo y no contractual."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"Dichos elementos no constituyen una representación fiel ni vinculante de la vivienda definitiva y podrán experimentar modificaciones por razones técnicas, urbanÃsticas, normativas, comerciales o constructivas, sin que ello genere derecho a reclamación alguna por parte del comprador."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Integridad del acuerdo y ausencia de confianza en manifestaciones previas"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"El presente documento constituye el acuerdo Ãntegro entre las partes en relación con la pre-reserva, dejando sin efecto cualquier comunicación, manifestación, negociación o información previa, ya sea verbal o escrita."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"El comprador reconoce que no ha basado su decisión en ninguna manifestación, promesa o información que no se encuentre expresamente recogida en estos términos y condiciones."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"Nada de lo dispuesto en los presentes términos y condiciones limitará o excluirá los derechos que la normativa vigente de protección de consumidores y usuarios reconozca al comprador, los cuales permanecerán plenamente vigentes."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Limitación de responsabilidad"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"En la medida permitida por la normativa aplicable, FindNido no será responsable de daños indirectos, lucro cesante, pérdida de oportunidad o expectativas económicas derivadas de la pre-reserva o de la imposibilidad de formalizar la compraventa."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Legislación aplicable y jurisdicción"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Los presentes términos y condiciones se regirán e interpretarán de conformidad con la legislación española."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"Para la resolución de cualquier controversia que pudiera derivarse de la interpretación o ejecución del presente documento, las partes se someten a los Juzgados y Tribunales del domicilio del consumidor, conforme a la normativa de protección de consumidores y usuarios."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"No renuncia"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"La falta de ejercicio por parte de FindNido de cualquier derecho reconocido en estos términos y condiciones no implicará renuncia alguna a su ejercicio futuro."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Nulidad parcial"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Si alguna de las cláusulas del presente documento fuera declarada nula o inaplicable, total o parcialmente, dicha nulidad no afectará a la validez del resto de las cláusulas, que permanecerán en pleno vigor."})]}),d.jsxs("section",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-4",children:"Aceptación de los términos"}),d.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"La realización del pago de la pre-reserva implica que el comprador:"}),d.jsxs("ul",{className:"list-disc pl-6 mt-4 space-y-2 text-muted-foreground",children:[d.jsx("li",{children:"Ha leÃdo y comprendido Ãntegramente los presentes términos y condiciones."}),d.jsx("li",{children:"Los acepta expresamente."}),d.jsx("li",{children:"Reconoce que la pre-reserva no constituye un contrato de compraventa ni garantiza la adquisición de la vivienda."})]})]})]}),d.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:d.jsxs($r,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-primary transition-colors",children:[d.jsx(Mo,{className:"w-4 h-4"}),"Volver al inicio"]})})]})}),n4=()=>{const e=ma();return y.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),d.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),d.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},s4=new $R,i4=()=>d.jsx(zR,{client:s4,children:d.jsxs(vR,{children:[d.jsx(hC,{}),d.jsx(WC,{}),d.jsx(Jj,{children:d.jsxs(Hj,{children:[d.jsx(As,{path:"/",element:d.jsx(Z$,{})}),d.jsx(As,{path:"/blog",element:d.jsx(e4,{})}),d.jsx(As,{path:"/blog/:slug",element:d.jsx(t4,{})}),d.jsx(As,{path:"/terminos-y-condiciones",element:d.jsx(r4,{})}),d.jsx(As,{path:"*",element:d.jsx(n4,{})})]})})]})});B0(document.getElementById("root")).render(d.jsx(i4,{}));export{a4 as c,Rv as g};
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.