vendor: 5,117 bytes, lines 1-9
1var ff=t=>{throw TypeError(t)};var Ec=(t,e,r)=>e.has(t)||ff("Cannot "+r);var C=(t,e,r)=>(Ec(t,e,"read from private field"),r?r.call(t):e.get(t)),ce=(t,e,r)=>e.has(t)?ff("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Z=(t,e,r,n)=>(Ec(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),qe=(t,e,r)=>(Ec(t,e,"access private method"),r);var sa=(t,e,r,n)=>({set _(s){Z(t,e,s,r)},get _(){return C(t,e,n)}});function Yw(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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)}})();function ag(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lg={exports:{}},Wl={},cg={exports:{}},se={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Wo=Symbol.for("react.element"),Zw=Symbol.for("react.portal"),Xw=Symbol.for("react.fragment"),ex=Symbol.for("react.strict_mode"),tx=Symbol.for("react.profiler"),rx=Symbol.for("react.provider"),nx=Symbol.for("react.context"),sx=Symbol.for("react.forward_ref"),ix=Symbol.for("react.suspense"),ox=Symbol.for("react.memo"),ax=Symbol.for("react.lazy"),pf=Symbol.iterator;function lx(t){return t===null||typeof t!="object"?null:(t=pf&&t[pf]||t["@@iterator"],typeof t=="function"?t:null)}var ug={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},dg=Object.assign,hg={};function vi(t,e,r){this.props=t,this.context=e,this.refs=hg,this.updater=r||ug}vi.prototype.isReactComponent={};vi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};vi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function fg(){}fg.prototype=vi.prototype;function Ud(t,e,r){this.props=t,this.context=e,this.refs=hg,this.updater=r||ug}var Fd=Ud.prototype=new fg;Fd.constructor=Ud;dg(Fd,vi.prototype);Fd.isPureReactComponent=!0;var mf=Array.isArray,pg=Object.prototype.hasOwnProperty,Bd={current:null},mg={key:!0,ref:!0,__self:!0,__source:!0};function gg(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)pg.call(e,n)&&!mg.hasOwnProperty(n)&&(s[n]=e[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(t&&t.defaultProps)for(n in a=t.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:Wo,type:t,key:i,ref:o,props:s,_owner:Bd.current}}function cx(t,e){return{$$typeof:Wo,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function zd(t){return typeof t=="object"&&t!==null&&t.$$typeof===Wo}function ux(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var gf=/\/+/g;function Cc(t,e){return typeof t=="object"&&t!==null&&t.key!=null?ux(""+t.key):e.toString(36)}function Da(t,e,r,n,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Wo:case Zw:o=!0}}if(o)return o=t,s=s(o),t=n===""?"."+Cc(o,0):n,mf(s)?(r="",t!=null&&(r=t.replace(gf,"$&/")+"/"),Da(s,e,r,"",function(c){return c})):s!=null&&(zd(s)&&(s=cx(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(gf,"$&/")+"/")+t)),e.push(s)),1;if(o=0,n=n===""?".":n+":",mf(t))for(var a=0;a<t.length;a++){i=t[a];var l=n+Cc(i,a);o+=Da(i,e,r,l,s)}else if(l=lx(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=n+Cc(i,a++),o+=Da(i,e,r,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function ia(t,e,r){if(t==null)return t;var n=[],s=0;
vendor: 4,262 bytes, lines 9-17
9return Da(t,n,"","",function(i){return e.call(r,i,s++)}),n}function dx(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var nt={current:null},$a={transition:null},hx={ReactCurrentDispatcher:nt,ReactCurrentBatchConfig:$a,ReactCurrentOwner:Bd};function yg(){throw Error("act(...) is not supported in production builds of React.")}se.Children={map:ia,forEach:function(t,e,r){ia(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return ia(t,function(){e++}),e},toArray:function(t){return ia(t,function(e){return e})||[]},only:function(t){if(!zd(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};se.Component=vi;se.Fragment=Xw;se.Profiler=tx;se.PureComponent=Ud;se.StrictMode=ex;se.Suspense=ix;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hx;se.act=yg;se.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=dg({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=Bd.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)pg.call(e,l)&&!mg.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[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:Wo,type:t.type,key:s,ref:i,props:n,_owner:o}};se.createContext=function(t){return t={$$typeof:nx,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:rx,_context:t},t.Consumer=t};se.createElement=gg;se.createFactory=function(t){var e=gg.bind(null,t);return e.type=t,e};se.createRef=function(){return{current:null}};se.forwardRef=function(t){return{$$typeof:sx,render:t}};se.isValidElement=zd;se.lazy=function(t){return{$$typeof:ax,_payload:{_status:-1,_result:t},_init:dx}};se.memo=function(t,e){return{$$typeof:ox,type:t,compare:e===void 0?null:e}};se.startTransition=function(t){var e=$a.transition;$a.transition={};try{t()}finally{$a.transition=e}};se.unstable_act=yg;se.useCallback=function(t,e){return nt.current.useCallback(t,e)};se.useContext=function(t){return nt.current.useContext(t)};se.useDebugValue=function(){};se.useDeferredValue=function(t){return nt.current.useDeferredValue(t)};se.useEffect=function(t,e){return nt.current.useEffect(t,e)};se.useId=function(){return nt.current.useId()};se.useImperativeHandle=function(t,e,r){return nt.current.useImperativeHandle(t,e,r)};se.useInsertionEffect=function(t,e){return nt.current.useInsertionEffect(t,e)};se.useLayoutEffect=function(t,e){return nt.current.useLayoutEffect(t,e)};se.useMemo=function(t,e){return nt.current.useMemo(t,e)};se.useReducer=function(t,e,r){return nt.current.useReducer(t,e,r)};se.useRef=function(t){return nt.current.useRef(t)};se.useState=function(t){return nt.current.useState(t)};se.useSyncExternalStore=function(t,e,r){return nt.current.useSyncExternalStore(t,e,r)};se.useTransition=function(){return nt.current.useTransition()};se.version="18.3.1";cg.exports=se;var b=cg.exports;const O=ag(b),vg=Yw({__proto__:null,default:O},[b]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var fx=b,px=Symbol.for("react.element"),mx=Symbol.for("react.fragment"),gx=Object.prototype.hasOwnProperty,yx=fx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vx={key:!0,ref:!0,__self:!0,__source:!0};function wg(t,e,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)gx.call(e,n)&&!vx.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:px,type:t,key:i,ref:o,props:s,_owner:yx.current}}Wl.Fragment=mx;Wl.jsx=wg;Wl.jsxs=wg;
vendor: 10,969 bytes, lines 17-34
17lg.exports=Wl;var m=lg.exports,xg={exports:{}},xt={},bg={exports:{}},_g={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(t){function e(A,T){var U=A.length;A.push(T);e:for(;0<U;){var X=U-1>>>1,W=A[X];if(0<s(W,T))A[X]=T,A[U]=W,U=X;else break e}}function r(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var T=A[0],U=A.pop();if(U!==T){A[0]=U;e:for(var X=0,W=A.length,ne=W>>>1;X<ne;){var ie=2*(X+1)-1,Re=A[ie],Ve=ie+1,de=A[Ve];if(0>s(Re,U))Ve<W&&0>s(de,Re)?(A[X]=de,A[Ve]=U,X=Ve):(A[X]=Re,A[ie]=U,X=ie);else if(Ve<W&&0>s(de,U))A[X]=de,A[Ve]=U,X=Ve;else break e}}return T}function s(A,T){var U=A.sortIndex-T.sortIndex;return U!==0?U:A.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,f=3,h=!1,w=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var T=r(c);T!==null;){if(T.callback===null)n(c);else if(T.startTime<=A)n(c),T.sortIndex=T.expirationTime,e(l,T);else break;T=r(c)}}function _(A){if(v=!1,y(A),!w)if(r(l)!==null)w=!0,K(k);else{var T=r(c);T!==null&&ee(_,T.startTime-A)}}function k(A,T){w=!1,v&&(v=!1,g(R),R=-1),h=!0;var U=f;try{for(y(T),d=r(l);d!==null&&(!(d.expirationTime>T)||A&&!q());){var X=d.callback;if(typeof X=="function"){d.callback=null,f=d.priorityLevel;var W=X(d.expirationTime<=T);T=t.unstable_now(),typeof W=="function"?d.callback=W:d===r(l)&&n(l),y(T)}else n(l);d=r(l)}if(d!==null)var ne=!0;else{var ie=r(c);ie!==null&&ee(_,ie.startTime-T),ne=!1}return ne}finally{d=null,f=U,h=!1}}var S=!1,E=null,R=-1,j=5,I=-1;function q(){return!(t.unstable_now()-I<j)}function $(){if(E!==null){var A=t.unstable_now();I=A;var T=!0;try{T=E(!0,A)}finally{T?J():(S=!1,E=null)}}else S=!1}var J;if(typeof p=="function")J=function(){p($)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,oe=D.port2;D.port1.onmessage=$,J=function(){oe.postMessage(null)}}else J=function(){x($,0)};function K(A){E=A,S||(S=!0,J())}function ee(A,T){R=x(function(){A(t.unstable_now())},T)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(A){A.callback=null},t.unstable_continueExecution=function(){w||h||(w=!0,K(k))},t.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(A){switch(f){case 1:case 2:case 3:var T=3;break;default:T=f}var U=f;f=T;try{return A()}finally{f=U}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(A,T){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var U=f;f=A;try{return T()}finally{f=U}},t.unstable_scheduleCallback=function(A,T,U){var X=t.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?X+U:X):U=X,A){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=U+W,A={id:u++,callback:T,priorityLevel:A,startTime:U,expirationTime:W,sortIndex:-1},U>X?(A.sortIndex=U,e(c,A),r(l)===null&&A===r(c)&&(v?(g(R),R=-1):v=!0,ee(_,U-X))):(A.sortIndex=W,e(l,A),w||h||(w=!0,K(k))),A},t.unstable_shouldYield=q,t.unstable_wrapCallback=function(A){var T=f;return function(){var U=f;f=T;try{return A.apply(this,arguments)}finally{f=U}}}})(_g);bg.exports=_g;var wx=bg.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var xx=b,vt=wx;function P(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var kg=new Set,lo={};function as(t,e){si(t,e),si(t+"Capture",e)}function si(t,e){for(lo[t]=e,t=0;t<e.length;t++)kg.add(e[t])}var Tr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mu=Object.prototype.hasOwnProperty,bx=/^[: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]*$/,yf={},vf={};function _x(t){return mu.call(vf,t)?!0:mu.call(yf,t)?!1:bx.test(t)?vf[t]=!0:(yf[t]=!0,!1)}function kx(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Sx(t,e,r,n){if(e===null||typeof e>"u"||kx(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function st(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){We[t]=new st(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];We[e]=new st(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){We[t]=new st(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){We[t]=new st(t,2,!1,t,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(t){We[t]=new st(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){We[t]=new st(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){We[t]=new st(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){We[t]=new st(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){We[t]=new st(t,5,!1,t.toLowerCase(),null,!1,!1)});var Hd=/[\-:]([a-z])/g;function Wd(t){return t[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(t){var e=t.replace(Hd,Wd);We[e]=new st(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Hd,Wd);We[e]=new st(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Hd,Wd);We[e]=new st(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){We[t]=new st(t,1,!1,t.toLowerCase(),null,!1,!1)});We.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){We[t]=new st(t,1,!1,t.toLowerCase(),null,!0,!0)});function Vd(t,e,r,n){var s=We.hasOwnProperty(e)?We[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(Sx(e,r,s,n)&&(r=null),n||s===null?_x(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):s.mustUseProperty?t[s.propertyName]=r===null?s.type===3?!1:"":r:(e=s.attributeName,n=s.attributeNamespace,r===null?t.removeAttribute(e):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var Lr=xx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,oa=Symbol.for("react.element"),Ts=Symbol.for("react.portal"),Rs=Symbol.for("react.fragment"),qd=Symbol.for("react.strict_mode"),gu=Symbol.for("react.profiler"),Sg=Symbol.for("react.provider"),Eg=Symbol.for("react.context"),Kd=Symbol.for("react.forward_ref"),yu=Symbol.for("react.suspense"),vu=Symbol.for("react.suspense_list"),Gd=Symbol.for("react.memo"),Gr=Symbol.for("react.lazy"),Cg=Symbol.for("react.offscreen"),wf=Symbol.iterator;function Ti(t){return t===null||typeof t!="object"?null:(t=wf&&t[wf]||t["@@iterator"],typeof t=="function"?t:null)}var ke=Object.assign,Ac;function Fi(t){if(Ac===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Ac=e&&e[1]||""}return` 34`+Ac+t}var Tc=!1;function Rc(t,e){if(!t||Tc)return"";Tc=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){n=c}t.call(e.prototype)}else{try{throw Error()}catch(c){n=c}t()}}
vendor: 14,678 bytes, lines 34-37
34catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(` 35`),i=n.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Tc=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Fi(t):""}function Ex(t){switch(t.tag){case 5:return Fi(t.type);case 16:return Fi("Lazy");case 13:return Fi("Suspense");case 19:return Fi("SuspenseList");case 0:case 2:case 15:return t=Rc(t.type,!1),t;case 11:return t=Rc(t.type.render,!1),t;case 1:return t=Rc(t.type,!0),t;default:return""}}function wu(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Rs:return"Fragment";case Ts:return"Portal";case gu:return"Profiler";case qd:return"StrictMode";case yu:return"Suspense";case vu:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Eg:return(t.displayName||"Context")+".Consumer";case Sg:return(t._context.displayName||"Context")+".Provider";case Kd:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Gd:return e=t.displayName||null,e!==null?e:wu(t.type)||"Memo";case Gr:e=t._payload,t=t._init;try{return wu(t(e))}catch{}}return null}function Cx(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wu(e);case 8:return e===qd?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function kn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ag(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ax(t){var e=Ag(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function aa(t){t._valueTracker||(t._valueTracker=Ax(t))}function Tg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Ag(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Xa(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function xu(t,e){var r=e.checked;return ke({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function xf(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=kn(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Rg(t,e){e=e.checked,e!=null&&Vd(t,"checked",e,!1)}function bu(t,e){Rg(t,e);var r=kn(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?_u(t,e.type,r):e.hasOwnProperty("defaultValue")&&_u(t,e.type,kn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function bf(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function _u(t,e,r){(e!=="number"||Xa(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Bi=Array.isArray;function Bs(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s<r.length;s++)e["$"+r[s]]=!0;for(r=0;r<t.length;r++)s=e.hasOwnProperty("$"+t[r].value),t[r].selected!==s&&(t[r].selected=s),s&&n&&(t[r].defaultSelected=!0)}else{for(r=""+kn(r),e=null,s=0;s<t.length;s++){if(t[s].value===r){t[s].selected=!0,n&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function ku(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(P(91));return ke({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function _f(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(P(92));if(Bi(r)){if(1<r.length)throw Error(P(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:kn(r)}}function Pg(t,e){var r=kn(e.value),n=kn(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function kf(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Ng(t){switch(t){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 Su(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Ng(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var la,jg=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,s){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(la=la||document.createElement("div"),la.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=la.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function co(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Qi={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},Tx=["Webkit","ms","Moz","O"];Object.keys(Qi).forEach(function(t){Tx.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Qi[e]=Qi[t]})});function Og(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Qi.hasOwnProperty(t)&&Qi[t]?(""+e).trim():e+"px"}function Ig(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Og(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var Rx=ke({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 Eu(t,e){if(e){if(Rx[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(P(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(P(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(P(61))}if(e.style!=null&&typeof e.style!="object")throw Error(P(62))}}function Cu(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Au=null;function Qd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Tu=null,zs=null,Hs=null;function Sf(t){if(t=Ko(t)){if(typeof Tu!="function")throw Error(P(280));var e=t.stateNode;e&&(e=Ql(e),Tu(t.stateNode,t.type,e))}}function Lg(t){zs?Hs?Hs.push(t):Hs=[t]:zs=t}function Dg(){if(zs){var t=zs,e=Hs;if(Hs=zs=null,Sf(t),e)for(t=0;t<e.length;t++)Sf(e[t])}}function $g(t,e){return t(e)}function Mg(){}var Pc=!1;function Ug(t,e,r){if(Pc)return t(e,r);Pc=!0;try{return $g(t,e,r)}finally{Pc=!1,(zs!==null||Hs!==null)&&(Mg(),Dg())}}function uo(t,e){var r=t.stateNode;if(r===null)return null;var n=Ql(r);if(n===null)return null;r=n[e];e:switch(e){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)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(P(231,e,typeof r));return r}var Ru=!1;if(Tr)try{var Ri={};Object.defineProperty(Ri,"passive",{get:function(){Ru=!0}}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{Ru=!1}function Px(t,e,r,n,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(u){this.onError(u)}}var Ji=!1,el=null,tl=!1,Pu=null,Nx={onError:function(t){Ji=!0,el=t}};function jx(t,e,r,n,s,i,o,a,l){Ji=!1,el=null,Px.apply(Nx,arguments)}function Ox(t,e,r,n,s,i,o,a,l){if(jx.apply(this,arguments),Ji){if(Ji){var c=el;Ji=!1,el=null}else throw Error(P(198));tl||(tl=!0,Pu=c)}}function ls(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function Fg(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Ef(t){if(ls(t)!==t)throw Error(P(188))}function Ix(t){var e=t.alternate;if(!e){if(e=ls(t),e===null)throw Error(P(188));return e!==t?null:t}for(var r=t,n=e;;){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 Ef(s),t;if(i===n)return Ef(s),e;i=i.sibling}throw Error(P(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(P(189))}}if(r.alternate!==n)throw Error(P(190))}if(r.tag!==3)throw Error(P(188));return r.stateNode.current===r?t:e}function Bg(t){return t=Ix(t),t!==null?zg(t):null}function zg(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=zg(t);if(e!==null)return e;t=t.sibling}return null}var Hg=vt.unstable_scheduleCallback,Cf=vt.unstable_cancelCallback,Lx=vt.unstable_shouldYield,Dx=vt.unstable_requestPaint,Te=vt.unstable_now,$x=vt.unstable_getCurrentPriorityLevel,Jd=vt.unstable_ImmediatePriority,Wg=vt.unstable_UserBlockingPriority,rl=vt.unstable_NormalPriority,Mx=vt.unstable_LowPriority,Vg=vt.unstable_IdlePriority,Vl=null,cr=null;function Ux(t){if(cr&&typeof cr.onCommitFiberRoot=="function")try{cr.onCommitFiberRoot(Vl,t,void 0,(t.current.flags&128)===128)}catch{}}var Kt=Math.clz32?Math.clz32:zx,Fx=Math.log,Bx=Math.LN2;function zx(t){return t>>>=0,t===0?32:31-(Fx(t)/Bx|0)|0}var ca=64,ua=4194304;function zi(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function nl(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=zi(a):(i&=o,i!==0&&(n=zi(i)))}else o=r&~s,o!==0?n=zi(o):i!==0&&(n=zi(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-Kt(e),s=1<<r,n|=t[r],e&=~s;return n}function Hx(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 Wx(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-Kt(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=Hx(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function Nu(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function qg(){var t=ca;return ca<<=1,!(ca&4194240)&&(ca=64),t}function Nc(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function Vo(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Kt(e),t[e]=r}function Vx(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var s=31-Kt(r),i=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~i}}function Yd(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-Kt(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var he=0;function Kg(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}
vendor: 2,428 bytes, line 37
37var Gg,Zd,Qg,Jg,Yg,ju=!1,da=[],dn=null,hn=null,fn=null,ho=new Map,fo=new Map,Yr=[],qx="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 Af(t,e){switch(t){case"focusin":case"focusout":dn=null;break;case"dragenter":case"dragleave":hn=null;break;case"mouseover":case"mouseout":fn=null;break;case"pointerover":case"pointerout":ho.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":fo.delete(e.pointerId)}}function Pi(t,e,r,n,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},e!==null&&(e=Ko(e),e!==null&&Zd(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function Kx(t,e,r,n,s){switch(e){case"focusin":return dn=Pi(dn,t,e,r,n,s),!0;case"dragenter":return hn=Pi(hn,t,e,r,n,s),!0;case"mouseover":return fn=Pi(fn,t,e,r,n,s),!0;case"pointerover":var i=s.pointerId;return ho.set(i,Pi(ho.get(i)||null,t,e,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,fo.set(i,Pi(fo.get(i)||null,t,e,r,n,s)),!0}return!1}function Zg(t){var e=Bn(t.target);if(e!==null){var r=ls(e);if(r!==null){if(e=r.tag,e===13){if(e=Fg(r),e!==null){t.blockedOn=e,Yg(t.priority,function(){Qg(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ma(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=Ou(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);Au=n,r.target.dispatchEvent(n),Au=null}else return e=Ko(r),e!==null&&Zd(e),t.blockedOn=r,!1;e.shift()}return!0}function Tf(t,e,r){Ma(t)&&r.delete(e)}function Gx(){ju=!1,dn!==null&&Ma(dn)&&(dn=null),hn!==null&&Ma(hn)&&(hn=null),fn!==null&&Ma(fn)&&(fn=null),ho.forEach(Tf),fo.forEach(Tf)}function Ni(t,e){t.blockedOn===e&&(t.blockedOn=null,ju||(ju=!0,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,Gx)))}function po(t){function e(s){return Ni(s,t)}if(0<da.length){Ni(da[0],t);for(var r=1;r<da.length;r++){var n=da[r];n.blockedOn===t&&(n.blockedOn=null)}}for(dn!==null&&Ni(dn,t),hn!==null&&Ni(hn,t),fn!==null&&Ni(fn,t),ho.forEac
vendor: 11,099 bytes, line 37
37h(e),fo.forEach(e),r=0;r<Yr.length;r++)n=Yr[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Yr.length&&(r=Yr[0],r.blockedOn===null);)Zg(r),r.blockedOn===null&&Yr.shift()}var Ws=Lr.ReactCurrentBatchConfig,sl=!0;function Qx(t,e,r,n){var s=he,i=Ws.transition;Ws.transition=null;try{he=1,Xd(t,e,r,n)}finally{he=s,Ws.transition=i}}function Jx(t,e,r,n){var s=he,i=Ws.transition;Ws.transition=null;try{he=4,Xd(t,e,r,n)}finally{he=s,Ws.transition=i}}function Xd(t,e,r,n){if(sl){var s=Ou(t,e,r,n);if(s===null)Bc(t,e,n,il,r),Af(t,n);else if(Kx(s,t,e,r,n))n.stopPropagation();else if(Af(t,n),e&4&&-1<qx.indexOf(t)){for(;s!==null;){var i=Ko(s);if(i!==null&&Gg(i),i=Ou(t,e,r,n),i===null&&Bc(t,e,n,il,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Bc(t,e,n,null,r)}}var il=null;function Ou(t,e,r,n){if(il=null,t=Qd(n),t=Bn(t),t!==null)if(e=ls(t),e===null)t=null;else if(r=e.tag,r===13){if(t=Fg(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return il=t,null}function Xg(t){switch(t){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($x()){case Jd:return 1;case Wg:return 4;case rl:case Mx:return 16;case Vg:return 536870912;default:return 16}default:return 16}}var an=null,eh=null,Ua=null;function ey(){if(Ua)return Ua;var t,e=eh,r=e.length,n,s="value"in an?an.value:an.textContent,i=s.length;for(t=0;t<r&&e[t]===s[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===s[i-n];n++);return Ua=s.slice(t,1<n?1-n:void 0)}function Fa(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function ha(){return!0}function Rf(){return!1}function bt(t){function e(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 t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ha:Rf,this.isPropagationStopped=Rf,this}return ke(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ha)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ha)},persist:function(){},isPersistent:ha}),e}var wi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},th=bt(wi),qo=ke({},wi,{view:0,detail:0}),Yx=bt(qo),jc,Oc,ji,ql=ke({},qo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rh,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ji&&(ji&&t.type==="mousemove"?(jc=t.screenX-ji.screenX,Oc=t.screenY-ji.screenY):Oc=jc=0,ji=t),jc)},movementY:function(t){return"movementY"in t?t.movementY:Oc}}),Pf=bt(ql),Zx=ke({},ql,{dataTransfer:0}),Xx=bt(Zx),eb=ke({},qo,{relatedTarget:0}),Ic=bt(eb),tb=ke({},wi,{animationName:0,elapsedTime:0,pseudoElement:0}),rb=bt(tb),nb=ke({},wi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),sb=bt(nb),ib=ke({},wi,{data:0}),Nf=bt(ib),ob={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ab={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"},lb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cb(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=lb[t])?!!e[t]:!1}function rh(){return cb}var ub=ke({},qo,{key:function(t){if(t.key){var e=ob[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Fa(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?ab[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rh,charCode:function(t){return t.type==="keypress"?Fa(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Fa(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),db=bt(ub),hb=ke({},ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jf=bt(hb),fb=ke({},qo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rh}),pb=bt(fb),mb=ke({},wi,{propertyName:0,elapsedTime:0,pseudoElement:0}),gb=bt(mb),yb=ke({},ql,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),vb=bt(yb),wb=[9,13,27,32],nh=Tr&&"CompositionEvent"in window,Yi=null;Tr&&"documentMode"in document&&(Yi=document.documentMode);var xb=Tr&&"TextEvent"in window&&!Yi,ty=Tr&&(!nh||Yi&&8<Yi&&11>=Yi),Of=" ",If=!1;function ry(t,e){switch(t){case"keyup":return wb.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ny(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ps=!1;function bb(t,e){switch(t){case"compositionend":return ny(e);case"keypress":return e.which!==32?null:(If=!0,Of);case"textInput":return t=e.data,t===Of&&If?null:t;default:return null}}function _b(t,e){if(Ps)return t==="compositionend"||!nh&&ry(t,e)?(t=ey(),Ua=eh=an=null,Ps=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return ty&&e.locale!=="ko"?null:e.data;default:return null}}var kb={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 Lf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!kb[t.type]:e==="textarea"}function sy(t,e,r,n){Lg(n),e=ol(e,"onChange"),0<e.length&&(r=new th("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var Zi=null,mo=null;function Sb(t){my(t,0)}function Kl(t){var e=Os(t);if(Tg(e))return t}function Eb(t,e){if(t==="change")return e}var iy=!1;if(Tr){var Lc;if(Tr){var Dc="oninput"in document;if(!Dc){var Df=document.createElement("div");Df.setAttribute("oninput","return;"),Dc=typeof Df.oninput=="function"}Lc=Dc}else Lc=!1;iy=Lc&&(!document.documentMode||9<document.documentMode)}function $f(){Zi&&(Zi.detachEvent("onpropertychange",oy),mo=Zi=null)}function oy(t){if(t.propertyName==="value"&&Kl(mo)){var e=[];sy(e,mo,t,Qd(t)),Ug(Sb,e)}}function Cb(t,e,r){t==="focusin"?($f(),Zi=e,mo=r,Zi.attachEvent("onpropertychange",oy)):t==="focusout"&&$f()}function Ab(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Kl(mo)}function Tb(t,e){if(t==="click")return Kl(e)}function Rb(t,e){if(t==="input"||t==="change")return Kl(e)}function Pb(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Qt=typeof Object.is=="function"?Object.is:Pb;function go(t,e){if(Qt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!mu.call(e,s)||!Qt(t[s],e[s]))return!1}return!0}function Mf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Uf(t,e){var r=Mf(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Mf(r)}}function ay(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?ay(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function ly(){for(var t=window,e=Xa();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Xa(t.document)}return e}function sh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Nb(t){var e=ly(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&ay(r.ownerDocument.documentElement,r)){if(n!==null&&sh(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=Uf(r,i);var o=Uf(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var jb=Tr&&"documentMode"in document&&11>
vendor: 4,756 bytes, line 37
37=document.documentMode,Ns=null,Iu=null,Xi=null,Lu=!1;function Ff(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Lu||Ns==null||Ns!==Xa(n)||(n=Ns,"selectionStart"in n&&sh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Xi&&go(Xi,n)||(Xi=n,n=ol(Iu,"onSelect"),0<n.length&&(e=new th("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Ns)))}function fa(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var js={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionend:fa("Transition","TransitionEnd")},$c={},cy={};Tr&&(cy=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function Gl(t){if($c[t])return $c[t];if(!js[t])return t;var e=js[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in cy)return $c[t]=e[r];return t}var uy=Gl("animationend"),dy=Gl("animationiteration"),hy=Gl("animationstart"),fy=Gl("transitionend"),py=new Map,Bf="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 Nn(t,e){py.set(t,e),as(e,[t])}for(var Mc=0;Mc<Bf.length;Mc++){var Uc=Bf[Mc],Ob=Uc.toLowerCase(),Ib=Uc[0].toUpperCase()+Uc.slice(1);Nn(Ob,"on"+Ib)}Nn(uy,"onAnimationEnd");Nn(dy,"onAnimationIteration");Nn(hy,"onAnimationStart");Nn("dblclick","onDoubleClick");Nn("focusin","onFocus");Nn("focusout","onBlur");Nn(fy,"onTransitionEnd");si("onMouseEnter",["mouseout","mouseover"]);si("onMouseLeave",["mouseout","mouseover"]);si("onPointerEnter",["pointerout","pointerover"]);si("onPointerLeave",["pointerout","pointerover"]);as("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));as("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));as("onBeforeInput",["compositionend","keypress","textInput","paste"]);as("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));as("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));as("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hi="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(" "),Lb=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hi));function zf(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,Ox(n,e,void 0,t),t.currentTarget=null}function my(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],s=n.event;n=n.listeners;e:{var i=void 0;if(e)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;zf(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;zf(s,a,c),i=l}}}if(tl)throw t=Pu,tl=!1,Pu=null,t}function ye(t,e){var r=e[Fu];r===void 0&&(r=e[Fu]=new Set);var n=t+"__bubble";r.has(n)||(gy(e,t,2,!1),r.add(n))}function Fc(t,e,r){var n=0;e&&(n|=4),gy(r,t,n,e)}var pa="_reactListening"+Math.random().toString(36).slice(2);function yo(t){if(!t[pa]){t[pa]=!0,kg.forEach(function(r){r!=="selectionchange"&&(Lb.has(r)||Fc(r,!1,t),Fc(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[pa]||(e[pa]=!0,Fc("selectionchange",!1,e))}}function gy(t,e,r,n){switch(Xg(e)){case 1:var s=Qx;break;case 4:s=Jx;break;default:s=Xd}r=s.bind(null,e,r,t),s=void 0,!Ru||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),n?s!==void 0?t.addEventListener(e,r,{capture:!0,passive:s}):t.addEventListener(e,r,!0):s!==void 0?t.addEventListener(e,r,{passive:s}):t.addEventListener(e,r,!1)}function Bc(t,e,r,n,s){var i=n;
vendor: 5,434 bytes, lines 37-38
37if(!(e&1)&&!(e&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=Bn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}Ug(function(){var c=i,u=Qd(r),d=[];e:{var f=py.get(t);if(f!==void 0){var h=th,w=t;switch(t){case"keypress":if(Fa(r)===0)break e;case"keydown":case"keyup":h=db;break;case"focusin":w="focus",h=Ic;break;case"focusout":w="blur",h=Ic;break;case"beforeblur":case"afterblur":h=Ic;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Pf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Xx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=pb;break;case uy:case dy:case hy:h=rb;break;case fy:h=gb;break;case"scroll":h=Yx;break;case"wheel":h=vb;break;case"copy":case"cut":case"paste":h=sb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=jf}var v=(e&4)!==0,x=!v&&t==="scroll",g=v?f!==null?f+"Capture":null:f;v=[];for(var p=c,y;p!==null;){y=p;var _=y.stateNode;if(y.tag===5&&_!==null&&(y=_,g!==null&&(_=uo(p,g),_!=null&&v.push(vo(p,_,y)))),x)break;p=p.return}0<v.length&&(f=new h(f,w,null,r,u),d.push({event:f,listeners:v}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&r!==Au&&(w=r.relatedTarget||r.fromElement)&&(Bn(w)||w[Rr]))break e;if((h||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,h?(w=r.relatedTarget||r.toElement,h=c,w=w?Bn(w):null,w!==null&&(x=ls(w),w!==x||w.tag!==5&&w.tag!==6)&&(w=null)):(h=null,w=c),h!==w)){if(v=Pf,_="onMouseLeave",g="onMouseEnter",p="mouse",(t==="pointerout"||t==="pointerover")&&(v=jf,_="onPointerLeave",g="onPointerEnter",p="pointer"),x=h==null?f:Os(h),y=w==null?f:Os(w),f=new v(_,p+"leave",h,r,u),f.target=x,f.relatedTarget=y,_=null,Bn(u)===c&&(v=new v(g,p+"enter",w,r,u),v.target=y,v.relatedTarget=x,_=v),x=_,h&&w)t:{for(v=h,g=w,p=0,y=v;y;y=vs(y))p++;for(y=0,_=g;_;_=vs(_))y++;for(;0<p-y;)v=vs(v),p--;for(;0<y-p;)g=vs(g),y--;for(;p--;){if(v===g||g!==null&&v===g.alternate)break t;v=vs(v),g=vs(g)}v=null}else v=null;h!==null&&Hf(d,f,h,v,!1),w!==null&&x!==null&&Hf(d,x,w,v,!0)}}e:{if(f=c?Os(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var k=Eb;else if(Lf(f))if(iy)k=Rb;else{k=Ab;var S=Cb}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=Tb);if(k&&(k=k(t,c))){sy(d,k,r,u);break e}S&&S(t,f,c),t==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&_u(f,"number",f.value)}switch(S=c?Os(c):window,t){case"focusin":(Lf(S)||S.contentEditable==="true")&&(Ns=S,Iu=c,Xi=null);break;case"focusout":Xi=Iu=Ns=null;break;case"mousedown":Lu=!0;break;case"contextmenu":case"mouseup":case"dragend":Lu=!1,Ff(d,r,u);break;case"selectionchange":if(jb)break;case"keydown":case"keyup":Ff(d,r,u)}var E;if(nh)e:{switch(t){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Ps?ry(t,r)&&(R="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(R="onCompositionStart");R&&(ty&&r.locale!=="ko"&&(Ps||R!=="onCompositionStart"?R==="onCompositionEnd"&&Ps&&(E=ey()):(an=u,eh="value"in an?an.value:an.textContent,Ps=!0)),S=ol(c,R),0<S.length&&(R=new Nf(R,t,null,r,u),d.push({event:R,listeners:S}),E?R.data=E:(E=ny(r),E!==null&&(R.data=E)))),(E=xb?bb(t,r):_b(t,r))&&(c=ol(c,"onBeforeInput"),0<c.length&&(u=new Nf("onBeforeInput","beforeinput",null,r,u),d.push({event:u,listeners:c}),u.data=E))}my(d,e)})}function vo(t,e,r){return{instance:t,listener:e,currentTarget:r}}function ol(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=uo(t,r),i!=null&&n.unshift(vo(t,i,s)),i=uo(t,e),i!=null&&n.push(vo(t,i,s))),t=t.return}return n}function vs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Hf(t,e,r,n,s){for(var i=e._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=uo(r,i),l!=null&&o.unshift(vo(r,l,a))):s||(l=uo(r,i),l!=null&&o.push(vo(r,l,a)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var Db=/\r\n?/g,$b=/\u0000|\uFFFD/g;function Wf(t){return(typeof t=="string"?t:""+t).replace(Db,` 38`).replace($b,"")}function ma(t,e,r){if(e=Wf(e),Wf(t)!==e&&r)throw Error(P(425))}function al(){}var Du=null,$u=null;function Mu(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Uu=typeof setTimeout=="function"?setTimeout:void 0,Mb=typeof clearTimeout=="function"?clearTimeout:void 0,Vf=typeof Promise=="function"?Promise:void 0,Ub=typeof queueMicrotask=="function"?queueMicrotask:typeof Vf<"u"?function(t){return Vf.resolve(null).then(t).cat
vendor: 4,824 bytes, line 38
38ch(Fb)}:Uu;function Fb(t){setTimeout(function(){throw t})}function zc(t,e){var r=e,n=0;do{var s=r.nextSibling;if(t.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){t.removeChild(s),po(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);po(e)}function pn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function qf(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var xi=Math.random().toString(36).slice(2),lr="__reactFiber$"+xi,wo="__reactProps$"+xi,Rr="__reactContainer$"+xi,Fu="__reactEvents$"+xi,Bb="__reactListeners$"+xi,zb="__reactHandles$"+xi;function Bn(t){var e=t[lr];if(e)return e;for(var r=t.parentNode;r;){if(e=r[Rr]||r[lr]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=qf(t);t!==null;){if(r=t[lr])return r;t=qf(t)}return e}t=r,r=t.parentNode}return null}function Ko(t){return t=t[lr]||t[Rr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Os(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(P(33))}function Ql(t){return t[wo]||null}var Bu=[],Is=-1;function jn(t){return{current:t}}function ve(t){0>Is||(t.current=Bu[Is],Bu[Is]=null,Is--)}function me(t,e){Is++,Bu[Is]=t.current,t.current=e}var Sn={},Ze=jn(Sn),ct=jn(!1),Xn=Sn;function ii(t,e){var r=t.type.contextTypes;if(!r)return Sn;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function ut(t){return t=t.childContextTypes,t!=null}function ll(){ve(ct),ve(Ze)}function Kf(t,e,r){if(Ze.current!==Sn)throw Error(P(168));me(Ze,e),me(ct,r)}function yy(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(P(108,Cx(t)||"Unknown",s));return ke({},r,n)}function cl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Sn,Xn=Ze.current,me(Ze,t),me(ct,ct.current),!0}function Gf(t,e,r){var n=t.stateNode;if(!n)throw Error(P(169));r?(t=yy(t,e,Xn),n.__reactInternalMemoizedMergedChildContext=t,ve(ct),ve(Ze),me(Ze,t)):ve(ct),me(ct,r)}var kr=null,Jl=!1,Hc=!1;function vy(t){kr===null?kr=[t]:kr.push(t)}function Hb(t){Jl=!0,vy(t)}function On(){if(!Hc&&kr!==null){Hc=!0;var t=0,e=he;try{var r=kr;for(he=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}kr=null,Jl=!1}catch(s){throw kr!==null&&(kr=kr.slice(t+1)),Hg(Jd,On),s}finally{he=e,Hc=!1}}return null}var Ls=[],Ds=0,ul=null,dl=0,Et=[],Ct=0,es=null,Er=1,Cr="";function Mn(t,e){Ls[Ds++]=dl,Ls[Ds++]=ul,ul=t,dl=e}function wy(t,e,r){Et[Ct++]=Er,Et[Ct++]=Cr,Et[Ct++]=es,es=t;var n=Er;t=Cr;var s=32-Kt(n)-1;n&=~(1<<s),r+=1;var i=32-Kt(e)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,Er=1<<32-Kt(e)+s|r<<s|n,Cr=i+t}else Er=1<<i|r<<s|n,Cr=t}function ih(t){t.return!==null&&(Mn(t,1),wy(t,1,0))}function oh(t){for(;t===ul;)ul=Ls[--Ds],Ls[Ds]=null,dl=Ls[--Ds],Ls[Ds]=null;for(;t===es;)es=Et[--Ct],Et[Ct]=null,Cr=Et[--Ct],Et[Ct]=null,Er=Et[--Ct],Et[Ct]=null}var gt=null,mt=null,xe=!1,Vt=null;function xy(t,e){var r=Tt(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function Qf(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,gt=t,mt=pn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,gt=t,mt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=es!==null?{id:Er,overflow:Cr}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Tt(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,gt=t,mt=null,!0):!1;default:return!1}}function zu(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Hu(t){if(xe){var e=mt;if(e){var r=e;if(!Qf(t,e)){if(zu(t))throw Error(P(418));e=pn(r.nextSibling);var n=gt;e&&Qf(t,e)?xy(n,r):(t.flags=t.flags&-4097|2,xe=!1,gt=t)}}else{if(zu(t))throw Error(P(418));t.flags=t.flags&-4097|2,xe=!1,gt=t}}}function Jf(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;gt=t}function ga(t){if(t!==gt)return!1;if(!xe)return Jf(t),xe=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Mu(t.type,t.memoizedProps)),e&&(e=mt)){if(zu(t))throw by(),Error(P(418));for(;e;)xy(t,e),e=pn(e.nextSibling)}if(Jf(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(P(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 10,279 bytes, line 38
38){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){mt=pn(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}mt=null}}else mt=gt?pn(t.stateNode.nextSibling):null;return!0}function by(){for(var t=mt;t;)t=pn(t.nextSibling)}function oi(){mt=gt=null,xe=!1}function ah(t){Vt===null?Vt=[t]:Vt.push(t)}var Wb=Lr.ReactCurrentBatchConfig;function Oi(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(P(309));var n=r.stateNode}if(!n)throw Error(P(147,t));var s=n,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(P(284));if(!r._owner)throw Error(P(290,t))}return t}function ya(t,e){throw t=Object.prototype.toString.call(e),Error(P(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Yf(t){var e=t._init;return e(t._payload)}function _y(t){function e(g,p){if(t){var y=g.deletions;y===null?(g.deletions=[p],g.flags|=16):y.push(p)}}function r(g,p){if(!t)return null;for(;p!==null;)e(g,p),p=p.sibling;return null}function n(g,p){for(g=new Map;p!==null;)p.key!==null?g.set(p.key,p):g.set(p.index,p),p=p.sibling;return g}function s(g,p){return g=vn(g,p),g.index=0,g.sibling=null,g}function i(g,p,y){return g.index=y,t?(y=g.alternate,y!==null?(y=y.index,y<p?(g.flags|=2,p):y):(g.flags|=2,p)):(g.flags|=1048576,p)}function o(g){return t&&g.alternate===null&&(g.flags|=2),g}function a(g,p,y,_){return p===null||p.tag!==6?(p=Jc(y,g.mode,_),p.return=g,p):(p=s(p,y),p.return=g,p)}function l(g,p,y,_){var k=y.type;return k===Rs?u(g,p,y.props.children,_,y.key):p!==null&&(p.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Gr&&Yf(k)===p.type)?(_=s(p,y.props),_.ref=Oi(g,p,y),_.return=g,_):(_=Ka(y.type,y.key,y.props,null,g.mode,_),_.ref=Oi(g,p,y),_.return=g,_)}function c(g,p,y,_){return p===null||p.tag!==4||p.stateNode.containerInfo!==y.containerInfo||p.stateNode.implementation!==y.implementation?(p=Yc(y,g.mode,_),p.return=g,p):(p=s(p,y.children||[]),p.return=g,p)}function u(g,p,y,_,k){return p===null||p.tag!==7?(p=Zn(y,g.mode,_,k),p.return=g,p):(p=s(p,y),p.return=g,p)}function d(g,p,y){if(typeof p=="string"&&p!==""||typeof p=="number")return p=Jc(""+p,g.mode,y),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case oa:return y=Ka(p.type,p.key,p.props,null,g.mode,y),y.ref=Oi(g,null,p),y.return=g,y;case Ts:return p=Yc(p,g.mode,y),p.return=g,p;case Gr:var _=p._init;return d(g,_(p._payload),y)}if(Bi(p)||Ti(p))return p=Zn(p,g.mode,y,null),p.return=g,p;ya(g,p)}return null}function f(g,p,y,_){var k=p!==null?p.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:a(g,p,""+y,_);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case oa:return y.key===k?l(g,p,y,_):null;case Ts:return y.key===k?c(g,p,y,_):null;case Gr:return k=y._init,f(g,p,k(y._payload),_)}if(Bi(y)||Ti(y))return k!==null?null:u(g,p,y,_,null);ya(g,y)}return null}function h(g,p,y,_,k){if(typeof _=="string"&&_!==""||typeof _=="number")return g=g.get(y)||null,a(p,g,""+_,k);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case oa:return g=g.get(_.key===null?y:_.key)||null,l(p,g,_,k);case Ts:return g=g.get(_.key===null?y:_.key)||null,c(p,g,_,k);case Gr:var S=_._init;return h(g,p,y,S(_._payload),k)}if(Bi(_)||Ti(_))return g=g.get(y)||null,u(p,g,_,k,null);ya(p,_)}return null}function w(g,p,y,_){for(var k=null,S=null,E=p,R=p=0,j=null;E!==null&&R<y.length;R++){E.index>R?(j=E,E=null):j=E.sibling;var I=f(g,E,y[R],_);if(I===null){E===null&&(E=j);break}t&&E&&I.alternate===null&&e(g,E),p=i(I,p,R),S===null?k=I:S.sibling=I,S=I,E=j}if(R===y.length)return r(g,E),xe&&Mn(g,R),k;if(E===null){for(;R<y.length;R++)E=d(g,y[R],_),E!==null&&(p=i(E,p,R),S===null?k=E:S.sibling=E,S=E);return xe&&Mn(g,R),k}for(E=n(g,E);R<y.length;R++)j=h(E,g,R,y[R],_),j!==null&&(t&&j.alternate!==null&&E.delete(j.key===null?R:j.key),p=i(j,p,R),S===null?k=j:S.sibling=j,S=j);return t&&E.forEach(function(q){return e(g,q)}),xe&&Mn(g,R),k}function v(g,p,y,_){var k=Ti(y);if(typeof k!="function")throw Error(P(150));if(y=k.call(y),y==null)throw Error(P(151));for(var S=k=null,E=p,R=p=0,j=null,I=y.next();E!==null&&!I.done;R++,I=y.next()){E.index>R?(j=E,E=null):j=E.sibling;var q=f(g,E,I.value,_);if(q===null){E===null&&(E=j);break}t&&E&&q.alternate===null&&e(g,E),p=i(q,p,R),S===null?k=q:S.sibling=q,S=q,E=j}if(I.done)return r(g,E),xe&&Mn(g,R),k;if(E===null){for(;!I.done;R++,I=y.next())I=d(g,I.value,_),I!==null&&(p=i(I,p,R),S===null?k=I:S.sibling=I,S=I);return xe&&Mn(g,R),k}for(E=n(g,E);!I.done;R++,I=y.next())I=h(E,g,R,I.value,_),I!==null&&(t&&I.alternate!==null&&E.delete(I.key===null?R:I.key),p=i(I,p,R),S===null?k=I:S.sibling=I,S=I);return t&&E.forEach(function($){return e(g,$)}),xe&&Mn(g,R),k}function x(g,p,y,_){if(typeof y=="object"&&y!==null&&y.type===Rs&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case oa:e:{for(var k=y.key,S=p;S!==null;){if(S.key===k){if(k=y.type,k===Rs){if(S.tag===7){r(g,S.sibling),p=s(S,y.props.children),p.return=g,g=p;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Gr&&Yf(k)===S.type){r(g,S.sibling),p=s(S,y.props),p.ref=Oi(g,S,y),p.return=g,g=p;break e}r(g,S);break}else e(g,S);S=S.sibling}y.type===Rs?(p=Zn(y.props.children,g.mode,_,y.key),p.return=g,g=p):(_=Ka(y.type,y.key,y.props,null,g.mode,_),_.ref=Oi(g,p,y),_.return=g,g=_)}return o(g);case Ts:e:{for(S=y.key;p!==null;){if(p.key===S)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){r(g,p.sibling),p=s(p,y.children||[]),p.return=g,g=p;break e}else{r(g,p);break}else e(g,p);p=p.sibling}p=Yc(y,g.mode,_),p.return=g,g=p}return o(g);case Gr:return S=y._init,x(g,p,S(y._payload),_)}if(Bi(y))return w(g,p,y,_);if(Ti(y))return v(g,p,y,_);ya(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(r(g,p.sibling),p=s(p,y),p.return=g,g=p):(r(g,p),p=Jc(y,g.mode,_),p.return=g,g=p),o(g)):r(g,p)}return x}var ai=_y(!0),ky=_y(!1),hl=jn(null),fl=null,$s=null,lh=null;function ch(){lh=$s=fl=null}function uh(t){var e=hl.current;ve(hl),t._currentValue=e}function Wu(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Vs(t,e){fl=t,lh=$s=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(lt=!0),t.firstContext=null)}function Pt(t){var e=t._currentValue;if(lh!==t)if(t={context:t,memoizedValue:e,next:null},$s===null){if(fl===null)throw Error(P(308));$s=t,fl.dependencies={lanes:0,firstContext:t}}else $s=$s.next=t;return e}var zn=null;function dh(t){zn===null?zn=[t]:zn.push(t)}function Sy(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,dh(e)):(r.next=s.next,s.next=r),e.interleaved=r,Pr(t,n)}function Pr(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Qr=!1;function hh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ey(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ar(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function mn(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ae&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,Pr(t,r)}return s=n.interleaved,s===null?(e.next=e,dh(n)):(e.next=s.next,s.next=e),n.interleaved=e,Pr(t,r)}function Ba(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Yd(t,r)}}function Zf(t,e){var r=t.updateQueue,n=t.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=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function pl(t,e,r,n){var s=t.updateQueue;Qr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,u=c=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((n&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=t,v=a;switch(f=e,h=r,v.tag){case 1:if(w=v.payload,typeof w=="function"){d=w.call(h,d,f);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,f=typeof w=="function"?w.call(h,d,f):w,f==null)break e;d=ke({},d,f);break e;case 2:Qr=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);rs|=o,t.lanes=o,t.memoizedState=d}}function Xf(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(P(191,s));s.call(n)}}}var Go={},ur=jn(Go),xo=jn(Go),bo=jn(Go);function Hn(t){if(t===Go)throw Error(P(174));return t}function fh(t,e){switch(me(bo,e),me(xo,t),me(ur,Go),t=e.nodeType,t){case 9:case 11:e=(e
vendor: 6,847 bytes, line 38
38=e.documentElement)?e.namespaceURI:Su(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Su(e,t)}ve(ur),me(ur,e)}function li(){ve(ur),ve(xo),ve(bo)}function Cy(t){Hn(bo.current);var e=Hn(ur.current),r=Su(e,t.type);e!==r&&(me(xo,t),me(ur,r))}function ph(t){xo.current===t&&(ve(ur),ve(xo))}var be=jn(0);function ml(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Wc=[];function mh(){for(var t=0;t<Wc.length;t++)Wc[t]._workInProgressVersionPrimary=null;Wc.length=0}var za=Lr.ReactCurrentDispatcher,Vc=Lr.ReactCurrentBatchConfig,ts=0,_e=null,Le=null,Ue=null,gl=!1,eo=!1,_o=0,Vb=0;function Ke(){throw Error(P(321))}function gh(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Qt(t[r],e[r]))return!1;return!0}function yh(t,e,r,n,s,i){if(ts=i,_e=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,za.current=t===null||t.memoizedState===null?Qb:Jb,t=r(n,s),eo){i=0;do{if(eo=!1,_o=0,25<=i)throw Error(P(301));i+=1,Ue=Le=null,e.updateQueue=null,za.current=Yb,t=r(n,s)}while(eo)}if(za.current=yl,e=Le!==null&&Le.next!==null,ts=0,Ue=Le=_e=null,gl=!1,e)throw Error(P(300));return t}function vh(){var t=_o!==0;return _o=0,t}function rr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?_e.memoizedState=Ue=t:Ue=Ue.next=t,Ue}function Nt(){if(Le===null){var t=_e.alternate;t=t!==null?t.memoizedState:null}else t=Le.next;var e=Ue===null?_e.memoizedState:Ue.next;if(e!==null)Ue=e,Le=t;else{if(t===null)throw Error(P(310));Le=t,t={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},Ue===null?_e.memoizedState=Ue=t:Ue=Ue.next=t}return Ue}function ko(t,e){return typeof e=="function"?e(t):e}function qc(t){var e=Nt(),r=e.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=t;var n=Le,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 u=c.lane;if((ts&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:t(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=n):l=l.next=d,_e.lanes|=u,rs|=u}c=c.next}while(c!==null&&c!==i);l===null?o=n:l.next=a,Qt(n,e.memoizedState)||(lt=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do i=s.lane,_e.lanes|=i,rs|=i,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function Kc(t){var e=Nt(),r=e.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,i=e.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);Qt(i,e.memoizedState)||(lt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),r.lastRenderedState=i}return[i,n]}function Ay(){}function Ty(t,e){var r=_e,n=Nt(),s=e(),i=!Qt(n.memoizedState,s);if(i&&(n.memoizedState=s,lt=!0),n=n.queue,wh(Ny.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||Ue!==null&&Ue.memoizedState.tag&1){if(r.flags|=2048,So(9,Py.bind(null,r,n,s,e),void 0,null),Fe===null)throw Error(P(349));ts&30||Ry(r,e,s)}return s}function Ry(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=_e.updateQueue,e===null?(e={lastEffect:null,stores:null},_e.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function Py(t,e,r,n){e.value=r,e.getSnapshot=n,jy(e)&&Oy(t)}function Ny(t,e,r){return r(function(){jy(e)&&Oy(t)})}function jy(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Qt(t,r)}catch{return!0}}function Oy(t){var e=Pr(t,1);e!==null&&Gt(e,t,1,-1)}function ep(t){var e=rr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:t},e.queue=t,t=t.dispatch=Gb.bind(null,_e,t),[e.memoizedState,t]}function So(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=_e.updateQueue,e===null?(e={lastEffect:null,stores:null},_e.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function Iy(){return Nt().memoizedState}function Ha(t,e,r,n){var s=rr();_e.flags|=t,s.memoizedState=So(1|e,r,void 0,n===void 0?null:n)}function Yl(t,e,r,n){var s=Nt();n=n===void 0?null:n;var i=void 0;if(Le!==null){var o=Le.memoizedState;if(i=o.destroy,n!==null&&gh(n,o.deps)){s.memoizedState=So(e,r,i,n);return}}_e.flags|=t,s.memoizedState=So(1|e,r,i,n)}function tp(t,e){return Ha(8390656,8,t,e)}function wh(t,e){return Yl(2048,8,t,e)}function Ly(t,e){return Yl(4,2,t,e)}function Dy(t,e){return Yl(4,4,t,e)}function $y(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function My(t,e,r){return r=r!=null?r.concat([t]):null,Yl(4,4,$y.bind(null,e,t),r)}function xh(){}function Uy(t,e){var r=Nt();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&gh(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function Fy(t,e){var r=Nt();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&gh(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function By(t,e,r){return ts&21?(Qt(r,e)||(r=qg(),_e.lanes|=r,rs|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,lt=!0),t.memoizedState=r)}function qb(t,e){var r=he;he=r!==0&&4>r?r:4,t(!0);var n=Vc.transition;Vc.transition={};try{t(!1),e()}finally{he=r,Vc.transition=n}}function zy(){return Nt().memoizedState}function Kb(t,e,r){var n=yn(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Hy(t))Wy(e,r);else if(r=Sy(t,e,r,n),r!==null){var s=rt();Gt(r,t,n,s),Vy(r,e,n)}}function Gb(t,e,r){var n=yn(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Hy(t))Wy(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Qt(a,o)){var l=e.interleaved;l===null?(s.next=s,dh(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=Sy(t,e,s,n),r!==null&&(s=rt(),Gt(r,t,n,s),Vy(r,e,n))}}function Hy(t){var e=t.alternate;return t===_e||e!==null&&e===_e}function Wy(t,e){eo=gl=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function Vy(t,e,r){if(r&4194240){var n=e.lanes;
vendor: 6,092 bytes, lines 38-40
38n&=t.pendingLanes,r|=n,e.lanes=r,Yd(t,r)}}var yl={readContext:Pt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},Qb={readContext:Pt,useCallback:function(t,e){return rr().memoizedState=[t,e===void 0?null:e],t},useContext:Pt,useEffect:tp,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Ha(4194308,4,$y.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Ha(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ha(4,2,t,e)},useMemo:function(t,e){var r=rr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=rr();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Kb.bind(null,_e,t),[n.memoizedState,t]},useRef:function(t){var e=rr();return t={current:t},e.memoizedState=t},useState:ep,useDebugValue:xh,useDeferredValue:function(t){return rr().memoizedState=t},useTransition:function(){var t=ep(!1),e=t[0];return t=qb.bind(null,t[1]),rr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=_e,s=rr();if(xe){if(r===void 0)throw Error(P(407));r=r()}else{if(r=e(),Fe===null)throw Error(P(349));ts&30||Ry(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,tp(Ny.bind(null,n,i,t),[t]),n.flags|=2048,So(9,Py.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=rr(),e=Fe.identifierPrefix;if(xe){var r=Cr,n=Er;r=(n&~(1<<32-Kt(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=_o++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=Vb++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},Jb={readContext:Pt,useCallback:Uy,useContext:Pt,useEffect:wh,useImperativeHandle:My,useInsertionEffect:Ly,useLayoutEffect:Dy,useMemo:Fy,useReducer:qc,useRef:Iy,useState:function(){return qc(ko)},useDebugValue:xh,useDeferredValue:function(t){var e=Nt();return By(e,Le.memoizedState,t)},useTransition:function(){var t=qc(ko)[0],e=Nt().memoizedState;return[t,e]},useMutableSource:Ay,useSyncExternalStore:Ty,useId:zy,unstable_isNewReconciler:!1},Yb={readContext:Pt,useCallback:Uy,useContext:Pt,useEffect:wh,useImperativeHandle:My,useInsertionEffect:Ly,useLayoutEffect:Dy,useMemo:Fy,useReducer:Kc,useRef:Iy,useState:function(){return Kc(ko)},useDebugValue:xh,useDeferredValue:function(t){var e=Nt();return Le===null?e.memoizedState=t:By(e,Le.memoizedState,t)},useTransition:function(){var t=Kc(ko)[0],e=Nt().memoizedState;return[t,e]},useMutableSource:Ay,useSyncExternalStore:Ty,useId:zy,unstable_isNewReconciler:!1};function Ut(t,e){if(t&&t.defaultProps){e=ke({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Vu(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:ke({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var Zl={isMounted:function(t){return(t=t._reactInternals)?ls(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=rt(),s=yn(t),i=Ar(n,s);i.payload=e,r!=null&&(i.callback=r),e=mn(t,i,s),e!==null&&(Gt(e,t,s,n),Ba(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=rt(),s=yn(t),i=Ar(n,s);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=mn(t,i,s),e!==null&&(Gt(e,t,s,n),Ba(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=rt(),n=yn(t),s=Ar(r,n);s.tag=2,e!=null&&(s.callback=e),e=mn(t,s,n),e!==null&&(Gt(e,t,n,r),Ba(e,t,n))}};function rp(t,e,r,n,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,o):e.prototype&&e.prototype.isPureReactComponent?!go(r,n)||!go(s,i):!0}function qy(t,e,r){var n=!1,s=Sn,i=e.contextType;return typeof i=="object"&&i!==null?i=Pt(i):(s=ut(e)?Xn:Ze.current,n=e.contextTypes,i=(n=n!=null)?ii(t,s):Sn),e=new e(r,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Zl,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function np(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&Zl.enqueueReplaceState(e,e.state,null)}function qu(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},hh(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Pt(i):(i=ut(e)?Xn:Ze.current,s.context=ii(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(Vu(t,e,i,r),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&Zl.enqueueReplaceState(s,s.state,null),pl(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function ci(t,e){try{var r="",n=e;do r+=Ex(n),n=n.return;while(n);var s=r}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function Gc(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Ku(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var Zb=typeof WeakMap=="function"?WeakMap:Map;function Ky(t,e,r){r=Ar(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){wl||(wl=!0,nd=n),Ku(t,e)},r}function Gy(t,e,r){r=Ar(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){Ku(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Ku(t,e),t
vendor: 7,089 bytes, line 40
40ypeof n!="function"&&(gn===null?gn=new Set([this]):gn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function sp(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new Zb;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=h_.bind(null,t,e,r),e.then(t,t))}function ip(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function op(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Ar(-1,1),e.tag=2,mn(r,e,1))),r.lanes|=1),t)}var Xb=Lr.ReactCurrentOwner,lt=!1;function et(t,e,r,n){e.child=t===null?ky(e,null,r,n):ai(e,t.child,r,n)}function ap(t,e,r,n,s){r=r.render;var i=e.ref;return Vs(e,s),n=yh(t,e,r,n,i,s),r=vh(),t!==null&&!lt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Nr(t,e,s)):(xe&&r&&ih(e),e.flags|=1,et(t,e,n,s),e.child)}function lp(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!Th(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,Qy(t,e,i,n,s)):(t=Ka(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:go,r(o,n)&&t.ref===e.ref)return Nr(t,e,s)}return e.flags|=1,t=vn(i,n),t.ref=e.ref,t.return=e,e.child=t}function Qy(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(go(i,n)&&t.ref===e.ref)if(lt=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(lt=!0);else return e.lanes=t.lanes,Nr(t,e,s)}return Gu(t,e,r,n,s)}function Jy(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(Us,ht),ht|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,me(Us,ht),ht|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,me(Us,ht),ht|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,me(Us,ht),ht|=n;return et(t,e,s,r),e.child}function Yy(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Gu(t,e,r,n,s){var i=ut(r)?Xn:Ze.current;return i=ii(e,i),Vs(e,s),r=yh(t,e,r,n,i,s),n=vh(),t!==null&&!lt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Nr(t,e,s)):(xe&&n&&ih(e),e.flags|=1,et(t,e,r,s),e.child)}function cp(t,e,r,n,s){if(ut(r)){var i=!0;cl(e)}else i=!1;if(Vs(e,s),e.stateNode===null)Wa(t,e),qy(e,r,n),qu(e,r,n,s),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Pt(c):(c=ut(r)?Xn:Ze.current,c=ii(e,c));var u=r.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&np(e,o,n,c),Qr=!1;var f=e.memoizedState;o.state=f,pl(e,n,o,s),l=e.memoizedState,a!==n||f!==l||ct.current||Qr?(typeof u=="function"&&(Vu(e,r,u,n),l=e.memoizedState),(a=Qr||rp(e,r,a,n,f,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,Ey(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Ut(e.type,a),o.props=c,d=e.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Pt(l):(l=ut(r)?Xn:Ze.current,l=ii(e,l));var h=r.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&np(e,o,n,l),Qr=!1,f=e.memoizedState,o.state=f,pl(e,n,o,s);var w=e.memoizedState;a!==d||f!==w||ct.current||Qr?(typeof h=="function"&&(Vu(e,r,h,n),w=e.memoizedState),(c=Qr||rp(e,r,c,n,f,w,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,w,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=w),o.props=n,o.state=w,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),n=!1)}return Qu(t,e,r,n,i,s)}function Qu(t,e,r,n,s,i){Yy(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return s&&Gf(e,r,!1),Nr(t,e,i);n=e.stateNode,Xb.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=ai(e,t.child,null,i),e.child=ai(e,null,a,i)):et(t,e,a,i),e.memoizedState=n.state,s&&Gf(e,r,!0),e.child}function Zy(t){var e=t.stateNode;e.pendingContext?Kf(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Kf(t,e.context,!1),fh(t,e.containerInfo)}function up(t,e,r,n,s){return oi(),ah(s),e.flags|=256,et(t,e,r,n),e.child}var Ju={dehydrated:null,treeContext:null,retryLane:0};function Yu(t){return{baseLanes:t,cachePool:null,transitions:null}}function Xy(t,e,r){var n=e.pendingProps,s=be.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),me(be,s&1),t===null)return Hu(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,i?(n=e.mode,i=e.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=tc(o,n,0,null),t=Zn(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=Yu(r),e.memoizedState=Ju,t):bh(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return e_(t,e,o,n,a,s,r);if(i){i=n.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=vn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=vn(a,i):(i=Zn(i,o,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,o=t.child.memoizedState,o=o===null?Yu(r):{base
vendor: 7,716 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~r,e.memoizedState=Ju,n}return i=t.child,t=i.sibling,n=vn(i,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function bh(t,e){return e=tc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function va(t,e,r,n){return n!==null&&ah(n),ai(e,t.child,null,r),t=bh(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function e_(t,e,r,n,s,i,o){if(r)return e.flags&256?(e.flags&=-257,n=Gc(Error(P(422))),va(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=tc({mode:"visible",children:n.children},s,0,null),i=Zn(i,s,o,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&ai(e,t.child,null,o),e.child.memoizedState=Yu(o),e.memoizedState=Ju,i);if(!(e.mode&1))return va(t,e,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(P(419)),n=Gc(i,n,void 0),va(t,e,o,n)}if(a=(o&t.childLanes)!==0,lt||a){if(n=Fe,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,Pr(t,s),Gt(n,t,s,-1))}return Ah(),n=Gc(Error(P(421))),va(t,e,o,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=f_.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,mt=pn(s.nextSibling),gt=e,xe=!0,Vt=null,t!==null&&(Et[Ct++]=Er,Et[Ct++]=Cr,Et[Ct++]=es,Er=t.id,Cr=t.overflow,es=e),e=bh(e,n.children),e.flags|=4096,e)}function dp(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Wu(t.return,e,r)}function Qc(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function ev(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(et(t,e,n.children,r),n=be.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&dp(t,r,e);else if(t.tag===19)dp(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(me(be,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&ml(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),Qc(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&ml(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}Qc(e,!0,r,null,i);break;case"together":Qc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Wa(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Nr(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),rs|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(P(153));if(e.child!==null){for(t=e.child,r=vn(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=vn(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function t_(t,e,r){switch(e.tag){case 3:Zy(e),oi();break;case 5:Cy(e);break;case 1:ut(e.type)&&cl(e);break;case 4:fh(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;me(hl,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(me(be,be.current&1),e.flags|=128,null):r&e.child.childLanes?Xy(t,e,r):(me(be,be.current&1),t=Nr(t,e,r),t!==null?t.sibling:null);me(be,be.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return ev(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),me(be,be.current),n)break;return null;case 22:case 23:return e.lanes=0,Jy(t,e,r)}return Nr(t,e,r)}var tv,Zu,rv,nv;tv=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Zu=function(){};rv=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,Hn(ur.current);var i=null;switch(r){case"input":s=xu(t,s),n=xu(t,n),i=[];break;case"select":s=ke({},s,{value:void 0}),n=ke({},n,{value:void 0}),i=[];break;case"textarea":s=ku(t,s),n=ku(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=al)}Eu(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"&&(lo.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"&&(lo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&ye("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};nv=function(t,e,r,n){r!==n&&(e.flags|=4)};function Ii(t,e){if(!xe)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Ge(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function r_(t,e,r){var n=e.pendingProps;switch(oh(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(e),null;case 1:return ut(e.type)&&ll(),Ge(e),null;case 3:return n=e.stateNode,li(),ve(ct),ve(Ze),mh(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(ga(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Vt!==null&&(od(Vt),Vt=null))),Zu(t,e),Ge(e),null;case 5:ph(e);var s=Hn(bo.current);if(r=e.type,t!==null&&e.stateNode!=null)rv(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(P(166));return Ge(e),null}if(t=Hn(ur.current),ga(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[lr]=e,n[wo]=i,t=(e.mode&1)!==0,r){case"dialog":ye("cancel",n),ye("
40close",n);break;case"iframe":case"object":case"embed":ye("load",n);break;case"video":case"audio":for(s=0;s<Hi.length;s++)ye(Hi[s],n);break;case"source":ye("error",n);break;case"img":case"image":case"link":ye("error",n),ye("load",n);break;case"details":ye("toggle",n);break;case"input":xf(n,i),ye("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},ye("invalid",n);break;case"textarea":_f(n,i),ye("invalid",n)}Eu(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&&ma(n.textContent,a,t),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ma(n.textContent,a,t),s=["children",""+a]):lo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ye("scroll",n)}switch(r){case"input":aa(n),bf(n,i,!0);break;case"textarea":aa(n),kf(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=al)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Ng(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[lr]=e,t[wo]=n,tv(t,e,!1,!1),e.stateNode=t;e:{switch(o=Cu(r,n),r){case"dialog":ye("cancel",t),ye("close",t),s=n;break;case"iframe":case"object":case"embed":ye("load",t),s=n;break;case"video":case"audio":for(s=0;s<Hi.length;s++)ye(Hi[s],t);s=n;break;case"source":ye("error",t),s=n;break;case"img":case"image":case"link":ye("error",t),ye("load",t),s=n;break;case"details":ye("toggle",t),s=n;break;case"input":xf(t,n),s=xu(t,n),ye("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=ke({},n,{value:void 0}),ye("invalid",t);break;case"textarea":_f(t,n),s=ku(t,n),ye("invalid",t);break;default:s=n}Eu(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Ig(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&jg(t,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&co(t,l):typeof l=="number"&&co(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(lo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ye("scroll",t):l!=null&&Vd(t,i,l,o))}switch(r){case"input":aa(t),bf(t,n,!1);break;case"textarea":aa(t),kf(t);break;case"option":n.value!=null&&t.setAttribute("value",""+kn(n.value));break;case"select":t.multiple=!!n.multiple,i=n.value,i!=null?Bs(t,!!n.multiple,i,!1):n.defaultValue!=null&&Bs(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=al)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Ge(e),null;case 6:if(t&&e.stateNode!=null)nv(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(P(166));if(r=Hn(bo.current),Hn(ur.current),ga(e)){if(n=e.stateNode,r=e.memoizedProps,n[lr]=e,(i=n.nodeValue!==r)&&(t=gt,t!==null))switch(t.tag){case 3:ma(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ma(n.nodeValue,r,(t.mode&1)!==0)}i&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[lr]=e,e.stateNode=n}return Ge(e),null;case 13:if(ve(be),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(xe&&mt!==null&&e.mode&1&&!(e.flags&128))by(),oi(),e.flags|=98560,i=!1;else if(i=ga(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(P(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(P(317));i[lr]=e}else oi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ge(e),i=!1}else Vt!==null&&(od(Vt),Vt=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||be.current&1?$e===0&&($e=3):Ah())),e.updateQueue!==null&&(e.flags|=4),Ge(e),null);case 4:return li(),Zu(t,e),t===null&&yo(e.stateNode.containerInfo),Ge(e),null;
vendor: 29,764 bytes, line 40
40case 10:return uh(e.type._context),Ge(e),null;case 17:return ut(e.type)&&ll(),Ge(e),null;case 19:if(ve(be),i=e.memoizedState,i===null)return Ge(e),null;if(n=(e.flags&128)!==0,o=i.rendering,o===null)if(n)Ii(i,!1);else{if($e!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=ml(t),o!==null){for(e.flags|=128,Ii(i,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)i=r,t=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,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,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return me(be,be.current&1|2),e.child}t=t.sibling}i.tail!==null&&Te()>ui&&(e.flags|=128,n=!0,Ii(i,!1),e.lanes=4194304)}else{if(!n)if(t=ml(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Ii(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!xe)return Ge(e),null}else 2*Te()-i.renderingStartTime>ui&&r!==1073741824&&(e.flags|=128,n=!0,Ii(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Te(),e.sibling=null,r=be.current,me(be,n?r&1|2:r&1),e):(Ge(e),null);case 22:case 23:return Ch(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?ht&1073741824&&(Ge(e),e.subtreeFlags&6&&(e.flags|=8192)):Ge(e),null;case 24:return null;case 25:return null}throw Error(P(156,e.tag))}function n_(t,e){switch(oh(e),e.tag){case 1:return ut(e.type)&&ll(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return li(),ve(ct),ve(Ze),mh(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ph(e),null;case 13:if(ve(be),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(P(340));oi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ve(be),null;case 4:return li(),null;case 10:return uh(e.type._context),null;case 22:case 23:return Ch(),null;case 24:return null;default:return null}}var wa=!1,Ye=!1,s_=typeof WeakSet=="function"?WeakSet:Set,F=null;function Ms(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ae(t,e,n)}else r.current=null}function Xu(t,e,r){try{r()}catch(n){Ae(t,e,n)}}var hp=!1;function i_(t,e){if(Du=sl,t=ly(),sh(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.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,u=0,d=t,f=null;t:for(;;){for(var h;d!==r||s!==0&&d.nodeType!==3||(a=o+s),d!==i||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===r&&++c===s&&(a=o),f===i&&++u===n&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for($u={focusedElem:t,selectionRange:r},sl=!1,F=e;F!==null;)if(e=F,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,F=t;else for(;F!==null;){e=F;try{var w=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,x=w.memoizedState,g=e.stateNode,p=g.getSnapshotBeforeUpdate(e.elementType===e.type?v:Ut(e.type,v),x);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(_){Ae(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,F=t;break}F=e.return}return w=hp,hp=!1,w}function to(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Xu(e,r,i)}s=s.next}while(s!==n)}}function Xl(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function ed(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function sv(t){var e=t.alternate;e!==null&&(t.alternate=null,sv(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[lr],delete e[wo],delete e[Fu],delete e[Bb],delete e[zb])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function iv(t){return t.tag===5||t.tag===3||t.tag===4}function fp(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||iv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function td(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=al));else if(n!==4&&(t=t.child,t!==null))for(td(t,e,r),t=t.sibling;t!==null;)td(t,e,r),t=t.sibling}function rd(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(rd(t,e,r),t=t.sibling;t!==null;)rd(t,e,r),t=t.sibling}var ze=null,Wt=!1;function zr(t,e,r){for(r=r.child;r!==null;)ov(t,e,r),r=r.sibling}function ov(t,e,r){if(cr&&typeof cr.onCommitFiberUnmount=="function")try{cr.onCommitFiberUnmount(Vl,r)}catch{}switch(r.tag){case 5:Ye||Ms(r,e);case 6:var n=ze,s=Wt;ze=null,zr(t,e,r),ze=n,Wt=s,ze!==null&&(Wt?(t=ze,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):ze.removeChild(r.stateNode));break;case 18:ze!==null&&(Wt?(t=ze,r=r.stateNode,t.nodeType===8?zc(t.parentNode,r):t.nodeType===1&&zc(t,r),po(t)):zc(ze,r.stateNode));break;case 4:n=ze,s=Wt,ze=r.stateNode.containerInfo,Wt=!0,zr(t,e,r),ze=n,Wt=s;break;case 0:case 11:case 14:case 15:if(!Ye&&(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)&&Xu(r,e,o),s=s.next}while(s!==n)}zr(t,e,r);break;case 1:if(!Ye&&(Ms(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Ae(r,e,a)}zr(t,e,r);break;case 21:zr(t,e,r);break;case 22:r.mode&1?(Ye=(n=Ye)||r.memoizedState!==null,zr(t,e,r),Ye=n):zr(t,e,r);break;default:zr(t,e,r)}}function pp(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new s_),e.forEach(function(n){var s=p_.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Dt(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:ze=a.stateNode,Wt=!1;break e;case 3:ze=a.stateNode.containerInfo,Wt=!0;break e;case 4:ze=a.stateNode.containerInfo,Wt=!0;break e}a=a.return}if(ze===null)throw Error(P(160));ov(i,o,s),ze=null,Wt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Ae(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)av(e,t),e=e.sibling}function av(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Dt(e,t),tr(t),n&4){try{to(3,t,t.return),Xl(3,t)}catch(v){Ae(t,t.return,v)}try{to(5,t,t.return)}catch(v){Ae(t,t.return,v)}}break;case 1:Dt(e,t),tr(t),n&512&&r!==null&&Ms(r,r.return);break;case 5:if(Dt(e,t),tr(t),n&512&&r!==null&&Ms(r,r.return),t.flags&32){var s=t.stateNode;try{co(s,"")}catch(v){Ae(t,t.return,v)}}if(n&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=r!==null?r.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Rg(s,i),Cu(a,o);var c=Cu(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?Ig(s,d):u==="dangerouslySetInnerHTML"?jg(s,d):u==="children"?co(s,d):Vd(s,u,d,c)}switch(a){case"input":bu(s,i);break;case"textarea":Pg(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Bs(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?Bs(s,!!i.multiple,i.defaultValue,!0):Bs(s,!!i.multiple,i.multiple?[]:"",!1))}s[wo]=i}catch(v){Ae(t,t.return,v)}}break;case 6:if(Dt(e,t),tr(t),n&4){if(t.stateNode===null)throw Error(P(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(v){Ae(t,t.return,v)}}break;case 3:if(Dt(e,t),tr(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{po(e.containerInfo)}catch(v){Ae(t,t.return,v)}break;case 4:Dt(e,t),tr(t);break;case 13:Dt(e,t),tr(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Sh=Te())),n&4&&pp(t);break;case 22:if(u=r!==null&&r.memoizedState!==null,t.mode&1?(Ye=(c=Ye)||u,Dt(e,t),Ye=c):Dt(e,t),tr(t),n&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(F=t,u=t.child;u!==null;){for(d=F=u;F!==null;){switch(f=F,h=f.child,f.tag){case 0:case 11:case 14:case 15:to(4,f,f.return);break;case 1:Ms(f,f.return);var w=f.stateNode;if(typeof w.componentWillUnmount=="function"){n=f,r=f.return;try{e=n,w.props=e.memoizedProps,w.state=e.memoizedState,w.componentWillUnmount()}catch(v){Ae(n,r,v)}}break;case 5:Ms(f,f.return);break;case 22:if(f.memoizedState!==null){gp(d);continue}}h!==null?(h.return=f,F=h):gp(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Og("display",o))}catch(v){Ae(t,t.return,v)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){Ae(t,t.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Dt(e,t),tr(t),n&4&&pp(t);break;case 21:break;default:Dt(e,t),tr(t)}}function tr(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(iv(r)){var n=r;break e}r=r.return}throw Error(P(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(co(s,""),n.flags&=-33);var i=fp(t);rd(t,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=fp(t);td(t,a,o);break;default:throw Error(P(161))}}catch(l){Ae(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function o_(t,e,r){F=t,lv(t)}function lv(t,e,r){for(var n=(t.mode&1)!==0;F!==null;){var s=F,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||wa;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ye;a=wa;var c=Ye;if(wa=o,(Ye=l)&&!c)for(F=s;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?yp(s):l!==null?(l.return=o,F=l):yp(s);for(;i!==null;)F=i,lv(i),i=i.sibling;F=s,wa=a,Ye=c}mp(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,F=i):mp(t)}}function mp(t){for(;F!==null;){var e=F;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ye||Xl(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Ye)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:Ut(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&Xf(e,i,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Xf(e,o,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;var l=e.memoizedProps;switch(e.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(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&po(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}Ye||e.flags&512&&ed(e)}catch(f){Ae(e,e.return,f)}}if(e===t){F=null;break}if(r=e.sibling,r!==null){r.return=e.return,F=r;break}F=e.return}}function gp(t){for(;F!==null;){var e=F;if(e===t){F=null;break}var r=e.sibling;if(r!==null){r.return=e.return,F=r;break}F=e.return}}function yp(t){for(;F!==null;){var e=F;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Xl(4,e)}catch(l){Ae(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(l){Ae(e,s,l)}}var i=e.return;try{ed(e)}catch(l){Ae(e,i,l)}break;case 5:var o=e.return;try{ed(e)}catch(l){Ae(e,o,l)}}}catch(l){Ae(e,e.return,l)}if(e===t){F=null;break}var a=e.sibling;if(a!==null){a.return=e.return,F=a;break}F=e.return}}var a_=Math.ceil,vl=Lr.ReactCurrentDispatcher,_h=Lr.ReactCurrentOwner,Rt=Lr.ReactCurrentBatchConfig,ae=0,Fe=null,Ne=null,He=0,ht=0,Us=jn(0),$e=0,Eo=null,rs=0,ec=0,kh=0,ro=null,at=null,Sh=0,ui=1/0,xr=null,wl=!1,nd=null,gn=null,xa=!1,ln=null,xl=0,no=0,sd=null,Va=-1,qa=0;function rt(){return ae&6?Te():Va!==-1?Va:Va=Te()}function yn(t){return t.mode&1?ae&2&&He!==0?He&-He:Wb.transition!==null?(qa===0&&(qa=qg()),qa):(t=he,t!==0||(t=window.event,t=t===void 0?16:Xg(t.type)),t):1}function Gt(t,e,r,n){if(50<no)throw no=0,sd=null,Error(P(185));Vo(t,r,n),(!(ae&2)||t!==Fe)&&(t===Fe&&(!(ae&2)&&(ec|=r),$e===4&&Zr(t,He)),dt(t,n),r===1&&ae===0&&!(e.mode&1)&&(ui=Te()+500,Jl&&On()))}function dt(t,e){var r=t.callbackNode;Wx(t,e);var n=nl(t,t===Fe?He:0);if(n===0)r!==null&&Cf(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&Cf(r),e===1)t.tag===0?Hb(vp.bind(null,t)):vy(vp.bind(null,t)),Ub(function(){!(ae&6)&&On()}),r=null;else{switch(Kg(n)){case 1:r=Jd;break;case 4:r=Wg;break;case 16:r=rl;break;case 536870912:r=Vg;break;default:r=rl}r=gv(r,cv.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function cv(t,e){if(Va=-1,qa=0,ae&6)throw Error(P(327));var r=t.callbackNode;if(qs()&&t.callbackNode!==r)return null;var n=nl(t,t===Fe?He:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=bl(t,n);else{e=n;var s=ae;ae|=2;var i=dv();(Fe!==t||He!==e)&&(xr=null,ui=Te()+500,Yn(t,e));do try{u_();break}catch(a){uv(t,a)}while(!0);ch(),vl.current=i,ae=s,Ne!==null?e=0:(Fe=null,He=0,e=$e)}if(e!==0){if(e===2&&(s=Nu(t),s!==0&&(n=s,e=id(t,s))),e===1)throw r=Eo,Yn(t,0),Zr(t,n),dt(t,Te()),r;if(e===6)Zr(t,n);else{if(s=t.current.alternate,!(n&30)&&!l_(s)&&(e=bl(t,n),e===2&&(i=Nu(t),i!==0&&(n=i,e=id(t,i))),e===1))throw r=Eo,Yn(t,0),Zr(t,n),dt(t,Te()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error(P(345));case 2:Un(t,at,xr);break;case 3:if(Zr(t,n),(n&130023424)===n&&(e=Sh+500-Te(),10<e)){if(nl(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){rt(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Uu(Un.bind(null,t,at,xr),e);break}Un(t,at,xr);break;case 4:if(Zr(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var o=31-Kt(n);i=1<<o,o=e[o],o>s&&(s=o),n&=~i}if(n=s,n=Te()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*a_(n/1960))-n,10<n){t.timeoutHandle=Uu(Un.bind(null,t,at,xr),n);break}Un(t,at,xr);break;case 5:Un(t,at,xr);break;default:throw Error(P(329))}}}return dt(t,Te()),t.callbackNode===r?cv.bind(null,t):null}function id(t,e){var r=ro;return t.current.memoizedState.isDehydrated&&(Yn(t,e).flags|=256),t=bl(t,e),t!==2&&(e=at,at=r,e!==null&&od(e)),t}function od(t){at===null?at=t:at.push.apply(at,t)}function l_(t){for(var e=t;;){if(e.flags&16384){var r=e.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(!Qt(i(),s))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Zr(t,e){for(e&=~kh,e&=~ec,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-Kt(e),n=1<<r;t[r]=-1,e&=~n}}function vp(t){if(ae&6)throw Error(P(327));qs();var e=nl(t,0);if(!(e&1))return dt(t,Te()),null;var r=bl(t,e);if(t.tag!==0&&r===2){var n=Nu(t);n!==0&&(e=n,r=id(t,n))}if(r===1)throw r=Eo,Yn(t,0),Zr(t,e),dt(t,Te()),r;if(r===6)throw Error(P(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Un(t,at,xr),dt(t,Te()),null}function Eh(t,e){var r=ae;ae|=1;try{return t(e)}finally{ae=r,ae===0&&(ui=Te()+500,Jl&&On())}}function ns(t){ln!==null&&ln.tag===0&&!(ae&6)&&qs();var e=ae;ae|=1;var r=Rt.transition,n=he;try{if(Rt.transition=null,he=1,t)return t()}finally{he=n,Rt.transition=r,ae=e,!(ae&6)&&On()}}function Ch(){ht=Us.current,ve(Us)}function Yn(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,Mb(r)),Ne!==null)for(r=Ne.return;r!==null;){var n=r;switch(oh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&ll();break;case 3:li(),ve(ct),ve(Ze),mh();break;case 5:ph(n);break;case 4:li();break;case 13:ve(be);break;case 19:ve(be);break;case 10:uh(n.type._context);break;case 22:case 23:Ch()}r=r.return}if(Fe=t,Ne=t=vn(t.current,null),He=ht=e,$e=0,Eo=null,kh=ec=rs=0,at=ro=null,zn!==null){for(e=0;e<zn.length;e++)if(r=zn[e],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}zn=null}return t}function uv(t,e){do{var r=Ne;try{if(ch(),za.current=yl,gl){for(var n=_e.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}gl=!1}if(ts=0,Ue=Le=_e=null,eo=!1,_o=0,_h.current=null,r===null||r.return===null){$e=1,Eo=e,Ne=null;break}e:{var i=t,o=r.return,a=r,l=e;if(e=He,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=ip(o);if(h!==null){h.flags&=-257,op(h,o,a,i,e),h.mode&1&&sp(i,c,e),e=h,l=c;var w=e.updateQueue;if(w===null){var v=new Set;v.add(l),e.updateQueue=v}else w.add(l);break e}else{if(!(e&1)){sp(i,c,e),Ah();break e}l=Error(P(426))}}else if(xe&&a.mode&1){var x=ip(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),op(x,o,a,i,e),ah(ci(l,a));break e}}i=l=ci(l,a),$e!==4&&($e=2),ro===null?ro=[i]:ro.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var g=Ky(i,l,e);Zf(i,g);break e;case 1:a=l;var p=i.type,y=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(gn===null||!gn.has(y)))){i.flags|=65536,e&=-e,i.lanes|=e;var _=Gy(i,a,e);Zf(i,_);break e}}i=i.return}while(i!==null)}fv(r)}catch(k){e=k,Ne===r&&r!==null&&(Ne=r=r.return);continue}break}while(!0)}function dv(){var t=vl.current;return vl.current=yl,t===null?yl:t}function Ah(){($e===0||$e===3||$e===2)&&($e=4),Fe===null||!(rs&268435455)&&!(ec&268435455)||Zr(Fe,He)}function bl(t,e){var r=ae;ae|=2;var n=dv();(Fe!==t||He!==e)&&(xr=null,Yn(t,e));do try{c_();break}catch(s){uv(t,s)}while(!0);if(ch(),ae=r,vl.current=n,Ne!==null)throw Error(P(261));return Fe=null,He=0,$e}function c_(){for(;Ne!==null;)hv(Ne)}function u_(){for(;Ne!==null&&!Lx();)hv(Ne)}function hv(t){var e=mv(t.alternate,t,ht);t.memoizedProps=t.pendingProps,e===null?fv(t):Ne=e,_h.current=null}function fv(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=n_(r,e),r!==null){r.flags&=32767,Ne=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{$e=6,Ne=null;return}}else if(r=r_(r,e,ht),r!==null){Ne=r;return}if(e=e.sibling,e!==null){Ne=e;return}Ne=e=t}while(e!==null);$e===0&&($e=5)}function Un(t,e,r){var n=he,s=Rt.transition;try{Rt.transition=null,he=1,d_(t,e,r,n)}finally{Rt.transition=s,he=n}return null}function d_(t,e,r,n){do qs();while(ln!==null);if(ae&6)throw Error(P(327));r=t.finishedWork;var s=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(P(177));t.callbackNode=null,t.callbackPriority=0;var i=r.lanes|r.childLanes;if(Vx(t,i),t===Fe&&(Ne=Fe=null,He=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||xa||(xa=!0,gv(rl,function(){return qs(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Rt.transition,Rt.transition=null;var o=he;he=1;var a=ae;ae|=4,_h.current=null,i_(t,r),av(r,t),Nb($u),sl=!!Du,$u=Du=null,t.current=r,o_(r),Dx(),ae=a,he=o,Rt.transition=i}else t.current=r;if(xa&&(xa=!1,ln=t,xl=s),i=t.pendingLanes,i===0&&(gn=null),Ux(r.stateNode),dt(t,Te()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)s=e[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(wl)throw wl=!1,t=nd,nd=null,t;return xl&1&&t.tag!==0&&qs(),i=t.pendingLanes,i&1?t===sd?no++:(no=0,sd=t):no=0,On(),null}function qs(){if(ln!==null){var t=Kg(xl),e=Rt.transition,r=he;try{if(Rt.transition=null,he=16>t?16:t,ln===null)var n=!1;else{if(t=ln,ln=null,xl=0,ae&6)throw Error(P(331));var s=ae;for(ae|=4,F=t.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 u=F;switch(u.tag){case 0:case 11:case 15:to(8,u,i)}var d=u.child;if(d!==null)d.return=u,F=d;else for(;F!==null;){u=F;var f=u.sibling,h=u.return;if(sv(u),u===c){F=null;break}if(f!==null){f.return=h,F=f;break}F=h}}}var w=i.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==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:to(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,F=g;break e}F=i.return}}var p=t.current;for(F=p;F!==null;){o=F;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,F=y;else e:for(o=p;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Xl(9,a)}}catch(k){Ae(a,a.return,k)}if(a===o){F=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,F=_;break e}F=a.return}}if(ae=s,On(),cr&&typeof cr.onPostCommitFiberRoot=="function")try{cr.onPostCommitFiberRoot(Vl,t)}catch{}n=!0}return n}finally{he=r,Rt.transition=e}}return!1}function wp(t,e,r){e=ci(r,e),e=Ky(t,e,1),t=mn(t,e,1),e=rt(),t!==null&&(Vo(t,1,e),dt(t,e))}function Ae(t,e,r){if(t.tag===3)wp(t,t,r);else for(;e!==null;){if(e.tag===3){wp(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(gn===null||!gn.has(n))){t=ci(r,t),t=Gy(e,t,1),e=mn(e,t,1),t=rt(),e!==null&&(Vo(e,1,t),dt(e,t));break}}e=e.return}}function h_(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=rt(),t.pingedLanes|=t.suspendedLanes&r,Fe===t&&(He&r)===r&&($e===4||$e===3&&(He&130023424)===He&&500>Te()-Sh?Yn(t,0):kh|=r),dt(t,e)}function pv(t,e){e===0&&(t.mode&1?(e=ua,ua<<=1,!(ua&130023424)&&(ua=4194304)):e=1);var r=rt();t=Pr(t,e),t!==null&&(Vo(t,e,r),dt(t,r))}function f_(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),pv(t,r)}function p_(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(P(314))}n!==null&&n.delete(e),pv(t,r)}var mv;mv=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||ct.current)lt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return lt=!1,t_(t,e,r);lt=!!(t.flags&131072)}else lt=!1,xe&&e.flags&1048576&&wy(e,dl,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Wa(t,e),t=e.pendingProps;var s=ii(e,Ze.current);Vs(e,r),s=yh(null,e,n,t,s,r);var i=vh();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ut(n)?(i=!0,cl(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,hh(e),s.updater=Zl,e.stateNode=s,s._reactInternals=e,qu(e,n,t,r),e=Qu(null,e,n,!0,i,r)):(e.tag=0,xe&&i&&ih(e),et(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Wa(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=g_(n),t=Ut(n,t),s){case 0:e=Gu(null,e,n,t,r);break e;case 1:e=cp(null,e,n,t,r);break e;case 11:e=ap(null,e,n,t,r);break e;case 14:e=lp(null,e,n,Ut(n.type,t),r);break e}throw Error(P(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ut(n,s),Gu(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ut(n,s),cp(t,e,n,s,r);case 3:e:{if(Zy(e),t===null)throw Error(P(387));n=e.pendingProps,i=e.memoizedState,s=i.element,Ey(t,e),pl(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=ci(Error(P(423)),e),e=up(t,e,n,r,s);break e}else if(n!==s){s=ci(Error(P(424)),e),e=up(t,e,n,r,s);break e}else for(mt=pn(e.stateNode.containerInfo.firstChild),gt=e,xe=!0,Vt=null,r=ky(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(oi(),n===s){e=Nr(t,e,r);break e}et(t,e,n,r)}e=e.child}return e;case 5:return Cy(e),t===null&&Hu(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Mu(n,s)?o=null:i!==null&&Mu(n,i)&&(e.flags|=32),Yy(t,e),et(t,e,o,r),e.child;case 6:return t===null&&Hu(e),null;case 13:return Xy(t,e,r);case 4:return fh(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ai(e,null,n,r):et(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ut(n,s),ap(t,e,n,s,r);case 7:return et(t,e,e.pendingProps,r),e.child;case 8:return et(t,e,e.pendingProps.children,r),e.child;case 12:return et(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,me(hl,n._currentValue),n._currentValue=o,i!==null)if(Qt(i.value,o)){if(i.children===s.children&&!ct.current){e=Nr(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);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=Ar(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Wu(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(P(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Wu(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}et(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,Vs(e,r),s=Pt(s),n=n(s),e.flags|=1,et(t,e,n,r),e.child;case 14:return n=e.type,s=Ut(n,e.pendingProps),s=Ut(n.type,s),lp(t,e,n,s,r);case 15:return Qy(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ut(n,s),Wa(t,e),e.tag=1,ut(n)?(t=!0,cl(e)):t=!1,Vs(e,r),qy(e,n,s),qu(e,n,s,r),Qu(null,e,n,!0,t,r);case 19:return ev(t,e,r);case 22:return Jy(t,e,r)}throw Error(P(156,e.tag))};function gv(t,e){return Hg(t,e)}function m_(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 Tt(t,e,r,n){return new m_(t,e,r,n)}function Th(t){return t=t.prototype,!(!t||!t.isReactComponent)}function g_(t){if(typeof t=="function")return Th(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Kd)return 11;if(t===Gd)return 14}return 2}function vn(t,e){var r=t.alternate;return r===null?(r=Tt(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Ka(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")Th(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Rs:return Zn(r.children,s,i,e);case qd:o=8,s|=8;break;case gu:return t=Tt(12,r,e,s|2),t.elementType=gu,t.lanes=i,t;case yu:return t=Tt(13,r,e,s),t.elementType=yu,t.lanes=i,t;case vu:return t=Tt(19,r,e,s),t.elementType=vu,t.lanes=i,t;case Cg:return tc(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Sg:o=10;break e;case Eg:o=9;break e;case Kd:o=11;break e;case Gd:o=14;break e;case Gr:o=16,n=null;break e}throw Error(P(130,t==null?t:typeof t,""))}return e=Tt(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function Zn(t,e,r,n){return t=Tt(7,t,n,e),t.lanes=r,t}function tc(t,e,r,n){return t=Tt(22,t,n,e),t.elementType=Cg,t.lanes=r,t.stateNode={isHidden:!1},t}
vendor: 5,691 bytes, line 40
40function Jc(t,e,r){return t=Tt(6,t,null,e),t.lanes=r,t}function Yc(t,e,r){return e=Tt(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function y_(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Nc(0),this.expirationTimes=Nc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nc(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Rh(t,e,r,n,s,i,o,a,l){return t=new y_(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Tt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},hh(i),t}function v_(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ts,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function yv(t){if(!t)return Sn;t=t._reactInternals;e:{if(ls(t)!==t||t.tag!==1)throw Error(P(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(ut(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(P(171))}if(t.tag===1){var r=t.type;if(ut(r))return yy(t,r,e)}return e}function vv(t,e,r,n,s,i,o,a,l){return t=Rh(r,n,!0,t,s,i,o,a,l),t.context=yv(null),r=t.current,n=rt(),s=yn(r),i=Ar(n,s),i.callback=e??null,mn(r,i,s),t.current.lanes=s,Vo(t,s,n),dt(t,n),t}function rc(t,e,r,n){var s=e.current,i=rt(),o=yn(s);return r=yv(r),e.context===null?e.context=r:e.pendingContext=r,e=Ar(i,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=mn(s,e,o),t!==null&&(Gt(t,s,o,i),Ba(t,s,o)),o}function _l(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function xp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function Ph(t,e){xp(t,e),(t=t.alternate)&&xp(t,e)}function w_(){return null}var wv=typeof reportError=="function"?reportError:function(t){console.error(t)};function Nh(t){this._internalRoot=t}nc.prototype.render=Nh.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(P(409));rc(t,e,null,null)};nc.prototype.unmount=Nh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;ns(function(){rc(null,t,null,null)}),e[Rr]=null}};function nc(t){this._internalRoot=t}nc.prototype.unstable_scheduleHydration=function(t){if(t){var e=Jg();t={blockedOn:null,target:t,priority:e};for(var r=0;r<Yr.length&&e!==0&&e<Yr[r].priority;r++);Yr.splice(r,0,t),r===0&&Zg(t)}};function jh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function sc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function bp(){}function x_(t,e,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var c=_l(o);i.call(c)}}var o=vv(e,n,t,0,null,!1,!1,"",bp);return t._reactRootContainer=o,t[Rr]=o.current,yo(t.nodeType===8?t.parentNode:t),ns(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=_l(l);a.call(c)}}var l=Rh(t,0,!1,null,null,!1,!1,"",bp);return t._reactRootContainer=l,t[Rr]=l.current,yo(t.nodeType===8?t.parentNode:t),ns(function(){rc(e,l,r,n)}),l}function ic(t,e,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=_l(o);a.call(l)}}rc(e,o,t,s)}else o=x_(r,e,t,s,n);return _l(o)}Gg=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=zi(e.pendingLanes);r!==0&&(Yd(e,r|1),dt(e,Te()),!(ae&6)&&(ui=Te()+500,On()))}break;case 13:ns(function(){var n=Pr(t,1);if(n!==null){var s=rt();Gt(n,t,1,s)}}),Ph(t,1)}};Zd=function(t){if(t.tag===13){var e=Pr(t,134217728);if(e!==null){var r=rt();Gt(e,t,134217728,r)}Ph(t,134217728)}};Qg=function(t){if(t.tag===13){var e=yn(t),r=Pr(t,e);if(r!==null){var n=rt();Gt(r,t,e,n)}Ph(t,e)}};Jg=function(){return he};Yg=function(t,e){var r=he;try{return he=t,e()}finally{he=r}};Tu=function(t,e,r){switch(e){case"input":if(bu(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var s=Ql(n);if(!s)throw Error(P(90));Tg(n),bu(n,s)}}}break;case"textarea":Pg(t,r);break;case"select":e=r.value,e!=null&&Bs(t,!!r.multiple,e,!1)}};$g=Eh;Mg=ns;var b_={usingClientEntryPoint:!1,Events:[Ko,Os,Ql,Lg,Dg,Eh]},Li={findFiberByHostInstance:Bn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},__={bundleType:Li.bundleType,version:Li.version,rendererPackageName:Li.rendererPackageName,rendererConfig:Li.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Lr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Bg(t),t===null?null:t.stateNode},findFiberByHostInstance:Li.findFiberByHostInstance||w_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
vendor: 2,411 bytes, line 40
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ba=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ba.isDisabled&&ba.supportsFiber)try{Vl=ba.inject(__),cr=ba}catch{}}xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b_;xt.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jh(e))throw Error(P(200));return v_(t,e,null,r)};xt.createRoot=function(t,e){if(!jh(t))throw Error(P(299));var r=!1,n="",s=wv;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Rh(t,1,!1,null,null,r,!1,n,s),t[Rr]=e.current,yo(t.nodeType===8?t.parentNode:t),new Nh(e)};xt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(P(188)):(t=Object.keys(t).join(","),Error(P(268,t)));return t=Bg(e),t=t===null?null:t.stateNode,t};xt.flushSync=function(t){return ns(t)};xt.hydrate=function(t,e,r){if(!sc(e))throw Error(P(200));return ic(null,t,e,!0,r)};xt.hydrateRoot=function(t,e,r){if(!jh(t))throw Error(P(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=wv;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=vv(e,null,t,1,r??null,s,!1,i,o),t[Rr]=e.current,yo(t),n)for(t=0;t<n.length;t++)r=n[t],s=r._getVersion,s=s(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,s]:e.mutableSourceEagerHydrationData.push(r,s);return new nc(e)};xt.render=function(t,e,r){if(!sc(e))throw Error(P(200));return ic(null,t,e,!1,r)};xt.unmountComponentAtNode=function(t){if(!sc(t))throw Error(P(40));return t._reactRootContainer?(ns(function(){ic(null,null,t,!1,function(){t._reactRootContainer=null,t[Rr]=null})}),!0):!1};xt.unstable_batchedUpdates=Eh;xt.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!sc(r))throw Error(P(200));if(t==null||t._reactInternals===void 0)throw Error(P(38));return ic(t,e,r,!1,n)};xt.version="18.3.1-next-f1338f8080-20240426";function xv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xv)}catch(t){console.error(t)}}xv(),xg.exports=xt;var Qo=xg.exports;const bv=ag(Qo);var _v,_p=Qo;_v=_p.createRoot,_p.hydrateRoot;
40const k_=1,S_=1e6;let Zc=0;function E_(){return Zc=(Zc+1)%Number.MAX_SAFE_INTEGER,Zc.toString()}const Xc=new Map,kp=t=>{if(Xc.has(t))return;const e=setTimeout(()=>{Xc.delete(t),so({type:"REMOVE_TOAST",toastId:t})},S_);Xc.set(t,e)},C_=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,k_)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;return r?kp(r):t.toasts.forEach(n=>{kp(n.id)}),{...t,toasts:t.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},Ga=[];let Qa={toasts:[]};function so(t){Qa=C_(Qa,t),Ga.forEach(e=>{e(Qa)})}function A_({...t}){const e=E_(),r=s=>so({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>so({type:"DISMISS_TOAST",toastId:e});return so({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function kv(){const[t,e]=b.useState(Qa);return b.useEffect(()=>(Ga.push(e),()=>{const r=Ga.indexOf(e);r>-1&&Ga.splice(r,1)}),[t]),{...t,toast:A_,dismiss:r=>so({type:"DISMISS_TOAST",toastId:r})}}function De(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Sp(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Sv(...t){return e=>{let r=!1;const n=t.map(s=>{const i=Sp(s,e);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():Sp(t[s],null)}}}}function Jt(...t){return b.useCallback(Sv(...t),t)}function Jo(t,e=[]){let r=[];function n(i,o){const a=b.createContext(o),l=r.length;r=[...r,o];const c=d=>{var g;const{scope:f,children:h,...w}=d,v=((g=f==null?void 0:f[t])==null?void 0:g[l])||a,x=b.useMemo(()=>w,Object.values(w));return m.jsx(v.Provider,{value:x,children:h})};c.displayName=i+"Provider";function u(d,f){var v;const h=((v=f==null?void 0:f[t])==null?void 0:v[l])||a,w=b.useContext(h);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=r.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,T_(s,...e)]}function T_(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function kl(t){const e=P_(t),r=b.forwardRef((n,s)=>{const{children:i,...o}=n,a=b.Children.toArray(i),l=a.find(j_);if(l){const c=l.props.children,u=a.map(d=>d===l?b.Children.count(c)>1?b.Children.only(null):b.isValidElement(c)?c.props.children:null:d);return m.jsx(e,{...o,ref:s,children:b.isValidElement(c)?b.cloneElement(c,void 0,u):null})}return m.jsx(e,{...o,ref:s,children:i})});return r.displayName=`${t}.Slot`,r}var R_=kl("Slot");function P_(t){const e=b.forwardRef((r,n)=>{const{children:s,...i}=r;if(b.isValidElement(s)){const o=I_(s),a=O_(i,s.props);return s.type!==b.Fragment&&(a.ref=n?Sv(n,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Ev=Symbol("radix.slottable");function N_(t){const e=({children:r})=>m.jsx(m.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=Ev,e}function j_(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Ev}function O_(t,e){const r={...e};for(const n in e){const s=t[n],i=e[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{...t,...r}}function I_(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.
vendor: 9,707 bytes, line 40
40isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function L_(t){const e=t+"CollectionProvider",[r,n]=Jo(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:x,children:g}=v,p=O.useRef(null),y=O.useRef(new Map).current;return m.jsx(s,{scope:x,itemMap:y,collectionRef:p,children:g})};o.displayName=e;const a=t+"CollectionSlot",l=kl(a),c=O.forwardRef((v,x)=>{const{scope:g,children:p}=v,y=i(a,g),_=Jt(x,y.collectionRef);return m.jsx(l,{ref:_,children:p})});c.displayName=a;const u=t+"CollectionItemSlot",d="data-radix-collection-item",f=kl(u),h=O.forwardRef((v,x)=>{const{scope:g,children:p,...y}=v,_=O.useRef(null),k=Jt(x,_),S=i(u,g);return O.useEffect(()=>(S.itemMap.set(_,{ref:_,...y}),()=>void S.itemMap.delete(_))),m.jsx(f,{[d]:"",ref:k,children:p})});h.displayName=u;function w(v){const x=i(t+"CollectionConsumer",v);return O.useCallback(()=>{const p=x.collectionRef.current;if(!p)return[];const y=Array.from(p.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((S,E)=>y.indexOf(S.ref.current)-y.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},w,n]}var D_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=D_.reduce((t,e)=>{const r=kl(`Primitive.${e}`),n=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Cv(t,e){t&&Qo.flushSync(()=>t.dispatchEvent(e))}function jr(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function $_(t,e=globalThis==null?void 0:globalThis.document){const r=jr(t);b.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var M_="DismissableLayer",ad="dismissableLayer.update",U_="dismissableLayer.pointerDownOutside",F_="dismissableLayer.focusOutside",Ep,Av=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oh=b.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,c=b.useContext(Av),[u,d]=b.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),w=Jt(e,E=>d(E)),v=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(x),p=u?v.indexOf(u):-1,y=c.layersWithOutsidePointerEventsDisabled.size>0,_=p>=g,k=z_(E=>{const R=E.target,j=[...c.branches].some(I=>I.contains(R));!_||j||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),S=H_(E=>{const R=E.target;[...c.branches].some(I=>I.contains(R))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return $_(E=>{p===c.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),b.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ep=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Cp(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ep)}},[u,f,r,c]),b.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Cp())},[u,c]),b.useEffect(()=>{const E=()=>h({});return document.addEventListener(ad,E),()=>document.removeEventListener(ad,E)},[]),m.jsx(Be.div,{...l,ref:w,style:{pointerEvents:y?_?"auto":"none":void 0,...t.style},onFocusCapture:De(t.onFocusCapture,S.onFocusCapture),onBlurCapture:De(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:De(t.onPointerDownCapture,k.onPointerDownCapture)})});Oh.displayName=M_;var B_="DismissableLayerBranch",Tv=b.forwardRef((t,e)=>{const r=b.useContext(Av),n=b.useRef(null),s=Jt(e,n);return b.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),m.jsx(Be.div,{...t,ref:s})});Tv.displayName=B_;function z_(t,e=globalThis==null?void 0:globalThis.document){const r=jr(t),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Rv(U_,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function H_(t,e=globalThis==null?void 0:globalThis.document){const r=jr(t),n=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!n.current&&Rv(F_,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Cp(){const t=new CustomEvent(ad);document.dispatchEvent(t)}function Rv(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?Cv(s,i):s.dispatchEvent(i)}var W_=Oh,V_=Tv,Yt=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},q_="Portal",Pv=b.forwardRef((t,e)=>{var a;const{container:r,...n}=t,[s,i]=b.useState(!1);Yt(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?bv.createPortal(m.jsx(Be.div,{...n,ref:e}),o):null});Pv.displayName=q_;function K_(t,e){return b.useReducer((r,n)=>e[r][n]??r,t)}var Ih=t=>{const{present:e,children:r}=t,n=G_(e),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),i=Jt(n.ref,Q_(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:i}):null};Ih.displayName="Presence";function G_(t){const[e,r]=b.useState(),n=b.useRef(null),s=b.useRef(t),i=b.useRef("none"),o=t?"mounted":"unmounted",[a,l]=K_(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=_a(n.current);i.current=a==="mounted"?c:"none"},[a]),Yt(()=>{const c=n.current,u=s.current;if(u!==t){const f=i.current,h=_a(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Yt(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,d=h=>{const v=_a(n.current).includes(h.animationName);if(h.target===e&&v&&(l("ANIMATION_END"),!s.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},f=h=>{h.target===e&&(i.current=_a(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function _a(t){return(t==null?void 0:t.animationName)||"none"}function Q_(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var J_=vg[" useInsertionEffect ".trim().toString()]||Yt;function Y_({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,i,o]=Z_({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:s;{const u=b.useRef(t!==void 0);b.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}const c=b.useCallback(u=>{var d;if(a){const f=X_(u)?u(t):u;f!==t&&((d=o.current)==null||d.call(o,f))}else i(u)},[a,t,i,o]);return[l,c]}function Z_({defaultProp:t,onChange:e}){const[r,n]=b.useState(t),s=b.useRef(r),i=b.useRef(e);return J_(()=>{i.current=e},[e]),b.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function X_(t){return typeof t=="function"}var e1=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"}),t1="VisuallyHidden",oc=b.forwardRef((t,e)=>m.jsx(Be.span,{...t,ref:e,style:{...e1,...t.style}}));oc.displayName=t1;var r1=oc,Lh="ToastProvider",[Dh,n1,s1]=L_("Toast"),[Nv,VN]=Jo("Toast",[s1]),[i1,ac]=Nv(Lh),jv=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=b.useState(null),[c,u]=b.useState(0),d=b.useRef(!1),f=b.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Lh}\`. Expected non-empty \`string\`.`),m.jsx(Dh.Provider,{scope:e,children:m.jsx(i1,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:
40a,onViewportChange:l,onToastAdd:b.useCallback(()=>u(h=>h+1),[]),onToastRemove:b.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};jv.displayName=Lh;var Ov="ToastViewport",o1=["F8"],ld="toast.viewportPause",cd="toast.viewportResume",Iv=b.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=o1,label:s="Notifications ({hotkey})",...i}=t,o=ac(Ov,r),a=n1(r),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),f=Jt(e,d,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;b.useEffect(()=>{const x=g=>{var y;n.length!==0&&n.every(_=>g[_]||g.code===_)&&((y=d.current)==null||y.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),b.useEffect(()=>{const x=l.current,g=d.current;if(w&&x&&g){const p=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(ld);g.dispatchEvent(S),o.isClosePausedRef.current=!0}},y=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(cd);g.dispatchEvent(S),o.isClosePausedRef.current=!1}},_=S=>{!x.contains(S.relatedTarget)&&y()},k=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",p),x.addEventListener("focusout",_),x.addEventListener("pointermove",p),x.addEventListener("pointerleave",k),window.addEventListener("blur",p),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",p),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",p),x.removeEventListener("pointerleave",k),window.removeEventListener("blur",p),window.removeEventListener("focus",y)}}},[w,o.isClosePausedRef]);const v=b.useCallback(({tabbingDirection:x})=>{const p=a().map(y=>{const _=y.ref.current,k=[_,...w1(_)];return x==="forwards"?k:k.reverse()});return(x==="forwards"?p.reverse():p).flat()},[a]);return b.useEffect(()=>{const x=d.current;if(x){const g=p=>{var k,S,E;const y=p.altKey||p.ctrlKey||p.metaKey;if(p.key==="Tab"&&!y){const R=document.activeElement,j=p.shiftKey;if(p.target===x&&j){(k=c.current)==null||k.focus();return}const $=v({tabbingDirection:j?"backwards":"forwards"}),J=$.findIndex(D=>D===R);eu($.slice(J+1))?p.preventDefault():j?(S=c.current)==null||S.focus():(E=u.current)==null||E.focus()}};return x.addEventListener("keydown",g),()=>x.removeEventListener("keydown",g)}},[a,v]),m.jsxs(V_,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&m.jsx(ud,{ref:c,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"forwards"});eu(x)}}),m.jsx(Dh.Slot,{scope:r,children:m.jsx(Be.ol,{tabIndex:-1,...i,ref:f})}),w&&m.jsx(ud,{ref:u,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"backwards"});eu(x)}})]})});Iv.displayName=Ov;var Lv="ToastFocusProxy",ud=b.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=ac(Lv,r);return m.jsx(oc,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&n()}})});ud.displayName=Lv;var Yo="Toast",a1="toast.swipeStart",l1="toast.swipeMove",c1="toast.swipeCancel",u1="toast.swipeEnd",Dv=b.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Y_({prop:n,defaultProp:s??!0,onChange:i,caller:Yo});return m.jsx(Ih,{present:r||a,children:m.jsx(f1,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:jr(t.onPause),onResume:jr(t.onResume),onSwipeStart:De(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:De(t.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:De(t.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:De(t.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Dv.displayName=Yo;var[d1,h1]=Nv(Yo,{onClose(){}}),f1=b.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...w}=t,v=ac(Yo,r),[x,g]=b.useState(null),p=Jt(e,D=>g(D)),y=b.useRef(null),_=b.useRef(null),k=s||v.duration,S=b.useRef(0),E=b.useRef(k),R=b.useRef(0),{onToastAdd:j,onToastRemove:I}=v,q=jr(()=>{var oe;(x==null?void 0:x.contains(document.activeElement))&&((oe=v.viewport)==null||oe.focus()),o()}),$=b.useCallback(D=>
40{!D||D===1/0||(window.clearTimeout(R.current),S.current=new Date().getTime(),R.current=window.setTimeout(q,D))},[q]);b.useEffect(()=>{const D=v.viewport;if(D){const oe=()=>{$(E.current),c==null||c()},K=()=>{const ee=new Date().getTime()-S.current;E.current=E.current-ee,window.clearTimeout(R.current),l==null||l()};return D.addEventListener(ld,K),D.addEventListener(cd,oe),()=>{D.removeEventListener(ld,K),D.removeEventListener(cd,oe)}}},[v.viewport,k,l,c,$]),b.useEffect(()=>{i&&!v.isClosePausedRef.current&&$(k)},[i,k,v.isClosePausedRef,$]),b.useEffect(()=>(j(),()=>I()),[j,I]);const J=b.useMemo(()=>x?Hv(x):null,[x]);return v.viewport?m.jsxs(m.Fragment,{children:[J&&m.jsx(p1,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:J}),m.jsx(d1,{scope:r,onClose:q,children:Qo.createPortal(m.jsx(Dh.ItemSlot,{scope:r,children:m.jsx(W_,{asChild:!0,onEscapeKeyDown:De(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||q(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(Be.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":v.swipeDirection,...w,ref:p,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:De(t.onKeyDown,D=>{D.key==="Escape"&&(a==null||a(D.nativeEvent),D.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:De(t.onPointerDown,D=>{D.button===0&&(y.current={x:D.clientX,y:D.clientY})}),onPointerMove:De(t.onPointerMove,D=>{if(!y.current)return;const oe=D.clientX-y.current.x,K=D.clientY-y.current.y,ee=!!_.current,A=["left","right"].includes(v.swipeDirection),T=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,U=A?T(0,oe):0,X=A?0:T(0,K),W=D.pointerType==="touch"?10:2,ne={x:U,y:X},ie={originalEvent:D,delta:ne};ee?(_.current=ne,ka(l1,d,ie,{discrete:!1})):Ap(ne,v.swipeDirection,W)?(_.current=ne,ka(a1,u,ie,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(oe)>W||Math.abs(K)>W)&&(y.current=null)}),onPointerUp:De(t.onPointerUp,D=>{const oe=_.current,K=D.target;if(K.hasPointerCapture(D.pointerId)&&K.releasePointerCapture(D.pointerId),_.current=null,y.current=null,oe){const ee=D.currentTarget,A={originalEvent:D,delta:oe};Ap(oe,v.swipeDirection,v.swipeThreshold)?ka(u1,h,A,{discrete:!0}):ka(c1,f,A,{discrete:!0}),ee.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),p1=t=>{const{__scopeToast:e,children:r,...n}=t,s=ac(Yo,e),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return y1(()=>o(!0)),b.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:m.jsx(Pv,{asChild:!0,children:m.jsx(oc,{...n,children:i&&m.jsxs(m.Fragment,{children:[s.label," ",r]})})})},m1="ToastTitle",$v=b.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return m.jsx(Be.div,{...n,ref:e})});$v.displayName=m1;var g1="ToastDescription",Mv=b.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return m.jsx(Be.div,{...n,ref:e})});Mv.displayName=g1;var Uv="ToastAction",Fv=b.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?m.jsx(zv,{altText:r,asChild:!0,children:m.jsx($h,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${Uv}\`. Expected non-empty \`string\`.`),null)});Fv.displayName=Uv;var Bv="ToastClose",$h=b.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=h1(Bv,r);return m.jsx(zv,{asChild:!0,children:m.jsx(Be.button,{type:"button",...n,ref:e,onClick:De(t.onClick,s.onClose)})})});$h.displayName=Bv;var zv=b.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return m.jsx(Be.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function Hv(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),v1(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&&e.push(o)}else e.push(...Hv(n))}}),e}function ka(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?Cv(s,i):s.dispatchEvent(i)}var Ap=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function y1(t=()=>{}){const e=jr(t);Yt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function v1(t){return t.nodeType===t.ELEMENT_NODE}function w1(t){const e=[],r=document.createTreeWalker(t,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();)e.push(r.currentNode);return e}function eu(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var x1=jv,Wv=Iv,Vv=Dv,qv=$v,Kv=Mv,Gv=Fv,Qv=$h;function Jv(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Jv(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Yv(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Jv(t))&&(n&&(n+=" "),n+=e);return n}const Tp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Rp=Yv,Mh=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return Rp(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(c=>{const u=r==null?void 0:r[c],d=i==null?void 0:i[c];if(u===null)return null;const f=Tp(u)||Tp(d);return s[c][f]}),a=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(w=>{let[v,x]=w;return Array.isArray(x)?x.includes({...i,...a}[v]):{...i,...a}[v]===x})?[...c,d,f]:c},[]);return Rp(t,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const b1=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zv=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var _1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const k1=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,..._1,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Zv("lucide",s),...a},[...o.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const er=(t,e)=>{const r=b.forwardRef(({className:n,...s},i)=>b.createElement(k1,{ref:i,iconNode:e,className:Zv(`lucide-${b1(t)}`,n),...s}));return r.displayName=`${t}`,r};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const S1=er("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const Xv=er("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"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const e0=er("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const E1=er("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"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const C1=er("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const A1=er("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const T1=er("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",ke
vendor: 13,704 bytes, lines 95-115
95y:"oel41y"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const R1=er("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const P1=er("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const t0=er("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const N1=er("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),Uh="-",j1=t=>{const e=I1(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const a=o.split(Uh);return a[0]===""&&a.length!==1&&a.shift(),r0(a,e)||O1(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},r0=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?r0(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(Uh);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Pp=/^\[(.+)\]$/,O1=t=>{if(Pp.test(t)){const e=Pp.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},I1=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return D1(Object.entries(t.classGroups),r).forEach(([i,o])=>{dd(o,n,i,e)}),n},dd=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Np(e,s);i.classGroupId=r;return}if(typeof s=="function"){if(L1(s)){dd(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{dd(o,Np(e,i),r,n)})})},Np=(t,e)=>{let r=t;return e.split(Uh).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},L1=t=>t.isThemeGetter,D1=(t,e)=>e?t.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[r,s]}):t,$1=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),e++,e>t&&(e=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)}}},n0="!",M1=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let c=0,u=0,d;for(let x=0;x<a.length;x++){let g=a[x];if(c===0){if(g===s&&(n||a.slice(x,x+i)===e)){l.push(a.slice(u,x)),u=x+i;continue}if(g==="/"){d=x;continue}}g==="["?c++:g==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(n0),w=h?f.substring(1):f,v=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:w,maybePostfixModifierPosition:v}};return r?a=>r({className:a,parseClassName:o}):o},U1=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},F1=t=>({cache:$1(t.cacheSize),parseClassName:M1(t),...j1(t)}),B1=/\s+/,z1=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(B1);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(c);let w=!!h,v=n(w?f.substring(0,h):f);if(!v){if(!w){a=c+(a.length>0?" "+a:a);continue}if(v=n(f),!v){a=c+(a.length>0?" "+a:a);continue}w=!1}const x=U1(u).join(":"),g=d?x+n0:x,p=g+v;if(i.includes(p))continue;i.push(p);const y=s(v,w);for(let _=0;_<y.length;++_){const k=y[_];i.push(g+k)}a=c+(a.length>0?" "+a:a)}return a};function H1(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=s0(e))&&(n&&(n+=" "),n+=r);return n}const s0=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=s0(t[n]))&&(r&&(r+=" "),r+=e);return r};function W1(t,...e){let r,n,s,i=o;function o(l){const c=e.reduce((u,d)=>d(u),t());return r=F1(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 u=z1(l,r);return s(l,u),u}return function(){return i(H1.apply(null,arguments))}}const ge=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},i0=/^\[(?:([a-z-]+):)?(.+)\]$/i,V1=/^\d+\/\d+$/,q1=new Set(["px","full","screen"]),K1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,G1=/\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$/,Q1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,J1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gr=t=>Ks(t)||q1.has(t)||V1.test(t),Hr=t=>bi(t,"length",ik),Ks=t=>!!t&&!Number.isNaN(Number(t)),tu=t=>bi(t,"number",Ks),Di=t=>!!t&&Number.isInteger(Number(t)),Z1=t=>t.endsWith("%")&&Ks(t.slice(0,-1)),te=t=>i0.test(t),Wr=t=>K1.test(t),X1=new Set(["length","size","percentage"]),ek=t=>bi(t,X1,o0),tk=t=>bi(t,"position",o0),rk=new Set(["image","url"]),nk=t=>bi(t,rk,ak),sk=t=>bi(t,"",ok),$i=()=>!0,bi=(t,e,r)=>{const n=i0.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},ik=t=>G1.test(t)&&!Q1.test(t),o0=()=>!1,ok=t=>J1.test(t),ak=t=>Y1.test(t),lk=()=>{const t=ge("colors"),e=ge("spacing"),r=ge("blur"),n=ge("brightness"),s=ge("borderColor"),i=ge("borderRadius"),o=ge("borderSpacing"),a=ge("borderWidth"),l=ge("contrast"),c=ge("grayscale"),u=ge("hueRotate"),d=ge("invert"),f=ge("gap"),h=ge("gradientColorStops"),w=ge("gradientColorStopPositions"),v=ge("inset"),x=ge("margin"),g=ge("opacity"),p=ge("padding"),y=ge("saturate"),_=ge("scale"),k=ge("sepia"),S=ge("skew"),E=ge("space"),R=ge("translate"),j=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",te,e],$=()=>[te,e],J=()=>["",gr,Hr],D=()=>["auto",Ks,te],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",te],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Ks,te];return{cacheSize:500,separator:":",theme:{colors:[$i],spacing:[gr,Hr],blur:["none","",Wr,te],brightness:X(),borderColor:[t],borderRadius:["none","","full",Wr,te],borderSpacing:$(),borderWidth:J(),contrast:X(),grayscale:T(),hueRotate:X(),invert:T(),gap:$(),gradientColorStops:[t],gradientColorStopPositions:[Z1,Hr],inset:q(),margin:q(),opacity:X(),padding:$(),saturate:X(),scale:X(),sepia:T(),skew:X(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[Wr]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:[...oe(),te]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Di,te]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Di,te]}],"grid-cols":[{"grid-cols":[$i]}],"col-start-end":[{col:["auto",{span:["full",Di,te]},te]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[$i]}],"row-start-end":[{row:["auto",{span:[Di,te]},te]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,e]}],"min-w":[{"min-w":[te,e,"min","max","fit"]}],"max-w":[{"max-w":[te,e,"none","full","min","max","fit","prose",{screen:[Wr]},Wr]}],h:[{h:[te,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Wr,Hr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tu]}],"font-family":[{font:[$i]}],"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",te]}],"line-clamp":[{"line-clamp":["none",Ks,tu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gr,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gr,Hr]}],"underline-offset":[{"underline-offset":["auto",gr,te]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],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",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),tk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ek]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nk]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[w]}
vendor: 5,182 bytes, line 115
115],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],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":[g]}],"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":[g]}],"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,te]}],"outline-w":[{outline:[gr,Hr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[gr,Hr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Wr,sk]}],"shadow-color":[{shadow:[$i]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Wr,te]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[k]}],"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":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Di,te]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",te]}],accent:[{accent:["auto",t]}],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",te]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,647 bytes, line 115
115],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",te]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[gr,Hr,tu]}],stroke:[{stroke:[t,"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"]}}},ck=W1(lk);function Oe(...t){return ck(Yv(t))}const uk=x1,a0=b.forwardRef(({className:t,...e},r)=>m.jsx(Wv,{ref:r,className:Oe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));a0.displayName=Wv.displayName;const dk=Mh("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"}}),l0=b.forwardRef(({className:t,variant:e,...r},n)=>m.jsx(Vv,{ref:n,className:Oe(dk({variant:e}),t),...r}));l0.displayName=Vv.displayName;const hk=b.forwardRef(({className:t,...e},r)=>m.jsx(Gv,{ref:r,className:Oe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));hk.displayName=Gv.displayName;const c0=b.forwardRef(({className:t,...e},r)=>m.jsx(Qv,{ref:r,className:Oe("absolute right-2 top-2 rounded-md p-1 text-foreground
115/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:m.jsx(t0,{className:"h-4 w-4"})}));c0.displayName=Qv.displayName;const u0=b.forwardRef(({className:t,...e},r)=>m.jsx(qv,{ref:r,className:Oe("text-sm font-semibold",t),...e}));u0.displayName=qv.displayName;const d0=b.forwardRef(({className:t,...e},r)=>m.jsx(Kv,{ref:r,className:Oe("text-sm opacity-90",t),...e}));d0.displayName=Kv.displayName;function fk(){const{toasts:t}=kv();return m.jsxs(uk,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return m.jsxs(l0,{...i,children:[m.jsxs("div",{className:"grid gap-1",children:[r&&m.jsx(u0,{children:r}),n&&m.jsx(d0,{children:n})]}),s,m.jsx(c0,{})]},e)}),m.jsx(a0,{})]})}var jp=["light","dark"],pk="(prefers-color-scheme: dark)",mk=b.createContext(void 0),gk={setTheme:t=>{},themes:[]},yk=()=>{var t;return(t=b.useContext(mk))!=null?t:gk};b.memo(({forcedTheme:t,storageKey:e,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=s?jp.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(w,v=!1,x=!0)=>{let g=o?o[w]:w,p=v?w+"|| ''":`'${g}'`,y="";return s&&x&&!v&&jp.includes(w)&&(y+=`d.style.colorScheme = '${w}';`),r==="class"?v||g?y+=`c.add(${p})`:y+="null":g&&(y+=`d[s](n,${p})`),y},h=t?`!function(){${u}${f(t)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${pk}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${c?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var vk=t=>{switch(t){case"success":return bk;case"info":return kk;case"warning":return _k;case"error":return Sk;default:return null}},wk=Array(12).fill(0),xk=({visible:t,className:e})=>O.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},O.createElement("div",{className:"sonner-spinner"},wk.map((r,n)=>O.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),bk=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"})),_k=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"})),kk=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"})),Sk=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"})),Ek=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"})),Ck=()=>{let[t,e]=O.useState(document.hidden);return O.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},hd=1,Ak=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>
115{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:r,...n}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:hd++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:r}),{...a,...t,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(r=>r({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let r;e.loading!==void 0&&(r=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),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(Rk(l)&&!l.ok){s=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:r,type:"error",message:c,description:u})}else if(e.success!==void 0){s=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=e.finally)==null||l.call(e)}),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=(t,e)=>{let r=(e==null?void 0:e.id)||hd++;return this.create({jsx:t(r),id:r,...e}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ot=new Ak,Tk=(t,e)=>{let r=(e==null?void 0:e.id)||hd++;return ot.addToast({title:t,...e,id:r}),r},Rk=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",Pk=Tk,Nk=()=>ot.toasts,jk=()=>ot.getActiveToasts();Object.assign(Pk,{success:ot.success,info:ot.info,warning:ot.warning,error:ot.error,custom:ot.custom,message:ot.message,promise:ot.promise,dismiss:ot.dismiss,loading:ot.loading},{getHistory:Nk,getToasts:jk});function Ok(t,{insertAt:e}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}Ok(`: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;
115left: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}
115: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%);
115--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%)} 116`);function Sa(t){return t.label!==void 0}var Ik=3,Lk="32px",Dk="16px",Op=4e3,$k=356,Mk=14,Uk=20,Fk=200;function $t(...t){return t.filter(Boolean).join(" ")}function Bk(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var zk=t=>{var e,r,n,s,i,o,a,l,c,u,d;let{invert:f,toast:h,unstyled:w,interacting:v,setHeights:x,visibleToasts:g,heights:p,index:y,toasts:_,expanded:k,removeToast:S,defaultRichColors:E,closeButton:R,style:j,cancelButtonStyle:I,actionButtonStyle:q,className:$="",descriptionClassName:J="",duration:D,position:oe,gap:K,loadingIcon:ee,expandByDefault:A,classNames:T,icons:U,closeButtonAriaLabel:X="Close toast",pauseWhenPageIsHidden:W}=t,[ne,ie]=O.useState(null),[Re,Ve]=O.useState(null),[de,hs]=O.useState(!1),[Dr,In]=O.useState(!1),[$r,fs]=O.useState(!1),[Mr,ta]=O.useState(!1),[bc,ra]=O.useState(!1),[_c,Ci]=O.useState(0),[ps,af]=O.useState(0),Ai=O.useRef(h.duration||D||Op),lf=O.useRef(null),Ln=O.useRef(null),zw=y===0,Hw=y+1<=g,_t=h.type,ms=h.dismissible!==!1,Ww=h.className||"",Vw=h.descriptionClassName||"",na=O.useMemo(()=>p.findIndex(Y=>Y.toastId===h.id)||0,[p,h.id]),qw=O.useMemo(()=>{var Y;return(Y=h.closeButton)!=null?Y:R},[h.closeButton,R]),cf=O.useMemo(()=>h.duration||D||Op,[h.duration,D]),kc=O.useRef(0),gs=O.useRef(0),uf=O.useRef(0),ys=O.useRef(null),[Kw,Gw]=oe.split("-"),df=O.useMemo(()=>p.reduce((Y,fe,we)=>we>=na?Y:Y+fe.height,0),[p,na]),hf=Ck(),Qw=h.invert||f,Sc=_t==="loading";gs.current=O.useMemo(()=>na*K+df,[na,df]),O.useEffect(()=>{Ai.current=cf},[cf]),O.useEffect(()=>{hs(!0)},[]),O.useEffect(()=>{let Y=Ln.current;if(Y){let fe=Y.getBoundingClientRect().height;return af(fe),x(we=>[{toastId:h.id,height:fe,position:h.position},...we]),()=>x(we=>we.filter(Ot=>Ot.toastId!==h.id))}},[x,h.id]),O.useLayoutEffect(()=>{if(!de)return;let Y=Ln.current,fe=Y.style.height;Y.style.height="auto";let we=Y.getBoundingClientRect().height;Y.style.height=fe,af(we),x(Ot=>Ot.find(It=>It.toastId===h.id)?Ot.map(It=>It.toastId===h.id?{...It,height:we}:It):[{toastId:h.id,height:we,position:h.position},...Ot])},[de,h.title,h.description,x,h.id]);let Ur=O.useCallback(()=>{In(!0),Ci(gs.current),x(Y=>Y.filter(fe=>fe.toastId!==h.id)),setTimeout(()=>{S(h)},Fk)},[h,S,x,gs]);O.useEffect(()=>{if(h.promise&&_t==="loading"||h.duration===1/0||h.type==="loading")return;let Y;return k||v||W&&hf?(()=>{if(uf.current<kc.current){let fe=new Date().getTime()-kc.current;Ai.current=Ai.current-fe}
116uf.current=new Date().getTime()})():Ai.current!==1/0&&(kc.current=new Date().getTime(),Y=setTimeout(()=>{var fe;(fe=h.onAutoClose)==null||fe.call(h,h),Ur()},Ai.current)),()=>clearTimeout(Y)},[k,v,h,_t,W,hf,Ur]),O.useEffect(()=>{h.delete&&Ur()},[Ur,h.delete]);function Jw(){var Y,fe,we;return U!=null&&U.loading?O.createElement("div",{className:$t(T==null?void 0:T.loader,(Y=h==null?void 0:h.classNames)==null?void 0:Y.loader,"sonner-loader"),"data-visible":_t==="loading"},U.loading):ee?O.createElement("div",{className:$t(T==null?void 0:T.loader,(fe=h==null?void 0:h.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":_t==="loading"},ee):O.createElement(xk,{className:$t(T==null?void 0:T.loader,(we=h==null?void 0:h.classNames)==null?void 0:we.loader),visible:_t==="loading"})}return O.createElement("li",{tabIndex:0,ref:Ln,className:$t($,Ww,T==null?void 0:T.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,T==null?void 0:T.default,T==null?void 0:T[_t],(r=h==null?void 0:h.classNames)==null?void 0:r[_t]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:E,"data-styled":!(h.jsx||h.unstyled||w),"data-mounted":de,"data-promise":!!h.promise,"data-swiped":bc,"data-removed":Dr,"data-visible":Hw,"data-y-position":Kw,"data-x-position":Gw,"data-index":y,"data-front":zw,"data-swiping":$r,"data-dismissible":ms,"data-type":_t,"data-invert":Qw,"data-swipe-out":Mr,"data-swipe-direction":Re,"data-expanded":!!(k||A&&de),style:{"--index":y,"--toasts-before":y,"--z-index":_.length-y,"--offset":`${Dr?_c:gs.current}px`,"--initial-height":A?"auto":`${ps}px`,...j,...h.style},onDragEnd:()=>{fs(!1),ie(null),ys.current=null},onPointerDown:Y=>{Sc||!ms||(lf.current=new Date,Ci(gs.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(fs(!0),ys.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,fe,we,Ot;if(Mr||!ms)return;ys.current=null;let It=Number(((Y=Ln.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fr=Number(((fe=Ln.current)==null?void 0:fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Dn=new Date().getTime()-((we=lf.current)==null?void 0:we.getTime()),Lt=ne==="x"?It:Fr,Br=Math.abs(Lt)/Dn;if(Math.abs(Lt)>=Uk||Br>.11){Ci(gs.current),(Ot=h.onDismiss)==null||Ot.call(h,h),Ve(ne==="x"?It>0?"right":"left":Fr>0?"down":"up"),Ur(),ta(!0),ra(!1);return}fs(!1),ie(null)},onPointerMove:Y=>{var fe,we,Ot,It;if(!ys.current||!ms||((fe=window.getSelection())==null?void 0:fe.toString().length)>0)return;let Fr=Y.clientY-ys.current.y,Dn=Y.clientX-ys.current.x,Lt=(we=t.swipeDirections)!=null?we:Bk(oe);!ne&&(Math.abs(Dn)>1||Math.abs(Fr)>1)&&ie(Math.abs(Dn)>Math.abs(Fr)?"x":"y");let Br={x:0,y:0};ne==="y"?(Lt.includes("top")||Lt.includes("bottom"))&&(Lt.includes("top")&&Fr<0||Lt.includes("bottom")&&Fr>0)&&(Br.y=Fr):ne==="x"&&(Lt.includes("left")||Lt.includes("right"))&&(Lt.includes("left")&&Dn<0||Lt.includes("right")&&Dn>0)&&(Br.x=Dn),(Math.abs(Br.x)>0||Math.abs(Br.y)>0)&&ra(!0),(Ot=Ln.current)==null||Ot.style.setProperty("--swipe-amount-x",`${Br.x}px`),(It=Ln.current)==null||It.style.setProperty("--swipe-amount-y",`${Br.y}px`)}},qw&&!h.jsx?O.createElement("button",{"aria-label":X,"data-disabled":Sc,"data-close-button":!0,onClick:Sc||!ms?()=>{}:()=>{var Y;Ur(),(Y=h.onDismiss)==null||Y.call(h,h)},className:$t(T==null?void 0:T.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=U==null?void 0:U.close)!=null?i:Ek):null,h.jsx||b.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:O.createElement(O.Fragment,null,_t||h.icon||h.promise?O.createElement("div",{"data-icon":"",className:$t(T==null?void 0:T.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Jw():null,h.type!=="loading"?h.icon||(U==null?void 0:U[_t])||vk(_t):null):null,O.createElement("div",{"data-content":"",className:$t(T==null?void 0:T.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},O.createElement("div",{"data-title":"",className:$t(T==null?void 0:T.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?O.createElement("div",{"data-description":"",className:$t(J,Vw,T==null?void 0:T.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),b.isValidElement(h.cancel)?h.cancel:h.cancel&&Sa(h.cancel)?O.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||I,onClick:Y=>{var fe,we;Sa(h.cancel)&&ms&&((we=(fe=h.cancel).onClick)==null||we.call(fe,Y),Ur())},className:$t(T==null?void 0:T.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,b.isValidElement(h.action)?h.action:h.action&&Sa(h.action)?O.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||q,onClick:Y=>{var fe,we;Sa(h.action)&&((we=(fe=h.action).onClick)==null||we.call(fe,Y),!Y.defaultPrevented&&Ur())},className:$t(T==null?void 0:T.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function Ip(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function Hk(t,e){let r={};return[t,e].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?Dk:Lk;function l(c){["top","right","bottom","left"].forEach(u=>{r[`${o}-${u}`]=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 Wk=b.forwardRef(function(t,e){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:f,style:h,visibleToasts:w=Ik,toastOptions:v,dir:x=Ip(),gap:g=Mk,loadingIcon:p,icons:y,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:k}=t,[S,E]=O.useState([]),R=O.useMemo(()=>Array.from(new Set([n].concat(S.filter(W=>W.position).map(W=>W.position)))),[S,n]),[j,I]=O.useState([]),[q,$]=O.useState(!1),[J,D]=O.useState(!1),[oe,K]=O.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
116k":"light"),ee=O.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=O.useRef(null),U=O.useRef(!1),X=O.useCallback(W=>{E(ne=>{var ie;return(ie=ne.find(Re=>Re.id===W.id))!=null&&ie.delete||ot.dismiss(W.id),ne.filter(({id:Re})=>Re!==W.id)})},[]);return O.useEffect(()=>ot.subscribe(W=>{if(W.dismiss){E(ne=>ne.map(ie=>ie.id===W.id?{...ie,delete:!0}:ie));return}setTimeout(()=>{bv.flushSync(()=>{E(ne=>{let ie=ne.findIndex(Re=>Re.id===W.id);return ie!==-1?[...ne.slice(0,ie),{...ne[ie],...W},...ne.slice(ie+1)]:[W,...ne]})})})}),[]),O.useEffect(()=>{if(u!=="system"){K(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:ne})=>{K(ne?"dark":"light")})}catch{W.addListener(({matches:ie})=>{try{K(ie?"dark":"light")}catch(Re){console.error(Re)}})}},[u]),O.useEffect(()=>{S.length<=1&&$(!1)},[S]),O.useEffect(()=>{let W=ne=>{var ie,Re;s.every(Ve=>ne[Ve]||ne.code===Ve)&&($(!0),(ie=ee.current)==null||ie.focus()),ne.code==="Escape"&&(document.activeElement===ee.current||(Re=ee.current)!=null&&Re.contains(document.activeElement))&&$(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s]),O.useEffect(()=>{if(ee.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,U.current=!1)}},[ee.current]),O.createElement("section",{ref:e,"aria-label":`${_} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((W,ne)=>{var ie;let[Re,Ve]=W.split("-");return S.length?O.createElement("ol",{key:W,dir:x==="auto"?Ip():x,tabIndex:-1,ref:ee,className:a,"data-sonner-toaster":!0,"data-theme":oe,"data-y-position":Re,"data-lifted":q&&S.length>1&&!i,"data-x-position":Ve,style:{"--front-toast-height":`${((ie=j[0])==null?void 0:ie.height)||0}px`,"--width":`${$k}px`,"--gap":`${g}px`,...h,...Hk(l,c)},onBlur:de=>{U.current&&!de.currentTarget.contains(de.relatedTarget)&&(U.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||U.current||(U.current=!0,T.current=de.relatedTarget)},onMouseEnter:()=>$(!0),onMouseMove:()=>$(!0),onMouseLeave:()=>{J||$(!1)},onDragEnd:()=>$(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},S.filter(de=>!de.position&&ne===0||de.position===W).map((de,hs)=>{var Dr,In;return O.createElement(zk,{key:de.id,icons:y,index:hs,toast:de,defaultRichColors:d,duration:(Dr=v==null?void 0:v.duration)!=null?Dr:f,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:w,closeButton:(In=v==null?void 0:v.closeButton)!=null?In:o,interacting:J,position:W,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:X,toasts:S.filter($r=>$r.position==de.position),heights:j.filter($r=>$r.position==de.position),setHeights:I,expandByDefault:i,gap:g,loadingIcon:p,expanded:q,pauseWhenPageIsHidden:k,swipeDirections:t.swipeDirections})})):null}))});const Vk=({...t})=>{const{theme:e="system"}=yk();return m.jsx(Wk,{theme:e,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"}},...t})},qk=["top","right","bottom","left"],En=Math.min,ft=Math.max,Sl=Math.round,Ea=Math.floor,Cn=t=>({x:t,y:t}),Kk={left:"right",right:"left",bottom:"top",top:"bottom"},Gk={start:"end",end:"start"};function fd(t,e,r){return ft(t,En(e,r))}function Or(t,e){return typeof t=="function"?t(e):t}function Ir(t){return t.split("-")[0]}function _i(t){return t.split("-")[1]}function Fh(t){return t==="x"?"y":"x"}function Bh(t){return t==="y"?"height":"width"}function An(t){return["top","bottom"].includes(Ir(t))?"y":"x"}function zh(t){return Fh(An(t))}function Qk(t,e,r){r===void 0&&(r=!1);const n=_i(t),s=zh(t),i=Bh(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=El(o)),[o,El(o)]}function Jk(t){const e=El(t);return[pd(t),e,pd(e)]}function pd(t){return t.replace(/start|end/g,e=>Gk[e])}function Yk(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function Zk(t,e,r,n){const s=_i(t);let i=Yk(Ir(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(pd)))),i}function El(t){return t.replace(/left|right|bottom|top/g,e=>Kk[e])}function Xk(t){return{top:0,right:0,bottom:0,left:0,...t}}function h0(t){return typeof t!="number"?Xk(t):{top:t,right:t,bottom:t,left:t}}function Cl(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function Lp(t,e,r){let{reference:n,floating:s}=t;const i=An(e),o=zh(e),a=Bh(o),l=Ir(e),c=i==="y",u=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:u,y:n.y-s.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(_i(e)){case"start":h[o]-=f*(r&&c?-1:1);break;case"end":h[o]+=f*(r&&c?-1:1);break}return h}const eS=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 9,709 bytes, line 116
116=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=Lp(c,n,l),f=n,h={},w=0;for(let v=0;v<a.length;v++){const{name:x,fn:g}=a[v],{x:p,y,data:_,reset:k}=await g({x:u,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:c,platform:o,elements:{reference:t,floating:e}});u=p??u,d=y??d,h={...h,[x]:{...h[x],..._}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(c=k.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):k.rects),{x:u,y:d}=Lp(c,f,l)),v=-1)}return{x:u,y:d,placement:f,strategy:s,middlewareData:h}};async function Co(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Or(e,t),w=h0(h),x=a[f?d==="floating"?"reference":"floating":d],g=Cl(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),p=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},k=Cl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:p,offsetParent:y,strategy:l}):p);return{top:(g.top-k.top+w.top)/_.y,bottom:(k.bottom-g.bottom+w.bottom)/_.y,left:(g.left-k.left+w.left)/_.x,right:(k.right-g.right+w.right)/_.x}}const tS=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Or(t,e)||{};if(c==null)return{};const d=h0(u),f={x:r,y:n},h=zh(s),w=Bh(h),v=await o.getDimensions(c),x=h==="y",g=x?"top":"left",p=x?"bottom":"right",y=x?"clientHeight":"clientWidth",_=i.reference[w]+i.reference[h]-f[h]-i.floating[w],k=f[h]-i.reference[h],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=S?S[y]:0;(!E||!await(o.isElement==null?void 0:o.isElement(S)))&&(E=a.floating[y]||i.floating[w]);const R=_/2-k/2,j=E/2-v[w]/2-1,I=En(d[g],j),q=En(d[p],j),$=I,J=E-v[w]-q,D=E/2-v[w]/2+R,oe=fd($,D,J),K=!l.arrow&&_i(s)!=null&&D!==oe&&i.reference[w]/2-(D<$?I:q)-v[w]/2<0,ee=K?D<$?D-$:D-J:0;return{[h]:f[h]+ee,data:{[h]:oe,centerOffset:D-oe-ee,...K&&{alignmentOffset:ee}},reset:K}}}),rS=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0,...x}=Or(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=Ir(s),p=An(a),y=Ir(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=f||(y||!v?[El(a)]:Jk(a)),S=w!=="none";!f&&S&&k.push(...Zk(a,v,w,_));const E=[a,...k],R=await Co(e,x),j=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&j.push(R[g]),d){const D=Qk(s,o,_);j.push(R[D[0]],R[D[1]])}if(I=[...I,{placement:s,overflows:j}],!j.every(D=>D<=0)){var q,$;const D=(((q=i.flip)==null?void 0:q.index)||0)+1,oe=E[D];if(oe)return{data:{index:D,overflows:I},reset:{placement:oe}};let K=($=I.filter(ee=>ee.overflows[0]<=0).sort((ee,A)=>ee.overflows[1]-A.overflows[1])[0])==null?void 0:$.placement;if(!K)switch(h){case"bestFit":{var J;const ee=(J=I.filter(A=>{if(S){const T=An(A.placement);return T===p||T==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(T=>T>0).reduce((T,U)=>T+U,0)]).sort((A,T)=>A[1]-T[1])[0])==null?void 0:J[0];ee&&(K=ee);break}case"initialPlacement":K=a;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function Dp(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function $p(t){return qk.some(e=>t[e]>=0)}const nS=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=Or(t,e);switch(n){case"referenceHidden":{const i=await Co(e,{...s,elementContext:"reference"}),o=Dp(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:$p(o)}}}case"escaped":{const i=await Co(e,{...s,altBoundary:!0}),o=Dp(i,r.floating);return{data:{escapedOffsets:o,escaped:$p(o)}}}default:return{}}}}};async function sS(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ir(r),a=_i(r),l=An(r)==="y",c=["left","top"].includes(o)?-1:1,u=i&&l?-1:1,d=Or(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof w=="number"&&(h=a==="end"?w*-1:w),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const iS=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await sS(e,t);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}}}}},oS=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:g,y:p}=x;return{x:g,y:p}}},...l}=Or(t,e),c={x:r,y:n},u=await Co(e,l),d=An(Ir(s)),f=Fh(d);let h=c[f],w=c[d];if(i){const x=f==="y"?"top":"left",g=f==="y"?"bottom":"right",p=h+u[x],y=h-u[g];h=fd(p,h,y)}if(o){const x=d==="y"?"top":"left",g=d==="y"?"bottom":"right",p=w+u[x],y=w-u[g];w=fd(p,w,y)}const v=a.fn({...e,[f]:h,[d]:w});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[f]:i,[d]:o}}}}}},aS=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Or(t,e),u={x:r,y:n},d=An(s),f=Fh(d);let h=u[f],w=u[d];const v=Or(a,e),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const y=f==="y"?"height":"width",_=i.reference[f]-i.floating[y]+x.mainAxis,k=i.reference[f]+i.reference[y]-x.mainAxis;h<_?h=_:h>k&&(h=k)}if(c){var g,p;const y=f==="y"?"width":"height",_=["top","left"].includes(Ir(s)),k=i.reference[d]-i.floating[y]+(_&&((g=o.offset)==null?void 0:g[d])||0)+(_?0:x.crossAxis),S=i.reference[d]+i.reference[y]+(_?0:((p=o.offset)==null?void 0:p[d])||0)-(_?x.crossAxis:0);w<k?w=k:w>S&&(w=S)}return{[f]:h,[d]:w}}}},lS=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...c}=Or(t,e),u=await Co(e,c),d=Ir(s),f=_i(s),h=An(s)==="y",{width:w,height:v}=i.floating;let x,g;d==="top"||d==="bottom"?(x=d,g=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,x=f==="end"?"top":"bottom");const p=v-u.top-u.bottom,y=w-u.left-u.right,_=En(v-u[x],p),k=En(w-u[g],y),S=!e.middlewareData.shift;let E=_,R=k;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(R=y),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(E=p),S&&!f){const I=ft(u.left,0),q=ft(u.right,0),$=ft(u.top,0),J=ft(u.bottom,0);h?R=w-2*(I!==0||q!==0?I+q:ft(u.left,u.right)):E=v-2*($!==0||J!==0?$+J:ft(u.top,u.bottom))}await l({...e,availableWidth:R,availableHeight:E});const j=await o.getDimensions(a.floating);return w!==j.width||v!==j.height?{reset:{rects:!0}}:{}}}};function lc(){return typeof window<"u"}function ki(t){return f0(t)?(t.nodeName||"").toLowerCase():"#document"}function yt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pr(t){var e;return(e=(f0(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function f0(t){return lc()?t instanceof Node||t instanceof yt(t).Node:!1}function Zt(t){return lc()?t instanceof Element||t instanceof yt(t).Element:!1}function hr(t){return lc()?t instanceof HTMLElement||t instanceof yt(t).HTMLElement:!1}function Mp(t){return!lc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof yt(t).ShadowRoot}function Zo(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Xt(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function cS(t){return["table","td","th"].includes(ki(t))}function cc(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Hh(t){const e=Wh(),r=Zt(t)?Xt(t):t;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(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 uS(t){let e=Tn(t);for(;hr(e)&&!di(e);){if(Hh(e))return e;if(cc(e))return null;e=Tn(e)}return null}function Wh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function di(t){return["html","body","#document"].includes(ki(t))}function Xt(t){return yt(t).getComputedStyle(t)}function uc(t){return Zt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Tn(t){if(ki(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Mp(t)&&t.host||pr(t);return Mp(e)?e.host:e}function p0(t){const e=Tn(t);return di(e)?t.ownerDocument?t.ownerDocument.body:t.body:hr(e)&&Zo(e)?e:p0(e)}function Ao(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=p0(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=yt(s);if(i){const a=md(o);
vendor: 1,666 bytes, line 116
116return e.concat(o,o.visualViewport||[],Zo(s)?s:[],a&&r?Ao(a):[])}return e.concat(s,Ao(s,[],r))}function md(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function m0(t){const e=Xt(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=hr(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Sl(r)!==i||Sl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Vh(t){return Zt(t)?t:t.contextElement}function Gs(t){const e=Vh(t);if(!hr(e))return Cn(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=m0(e);let o=(i?Sl(r.width):r.width)/n,a=(i?Sl(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const dS=Cn(0);function g0(t){const e=yt(t);return!Wh()||!e.visualViewport?dS:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function hS(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==yt(t)?!1:e}function ss(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=Vh(t);let o=Cn(1);e&&(n?Zt(n)&&(o=Gs(n)):o=Gs(t));const a=hS(i,r,n)?g0(i):Cn(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const f=yt(i),h=n&&Zt(n)?yt(n):n;let w=f,v=md(w);for(;v&&n&&h!==w;){const x=Gs(v),g=v.getBoundingClientRect(),p=Xt(v),y=g.left+(v.clientLeft+parseFloat(p.paddingLeft))*x.x,_=g.top+(v.clientTop+parseFloat(p.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=y,c+=_,w=yt(v),v=md(w)}}return Cl({width:u,height:d,x:l,y:c})}function fS(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=pr(n),a=e?cc(e.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Cn(1);const u=Cn(0),d=hr(n);
vendor: 5,459 bytes, line 116
116if((d||!d&&!i)&&((ki(n)!=="body"||Zo(o))&&(l=uc(n)),hr(n))){const f=ss(n);c=Gs(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x,y:r.y*c.y-l.scrollTop*c.y+u.y}}function pS(t){return Array.from(t.getClientRects())}function gd(t,e){const r=uc(t).scrollLeft;return e?e.left+r:ss(pr(t)).left+r}function mS(t){const e=pr(t),r=uc(t),n=t.ownerDocument.body,s=ft(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ft(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+gd(t);const a=-r.scrollTop;return Xt(n).direction==="rtl"&&(o+=ft(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function gS(t,e){const r=yt(t),n=pr(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Wh();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function yS(t,e){const r=ss(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=hr(t)?Gs(t):Cn(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function Up(t,e,r){let n;if(e==="viewport")n=gS(t,r);else if(e==="document")n=mS(pr(t));else if(Zt(e))n=yS(e,r);else{const s=g0(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Cl(n)}function y0(t,e){const r=Tn(t);return r===e||!Zt(r)||di(r)?!1:Xt(r).position==="fixed"||y0(r,e)}function vS(t,e){const r=e.get(t);if(r)return r;let n=Ao(t,[],!1).filter(a=>Zt(a)&&ki(a)!=="body"),s=null;const i=Xt(t).position==="fixed";let o=i?Tn(t):t;for(;Zt(o)&&!di(o);){const a=Xt(o),l=Hh(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Zo(o)&&!l&&y0(t,o))?n=n.filter(u=>u!==o):s=a,o=Tn(o)}return e.set(t,n),n}function wS(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?cc(e)?[]:vS(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,u)=>{const d=Up(e,u,s);return c.top=ft(d.top,c.top),c.right=En(d.right,c.right),c.bottom=En(d.bottom,c.bottom),c.left=ft(d.left,c.left),c},Up(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xS(t){const{width:e,height:r}=m0(t);return{width:e,height:r}}function bS(t,e,r){const n=hr(e),s=pr(e),i=r==="fixed",o=ss(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Cn(0);if(n||!n&&!i)if((ki(e)!=="body"||Zo(s))&&(a=uc(e)),n){const h=ss(e,!0,i,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else s&&(l.x=gd(s));let c=0,u=0;if(s&&!n&&!i){const h=s.getBoundingClientRect();u=h.top+a.scrollTop,c=h.left+a.scrollLeft-gd(s,h)}const d=o.left+a.scrollLeft-l.x-c,f=o.top+a.scrollTop-l.y-u;return{x:d,y:f,width:o.width,height:o.height}}function ru(t){return Xt(t).position==="static"}function Fp(t,e){if(!hr(t)||Xt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return pr(t)===r&&(r=r.ownerDocument.body),r}function v0(t,e){const r=yt(t);if(cc(t))return r;if(!hr(t)){let s=Tn(t);for(;s&&!di(s);){if(Zt(s)&&!ru(s))return s;s=Tn(s)}return r}let n=Fp(t,e);for(;n&&cS(n)&&ru(n);)n=Fp(n,e);return n&&di(n)&&ru(n)&&!Hh(n)?r:n||uS(t)||r}const _S=async function(t){const e=this.getOffsetParent||v0,r=this.getDimensions,n=await r(t.floating);return{reference:bS(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function kS(t){return Xt(t).direction==="rtl"}const SS={convertOffsetParentRelativeRectToViewportRelativeRect:fS,getDocumentElement:pr,getClippingRect:wS,getOffsetParent:v0,getElementRects:_S,getClientRects:pS,getDimensions:xS,getScale:Gs,isElement:Zt,isRTL:kS};function ES(t,e){let r=null,n;const s=pr(t);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:u,width:d,height:f}=t.getBoundingClientRect();if(a||e(),!d||!f)return;const h=Ea(u),w=Ea(s.clientWidth-(c+d)),v=Ea(s.clientHeight-(u+f)),x=Ea(c),p={rootMargin:-h+"px "+-w+"px "+-v+"px "+-x+"px",threshold:ft(0,En(1,l))||1};let y=!0;function _(k){const S=k[0].intersectionRatio;if(S!==l){if(!y)return o();S?o(!1,S):n=setTimeout(()=>{o(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(_,{...p,root:s.ownerDocument})}catch{r=new IntersectionObserver(_,p)}r.observe(t)}return o(!0),i}function CS(t,e,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=Vh(t),u=s||i?[...c?Ao(c):[],...Ao(e)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=c&&a?ES(c,r):null;let f=-1,h=null;o&&(h=new ResizeObserver(g=>{let[p]=g;p&&p.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let w,v=l?ss(t):null;l&&x();function x(){const g=ss(t);v&&(g.x!==v.x||g.y!==v.y||g.width!==v.width||g.height!==v.height)&&r(),v=g,w=requestAnimationFrame(x)}return r(),()=>{var g;u.forEach(p=>{s&&p.removeEventListener("scroll",r),i&&p.removeEventListener("resize",r)}),d==null||d(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(w)}}const AS=iS,TS=oS,RS=rS,PS=lS,NS=nS,Bp=tS,jS=aS,OS=(t,e,r)=>{const n=new Map,s={platform:SS,...r},i={...s.platform,_c:n};return eS(t,e,{...s,platform:i})};var Ja=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Al(t,e){if(t===e)return!0;
vendor: 4,139 bytes, line 116
116if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Al(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Al(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function w0(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function zp(t,e){const r=w0(t);return Math.round(e*r)/r}function nu(t){const e=b.useRef(t);return Ja(()=>{e.current=t}),e}function IS(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=b.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=b.useState(n);Al(f,n)||h(n);const[w,v]=b.useState(null),[x,g]=b.useState(null),p=b.useCallback(A=>{A!==S.current&&(S.current=A,v(A))},[]),y=b.useCallback(A=>{A!==E.current&&(E.current=A,g(A))},[]),_=i||w,k=o||x,S=b.useRef(null),E=b.useRef(null),R=b.useRef(u),j=l!=null,I=nu(l),q=nu(s),$=nu(c),J=b.useCallback(()=>{if(!S.current||!E.current)return;const A={placement:e,strategy:r,middleware:f};q.current&&(A.platform=q.current),OS(S.current,E.current,A).then(T=>{const U={...T,isPositioned:$.current!==!1};D.current&&!Al(R.current,U)&&(R.current=U,Qo.flushSync(()=>{d(U)}))})},[f,e,r,q,$]);Ja(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[c]);const D=b.useRef(!1);Ja(()=>(D.current=!0,()=>{D.current=!1}),[]),Ja(()=>{if(_&&(S.current=_),k&&(E.current=k),_&&k){if(I.current)return I.current(_,k,J);J()}},[_,k,J,I,j]);const oe=b.useMemo(()=>({reference:S,floating:E,setReference:p,setFloating:y}),[p,y]),K=b.useMemo(()=>({reference:_,floating:k}),[_,k]),ee=b.useMemo(()=>{const A={position:r,left:0,top:0};if(!K.floating)return A;const T=zp(K.floating,u.x),U=zp(K.floating,u.y);return a?{...A,transform:"translate("+T+"px, "+U+"px)",...w0(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:T,top:U}},[r,a,K.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:J,refs:oe,elements:K,floatingStyles:ee}),[u,J,oe,K,ee])}const LS=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Bp({element:n.current,padding:s}).fn(r):{}:n?Bp({element:n,padding:s}).fn(r):{}}}},DS=(t,e)=>({...AS(t),options:[t,e]}),$S=(t,e)=>({...TS(t),options:[t,e]}),MS=(t,e)=>({...jS(t),options:[t,e]}),US=(t,e)=>({...RS(t),options:[t,e]}),FS=(t,e)=>({...PS(t),options:[t,e]}),BS=(t,e)=>({...NS(t),options:[t,e]}),zS=(t,e)=>({...LS(t),options:[t,e]});var HS="Arrow",x0=b.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return m.jsx(Be.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});x0.displayName=HS;var WS=x0;function VS(t){const[e,r]=b.useState(void 0);return Yt(()=>{if(t){r({width:t.offsetWidth,height:t.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=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var b0="Popper",[_0,k0]=Jo(b0),[qN,S0]=_0(b0),E0="PopperAnchor",C0=b.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=S0(E0,r),o=b.useRef(null),a=Jt(e,o);return b.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.jsx(Be.div,{...s,ref:a})});C0.displayName=E0;var qh="PopperContent",[qS,KS]=_0(qh),A0=b.forwardRef((t,e)=>{var de,hs,Dr,In,$r,fs;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l
vendor: 8,296 bytes, line 116
116=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:w,...v}=t,x=S0(qh,r),[g,p]=b.useState(null),y=Jt(e,Mr=>p(Mr)),[_,k]=b.useState(null),S=VS(_),E=(S==null?void 0:S.width)??0,R=(S==null?void 0:S.height)??0,j=n+(i!=="center"?"-"+i:""),I=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},q=Array.isArray(c)?c:[c],$=q.length>0,J={padding:I,boundary:q.filter(QS),altBoundary:$},{refs:D,floatingStyles:oe,placement:K,isPositioned:ee,middlewareData:A}=IS({strategy:"fixed",placement:j,whileElementsMounted:(...Mr)=>CS(...Mr,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[DS({mainAxis:s+R,alignmentAxis:o}),l&&$S({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?MS():void 0,...J}),l&&US({...J}),FS({...J,apply:({elements:Mr,rects:ta,availableWidth:bc,availableHeight:ra})=>{const{width:_c,height:Ci}=ta.reference,ps=Mr.floating.style;ps.setProperty("--radix-popper-available-width",`${bc}px`),ps.setProperty("--radix-popper-available-height",`${ra}px`),ps.setProperty("--radix-popper-anchor-width",`${_c}px`),ps.setProperty("--radix-popper-anchor-height",`${Ci}px`)}}),_&&zS({element:_,padding:a}),JS({arrowWidth:E,arrowHeight:R}),f&&BS({strategy:"referenceHidden",...J})]}),[T,U]=P0(K),X=jr(w);Yt(()=>{ee&&(X==null||X())},[ee,X]);const W=(de=A.arrow)==null?void 0:de.x,ne=(hs=A.arrow)==null?void 0:hs.y,ie=((Dr=A.arrow)==null?void 0:Dr.centerOffset)!==0,[Re,Ve]=b.useState();return Yt(()=>{g&&Ve(window.getComputedStyle(g).zIndex)},[g]),m.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:ee?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Re,"--radix-popper-transform-origin":[(In=A.transformOrigin)==null?void 0:In.x,($r=A.transformOrigin)==null?void 0:$r.y].join(" "),...((fs=A.hide)==null?void 0:fs.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:m.jsx(qS,{scope:r,placedSide:T,onArrowChange:k,arrowX:W,arrowY:ne,shouldHideArrow:ie,children:m.jsx(Be.div,{"data-side":T,"data-align":U,...v,ref:y,style:{...v.style,animation:ee?void 0:"none"}})})})});A0.displayName=qh;var T0="PopperArrow",GS={top:"bottom",right:"left",bottom:"top",left:"right"},R0=b.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=KS(T0,n),o=GS[i.placedSide];return m.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:m.jsx(WS,{...s,ref:r,style:{...s.style,display:"block"}})})});R0.displayName=T0;function QS(t){return t!==null}var JS=t=>({name:"transformOrigin",options:t,fn(e){var x,g,p;const{placement:r,rects:n,middlewareData:s}=e,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=P0(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,h=(((p=s.arrow)==null?void 0:p.y)??0)+l/2;let w="",v="";return c==="bottom"?(w=o?d:`${f}px`,v=`${-l}px`):c==="top"?(w=o?d:`${f}px`,v=`${n.floating.height+l}px`):c==="right"?(w=`${-l}px`,v=o?d:`${h}px`):c==="left"&&(w=`${n.floating.width+l}px`,v=o?d:`${h}px`),{data:{x:w,y:v}}}});function P0(t){const[e,r="center"]=t.split("-");return[e,r]}var YS=C0,ZS=A0,XS=R0,[dc,KN]=Jo("Tooltip",[k0]),Kh=k0(),N0="TooltipProvider",eE=700,Hp="tooltip.open",[tE,j0]=dc(N0),O0=t=>{const{__scopeTooltip:e,delayDuration:r=eE,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),m.jsx(tE,{scope:e,isOpenDelayedRef:o,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};O0.displayName=N0;var I0="Tooltip",[GN,hc]=dc(I0),yd="TooltipTrigger",rE=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=hc(yd,r),i=j0(yd,r),o=Kh(r),a=b.useRef(null),l=Jt(e,a,s.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(YS,{asChild:!0,...o,children:m.jsx(Be.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:De(t.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:De(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:De(t.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:De(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:De(t.onBlur,s.onClose),onClick:De(t.onClick,s.onClose)})})});rE.displayName=yd;var nE="TooltipPortal",[QN,sE]=dc(nE,{forceMount:void 0}),hi="TooltipContent",L0=b.forwardRef((t,e)=>{const r=sE(hi,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=hc(hi,t.__scopeTooltip);return m.jsx(Ih,{present:n||o.open,children:o.disableHoverableContent?m.jsx(D0,{side:s,...i,ref:e}):m.jsx(iE,{side:s,...i,ref:e})})}),iE=b.forwardRef((t,e)=>{const r=hc(hi,t.__scopeTooltip),n=j0(hi,t.__scopeTooltip),s=b.useRef(null),i=Jt(e,s),[o,a]=b.useState(null),{trigger:l,onClose:c}=r,u=s.current,{onPointerInTransitChange:d}=n,f=b.useCallback(()=>{a(null),d(!1)},[d]),h=b.useCallback((w,v)=>{const x=w.currentTarget,g={x:w.clientX,y:w.clientY},p=uE(g,x.getBoundingClientRect()),y=dE(g,p),_=hE(v.getBoundingClientRect()),k=pE([...y,..._]);a(k),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(l&&u){const w=x=>h(x,u),v=x=>h(x,l);return l.addEventListener("pointerleave",w),u.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",v)}}},[l,u,h,f]),b.useEffect(()=>{if(o){const w=v=>{const x=v.target,g={x:v.clientX,y:v.clientY},p=(l==null?void 0:l.contains(x))||(u==null?void 0:u.contains(x)),y=!fE(g,o);p?f():y&&(f(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,u,o,c,f]),m.jsx(D0,{...t,ref:i})}),[oE,aE]=dc(I0,{isInside:!1}),lE=N_("TooltipContent"),D0=b.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=hc(hi,r),c=Kh(r),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(Hp,u),()=>document.removeEventListener(Hp,u)),[u]),b.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),m.jsx(Oh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:m.jsxs(ZS,{"data-state":l.stateAttribute,...c,...a,ref:e,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:[m.jsx(lE,{children:n}),m.jsx(oE,{scope:r,isInside:!0,children:m.jsx(r1,{id:l.contentId,role:"tooltip",children:s||n})})]})})});L0.displayName=hi;var $0="TooltipArrow",cE=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Kh(r);return aE($0,r).isInside?null:m.jsx(XS,{...s,...n,ref:e})});cE.displayName=$0;function uE(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.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 dE(t,e,r=5){const n=[];
116switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function hE(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function fE(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],c=a.x,u=a.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(s=!s)}return s}function pE(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),mE(e)}function mE(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const s=t[n];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[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(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var gE=O0,M0=L0;const yE=gE,vE=b.forwardRef(({className:t,sideOffset:e=4,...r},n)=>m.jsx(M0,{ref:n,sideOffset:e,className:Oe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));vE.displayName=M0.displayName;var fc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},pc=typeof window>"u"||"Deno"in globalThis;function Ft(){}function wE(t,e){return typeof t=="function"?t(e):t}function xE(t){return typeof t=="number"&&t>=0&&t!==1/0}function bE(t,e){return Math.max(t+(e||0)-Date.now(),0)}function vd(t,e){return typeof t=="function"?t(e):t}function _E(t,e){return typeof t=="function"?t(e):t}function Wp(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(n){if(e.queryHash!==Gh(o,e.options))return!1}else if(!Ro(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function Vp(t,e){const{exact:r,status:n,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(r){if(To(e.options.mutationKey)!==To(i))return!1}else if(!Ro(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function Gh(t,e){return((e==null?void 0:e.queryKeyHashFn)||To)(t)}function To(t){return JSON.stringify(t,(e,r)=>wd(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Ro(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>Ro(t[r],e[r])):!1}function U0(t,e){if(t===e)return t;const r=qp(t)&&qp(e);if(r||wd(t)&&wd(e)){const n=r?t:Object.keys(t),s=n.length,i=r?e:Object.keys(e),o=i.length,a=r?[]:{},l=new Set(n);let c=0;for(let u=0;u<o;u++){const d=r?u:i[u];(!r&&l.has(d)||r)&&t[d]===void 0&&e[d]===void 0?(a[d]=void 0,c++):(a[d]=U0(t[d],e[d]),a[d]===t[d]&&t[d]!==void 0&&c++)}return s===o&&c===s?t:a}return e}function qp(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function wd(t){if(!Kp(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!Kp(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Kp(t){return Object.prototype.toString.call(t)==="[object Object]"}function kE(t){return new Promise(e=>{setTimeout(e,t)})}function SE(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?U0(t,e):e}function EE(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function CE(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var Qh=Symbol();function F0(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Qh?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Vn,tn,Js,Xm,AE=(Xm=class extends fc{constructor(){super();ce(this,Vn);ce(this,tn);ce(this,Js);Z(this,Js,e=>{if(!pc&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){C(this,tn)||this.setEventListener(C(this,Js))}onUnsubscribe(){var e;this.hasListeners()||((e=C(this,tn))==null||e.call(this),Z(this,tn,void 0))}setEventListener(e){var r;Z(this,Js,e),(r=C(this,tn))==null||r.call(this),Z(this,tn,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){C(this,Vn)!==e&&(Z(this,Vn,e),this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 20,025 bytes, line 116
116this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof C(this,Vn)=="boolean"?C(this,Vn):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Vn=new WeakMap,tn=new WeakMap,Js=new WeakMap,Xm),B0=new AE,Ys,rn,Zs,eg,TE=(eg=class extends fc{constructor(){super();ce(this,Ys,!0);ce(this,rn);ce(this,Zs);Z(this,Zs,e=>{if(!pc&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){C(this,rn)||this.setEventListener(C(this,Zs))}onUnsubscribe(){var e;this.hasListeners()||((e=C(this,rn))==null||e.call(this),Z(this,rn,void 0))}setEventListener(e){var r;Z(this,Zs,e),(r=C(this,rn))==null||r.call(this),Z(this,rn,e(this.setOnline.bind(this)))}setOnline(e){C(this,Ys)!==e&&(Z(this,Ys,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return C(this,Ys)}},Ys=new WeakMap,rn=new WeakMap,Zs=new WeakMap,eg),Tl=new TE;function RE(){let t,e;const r=new Promise((s,i)=>{t=s,e=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}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}function PE(t){return Math.min(1e3*2**t,3e4)}function z0(t){return(t??"online")==="online"?Tl.isOnline():!0}var H0=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function su(t){return t instanceof H0}function W0(t){let e=!1,r=0,n=!1,s;const i=RE(),o=v=>{var x;n||(f(new H0(v)),(x=t.abort)==null||x.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>B0.isFocused()&&(t.networkMode==="always"||Tl.isOnline())&&t.canRun(),u=()=>z0(t.networkMode)&&t.canRun(),d=v=>{var x;n||(n=!0,(x=t.onSuccess)==null||x.call(t,v),s==null||s(),i.resolve(v))},f=v=>{var x;n||(n=!0,(x=t.onError)==null||x.call(t,v),s==null||s(),i.reject(v))},h=()=>new Promise(v=>{var x;s=g=>{(n||c())&&v(g)},(x=t.onPause)==null||x.call(t)}).then(()=>{var v;s=void 0,n||(v=t.onContinue)==null||v.call(t)}),w=()=>{if(n)return;let v;const x=r===0?t.initialPromise:void 0;try{v=x??t.fn()}catch(g){v=Promise.reject(g)}Promise.resolve(v).then(d).catch(g=>{var S;if(n)return;const p=t.retry??(pc?0:3),y=t.retryDelay??PE,_=typeof y=="function"?y(r,g):y,k=p===!0||typeof p=="number"&&r<p||typeof p=="function"&&p(r,g);if(e||!k){f(g);return}r++,(S=t.onFail)==null||S.call(t,r,g),kE(_).then(()=>c()?void 0:h()).then(()=>{e?f(g):w()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?w():h().then(w),i)}}var NE=t=>setTimeout(t,0);function jE(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=NE;const i=a=>{e?t.push(a):s(()=>{r(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var tt=jE(),qn,tg,V0=(tg=class{constructor(){ce(this,qn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xE(this.gcTime)&&Z(this,qn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(pc?1/0:5*60*1e3))}clearGcTimeout(){C(this,qn)&&(clearTimeout(C(this,qn)),Z(this,qn,void 0))}},qn=new WeakMap,tg),Xs,Kn,St,Gn,Je,zo,Qn,zt,wr,rg,OE=(rg=class extends V0{constructor(e){super();ce(this,zt);ce(this,Xs);ce(this,Kn);ce(this,St);ce(this,Gn);ce(this,Je);ce(this,zo);ce(this,Qn);Z(this,Qn,!1),Z(this,zo,e.defaultOptions),this.setOptions(e.options),this.observers=[],Z(this,Gn,e.client),Z(this,St,C(this,Gn).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Z(this,Xs,LE(this.options)),this.state=e.state??C(this,Xs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=C(this,Je))==null?void 0:e.promise}setOptions(e){this.options={...C(this,zo),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,St).remove(this)}setData(e,r){const n=SE(this.state.data,e,this.options);return qe(this,zt,wr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){qe(this,zt,wr).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,s;const r=(n=C(this,Je))==null?void 0:n.promise;return(s=C(this,Je))==null||s.cancel(e),r?r.then(Ft).catch(Ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Xs))}isActive(){return this.observers.some(e=>_E(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>vd(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!bE(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=C(this,Je))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=C(this,Je))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),C(this,St).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(C(this,Je)&&(C(this,Qn)?C(this,Je).cancel({revert:!0}):C(this,Je).cancelRetry()),this.scheduleGc()),C(this,St).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||qe(this,zt,wr).call(this,{type:"invalidate"})}fetch(e,r){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(C(this,Je))return C(this,Je).continueRetry(),C(this,Je).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Z(this,Qn,!0),n.signal)})},i=()=>{const f=F0(this.options,r),w=(()=>{const v={client:C(this,Gn),queryKey:this.queryKey,meta:this.meta};return s(v),v})();return Z(this,Qn,!1),this.options.persister?this.options.persister(f,w,this):f(w)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:C(this,Gn),state:this.state,fetchFn:i};return s(f),f})();(c=this.options.behavior)==null||c.onFetch(a,this),Z(this,Kn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&qe(this,zt,wr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,w,v,x;su(f)&&f.silent||qe(this,zt,wr).call(this,{type:"error",error:f}),su(f)||((w=(h=C(this,St).config).onError)==null||w.call(h,f,this),(x=(v=C(this,St).config).onSettled)==null||x.call(v,this.state.data,f,this)),this.scheduleGc()};return Z(this,Je,W0({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,w,v,x;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(g){l(g);return}(w=(h=C(this,St).config).onSuccess)==null||w.call(h,f,this),(x=(v=C(this,St).config).onSettled)==null||x.call(v,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{qe(this,zt,wr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{qe(this,zt,wr).call(this,{type:"pause"})},onContinue:()=>{qe(this,zt,wr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),C(this,Je).start()}},Xs=new WeakMap,Kn=new WeakMap,St=new WeakMap,Gn=new WeakMap,Je=new WeakMap,zo=new WeakMap,Qn=new WeakMap,zt=new WeakSet,wr=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...IE(n.data,this.options),fetchMeta:e.meta??null};case"success":return Z(this,Kn,void 0),{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return su(s)&&s.revert&&C(this,Kn)?{...C(this,Kn),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,...e.state}}};this.state=r(this.state),tt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),C(this,St).notify({query:this,type:"updated",action:e})})},rg);function IE(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:z0(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function LE(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 sr,ng,DE=(ng=class extends fc{constructor(e={}){super();ce(this,sr);this.config=e,Z(this,sr,new Map)}build(e,r,n){const s=r.queryKey,i=r.queryHash??Gh(s,r);let o=this.get(i);return o||(o=new OE({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){C(this,sr).has(e.queryHash)||(C(this,sr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=C(this,sr).get(e.queryHash);r&&(e.destroy(),r===e&&C(this,sr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){tt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return C(this,sr).get(e)}getAll(){return[...C(this,sr).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>Wp(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>Wp(e,n)):r}notify(e){tt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){tt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){tt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},sr=new WeakMap,ng),ir,Xe,Jn,or,Vr,sg,$E=(sg=class extends V0{constructor(e){super();ce(this,or);ce(this,ir);ce(this,Xe);ce(this,Jn);this.mutationId=e.mutationId,Z(this,Xe,e.mutationCache),Z(this,ir,[]),this.state=e.state||ME(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){C(this,ir).includes(e)||(C(this,ir).push(e),this.clearGcTimeout(),C(this,Xe).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Z(this,ir,C(this,ir).filter(r=>r!==e)),this.scheduleGc(),C(this,Xe).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){C(this,ir).length||(this.state.status==="pending"?this.scheduleGc():C(this,Xe).remove(this))}continue(){var e;return((e=C(this,Jn))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,c,u,d,f,h,w,v,x,g,p,y,_,k,S,E,R;const r=()=>{qe(this,or,Vr).call(this,{type:"continue"})};Z(this,Jn,W0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(j,I)=>{qe(this,or,Vr).call(this,{type:"failed",failureCount:j,error:I})},onPause:()=>{qe(this,or,Vr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Xe).canRun(this)}));const n=this.state.status==="pending",s=!C(this,Jn).canStart();try{if(n)r();else{qe(this,or,Vr).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=C(this,Xe).config).onMutate)==null?void 0:o.call(i,e,this));const I=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));I!==this.state.context&&qe(this,or,Vr).call(this,{type:"pending",context:I,variables:e,isPaused:s})}const j=await C(this,Jn).start();return await((u=(c=C(this,Xe).config).onSuccess)==null?void 0:u.call(c,j,e,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,j,e,this.state.context)),await((w=(h=C(this,Xe).config).onSettled)==null?void 0:w.call(h,j,null,this.state.variables,this.state.context,this)),await((x=(v=this.options).onSettled)==null?void 0:x.call(v,j,null,e,this.state.context)),qe(this,or,Vr).call(this,{type:"success",data:j}),j}catch(j){try{throw await((p=(g=C(this,Xe).config).onError)==null?void 0:p.call(g,j,e,this.state.context,this)),await((_=(y=this.options).onError)==null?void 0:_.call(y,j,e,this.state.context)),await((S=(k=C(this,Xe).config).onSettled)==null?void 0:S.call(k,void 0,j,this.state.variables,this.state.context,this)),await((R=(E=this.options).onSettled)==null?void 0:R.call(E,void 0,j,e,this.state.context)),j}finally{qe(this,or,Vr).call(this,{type:"error",error:j})}}finally{C(this,Xe).runNext(this)}}},ir=new WeakMap,Xe=new WeakMap,Jn=new WeakMap,or=new WeakSet,Vr=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),tt.batch(()=>{C(this,ir).forEach(n=>{n.onMutationUpdate(e)}),C(this,Xe).notify({mutation:this,type:"updated",action:e})})},sg);function ME(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sr,Ht,Ho,ig,UE=(ig=class extends fc{constructor(e={}){super();ce(this,Sr);ce(this,Ht);ce(this,Ho);this.config=e,Z(this,Sr,new Set),Z(this,Ht,new Map),Z(this,Ho,0)}build(e,r,n){const s=new $E({mutationCache:this,mutationId:++sa(this,Ho)._,options:e.defaultMutationOptions(r),state:n});return this.add(s),s}add(e){C(this,Sr).add(e);const r=Ca(e);if(typeof r=="string"){const n=C(this,Ht).get(r);n?n.push(e):C(this,Ht).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(C(this,Sr).delete(e)){const r=Ca(e);if(typeof r=="string"){const n=C(this,Ht).get(r);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&C(this,Ht).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=Ca(e);if(typeof r=="string"){const n=C(this,Ht).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const r=Ca(e);if(typeof r=="string"){const s=(n=C(this,Ht).get(r))==null?void 0:n.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){tt.batch(()=>{C(this,Sr).forEach(e=>{this.notify({type:"removed",mutation:e})}),C(this,Sr).clear(),C(this,Ht).clear()})}getAll(){return Array.from(C(this,Sr))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>Vp(r,n))}findAll(e={}){return this.getAll().filter(r=>Vp(e,r))}notify(e){tt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return tt.batch(()=>Promise.all(e.map(r=>r.continue().catch(Ft))))}},Sr=new WeakMap,Ht=new WeakMap,Ho=new WeakMap,ig);function Ca(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Gp(t){return{onFetch:(e,r)=>{var u,d,f,h,w;const n=e.options,s=(f=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=e.state.data)==null?void 0:h.pages)||[],o=((w=e.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let v=!1;const x=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(e.signal.aborted?v=!0:e.signal.addEventListener("abort",()=>{v=!0}),e.signal)})},g=F0(e.options,e.fetchOptions),p=async(y,_,k)=>{if(v)return Promise.reject();if(_==null&&y.pages.length)return Promise.resolve(y);const E=(()=>{const q={client:e.client,queryKey:e.queryKey,pageParam:_,direction:k?"backward":"forward",meta:e.options.meta};return x(q),q})(),R=await g(E),{maxPages:j}=e.options,I=k?CE:EE;return{pages:I(y.pages,R,j),pageParams:I(y.pageParams,_,j)}};if(s&&i.length){const y=s==="backward",_=y?FE:Qp,k={pages:i,pageParams:o},S=_(n,k);a=await p(k,S,y)}else{const y=t??i.length;do{const _=l===0?o[0]??n.initialPageParam:Qp(n,a);if(l>0&&_==null)break;a=await p(a,_),l++}while(l<y)}return a};e.options.persister?e.fetchFn=()=>{var v,x;return(x=(v=e.options).persister)==null?void 0:x.call(v,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=c}}}function Qp(t,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function FE(t,{pages:e,pageParams:r}){var n;return e.length>0?(n=t.getPreviousPageParam)==null?void 0:n.call(t,e[0],e,r[0],r):void 0}var Se,nn,sn,ei,ti,on,ri,ni,og,BE=(og=class{constructor(t={}){ce(this,Se);ce(this,nn);ce(this,sn);ce(this,ei);ce(this,ti);ce(this,on);ce(this,ri);ce(this,ni);Z(this,Se,t.queryCache||new DE),Z(this,nn,t.mutationCache||new UE),Z(this,sn,t.defaultOptions||{}),Z(this,ei,new Map),Z(this,ti,new Map),Z(this,on,0)}mount(){sa(this,on)._++,C(this,on)===1&&(Z(this,ri,B0.subscribe(async t=>{t&&(await this.resumePausedMutations(),C(this,Se).onFocus())})),Z(this,ni,Tl.subscribe(async t=>{t&&(await this.resumePausedMutations(),C(this,Se).onOnline())})))}unmount(){var t,e;sa(this,on)._--,C(this,on)===0&&((t=C(this,ri))==null||t.call(this),Z(this,ri,void 0),(e=C(this,ni))==null||e.call(this),Z(this,ni,void 0))}isFetching(t){return C(this,Se).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return C(this,nn).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=C(this,Se).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=C(this,Se).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(vd(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return C(this,Se).findAll(t).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(t,e,r){const n=this.defaultQueryOptions({queryKey:t}),s=C(this,Se).get(n.queryHash),i=s==null?void 0:s.state.data,o=wE(e,i);if(o!==void 0)return C(this,Se).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(t,e,r){return tt.batch(()=>C(this,Se).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=C(this,Se).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=C(this,Se);tt.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=C(this,Se);return tt.batch(()=>(r.findAll(t).forEach(n=>
116{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=tt.batch(()=>C(this,Se).findAll(t).map(s=>s.cancel(r)));return Promise.all(n).then(Ft).catch(Ft)}invalidateQueries(t,e={}){return tt.batch(()=>(C(this,Se).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=tt.batch(()=>C(this,Se).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(Ft)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Ft)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=C(this,Se).build(this,e);return r.isStaleByTime(vd(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ft).catch(Ft)}fetchInfiniteQuery(t){return t.behavior=Gp(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ft).catch(Ft)}ensureInfiniteQueryData(t){return t.behavior=Gp(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Tl.isOnline()?C(this,nn).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Se)}getMutationCache(){return C(this,nn)}getDefaultOptions(){return C(this,sn)}setDefaultOptions(t){Z(this,sn,t)}setQueryDefaults(t,e){C(this,ei).set(To(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...C(this,ei).values()],r={};return e.forEach(n=>{Ro(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){C(this,ti).set(To(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...C(this,ti).values()],r={};return e.forEach(n=>{Ro(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...C(this,sn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Gh(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Qh&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...C(this,sn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){C(this,Se).clear(),C(this,nn).clear()}},Se=new WeakMap,nn=new WeakMap,sn=new WeakMap,ei=new WeakMap,ti=new WeakMap,on=new WeakMap,ri=new WeakMap,ni=new WeakMap,og),zE=b.createContext(void 0),HE=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),m.jsx(zE.Provider,{value:t,children:e}));/** 117 * @remix-run/router v1.23.0 118 * 119 * Copyright (c) Remix Software Inc. 120 * 121 * This source code is licensed under the MIT license found in the 122 * LICENSE.md file in the root directory of this source tree. 123 * 124 * @license MIT 125 */function Po(){return Po=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Po.apply(this,arguments)}var cn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(cn||(cn={}));const Jp="popstate";function WE(t){t===void 0&&(t={});function e(n,s){let{pathname:i,search:o,hash:a}=n.location;return xd("",{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:Rl(s)}return qE(e,r,null,t)}function je(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function q0(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function VE(){return Math.random().toString(36).substr(2,8)}function Yp(t,e){return{usr:t.state,key:t.key,idx:e}}function xd(t,e,r,n){return r===void 0&&(r=null),Po({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Si(e):e,{state:r,key:e&&e.key||n||VE()})}function Rl(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Si(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function qE(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=cn.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Po({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=cn.Pop;let x=u(),g=x==null?null:x-c;c=x,l&&l({action:a,location:v.location,delta:g})}function f(x,g){a=cn.Push;let p=xd(v.location,x,g);c=u()+1;let y=Yp(p,c),_=v.createHref(p);try{o.pushState(y,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(_)}i&&l&&l({action:a,location:v.location,delta:1})}function h(x,g){a=cn.Replace;let p=xd(v.location,x,g);c=u();let y=Yp(p,c),_=v.createHref(p);o.replaceState(y,"",_),i&&l&&l({action:a,location:v.location,delta:0})}function w(x){let g=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof x=="str
125ing"?x:Rl(x);return p=p.replace(/ $/,"%20"),je(g,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,g)}let v={get action(){return a},get location(){return t(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Jp,d),l=x,()=>{s.removeEventListener(Jp,d),l=null}},createHref(x){return e(s,x)},createURL:w,encodeLocation(x){let g=w(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:h,go(x){return o.go(x)}};return v}var Zp;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Zp||(Zp={}));function KE(t,e,r){return r===void 0&&(r="/"),GE(t,e,r,!1)}function GE(t,e,r,n){let s=typeof e=="string"?Si(e):e,i=Jh(s.pathname||"/",r);if(i==null)return null;let o=K0(t);QE(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=oC(i);a=sC(o[l],c,n)}return a}function K0(t,e,r,n){e===void 0&&(e=[]),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("/")&&(je(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=wn([n,l.relativePath]),u=r.concat(l);i.children&&i.children.length>0&&(je(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),K0(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:rC(c,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of G0(i.path))s(i,o,l)}),e}function G0(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=G0(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function QE(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:nC(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const JE=/^:[\w-]+$/,YE=3,ZE=2,XE=1,eC=10,tC=-2,Xp=t=>t==="*";function rC(t,e){let r=t.split("/"),n=r.length;return r.some(Xp)&&(n+=tC),e&&(n+=ZE),r.filter(s=>!Xp(s)).reduce((s,i)=>s+(JE.test(i)?YE:i===""?XE:eC),n)}function nC(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function sC(t,e,r){let{routesMeta:n}=t,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,u=i==="/"?e:e.slice(i.length)||"/",d=em({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&r&&!n[n.length-1].route.index&&(d=em({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 13,359 bytes, lines 125-143
125Object.assign(s,d.params),o.push({params:s,pathname:wn([i,d.pathname]),pathnameBase:uC(wn([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=wn([i,d.pathnameBase]))}return o}function em(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=iC(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,u,d)=>{let{paramName:f,isOptional:h}=u;if(f==="*"){let v=a[d]||"";o=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const w=a[d];return h&&!w?c[f]=void 0:c[f]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:t}}function iC(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),q0(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function oC(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return q0(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Jh(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function aC(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Si(t):t;return{pathname:r?r.startsWith("/")?r:lC(r,e):e,search:dC(n),hash:hC(s)}}function lC(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function iu(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` 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 cC(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Q0(t,e){let r=cC(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function J0(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=Si(t):(s=Po({},t),je(!s.pathname||!s.pathname.includes("?"),iu("?","pathname","search",s)),je(!s.pathname||!s.pathname.includes("#"),iu("#","pathname","hash",s)),je(!s.search||!s.search.includes("#"),iu("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let d=e.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?e[d]:"/"}let l=aC(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const wn=t=>t.join("/").replace(/\/\/+/g,"/"),uC=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),dC=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,hC=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function fC(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Y0=["post","put","patch","delete"];new Set(Y0);const pC=["get",...Y0];new Set(pC);/** 126 * React Router v6.30.1 127 * 128 * Copyright (c) Remix Software Inc. 129 * 130 * This source code is licensed under the MIT license found in the 131 * LICENSE.md file in the root directory of this source tree. 132 * 133 * @license MIT 134 */function No(){return No=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},No.apply(this,arguments)}const Yh=b.createContext(null),mC=b.createContext(null),cs=b.createContext(null),mc=b.createContext(null),us=b.createContext({outlet:null,matches:[],isDataRoute:!1}),Z0=b.createContext(null);function gC(t,e){let{relative:r}=e===void 0?{}:e;Xo()||je(!1);let{basename:n,navigator:s}=b.useContext(cs),{hash:i,pathname:o,search:a}=ew(t,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:wn([n,o])),s.createHref({pathname:l,search:a,hash:i})}function Xo(){return b.useContext(mc)!=null}function ds(){return Xo()||je(!1),b.useContext(mc).location}function X0(t){b.useContext(cs).static||b.useLayoutEffect(t)}function yC(){let{isDataRoute:t}=b.useContext(us);return t?PC():vC()}function vC(){Xo()||je(!1);let t=b.useContext(Yh),{basename:e,future:r,navigator:n}=b.useContext(cs),{matches:s}=b.useContext(us),{pathname:i}=ds(),o=JSON.stringify(Q0(s,r.v7_relativeSplatPath)),a=b.useRef(!1);return X0(()=>{a.current=!0}),b.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let d=J0(c,JSON.parse(o),i,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:wn([e,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[e,n,o,i,t])}function ew(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=b.useContext(cs),{matches:s}=b.useContext(us),{pathname:i}=ds(),o=JSON.stringify(Q0(s,n.v7_relativeSplatPath));return b.useMemo(()=>J0(t,JSON.parse(o),i,r==="path"),[t,o,i,r])}function wC(t,e){return xC(t,e)}function xC(t,e,r,n){Xo()||je(!1);let{navigator:s}=b.useContext(cs),{matches:i}=b.useContext(us),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=ds(),u;if(e){var d;let x=typeof e=="string"?Si(e):e;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||je(!1),u=x}else u=c;let f=u.pathname||"/",h=f;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=KE(t,{pathname:h}),v=EC(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:wn([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:wn([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,r,n);return e&&v?b.createElement(mc.Provider,{value:{location:No({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:cn.Pop}},v):v}function bC(){let t=RC(),e=fC(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),r?b.createElement("pre",{style:s},r):null,null)}const _C=b.createElement(bC,null);class kC extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?b.createElement(us.Provider,{value:this.props.routeContext},b.createElement(Z0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function SC(t){let{routeContext:e,match:r,children:n}=t,s=b.useContext(Yh);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(us.Provider,{value:e},n)}function EC(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if(!r)return null;if(r.errors)t=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(s=r)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||je(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:f,errors:h}=r,w=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||w){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,f)=>{let h,w=!1,v=null,x=null;r&&(h=a&&d.route.id?a[d.route.id]:void 0,v=d.route.errorElement||_C,l&&(c<0&&f===0?(w=!0,x=null):c===f&&(w=!0,x=d.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,f+1)),p=()=>{let y;return h?y=v:w?y=x:d.route.Component?y=b.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=u,b.createElement(SC,{match:d,routeContext:{outlet:u,matches:g,isDataRoute:r!=null},children:y})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?b.createElement(kC,{location:r.location,revalidation:r.revalidation,component:v,error:h,children:p(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):p()},null)}var tw=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(tw||{}),Pl=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Pl||{});function CC(t){let e=b.useContext(Yh);return e||je(!1),e}function AC(t){let e=b.useContext(mC);return e||je(!1),e}function TC(t){let e=b.useContext(us);return e||je(!1),e}function rw(t){let e=TC(),r=e.matches[e.matches.length-1];return r.route.id||je(!1),r.route.id}function RC(){var t;let e=b.useContext(Z0),r=AC(Pl.UseRouteError),n=rw(Pl.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function PC(){let{router:t}=CC(tw.UseNavigateStable),e=rw(Pl.UseNavigateStable),r=b.useRef(!1);return X0(()=>{r.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,No({fromRouteId:e},i)))},[t,e])}function NC(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function qr(t){je(!1)}function jC(t){let{basename:e="/",children:r=null,location:n,navigationType:s=cn.Pop,navigator:i,static:o=!1,future:a}=t;Xo()&&je(!1);let l=e.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:i,static:o,future:No({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Si(n));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:w="default"}=n,v=b.useMemo(()=>{let x=Jh(u,l);return x==null?null:{location:{pathname:x,search:d,hash:f,state:h,key:w},navigationType:s}},[l,u,d,f,h,w,s]);return v==null?null:b.createElement(cs.Provider,{value:c},b.createElement(mc.Provider,{children:r,value:v}))}function OC(t){let{children:e,location:r}=t;return wC(bd(e),r)}new Promise(()=>{});function bd(t,e){e===void 0&&(e=[]);let r=[];return b.Children.forEach(t,(n,s)=>{if(!b.isValidElement(n))return;let i=[...e,s];if(n.type===b.Fragment){r.push.apply(r,bd(n.props.children,i));return}n.type!==qr&&je(!1),!n.props.index||!n.props.children||je(!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=bd(n.props.children,i)),r.push(o)}),r}/** 135 * React Router DOM v6.30.1 136 * 137 * Copyright (c) Remix Software Inc. 138 * 139 * This source code is licensed under the MIT license found in the 140 * LICENSE.md file in the root directory of this source tree. 141 * 142 * @license MIT 143 */function _d(){return _d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_d.apply(this,arguments)}function IC(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i<n.length;i++)s=n[i],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function LC(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function DC(t,e){return t.button===0&&(!e||e==="_self")&&!LC(t)}const $C=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],MC="6";try{window.__reactRouterVersion=MC}catch{}const UC="startTransition",tm=vg[UC];function FC(t){let{basename:e,children:r,future:n,window:s}=t,i=b.useRef();i.current==null&&(i.current=WE({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=b.useCallback(d=>
143{c&&tm?tm(()=>l(d)):l(d)},[l,c]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>NC(n),[n]),b.createElement(jC,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const BC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,At=b.forwardRef(function(e,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=e,f=IC(e,$C),{basename:h}=b.useContext(cs),w,v=!1;if(typeof c=="string"&&zC.test(c)&&(w=c,BC))try{let y=new URL(window.location.href),_=c.startsWith("//")?new URL(y.protocol+c):new URL(c),k=Jh(_.pathname,h);_.origin===y.origin&&k!=null?c=k+_.search+_.hash:v=!0}catch{}let x=gC(c,{relative:s}),g=HC(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:d});function p(y){n&&n(y),y.defaultPrevented||g(y)}return b.createElement("a",_d({},f,{href:w||x,onClick:v||i?n:p,ref:r,target:l}))});var rm;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(rm||(rm={}));var nm;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(nm||(nm={}));function HC(t,e){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=yC(),c=ds(),u=ew(t,{relative:o});return b.useCallback(d=>{if(DC(d,r)){d.preventDefault();let f=n!==void 0?n:Rl(c)===Rl(u);l(t,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,n,s,r,t,i,o,a])}const WC="/assets/rinksport-logo-BIDq51jo.jpg",VC=()=>{const[t,e]=b.useState(!1),r=ds(),n=[{name:"Home",path:"/"},{name:"About the Camp",path:"/camp"},{name:"Staff",path:"/staff"},{name:"Gallery",path:"/gallery"},{name:"Register",path:"/register"},{name:"Contact",path:"/contact"}],s=i=>r.pathname===i;return m.jsx("nav",{className:"fixed top-0 left-0 right-0 z-50 bg-background/95 backdrop-blur-sm border-b border-border",children:m.jsxs("div",{className:"container mx-auto px-4",children:[m.jsxs("div",{className:"flex items-center justify-between h-16",children:[m.jsx(At,{to:"/",className:"flex items-center",children:m.jsx("img",{src:WC,alt:"RinkSport",className:"h-14 w-auto"})}),m.jsx("div",{className:"hidden md:flex items-center gap-8",children:n.map(i=>m.jsx(At,{to:i.path,className:`text-sm font-medium transition-colors hover:text-primary ${s(i.path)?"text-primary":"text-foreground/80"}`,children:i.name},i.path))}),m.jsx("button",{className:"md:hidden",onClick:()=>e(!t),"aria-label":"Toggle menu",children:t?m.jsx(t0,{className:"h-6 w-6"}):m.jsx(C1,{className:"h-6 w-6"})})]}),t&&m.jsx("div",{className:"md:hidden py-4 space-y-3",children:n.map(i=>m.jsx(At,{to:i.path,onClick:()=>e(!1),className:`block py-2 text-sm font-medium transition-colors hover:text-primary ${s(i.path)?"text-primary":"text-foreground/80"}`,children:i.name},i.path))})]})})},qC=()=>m.jsx("footer",{className:"bg-card border-t border-border mt-auto",children:m.jsxs("div",{className:"container mx-auto px-4 py-12",children:[m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[m.jsxs("div",{children:[m.jsx("h3",{className:"text-xl font-bold text-primary mb-4",children:"The NCAA Prep Camp"}),m.jsx("p",{className:"text-muted-foreground",children:"Elite ice hockey training for college-bound players. Develop your skills and prepare for NCAA competition."})]}),m.jsxs("div",{children:[m.jsx("h4",{className:"font-semibold mb-4",children:"Contact Info"}),m.jsxs("div",{className:"space-y-3 text-sm text-muted-foreground",children:[m.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 hover:text-primary transition-colors",children:[m.jsx(E1,{className:"h-4 w-4 text-primary"}),m.jsx("span",{children:"[email protected]"})]}),m.jsxs("a",{href:"https://www.instagram.com/rinksport",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:text-primary transition-colors",children:[m.jsx(e0,{className:"h-4 w-4 text-primary"}),m.jsx("span",{children:"Insta: @rinksport"})]}),m.jsxs("a",{href:"https://www.youtube.com/@RinkSportHockey",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:text-primary transition-colors",children:[m.jsx(N1,{className:"h-4 w-4 text-primary"}),m.jsx("span",{children:"YouTube: @RinkSportHockey"})]})]})]}),m.jsxs("div",{children:[m.jsx("h4",{className:"font-semibold mb-4",children:"Qu
143ick Links"}),m.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[m.jsx("li",{children:m.jsx(At,{to:"/camp",className:"hover:text-primary transition-colors",children:"About the Camp"})}),m.jsx("li",{children:m.jsx(At,{to:"/staff",className:"hover:text-primary transition-colors",children:"Meet Our Staff"})}),m.jsx("li",{children:m.jsx(At,{to:"/gallery",className:"hover:text-primary transition-colors",children:"Gallery"})}),m.jsx("li",{children:m.jsx(At,{to:"/register",className:"hover:text-primary transition-colors",children:"Registration"})}),m.jsx("li",{children:m.jsx(At,{to:"/contact",className:"hover:text-primary transition-colors",children:"Contact Us"})})]})]})]}),m.jsx("div",{className:"border-t border-border mt-8 pt-8 text-center text-sm text-muted-foreground",children:m.jsxs("p",{children:["© ",new Date().getFullYear()," RinkSport. All rights reserved."]})})]})}),KC=()=>m.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:px-4 focus:py-2 focus:bg-primary focus:text-primary-foreground focus:rounded-md focus:shadow-lg",children:"Skip to main content"});function GC(){const{pathname:t}=ds();return b.useEffect(()=>{window.scrollTo(0,0)},[t]),null}const QC=Mh("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",hero:"bg-accent text-accent-foreground hover:bg-accent/90 shadow-lg hover:shadow-xl transition-all"},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"}}),is=b.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},i)=>{const o=n?R_:"button";return m.jsx(o,{className:Oe(QC({variant:e,size:r,className:t})),ref:i,...s})});is.displayName="Button";const JC=()=>m.jsxs("section",{className:"relative h-screen w-full overflow-hidden",children:[m.jsxs("div",{className:"absolute inset-0",children:[m.jsxs("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"w-full h-full object-cover scale-105","aria-label":"Hockey training background video",children:[m.jsx("source",{src:"/hero-video.mp4",type:"video/mp4"}),m.jsx("track",{kind:"captions",label:"English captions"})]}),m.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/30 via-primary/50 to-background shadow-[inset_0_0_100px_rgba(0,0,0,0.5)]"})]}),m.jsx("div",{className:"relative h-full flex items-center justify-center",children:m.jsxs("div",{className:"container mx-auto px-4 text-center animate-fade-in",children:[m.jsx("h1",{className:"text-5xl md:text-7xl font-bold mb-6 text-primary-foreground drop-shadow-[0_4px_20px_rgba(0,0,0,0.8)] animate-[fade-in_0.8s_ease-out]",children:"The NCAA Prep Camp"}),m.jsx("p",{className:"text-xl md:text-2xl mb-8 text-primary-foreground/95 max-w-2xl mx-auto drop-shadow-[0_2px_10px_rgba(0,0,0,0.8)] animate-[fade-in_1s_ease-out_0.3s_both]",children:"Improve your game and showcase your talent"}),m.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center animate-[fade-in_1.2s_ease-out_0.6s_both]",children:[m.jsx(is,{asChild:!0,variant:"hero",size:"lg",className:"hover-scale",children:m.jsx(At,{to:"/register",children:"Register Now"})}),m.jsx(is,{asChild:!0,variant:"outline",size:"lg",className:"bg-background/95 backdrop-blur-sm hover-scale border-2 border-primary-foreground/30 hover:border-primary-foreground
143/50",children:m.jsx(At,{to:"/camp",children:"Learn More"})})]})]})}),m.jsx("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 animate-bounce",children:m.jsx("div",{className:"w-6 h-10 border-2 border-primary-foreground/50 rounded-full flex items-start justify-center p-2",children:m.jsx("div",{className:"w-1 h-3 bg-primary-foreground/50 rounded-full"})})})]}),xn=b.forwardRef(({className:t,...e},r)=>m.jsx("div",{ref:r,className:Oe("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));xn.displayName="Card";const gc=b.forwardRef(({className:t,...e},r)=>m.jsx("div",{ref:r,className:Oe("flex flex-col space-y-1.5 p-6",t),...e}));gc.displayName="CardHeader";const Zh=b.forwardRef(({className:t,...e},r)=>m.jsx("h3",{ref:r,className:Oe("text-2xl font-semibold leading-none tracking-tight",t),...e}));Zh.displayName="CardTitle";const YC=b.forwardRef(({className:t,...e},r)=>m.jsx("p",{ref:r,className:Oe("text-sm text-muted-foreground",t),...e}));YC.displayName="CardDescription";const bn=b.forwardRef(({className:t,...e},r)=>m.jsx("div",{ref:r,className:Oe("p-6 pt-0",t),...e}));bn.displayName="CardContent";const ZC=b.forwardRef(({className:t,...e},r)=>m.jsx("div",{ref:r,className:Oe("flex items-center p-6 pt-0",t),...e}));ZC.displayName="CardFooter";var nw={exports:{}},sw={};/** 144 * @license React 145 * use-sync-external-store-shim.production.js 146 * 147 * Copyright (c) Meta Platforms, Inc. and affiliates. 148 * 149 * This source code is licensed under the MIT license found in the 150 * LICENSE file in the root directory of this source tree. 151 */var fi=b;function XC(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var eA=typeof Object.is=="function"?Object.is:XC,tA=fi.useState,rA=fi.useEffect,nA=fi.useLayoutEffect,sA=fi.useDebugValue;function iA(t,e){var r=e(),n=tA({inst:{value:r,getSnapshot:e}}),s=n[0].inst,i=n[1];return nA(function(){s.value=r,s.getSnapshot=e,ou(s)&&i({inst:s})},[t,r,e]),rA(function(){return ou(s)&&i({inst:s}),t(function(){ou(s)&&i({inst:s})})},[t]),sA(r),r}function ou(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!eA(t,r)}catch{return!0}}function oA(t,e){return e()}var aA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oA:iA;sw.useSyncExternalStore=fi.useSyncExternalStore!==void 0?fi.useSyncExternalStore:aA;nw.exports=sw;var lA=nw.exports;function cA(){return lA.useSyncExternalStore(uA,()=>!0,()=>!1)}function uA(){return()=>{}}var Xh="Avatar",[dA,JN]=Jo(Xh),[hA,iw]=dA(Xh),ow=b.forwardRef((t,e)=>{const{__scopeAvatar:r,...n}=t,[s,i]=b.useState("idle");return m.jsx(hA,{scope:r,imageLoadingStatus:s,onImageLoadingStatusChange:i,children:m.jsx(Be.span,{...n,ref:e})})});ow.displayName=Xh;var aw="AvatarImage",lw=b.forwardRef((t,e)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:s=()=>{},...i}=t,o=iw(aw,r),a=fA(n,i),l=jr(c=>{s(c),o.onImageLoadingStatusChange(c)});return Yt(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?m.jsx(Be.img,{...i,ref:e,src:n}):null});lw.displayName=aw;var cw="AvatarFallback",uw=b.forwardRef((t,e)=>{const{__scopeAvatar:r,delayMs:n,...s}=t,i=iw(cw,r),[o,a]=b.useState(n===void 0);return b.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>a(!0),n);return()=>window.clearTimeout(l)}},[n]),o&&i.imageLoadingStatus!=="loaded"?m.jsx(Be.span,{...s,ref:e}):null});uw.displayName=cw;function sm(t,e){return t?e?(t.src!==e&&(t.src=e),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function fA(t,{referrerPolicy:e,crossOrigin:r}){const n=cA(),s=b.useRef(null),i=n?(s.current||(s.current=new window.Image),s.current):null,[o,a]=b.useState(()=>sm(i,t));return Yt(()=>{a(sm(i,t))},[i,t]),Yt(()=>{const l=d=>()=>{a(d)};if(!i)return;const c=l("loaded"),u=l("error");return i.addEventListener("load",c),i.addEventListener("error",u),e&&(i.referrerPolicy=e),typeof r=="string"&&(i.crossOrigin=r),()=>{i.removeEventListener("load",c),i.removeEventListener("error",u)}},[i,r,e]),o}var dw=ow,hw=lw,fw=uw;const ef=b.forwardRef(({className:t,...e},r)=>m.jsx(dw,{ref:r,className:Oe("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));
151ef.displayName=dw.displayName;const tf=b.forwardRef(({className:t,...e},r)=>m.jsx(hw,{ref:r,className:Oe("aspect-square h-full w-full object-cover",t),...e}));tf.displayName=hw.displayName;const rf=b.forwardRef(({className:t,...e},r)=>m.jsx(fw,{ref:r,className:Oe("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));rf.displayName=fw.displayName;const pA="/assets/haley-skarupa-Ca23HCy9.jpg",mA="/assets/jeff-kampersal-CRMMnyxZ.jpg",gA="/assets/education-DaQgO5ZE.jpg",yA="/assets/coaching-DCuZPWyB.jpg",vA="/assets/showcase-gZz9lavU.jpg",wA=()=>{const t=[{title:"Elite Coaching",description:"Our coaches are some of the best teachers in the game. They have coached at the highest levels of hockey - NCAA D1, D3, Olympics, World Championships and the Pros. At RinkSport, you'll spend quality time on and off the ice working with our staff to help improve your game. Daily practices, off-ice sessions, and lectures are all part of The NCAA Prep Camp experience."},{title:"Showcase",description:`During the camp, you will participate in 4 NCAA-style games. NCAA coaches will be on your bench, and NCAA officials will be on the ice. This is an opportunity to show coaches how you compete, and how you implement the lessons taught during practice. 152 153NCAA Trainers will be available for all practices and games.`},{title:"Education",description:"Off the ice, we spend time in the classroom talking about how to go from 'prospect' to 'recruit'. Learn how the world of college recruiting is evolving and how you can best position yourself for an NCAA opportunity. "}],e=[{quote:"RinkSport was a huge part of my development as a player and a student. It provided me with a focus and gave me a template on what I need to do in order to reach the next level and how I need to do it. It helped me figure out what it takes to not only get to the NCAA level in hockey, but to excel there as well. And it was a blastâI met a ton of awesome people who I am still friends with. It was just an all around great experience.",author:"Haley Skarupa",position:"Boston College #22 | 3x U18 World Championship, Team USA"},{quote:"I have worked with RinkSport for the last 15 years because Kush has consistently developed womenâs ice hockey players by creating an environment that is conducive to learning. He has brought together excellent college coaches who collaborate to teach hockey to motivated players. I keep working the camp because of the quality of the people. We have so much fun and we all learn from each other.",author:"Jeff Kampersal",position:"Penn State Head Coach | Team USA U18 Head Coach 2013, 2014 | Princeton Head Coach 1996 - 2017"}];return m.jsxs("div",{className:"min-h-screen",children:[m.jsx("h1",{className:"sr-only",children:"The NCAA Prep Camp - Elite Hockey Training"}),m.jsx(JC,{}),m.jsx("section",{className:"py-8 bg-background",children:m.jsx("div",{className:"container mx-auto px-4 flex justify-center",children:m.jsx("iframe",{src:"https://snapwidget.com/embed/1125634",className:"snapwidget-widget",frameBorder:"0",scrolling:"no",style:{border:"none",overflow:"hidden",width:"100%",maxWidth:"800px",height:"160px"},title:"Posts from Instagram"})})}),m.jsx("section",{className:"py-20 bg-secondary/30",children:m.jsxs("div",{className:"container mx-auto px-4",children:[m.jsx("h2",{className:"text-4xl font-bold text-center mb-12 text-primary",children:"Our Mission since 1993"}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:t.map((r,n)=>m.jsx(xn,{className:"border-border hover:shadow-lg transition-shadow",children:m.jsxs(bn,{className:"pt-6",children:[n===0&&m.jsx("img",{src:yA,alt:"Elite coaching session",className:"w-full h-48 object-cover rounded-lg mb-4"}),n===1&&m.jsx("img",{src:vA,alt:"Showcase games",className:"w-full h-48 object-cover rounded-lg mb-4"}),n===2&&m.jsx("img",{src:gA,alt:"Education session",className:"w-full h-48 object-cover rounded-lg mb-4"}),m.jsx("h3",{className:"text-xl font-semibold mb-2",children:r.title}),m.jsx("p",{className:"text-muted-foreground",children:r.description})]})}
153,n))})]})}),m.jsx("section",{className:"pt-12 pb-20 bg-background",children:m.jsxs("div",{className:"container mx-auto px-4",children:[m.jsx("h2",{className:"text-4xl font-bold text-center mb-4 text-primary",children:"Why RinkSport?"}),m.jsx("p",{className:"text-center text-muted-foreground mb-12 max-w-2xl mx-auto",children:"Hear from players and coaches who've been a part of RinkSport's NCAA Prep Camp"}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:e.map((r,n)=>m.jsx(xn,{className:"border-border hover:shadow-lg transition-shadow",children:m.jsxs(bn,{className:"pt-6",children:[m.jsx(A1,{className:"h-8 w-8 text-primary/30 mb-4"}),m.jsxs("p",{className:"text-muted-foreground mb-6 italic",children:['"',r.quote,'"']}),m.jsxs("div",{className:"border-t border-border pt-4 flex items-center gap-3",children:[m.jsxs(ef,{className:"h-12 w-12",children:[m.jsx(tf,{src:n===0?pA:mA,alt:r.author}),m.jsx(rf,{className:"bg-primary/10 text-primary",children:r.author.split(" ").map(s=>s[0]).join("")})]}),m.jsxs("div",{children:[m.jsx("p",{className:"font-semibold",children:r.author}),m.jsx("p",{className:"text-sm text-muted-foreground",children:r.position})]})]})]})},n))})]})})]})},xA="/assets/goalie-training-CzohF1Gv.png",bA="/assets/lecture-series-DhVN-pWK.png",_A="/assets/camp-hero-background-BYGYEOHE.jpg",kA=()=>{const t={title:"Lecture Series",description:"",features:["NCAA D1: Rules, NIL, Transfer Portal, breakout session on the Ivy League","NCAA D3: Rules, Leagues, and a breakout session on the NESCAC","Nutrition, Sleep, Recovery","The Application process, and Early Decision","Mental Skills for the elite hockey player","NCAA Recruiting Roundtable"]},e=[{icon:R1,title:"For Committed Athletes",description:"RinkSport is designed for the committed student-athlete focused on securing an opportunity to play NCAA Women's Ice Hockey. Players who are looking for a recreational camp should explore other opportunities."},{icon:P1,title:"Eligibility Requirements",description:"Per NCAA rules, programs such as ours (where college coaches work with players), must be open to all eligible participants. Eligibility for the RinkSport College Development Program is restricted to Female ice hockey players who graduate from high school in 2030 or earlier. Players are accepted on a first come, first served basis, and we have limited spaces available."},{icon:T1,title:"Health & Safety",description:"All participants and staff will follow health and safety protocols as mandated by the Commonwealth of Massachusetts, the Wellesley MA Health Department, and Babson College."}];return m.jsxs("div",{className:"min-h-screen pt-20 pb-12",children:[m.jsxs("section",{className:"relative py-20 mb-16 overflow-hidden",children:[m.jsxs("div",{className:"absolute inset-0 z-0",children:[m.jsx("img",{src:_A,alt:"Hockey players gathered on ice during training session",className:"w-full h-full object-cover"}),m.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/70 via-background/50 to-background/65"}),m.jsx("div",{className:"absolute inset-0 bg-[hsl(var(--ice-blue))]/10"})]}),m.jsx("div",{className:"container mx-auto px-4 relative z-10",children:m.jsx("div",{className:"max-w-4xl mx-auto text-center",children:m.jsxs("div",{className:"bg-background/25 backdrop-blur-md rounded-3xl p-8 md:p-12 border border-primary/20 shadow-2xl",children:[m.jsx("h1",{className:"text-4xl md:text-6xl font-bold mb-6 text-primary animate-fade-in drop-shadow-lg",children:"The NCAA Prep Camp"}),m.jsx("h2",{className:"text-2xl md:text-3xl font-semibold mb-3 text-foreground",children:"Babson College"}),m.jsx("p",{className:"text-lg md:text-xl mb-4 text-foreground/90",children:"Wellesley, MA"}),m.jsx("p",{className:"text-xl md:text-2xl font-semibold mb-8 text-accent",children:"June 19â24, 2027"}),m.jsx(At,{to:"/register",children:m.jsx(is,{size:"lg",className:"animate-scale-in shadow-lg",children:"Register Now"})})]})})})]}),m.jsxs("div",{className:"container mx-auto px-4",children:[m.jsx("section",{className:"max-w-4xl mx-auto mb-20",children:m.jsxs("div",{className:"text-lg leading-relaxed space-y-6 text-foreground",children:[m.jsx("p",{className:"text-lg",children:"The NCAA Prep Camp brings some of the NCAA's top Women's Ice Hockey coaches together with prospective student-athletes from across North America for a
153week of training, education, and competition."}),m.jsx("p",{className:"text-lg",children:"This Summer, our camp will again be open to rising High School Freshmen through Seniors (and PGs)."}),m.jsx("p",{className:"text-lg",children:"Players in our NCAA Prep Camp will spend at least 3 hours per day on the ice in college-style practices and competition as well as ample time off the ice in training sessions."}),m.jsx("p",{className:"text-lg",children:"In addition to the physical activities, players will participate in our comprehensive lecture series:"})]})}),m.jsx("section",{className:"mb-20",children:m.jsxs("div",{className:"max-w-3xl mx-auto",children:[m.jsx("h2",{className:"text-3xl font-bold mb-8 text-center text-primary",children:t.title}),m.jsx(xn,{className:"border-2 border-primary/20 shadow-lg hover-scale",children:m.jsxs(bn,{className:"pt-8",children:[m.jsx("img",{src:bA,alt:"Lecture series with students in auditorium taking notes",className:"w-full h-64 object-cover rounded-lg mb-6"}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.features.map((r,n)=>m.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-secondary/50 hover:bg-secondary transition-colors",children:[m.jsx(S1,{className:"h-5 w-5 text-accent flex-shrink-0 mt-0.5"}),m.jsx("span",{className:"text-base font-medium text-foreground",children:r})]},n))})]})})]})}),m.jsx("section",{className:"mb-20",children:m.jsxs("div",{className:"max-w-3xl mx-auto",children:[m.jsx("h2",{className:"text-3xl font-bold mb-8 text-center text-primary",children:"Goalie Training"}),m.jsx(xn,{className:"border-2 border-primary/20 shadow-lg hover-scale",children:m.jsxs(bn,{className:"pt-8",children:[m.jsx("img",{src:xA,alt:"Goalie training session with coach on ice",className:"w-full h-64 object-cover object-[50%_20%] rounded-lg mb-6"}),m.jsxs("p",{className:"text-base leading-relaxed text-foreground",children:["Goalies at RinkSport will have additional ice sessions devoted to them from Sunday-Wednesday of camp. These sessions will be designed by legendary coach Cap Raeder (",m.jsxs("a",{href:"https://en.wikipedia.org/wiki/Cap_Raeder",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline inline-flex items-center gap-1",children:["see bio ",m.jsx(Xv,{size:14})]}),") with help from Penn State's Mo Bradley and other coaches on staff."]})]})})]})}),m.jsxs("section",{className:"max-w-5xl mx-auto mb-12",children:[m.jsx("h2",{className:"text-3xl font-bold mb-10 text-center text-primary",children:"Important Information"}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:e.map((r,n)=>m.jsxs(xn,{className:"border-border hover-scale",children:[m.jsxs(gc,{children:[m.jsx("div",{className:"flex items-center gap-3 mb-2",children:m.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:m.jsx(r.icon,{className:"h-6 w-6 text-primary"})})}),m.jsx(Zh,{className:"text-lg",children:r.title})]}),m.jsx(bn,{children:m.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:r.description})})]},n))})]}),m.jsx("section",{className:"max-w-3xl mx-auto text-center py-12",children:m.jsxs("div",{className:"bg-gradient-to-br from-primary/5 to-accent/5 rounded-2xl p-8 md:p-12",children:[m.jsx("h3",{className:"text-2xl md:text-3xl font-bold mb-4 text-primary",children:"Ready to show us what you can do?"}),m.jsx("p",{className:"text-lg text-muted-foreground mb-6",children:"Limited spaces available. Register early to secure your spot."}),m.jsx(At,{to:"/register",children:m.jsx(is,{size:"lg",className:"text-lg px-8",children:"Register Now"})})]})})]})]})},SA="/assets/kush-sidhu-YaNgtm1Q.jpg",EA="/assets/bill-mandigo-CIGiUn2R.jpg",CA="data:image/webp;base64,UklGRroNAABXRUJQVlA4WAoAAAAIAAAAswAADQEAVlA4IPIMAACwRgCdASq0AA4BPpFEnEmlpCKkKrT5iLASCWVudF5qvsyM8oV2FPaC9Qf9+6efqh8x3msXlnL5f/jmruX/euN9iMuvFvP7p0TPg31DOmGYUUTjvkpyU5Jx5mhTR+sq6LO4g7MX4kLlSNhiABybHPJDcqegepJIgGy7ogGPiZ6RsNdYmyEb4UkFyujiTKpoIHrJGj3Aza1sayLpgZAzMCZt8rMZhwLVcxtUGHCht0Lg+W8eZRKrYQxwVthYhvmEsjwtu+jqq6XVtoqwSFBAql2bh8TcpIMwcfTYX7a2kkSTwbbMS1Ems6BiI9ksFjPhDHseE51aLn0kQVegDNqK5ZieNoIjOE5mK3h3S/gAPWN2FwA1F0eNDu9kI5X5S7+xmGDewev2TBl7HGorTN6+PFsIcO9+6oEzaC2S1VrzcO39Ff+9Z9AdxBY8MmLyjSx8/A1EvynXK/hsxF4Ao23lwVuxnsUetUspEVnhIjN++0hIQ1JbFcrQxIOP472y99e2m2mtD7iQ/gc36s/SyokwlF6+zZgnK9FxoAZdzMX978fza49bL1BaHI7nn2FMCFaLzvGBXGIRWeeOX/l0qg4WaMLdWq4ADiUzCLXdhs8+GEo9tJREpk+m2hI0kebVFxN/oj7pXUbjxTRwJPnUdH+jeK7dnbVmT5iMEQbjeYtTDlYe68/RfD9+VQduuth7l9CgfhsyRDJLs/hFBEPxVMA7w5xy6Zk9s39Txm258Wuq9RJ+Yk2QV8oo49VTLCs2rGrAAP77IYAAAAKON6WT27n+bICnHWuhMezK3DMN5qi1ZA12XcF1jS+EeYltt3whLZ8aC0OdilsAXDYUSr2K717RvYgN8TZ6dvRqaM8Dy06wSOvreTKdnR2XtbnClyRU7lL
153ap4l578Wf6J0AAEPzupAXlFj6lE/hn3694dnbTwtezDQVbmD+/tqACAugpgDQGSy7ToGBLBQv/x4naKgkRtN/AoyKzWmHivFv8VYiM/HiDBGIfhUCLSRBihVfIDWHTrJSYVSYpDVd6ytX80hlUQCI1YqYv6s9i99KRIr2E6hzOb6k1MAFyoEDsgWGmrvXurIpWZ0ZeC106N4/PkwgcgUL7IsMBCT4vNPNy4gEt0Lh7bSRHYRWWlFSSCzfFc4liqzJ+EA3HxRR+Oh+jQdOYOWuUglHND8+1twkCOLMKsSVWHNXswZsyS5qTrBOLlyTeH8vcoADKwHpXMipUH3bYNa7A+IpGfR7tuQuivibBiG88y1g3iz+YBNxbuFNhLMQ8dFkeVSi2WYdzIM1SP8EBM8IAC3RyfOc0NBvlQpXOL4+E5YiMStXeq+85e4Asl5CjzOZL/pNRdgNYWuHES8H+ScLJGH48C7nQ0atjw8CwvV0dD8tNjaeE5TqYOYjMzQ4F+7qWok7e85ZgiZ8awuPHnMBLhWIw6AvXRvVjJ5jNNtTVOTXGiUcjybD9/8X1qLwn4lKdM0XXATswOGdu6q5q2BpQHMZswidLO6QqzMeE4FrgV0UXKXc0FidUkqU7B5GtFjR4MU8CgAesE/EaVrEPhIpePDlj9Qu5FTy//gKO3Ak35m0cpOE4/opZceX3s9SqDcy3PdsyLUuB0ASmE0H+dlxQPmMsMAXmE5XxW2haVSB8XH2UTVXf+J1PUgzIJ1nQ4esW6o2iJ3Mywu02seBSGTmQQdryuf5D88XmRgdbsFOeS8K1pQcmJob7xoJy1C9bXvXco7X4nODbJ9OPcMszdfR5X3VoOOJrl4hOV3tEDT0Ga/SaNmUzJDAbQx/089qJFUVoLzgjiYRJptrYnih+iD6OvINqrMmwmXdAXVPSx+0S+CO9cEjU5BaolLqN5Qbn7ruwuxkAwDW0kfkwBzr2Z0sbqTMIQjjEiHdiNwmDANxAgQQ7Xi/xkUldfEWnUcTBLWriAH87DdLvpxrUV6WwPgMRD9bdvoOG6q5Kh+KHSj/9DSUu14/pFVIULMzcsWPRWq/b8HgQ5RXhWuYxfYpsy1B2XC0aAL0k62II7YDZRNHom2OMd5a0HFhdOGrUWv33PhxbTBUD+0Q5jbyT0cPsZgZpAB2N8QQJ2CImxu8R+cgkUsW0pqMpsYlgzYj8VIkxY0izQkKHsQoR2bBF17IM9qTbBskYtHabKMJD082kwTRYcVUIdMKtu+WqNufpRfm0gRu8pxZvkl7cZt0R3WRGfAl87lLwTk6RFFUck0TxMELqR1zXfE9suezy9AddekDMIfqa6/dzX6eCmdID4A1+M/JFc0F044BRaIuMdBgD2YBpVLNz25qGi30AmgHX5gn/iBN5samQ51Q3HPPmp2XuP7fSZKkj5tOlI9y80z8kta/LXIo125pOJ/7+DpRPLgGsGdka/+Jecujs1tbfLHkfcKXvHc/OidTsRRaitbL1xpH1H3wxTzDJfWVPC5X4z+Dr/JK7/I7x2LWTRKjxsK6X7WJMbWS34Vh5z3mIuYwQ2drzwSbQHxJbY9XeXl9pVdDnL0QjR3IAo+JSxywh0z7GVinLS1m867Ca6ohmWjMopflRN0/Zw0uCIb2Jy3QF+nHfQ1g+mZjBPrps6Yq+JbUmdCJclfuwY8TyfwikXUvzymq2aUYnhAa2D8UoDj0CDa9HnUvdY/nK6U7SlxYPONkYSV0+RGCeCo76nVqSmBTOA7jawnfsZmHeMXmAjNxVzqjY1JgMYbvV6G2ajke3M9ytn3XM26CsRs4dd0VsuNemNsfN6XI/EdgRcn1ml9tv3nkm84muUnityN01kFADwjiwXVwqePSb7CPURJxMcl0pqpuLSkzne3+njRSSvkwFxHJHVbqxkpnlhivCRnEGMbPmAaYesU9OYxF0axVmfB/tP1WpkB2tFEw1mBV8Rs84NVUIG3EpxGWD3ycbpOh5KTp/cYAt9f6XfHMv0iCy15meMSEWTj3q8Ix2O5lcKOKFaEUAKXk9IkyRKTOoIstsqIV3s3tRlkRYUFiZUbh9cE8AbSRxVmj+WxWnK0UlbLGmunVrxk+tNoQ3C/fjhmiZfLiJ+TOoCckjfpphgh3+LWWqaMQwZ952y3wD8H/uTkwxvoPfDVDhK19P1KeJLHfDOL/9Go1PqHaAoln4GOQA07KMdceQMedaiaiaoqMG7v1E1zDbyuanTvLWq1Q7zUwhlBRznCLhXkwMFiQv8Xbkro23Q0y4mn2P3hlyLxl7FGtWmdfGnZOs/cW5476bVVeXEA3c+22pH3UdvTD8D99eCOv6LxDpzYff8iDWlruY7lWgxRMedNdJOfvlasNtcNfR7PGnuCarNIfFFsfD5Ix/2+Kqx9omtjPhTop3LOrhGhiXMvZ9VbLNg3degpbQr0TY+0jx230BREKE5jEFugLl1SZxKshP9gILZYVTlmvxbz7WhP5Wawltdc0AFukPm0//4Z4l1JdHBBtVF2CYWv0FufvupzFHI2/iLdTVi0+ADfwQrOh92i/rVhEe6m0gt/cGVmv+p8v6fzSXZV4f/4ZkPdI5I16Y2M3/MfGOrXj5Lqg/mOTkaW0EIvSdnueFi3TR72Igpac6zvyvYxdFBPlUqr6aEFOFTc3oGv8Sv3F5Ne01zjvoMN2YWbsdNOz4JiHsoOuKWlrvg4tVxWu05gvTj1g7rav2sbI3Bs1+wzfA72HRsKc6pPN8wxcPNaPirpxk4pdZ/+ZUsQtauE/AN7Ah3W74tgjKmCojnWFZwpQ8bMBp7dbo9E8RFopM5suzGByhW2
153S4+G4KY6GRGZm1xvogFbugJmHRbLd+DwBnfzknqgJHAXnw/Mra2UjZfWDN7d4DqCGTZ7r54zBjdGXArENQ/ZlTRjxV1wxIUQNNyE98bSm/dJqt1TMSz4KEXnZ+rKv0trRGSb3l2cDoFADNAISzRy6XMqZrZRcxMR4ZkwiPIOxTFENDjKSH/zETKqV1L+8T7yjLXxwDa+KkmFMHDDoisRtEjC2cXof9zRS0hSTD2qbEf/ESQBDtuCiypQvazwBA8HDRKdg9kZVAOqB2mAA00eRJaqtJkOiU/B+3qwDqQuCVe7lYdFQaQk8eWpDCi0xLApYEskCNon4RA1HbKmkztDJcGgh33eKn3gXnW9An++Dkmn2oZeZF+EMebpgMiwgx9YN29nwLkzNsxi/0N07IKvm+i+LaxVqWYrukH28fOMrbUZnNdpkdERSPB2gnCkdHPqKrQcIQRoqww4PZ15F/Sl8YGSnVLPCR9QdH5ZxK+7lfNNNQZC1uOJPUFzDydNEkFb7PYEp37mJCrrA57hep1k2ORWbATLqPp6LPx6bZjzvdg0/WYbXH07Y3n82x8xOWrNOgm1Eu8XxyoLKLbkTyBSw5zJF0gfZKVoeSE4DJTH4npy8q0tFjXCCH55BUtcTi3Oxcv7hImsVSI5BfpH1LAgMPbMEhjYcMFC0lApEZon83a7fX9GYwAAAAEVYSUaiAAAARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAWQAAAHAAAABDAyMTCgAAAHAAAABDAxMDCgAQADAAAAAQABAACgAgAEAAAAAQAAALSgAwAEAAAAAQAAAQ4AAAAA",AA="/assets/lindsay-berman-CM71jRau.jpeg",TA="/assets/chris-ardito-C88Z06Yw.webp",RA="data:image/webp;base64,UklGRnoOAABXRUJQVlA4WAoAAAAIAAAAswAADQEAVlA4IJoNAABwTgCdASq0AA4BPpFCnEqlo6KkphDa2LASCWVu4EFOp+rSpqc/vfBfr15B6Vg3ajeoHb9XeTTq3dzhVvD3AzXgcrLL+x2ZQ8Z4JX3THYopYh515tvaaiL6BX1Xyd6Zd5n9nv5fEM+Su7H1g40RobzkcRIfV+eFZ7kgwkJRkNtHvKwGQlIT9xnBdA65ECPSvUlH6aD+UExWqXdOczWdd3hMT7t1XhuA6sgiFm7/JkhRx/BAFQ9cbvxtN6wt/BV9z41xRqO2JP3JNZwmBLmNFfdFmcFbl7OsTVkesK9LpOUxY7rxJO0CJz4xvlYjgybcVCvB9Xye2NijvS6S/bfk6YOGFLw7CAu4mKaZ7YuCboP2StLmdW3dE5jYwrpW5QNQjVhANLRwCFlhsmfRft12yP1CrhLOVgKUDMV0pmtN0Krc9lKRwnfTgERz/IftRxPKX+dB++nBk1hYnYbPsSEgLLSmvqk7jP8FTvEFQmknmIkVE6tP16PFLXPnP+85fObU76NNuu5JNV8QgAZWUpwzZxbWggHi/jdLPHeczCUdhG8Gl4jDkTj3Hhk+7lNcvjFsQj8UtM1PUcp0/1tr2hYDku96DRxfhcrQGVlrxyVFgQTdV1mpZ9yFkuCRjinzznZqlA3C/eiP17x8sTALwtrRvYYfK6WmPPiCTe6JXB8J+f/3vbaVUrbPjUbGxBHkEi4r6GcpE3Gvmp9couYo1Na+DhdliuTjSzkXR/8RQ90lNyQQE7wSCHUmyZyd/F2WlhzLbalvRqEZtJWyoRPN9aRf9cNbQssaMfH1UkcowHaTSBpmfZZJ18+UZY4BPx8mQBmN2k1LfxqsFQ6/cxot7YAA/uRKGeb0XqLyBey+cwbgEhtoKhe/LF4qgtz9LGeuTk7AjsWgZmJkTp1oGl1f+J0rPr2Bcv21wNcHiWEoEF1eYiAApKKaIxgMEvKe+4/K9ifNnXMcnr2OgC0qCfjHZC9FaOdAOjoaskyyClIBuqUpZJmJWyTF6ef5dfIYAn2Hl1c8ZjN+9bWIia1ugRWfCzF6mM/FifTCuHtTgbiA2u03Mbpv48GEbRp5BPx5deAqLKXjK/MbE5nMm027pyh92O+IBqBzNAKzq+G8lZuaetQhxOE7DAx79qgYPHxjUo3tGUu0/YkkzXCM0ZohQjU0Bc+cDz9Tf9Np1uehxE8fuPgOoCcPM4jVZtTpVgsTrlCRETlMgbqyOoTEoEv6RAzJ031d33Dn8IpFjh0DhMOyH5KmGtxUNgJpYpJU1/mEGpY2AA2CwNPO2kMBrTNwyvvqfcyDAGAuulncjtU5bni1vi5wbl572qPw1jIzIKHhr/kNiQB4TZmcYxJZowC/Mw33xH8qWnHF+IBWU0S3HFTVlc1d4L2VbrXYQE2RlPK0a+nOFKtkgJycbnGlN+oHHiiR6qr1PcR7iB2sk2oOvu4OgPORfsmYEkcMZyzCsK9tzQkGxrt8TwCbKIubj0sDA+zGmzC8wzpJY9z8nC7YeJhaNLHdQvapmMmRM8zxlJYmv7EzOYpM2XihRO4msI3aAOPQJ1McSLYF+0nOW9YNgGyPqgw04ZKi3xNq3y7aqh/cvEurNqwmnnI26bzrtJhB3o7VxEk1HQyOgHEY/G4pLAmrWlqjTE86ZjixYKsg0M5SK8NeJl/EqdT98quTp/aUEwDQ/rQvuaAa55jAS3TOqvnUCzvKlvRfNZC9DDBv0dwHThArFlQHzM4Zj9vp9SHhkXz8IXBVWkaWSFE+o/67fjPrfYDgVw4Ki3S9lAbBGDIKUtMqupsgoQlYP0kItyd8Y8qrYl7hiN7jtmxRO4vE/yjhSUEbn7EAo0YhmwenU7QXjO1jfjFjSVm6c2qExR7rwminurdpu6f7gJgrLPSvm8IoNy71lsiItub6U7O2h2jQYiSpim7OGUCJjZqifwJOixT9uvh37SGw8BCUnjaET1ZNYoasYG7C0hXFivsgJ6/hco8XHTS/i9tF41ZlhqZIPA0YbxKsEcPjshMu1/Ek0PVUqw4QMYsSMBnGfdkNzbjVgfsw6EjKnmzlx6ui1QxiXXdG3vafG6kuinguuChTp5FZrP+yvw5GpsZO/asxRWijtT9fjL+yGkFxyBSlri1hzFdsE8GDKyJ0f+3nk0nYAQeqBO4euTwtClqja9hVvq7Bi0Sqp6oMwNgyh4z0JlMri6qg46jRpDkc37A6LrNc5GVuVvmk4njIGJK1TyZQPOeamzh8PQK9IEeAehRtd4nI4w9Hyo26yGWzC2J2NBJvqVpTb0eWP5w7zTU4XXkokrWBgWqwZegor1TE+8WRQTfkku7bjzt2wrsF+nSPhfncQAzv57/5d/HY5vAxLmuM7pb2pLLVviQN4ExnPJN8hOXr2Raiu1Sti8js3QH7NPuIv9UM4SuGhkEXD/cmkTl70OJEH2bwCJ1cnRlNcW+JYBay4sQxidLzeOHkOGnpxA/aJJsbGOuED50Pchv29k5F8P0gFIz9jrCpTiXe1NXF3SrbfFBOo/HPS28bT7MfDPAVLVmEoVhUWSLbu8JscBKG5weqr7A6TcFVybg/vIBr6XiowpFUmyC5zOc6yjfCBdK5jGvv44E0QeDL4GLvSGL0NB66ZRr980PBe+ejZ7KnTD55tOc6IIGScTq5I6CewItfI2Wsme/X5WSr4MP1cZ1Bbh79LDyu5R3/ZQXDC4bmTnAoMZGo+lXThwRzG28UrdnHz2KOEK2xNOq6BzZTrci/CZ2CfhqiYOYhdbnBVCKM85bp1OpFJqe+ulfuZVy2VHHg9DRGMpSxYsT/wRyYqs6TPwBiy7TMeZeg5qAUECbjxjItEa09fOtTkw+7lrajgHd9Bhx6A/jRqvyykR4ln9jwkHbC67LR5W7dBaLhR2/dHqHXXWl/JRvAaY/nU6k0cZvB9cTbR+j57osIqM7dsbSrUhc1zhzyUnO1L4lofGQfQcFQwyl2sqwkR4jkcelHsuwpIOzPDShns+4vrTgOE+HGmXJkRMjl+r30kU4X8xYaDrr7URSQ+jc3MYuovJEpdUHO5kKciiqDzk7HNKv9RSOm3orb2e0/bn6rKlpTAaTYXe5txkOCDAIn83bRuME1ZLMGohVdNdVP2YFI3edGTv0UcorpG+0FEKIzU9l4RBujhwhNq+WZu3DnNv31kQkwoDd7sITiKlkoVxgzmUI5kDEsmyHDuaw4wbqZIS1bkgUEqkwU3Lpdil6Pv2y3JMWquXy4QcM8J3CNGI9FhtQCEyFUYbnB9oxwHcN6pkCrBSTP971ZE8tCZHHEB3Ejc+H3vqCLxFp2Ru3ILFXFRTOKJE3oO4Z2nOYP+rv3PfmhJy7Vt5rKkGQlWN4Y6+yMdR5moOfckOlL7y9yrReN/Y/jbzwXgwWGXHhVzg2SThd7fm0T1VTMUSswN3djbgvPNykjE8ntKKjU7S2IDAvSln0B6J5FdAyRiuc6SZN+GY2brvMFBtYRUnz/OhQsg3vTqYyrJkpsBmhfS3dcIGg6Kn0rWLqO+GJWdEav0bIanxevyW/6h9GnKXefr7WbRmYJIKSR
153B0cvoGjUbOEU2dwXUtCdM2AthBxtcceqIoaDhvvvI9wZ9dm6zQyKL3iWZf/cUq02+bhShCvWBfRNHN0t1uwPVsIO33jIf1jr0c/GvvUSjkzZYCUjPSvfNaOKkqcasjW1vMj2wsIV/hGNDhdb6vzvKGjwzjcHlYRN8sP03L2pkzcnr2J/2Z5Lye4Bs63yoWkWC+mHnPofbfSeQe1Wi+xkACjreogZot6iHcyh8LI/L14PLCAfJTTbiGPLykhzEsXqep793LHepENSe5B+1dRzY3Y32bfQH53Wz7QfvkSxWIFKvJ9omq9z14m2Ua8PEquGKxB3BKiS8qkATtuYQURnCyK6ePMIhvCSE/as1ccDmrNx4WqtgslUYzCjanrknGHg5CZLHee5KMwkeVidRvGvYSDPTVW0JXWC3pD8CX82wRrazxza9sULJ3IheteNq54DLeVVfTb5MxFAbfCSDZnbtOm5eRsZxPXUzjDxPie7IV5bfVRMatvP3e94UXNP8JKFkUSic4U3KmwHfaIopIe37pxaAAcy4jxgi03BFCID9yYR6XjOb0lJK2xY6m7qu2HFxSUIMun4rw6JOhNpY6L324APUK6BB5khlMIp7ee3hVBBXbEsfXTju7NaNVdgBS0mEacampV59e9159bHjYQIVh3+wVlTb/DznLFX9SR+tGtc2j6jf9hamZd8yw33FDI4WmZI4nhuplR5GAJKSzTuxIhScAMFCquUcRYkW2t1zpuhA+dgdCzg2hwTVth/9fccCj4AMhE/YJU9BTDkiyGcpYSDNVa14wB0eg1sJ3HAL8Xz2hCQsXVnJH0A6oDAGdDFBTuAqbRPMGU78U5IRuOwW9YCgA40H6EDKOFTg1hxpVBKmjnexg+IPBIX01BRAYTS5yGZZBsCfo7PzkTj79l4o/hZ0u/ulSgBTgWeJXpImioeTV4txzrxZBWTNfs4ytebQc0kxbob36O5hSQBVDJNs5St2HAXVFs+Lq+5IZuJ6cMI1x0QhZbIVMc8aO+We1RQbXIhU7Ss4T
153+AaXjUOQVg3m3fUUuEboAdnXAsgJAL1/jYNLsiQF4+cNBdxUe4vUpqjov8gQAAAEVYSUa6AAAARXhpZgAASUkqAAgAAAAGABIBAwABAAAAAQAAABoBBQABAAAAVgAAABsBBQABAAAAXgAAACgBAwABAAAAAgAAABMCAwABAAAAAQAAAGmHBAABAAAAZgAAAAAAAAAAdwEA6AMAAAB3AQDoAwAABgAAkAcABAAAADAyMTABkQcABAAAAAECAwAAoAcABAAAADAxMDABoAMAAQAAAP//AAACoAQAAQAAALQAAAADoAQAAQAAAA4BAAAAAAAA",PA="/assets/jodi-mckenna-D2N4YhAG.jpg",NA="/assets/andy-mcphee-Da7mw6jD.jpg",jA="/assets/holley-tyng-CCEXKqYp.jpg",OA="/assets/joakim-flygh-Cq4NI1HA.webp",IA="/assets/kim-weiss-DSBjM0UZ.webp",LA="/assets/cap-raeder-B1YHcgcF.png",DA="/assets/sadie-peart-Ct1IaOj-.png",$A="/assets/chris-baudo-BZxznVtE.png",MA=1,UA="032aa57e-3f7e-4f8e-888a-a489e5f923d3",FA="420ef874-7223-480d-a3e5-de3a7421c765",BA="/__l5e/assets-v1/032aa57e-3f7e-4f8e-888a-a489e5f923d3/katie-burt.png",zA="a/v1/420ef874-7223-480d-a3e5-de3a7421c765/032aa57e-3f7e-4f8e-888a-a489e5f923d3/katie-burt.png",HA="katie-burt.png",WA=51283,VA="image/png",qA="2026-09-24T03:59:29Z",KA={version:MA,asset_id:UA,project_id:FA,url:BA,r2_key:zA,original_filename:HA,size:WA,content_type:VA,created_at:qA},GA=1,QA="331fe908-fecf-4ad9-bcf7-3d04f9049dbd",JA="420ef874-7223-480d-a3e5-de3a7421c765",YA="/__l5e/assets-v1/331fe908-fecf-4ad9-bcf7-3d04f9049dbd/ted-wisner.png",ZA="a/v1/420ef874-7223-480d-a3e5-de3a7421c765/331fe908-fecf-4ad9-bcf7-3d04f9049dbd/ted-wisner.png",XA="ted-wisner.png",eT=113505,tT="image/png",rT="2026-09-24T04:08:09Z",nT={version:GA,asset_id:QA,project_id:JA,url:YA,r2_key:ZA,original_filename:XA,size:eT,content_type:tT,created_at:rT},sT=()=>{const t=[{name:"Bill Mandigo",role:"Middlebury College",bio:"Most wins of any women's hockey coach across all divisions (681). 4x NCAA Championships (2004, 2005, 2006, 2022).",web:"https://athletics.middlebury.edu/sports/womens-ice-hockey/roster/coaches/bill-mandigo/1053",image:EA,imagePosition:"center 20%"},{name:"Hilary Witt",role:"University of New Hampshire",bio:"UNH Head Coach since 2014. Served as assistant coach on the 2014 U.S. Olympic Women's Ice Hockey Team. ECAC Coach of the Year in her first season as head coach at Yale (2003).",web:"https://unhwildcats.com/staff-directory/hilary-witt/148",image:RA,imagePosition:"center 20%"},{name:"Cap Raeder",role:"Goalie Coach",bio:"Cap will focus on Goalie training. He was selected as goalie for the US team in the inaugural Canada Cup. He coached in the pros including coaching Wayne Gretzky. He is on staff with many NCAA programs in New England.",web:"https://en.wikipedia.org/wiki/Cap_Raeder",image:LA,imagePosition:"center 20%"},{name:"Elizabeth Wulf",role:"University of St. Joseph",bio:"Led her team to three-consecutive NESCAC titles in 2016, 2017, and 2018. Her team also qualified for the NCAA Quarterfinals all four years, including a trip to the Final Four in 2016.",web:"https://www.usjbluejays.com/sports/wice/coaches/wulf",image:CA,imagePosition:"center 15%"},{name:"Lindsay Berman",role:"Northeastern University",bio:"Berman was named an assistant coach for the 2023 U.S. Under-18 Women's National Team, and helped guide Team USA to a bronze medal at the 2023 IIHF U-18 World Championship.",web:"https://nuhuskies.com/sports/womens-ice-hockey/roster/coaches/lindsay-berman/2540",image:AA,imagePosition:"center 20%"},{name:"Jodi McKenna",role:"Wesleyan University",bio:"As head coach at Wesleyan McKenna guided the Cardinals to the NESCAC Tournament for three straight seasons from 2016-19. Has served as a USA Hockey Olympic and Junior Olympic coach.",web:"https://athletics.wesleyan.edu/sports/womens-ice-hockey/roster/coaches/jodi-mckenna/1157",image:PA,imagePosition:"center 20%"},{name:"Holley Tyng",role:"Colby College",bio:"In the 2024-25 campaign, Tyng earned her 100th career win and led the Mules to their third NCAA Tournament appearance in the last four seasons as well as fifth straight conference semifinals game. Captain during her senior year as a student at Providence College, Tyng was a three-time ECAC All-Academic Team selection.",web:"https://colbyathletics.com/sports/womens-ice-hockey/roster/coaches/holley-tyng/745",image:jA,imagePosition:"center 20%"},{name:"Katie Burt",role:"Providence College",bio:"Katie Burt enters her fourth season with the Friars in the 2026-27 season and her first as associate head coach. During her first three seasons, Burt worked with the Friar goaltenders and defense.",web:"https://friars.com/sports/womens-ice-hockey/roster/coaches/katie-burt/1253",image:KA.url,imagePosition:"center 20%"},{name:"Ted Wisner",role:"St. Lawrence University",bio:"Ted Wisner joined the Saints' women's hockey coaching staff in the 2004-05 season and was named Associate Head Coach in 2007-08. He was named the American Hockey Coaches Association Women's Assistant Coach of the Year in 2018.",web:"https://saintsathletics.com/staff-directory/ted-wisner/43",image:nT.url,imagePosition:"center 20%"},{name:"Sadie Peart",role:"Quinnipiac",bio:"Sadie Peart was named the Director of Operations and Player Development in August 2025. Peart returns to Hamden after a one-year stint as an Assistant Coach for Dartmouth Women's Ice Hockey. At Dartmouth, Peart oversaw the forwards while managing power play strategy and skills.",web:"https://gobobcats.com/sports/womens-ice-hockey/roster/coaches/sadie-peart/9329",image:DA,imagePosition:"center 20%"},{name:"Chris Baudo",role:"Nazareth",bio:"Under Baudo's direction, the Golden Flyers burst onto the scene in 2018. Six years in, the program has 116 wins, three-straight UCHC titles and three NCAA Tourn
153ament berths. Nazareth is consistently ranked nationally in the division III women's hockey polls.",web:"https://nazathletics.com/sports/womens-ice-hockey/roster/coaches/chris-baudo/2264",image:$A,imagePosition:"center 20%"},{name:"Chris Ardito",role:"RPI",bio:"Ardito served as the General Manager of the Connecticut Whale of the National Women's Hockey League (now Premier Hockey Federation) and also worked with the St. Louis Blues in analytics within their goalie department.",web:"https://rpiathletics.com/staff-directory/chris-ardito/791",image:TA,imagePosition:"center 20%"},{name:"Andy McPhee",role:"Endicott College",bio:"2024-25 Conference of New England (CNE) Coach of the Year. 2019-20, 2018-19, 2016-17 Colonial Hockey Conference (CHC) Coach of the Year.",web:"https://www.ecgulls.com/sports/wice/coaches/mcphee_andrew",image:NA,imagePosition:"center 20%"},{name:"Joakim Flygh",role:"Brown University",bio:"Ten-year tenure as the head coach of the Yale women's ice hockey program from 2009-2019. In 2014-15, Flygh led the Bulldogs to their best winning percentage in eight seasons, finishing with the second-most overall wins in school history (15)",web:"https://brownbears.com/sports/womens-ice-hockey/roster/coaches/joakim-flygh/7894",image:OA,imagePosition:"center 20%"},{name:"Kim Weiss",role:"PWHL Las Vegas",bio:"First-team All-American and NESCAC Player of the Year as a senior at Trinity College in 2010-11. Weiss was a four-time All-NESCAC honoree and remains the program's all-time leading scorer.",web:"https://en.wikipedia.org/wiki/Kim_Weiss",image:IA,imagePosition:"center 20%"},{name:"Kush Sidhu",role:"Director",bio:"Kush has been coaching ice hockey players since 1988 at Northeastern University and the USA Hockey Women's Development Program.",web:"https://www.pridehockey.com/coaches",image:SA,imageScale:1.5,imagePosition:"center center"}];return m.jsx("div",{className:"min-h-screen pt-24 pb-12",children:m.jsxs("div",{className:"container mx-auto px-4",children:[m.jsxs("div",{className:"max-w-4xl mx-auto mb-12 text-center",children:[m.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6 text-primary",children:"Our Coaches"}),m.jsx("p",{className:"text-xl text-muted-foreground",children:"Meet our amazing coaching staff!"})]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map((e,r)=>m.jsxs(xn,{className:"border-border hover:shadow-lg transition-shadow",children:[m.jsxs(gc,{className:"text-center",children:[m.jsxs(ef,{className:"w-24 h-24 mx-auto mb-4 overflow-hidden",children:[m.jsx(tf,{src:e.image,alt:e.name,style:{objectPosition:e.imagePosition||"center",transform:e.imageScale?`scale(${e.imageScale})`:void 0}}),m.jsx(rf,{className:"text-2xl bg-primary/10 text-primary",children:e.name.split(" ").map(n=>n[0]).join("")})]}),m.jsxs("h3",{className:"text-xl font-bold flex items-center justify-center gap-2",children:[e.name,e.web&&m.jsx("a",{href:e.web,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 transition-colors","aria-label":`View ${e.name}'s profile`,children:m.jsx(Xv,{size:18})})]}),m.jsx("p",{className:"text-sm text-accent font-semibold",children:e.role})]}),m.jsx(bn,{children:m.jsx("p",{className:"text-muted-foreground text-sm",children:e.bio})})]},r))})]})})},iT=()=>(b.useEffect(()=>{const t=document.createElement("script");t.src="//www.instagram.com/embed.js",t.async=!0,document.body.appendChild(t);const e=setTimeout(()=>{window.instgrm&&window.instgrm.Embeds.process()},1e3);return()=>{clearTimeout(e),document.body.removeChild(t)}},[]),m.jsx("div",{className:"min-h-screen pt-20 pb-12 px-4",children:m.jsxs("div",{className:"container mx-auto px-4",children:[m.jsxs("div",{className:"max-w-4xl mx-auto mb-12 text-center",children:[m.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6 text-primary",children:"Gallery"}),m.jsx("p",{className:"text-xl text-muted-foreground",children:"Follow our journey and see highlights from The NCAA Prep Camp experience"})]}),m.jsx("div",{className:"flex justify-center mb-12",children:m.jsx("div",{className:"instagram-embed-wrapper w-full max-w-[540px]",children:m.jsx("blockquote",{className:"instagram-media","data-instgrm-permalink":"https://www.instagram.com/rinksport/?utm_source=ig_embed&utm_campaign=loading","data-instgrm-version":"14",style:{background:"#FFF",border:0,borderRadius:"3px",boxShadow:"0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15)",margin:"1px",maxWidth:"540px",minWidth:"326px",padding:0,width:"99.375%"},children:m.jsxs("div",{style:{padding:"16px"},children:[m.jsxs("a",{href:"https://www.instagram.com/rinksport/?utm_source=ig_embed&utm_campaign=loading",style:{background:"#FFFFFF",lineHeight:0,padding:"0 0",textAlign:"center",textDecoration:"none",width:"100%"},target:"_blank",rel:"noopener noreferrer",children:[m.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[m.jsx("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",flexGrow:0,height:"40px",marginRight:"14px",width:"40px"}}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",flexGrow:1,justifyContent:"center"},children:[m.jsx("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"4px",flexGrow:0,height:"14px",marginBottom:"6px",width:"100px"}}),m.jsx("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"4px",flexGrow:0,height:"14px",width:"60px"}})]})]}),m.jsx("div",{style:{padding:"19% 0"}}),m.jsx("div",{style:{display:"block",height:"50px",margin:"0 auto 12px",width:"50px"},children:m.jsx("svg",{width:"50px",height:"50px",viewBox:"0 0 60 60",version:"1.1",xmlns:"https://www.w3.org/2000/svg",children:m.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:m.jsx("g",{transform:"translate(-511.000000, -20.000000)",fill:"#000000",children:m.jsx("g",{children:m.jsx("path",{d:"M556.869,30.41 C554.8
15314,30.41 553.148,32.076 553.148,34.131 C553.148,36.186 554.814,37.852 556.869,37.852 C558.924,37.852 560.59,36.186 560.59,34.131 C560.59,32.076 558.924,30.41 556.869,30.41 M541,60.657 C535.114,60.657 530.342,55.887 530.342,50 C530.342,44.114 535.114,39.342 541,39.342 C546.887,39.342 551.658,44.114 551.658,50 C551.658,55.887 546.887,60.657 541,60.657 M541,33.886 C532.1,33.886 524.886,41.1 524.886,50 C524.886,58.899 532.1,66.113 541,66.113 C549.9,66.113 557.115,58.899 557.115,50 C557.115,41.1 549.9,33.886 541,33.886 M565.378,62.101 C565.244,65.022 564.756,66.606 564.346,67.663 C563.803,69.06 563.154,70.057 562.106,71.106 C561.058,72.155 560.06,72.803 558.662,73.347 C557.607,73.757 556.021,74.244 553.102,74.378 C549.944,74.521 548.997,74.552 541,74.552 C533.003,74.552 532.056,74.521 528.898,74.378 C525.979,74.244 524.393,73.757 523.338,73.347 C521.94,72.803 520.942,72.155 519.894,71.106 C518.846,70.057 518.197,69.06 517.654,67.663 C517.244,66.606 516.755,65.022 516.623,62.101 C516.479,58.943 516.448,57.996 516.448,50 C516.448,42.003 516.479,41.056 516.623,37.899 C516.755,34.978 517.244,33.391 517.654,32.338 C518.197,30.938 518.846,29.942 519.894,28.894 C520.942,27.846 521.94,27.196 523.338,26.654 C524.393,26.244 525.979,25.756 528.898,25.623 C532.057,25.479 533.004,25.448 541,25.448 C548.997,25.448 549.943,25.479 553.102,25.623 C556.021,25.756 557.607,26.244 558.662,26.654 C560.06,27.196 561.058,27.846 562.106,28.894 C563.154,29.942 563.803,30.938 564.346,32.338 C564.756,33.391 565.244,34.978 565.378,37.899 C565.522,41.056 565.552,42.003 565.552,50 C565.552,57.996 565.522,58.943 565.378,62.101 M570.82,37.631 C570.674,34.438 570.167,32.258 569.425,30.349 C568.659,28.377 567.633,26.702 565.965,25.035 C564.297,23.368 562.623,22.342 560.652,21.575 C558.743,20.834 556.562,20.326 553.369,20.18 C550.169,20.033 549.148,20 541,20 C532.853,20 531.831,20.033 528.631,20.18 C525.438,20.326 523.257,20.834 521.349,21.575 C519.376,22.342 517.703,23.368 516.035,25.035 C514.368,26.702 513.342,28.377 512.574,30.349 C511.834,32.258 511.326,34.438 511.181,37.631 C511.035,40.831 511,41.851 511,50 C511,58.147 511.035,59.17 511.181,62.369 C511.326,65.562 511.834,67.743 512.574,69.651 C513.342,71.625 514.368,73.296 516.035,74.965 C517.703,76.634 519.376,77.658 521.349,78.425 C523.257,79.167 525.438,79.673 528.631,79.82 C531.831,79.965 532.853,80.001 541,80.001 C549.148,80.001 550.169,79.965 553.369,79.82 C556.562,79.673 558.743,79.167 560.652,78.425 C562.623,77.658 564.297,76.634 565.965,74.965 C567.633,73.296 568.659,71.625 569.425,69.651 C570.167,67.743 570.674,65.562 570.82,62.369 C570.966,59.17 571,58.147 571,50 C571,41.851 570.966,40.831 570.82,37.631"})})})})})}),m.jsx("div",{style:{paddingTop:"8px"},children:m.jsx("div",{style:{color:"#3897f0",fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",fontWeight:550,lineHeight:"18px"},children:"View this profile on Instagram"})}),m.jsx("div",{style:{padding:"12.5% 0"}}),m.jsxs("div",{style:{display:"flex",flexDirection:"row",marginBottom:"14px",alignItems:"center"},children:[m.jsxs("div",{children:[m.jsx("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",height:"12.5px",width:"12.5px",transform:"translateX(0px) translateY(7px)"}}),m.jsx("div",{style:{backgroundColor:"#F4F4F4",height:"12.5px",transform:"rotate(-45deg) translateX(3px) translateY(1px)",width:"12.5px",flexGrow:0,marginRight:"14px",marginLeft:"2px"}}),m.jsx("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",height:"12.5px",width:"12.5px",transform:"translateX(9px) translateY(-18px)"}})]}),m.jsxs("div",{style:{marginLeft:"8px"},children:[m.jsx("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"50%",flexGrow:0,height:"20px",width:"20px"}}),m.jsx("div",{style:{width:0,height:0,borderTop:"2px solid transparent",borderLeft:"6px solid #f4f4f4",borderBottom:"2px solid transparent",transform:"translateX(16px) translateY(-4px) rotate(30deg)"}})]}),m.jsxs("div",{style:{marginLeft:"auto"},children:[m.jsx("div",{style:{width:"0px",borderTop:"8px solid #F4F4F4",borderRight:"8px solid transparent",transform:"translateY(16px)"}}),m.jsx("div",{style:{backgroundColor:"#F4F4F4",flexGrow:0,height:"12px",width:"16px",transform:"translateY(-4px)"}}),m.jsx("div",{style:{width:0,height:0,borderTop:"8px solid #F4F4F4",borderLeft:"8px solid transparent",transform:"translateY(-4px) translateX(8px)"}})]})]}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",flexGrow:1,justifyContent:"center",marginBottom:"24px"},children:[m.jsx("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"4px",flexGrow:0,height:"14px",marginBottom:"6px",width:"224px"}}),m.jsx("div",{style:{backgroundColor:"#F4F4F4",borderRadius:"4px",flexGrow:0,height:"14px",width:"144px"}})]})]}),m.jsxs("p",{style:{color:"#c9c8cd",fontFamily:"Arial,sans-serif",fontSize:"14px",lineHeight:"17px",marginBottom:0,marginTop:"8px",overflow:"hidden",padding:"8px 0 7px",textAlign:"center",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[m.jsx("a",{href:"https://www.instagram.com/rinksport/?utm_source=ig_embed&utm_campaign=loading",style:{color:"#c9c8cd",fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",fontWeight:"normal",lineHeight:"17px"},target:"_blank",rel:"noopener noreferrer",children:"College Development Camps"})," (@",m.jsx("a",{href:"https://www.instagram.com/rinksport/?utm_source=ig_embed&utm_campaign=loading",style:{color:"#c9c8cd",fontFamily:"Arial,sans-serif",fontSize:"14px",fontStyle:"normal",fontWeight:"normal",lineHeight:"17px"},target:"_blank",rel:"noopener noreferrer",children:"rinksport"}),") ⢠Instagram photos and videos"]})]})})})}),m.jsx("div",{className:"text-center mt-8",children:m.jsx(is,{size:"lg",asChild:!0,children:m.jsxs("a",{href:"https://instagram.com/rinksport",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[m.jsx(e0,{className:"h-5 w-5"}),"Follow Us on Instagram"]})})})]})})),oT=()=>m.jsx("div",{className:"min-h-screen pt-24 pb-12",children:m.jsxs("div",{className:"container mx-auto px-4",children:[m.jsxs("div",{className:"max-w-4xl mx-auto mb-8 text-center",children:[m.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6 text-primary",children:"Camp Registration"}),m.jsx("p",{className:"text-xl text-muted-foreground",children:"Complete the form below to secure your spot."})]}),m.jsx("div",{className:"w-full h-[800px] rounded-lg overflow-hidden",children:m.jsx("iframe",{src:"https://rinksport.regfox.com/2027-rinksport-ncaa-prep-camp",title:"Registration Form",className:"w-full h-full",frameBorder:"0"})}),m.jsx("div",{className:"mt-6 text-sm text-muted-foreground text-center",children:m.jsxs("p",{children:["Need help with registration? Contact us at"," ",m.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})]})})]})}),Ya=b.forwardRef(({className:t,type:e,...r},n)=>m.jsx("input",{type:e,className:Oe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...r}));Ya.displayName="Input";const pw=b.forwardRef(({className:t,...e},r)=>m.jsx("textarea",{className:Oe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
153ing-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",t),ref:r,...e}));pw.displayName="Textarea";var aT="Label",mw=b.forwardRef((t,e)=>m.jsx(Be.label,{...t,ref:e,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));mw.displayName=aT;var gw=mw;const lT=Mh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Wi=b.forwardRef(({className:t,...e},r)=>m.jsx(gw,{ref:r,className:Oe(lT(),t),...e}));Wi.displayName=gw.displayName;var ue;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ue||(ue={}));var im;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(im||(im={}));const z=ue.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jr=t=>{switch(typeof t){case"undefined":return z.undefined;case"string":return z.string;case"number":return Number.isNaN(t)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":return Array.isArray(t)?z.array:t===null?z.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?z.promise:typeof Map<"u"&&t instanceof Map?z.map:typeof Set<"u"&&t instanceof Set?z.set:typeof Date<"u"&&t instanceof Date?z.date:z.object;default:return z.unknown}}
vendor: 5,704 bytes, line 153
153,N=ue.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class fr extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(i){return i.message},n={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),n}static assert(e){if(!(e instanceof fr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ue.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];r[i]=r[i]||[],r[i].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}fr.create=t=>new fr(t);const kd=(t,e)=>{let r;switch(t.code){case N.invalid_type:t.received===z.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ue.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:r=`Unrecognized key(s) in object: ${ue.joinValues(t.keys,", ")}`;break;case N.invalid_union:r="Invalid input";break;case N.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ue.joinValues(t.options)}`;break;case N.invalid_enum_value:r=`Invalid enum value. Expected ${ue.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:r="Invalid function arguments";break;case N.invalid_return_type:r="Invalid function return type";break;case N.invalid_date:r="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:ue.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case N.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case N.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case N.custom:r="Invalid input";break;case N.invalid_intersection_types:r="Intersection results could not be merged";break;case N.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:r="Number must be finite";break;default:r=e.defaultError,ue.assertNever(t)}return{message:r}};let cT=kd;function uT(){return cT}const dT=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=n.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...s,path:i,message:a}};function M(t,e){const r=uT(),n=dT({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===kd?void 0:kd].filter(s=>!!s)});t.common.issues.push(n)}class wt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const s of r){if(s.status==="aborted")return G;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const s of r){const i=await s.key,o=await s.value;n.push({key:i,value:o})}return wt.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:i,value:o}=s;
vendor: 28,022 bytes, line 153
153if(i.status==="aborted"||o.status==="aborted")return G;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}}const G=Object.freeze({status:"aborted"}),Vi=t=>({status:"dirty",value:t}),jt=t=>({status:"valid",value:t}),om=t=>t.status==="aborted",am=t=>t.status==="dirty",pi=t=>t.status==="valid",Nl=t=>typeof Promise<"u"&&t instanceof Promise;var H;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(H||(H={}));class Rn{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const lm=(t,e)=>{if(pi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new fr(t.common.issues);return this._error=r,this._error}}};function re(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??r??a.defaultError}},description:s}}class le{get description(){return this._def.description}_getType(e){return Jr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Jr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new wt,ctx:{common:e.parent.common,data:e.data,parsedType:Jr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Nl(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jr(e)},s=this._parseSync({data:e,path:n.path,parent:n});return lm(n,s)}"~validate"(e){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jr(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:r});return pi(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(s=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>pi(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jr(e)},s=this._parse({data:e,path:n.path,parent:n}),i=await(Nl(s)?s:Promise.resolve(s));return lm(n,i)}refine(e,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{const o=e(s),a=()=>i.addIssue({code:N.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new gi({schema:this,typeName:Q.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return _n.create(this,this._def)}nullable(){return yi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return dr.create(this)}promise(){return Ll.create(this,this._def)}or(e){return Ol.create([this,e],this._def)}and(e){return Il.create(this,e,this._def)}transform(e){return new gi({...re(this._def),schema:this,typeName:Q.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Ed({...re(this._def),innerType:this,defaultValue:r,typeName:Q.ZodDefault})}brand(){return new IT({typeName:Q.ZodBranded,type:this,...re(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Cd({...re(this._def),innerType:this,catchValue:r,typeName:Q.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return nf.create(this,e)}readonly(){return Ad.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const hT=/^c[^\s-]{8,}$/i,fT=/^[0-9a-z]+$/,pT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,mT=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gT=/^[a-z0-9_-]{21}$/i,yT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vT=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let au;const bT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_T=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,kT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ST=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ET=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,CT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yw="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",AT=new RegExp(`^${yw}$`);function vw(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function TT(t){return new RegExp(`^${vw(t)}$`)}function RT(t){let e=`${yw}T${vw(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function PT(t,e){return!!((e==="v4"||!e)&&bT.test(t)||(e==="v6"||!e)&&kT.test(t))}function NT(t,e){if(!yT.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function jT(t,e){return!!((e==="v4"||!e)&&_T.test(t)||(e==="v6"||!e)&&ST.test(t))}class un extends le{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==z.string){const i=this._getOrReturnCtx(e);return M(i,{code:N.invalid_type,expected:z.string,received:i.parsedType}),G}const n=new wt;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),M(s,{code:N.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),M(s,{code:N.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?M(s,{code:N.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&M(s,{code:N.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")wT.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"email",code:N.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")au||(au=new RegExp(xT,"u")),au.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"emoji",code:N.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")mT.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"uuid",code:N.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")gT.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"nanoid",code:N.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")hT.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"cuid",code:N.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")fT.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"cuid2",code:N.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")pT.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"ulid",code:N.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),M(s,{validation:"url",code:N.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"regex",code:N.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),M(s,{code:N.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),M(s,{code:N.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),M(s,{code:N.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?RT(i).test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{code:N.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?AT.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{code:N.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?TT(i).test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{code:N.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?vT.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"duration",code:N.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?PT(e.data,i.version)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"ip",code:N.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?NT(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"jwt",code:N.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?jT(e.data,i.version)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"cidr",code:N.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?ET.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"base64",code:N.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?CT.test(e.data)||(s=this._getOrReturnCtx(e,s),M(s,{validation:"base64url",code:N.invalid_string,message:i.message}),n.dirty()):ue.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:N.invalid_string,...H.errToObj(n)})}_addCheck(e){return new un({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...H.errToObj(e)})}url(e){return this._addCheck({kind:"url",...H.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...H.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...H.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...H.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...H.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...H.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...H.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...H.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...H.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...H.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...H.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...H.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...H.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...H.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...H.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...H.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...H.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...H.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...H.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...H.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...H.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...H.errToObj(r)})}nonempty(e){return this.min(1,H.errToObj(e))}trim(){return new un({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new un({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new un({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}un.create=t=>new un({checks:[],typeName:Q.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...re(t)});function OT(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}class jo extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==z.number){const i=this._getOrReturnCtx(e);return M(i,{code:N.invalid_type,expected:z.number,received:i.parsedType}),G}let n;const s=new wt;for(const i of this._def.checks)i.kind==="int"?ue.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:N.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),M(n,{code:N.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),M(n,{code:N.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?OT(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),M(n,{code:N.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),M(n,{code:N.not_finite,message:i.message}),s.dirty()):ue.assertNever(i);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,H.toString(r))}gt(e,r){return this.setLimit("min",e,!1,H.toString(r))}lte(e,r){return this.setLimit("max",e,!0,H.toString(r))}lt(e,r){return this.setLimit("max",e,!1,H.toString(r))}setLimit(e,r,n,s){return new jo({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:H.toString(s)}]})}_addCheck(e){return new jo({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:H.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:H.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:H.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:H.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:H.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:H.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:H.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:H.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:H.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&ue.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}jo.create=t=>new jo({checks:[],typeName:Q.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...re(t)});class Oo extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==z.bigint)return this._getInvalidInput(e);let n;const s=new wt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),M(n,{code:N.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),M(n,{code:N.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),M(n,{code:N.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ue.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return M(r,{code:N.invalid_type,expected:z.bigint,received:r.parsedType}),G}gte(e,r){return this.setLimit("min",e,!0,H.toString(r))}gt(e,r){return this.setLimit("min",e,!1,H.toString(r))}lte(e,r){return this.setLimit("max",e,!0,H.toString(r))}lt(e,r){return this.setLimit("max",e,!1,H.toString(r))}setLimit(e,r,n,s){return new Oo({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:H.toString(s)}]})}_addCheck(e){return new Oo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:H.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:H.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:H.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:H.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:H.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Oo.create=t=>new Oo({checks:[],typeName:Q.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...re(t)});class cm extends le{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==z.boolean){const n=this._getOrReturnCtx(e);return M(n,{code:N.invalid_type,expected:z.boolean,received:n.parsedType}),G}return jt(e.data)}}cm.create=t=>new cm({typeName:Q.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...re(t)});class jl extends le{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==z.date){const i=this._getOrReturnCtx(e);return M(i,{code:N.invalid_type,expected:z.date,received:i.parsedType}),G}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return M(i,{code:N.invalid_date}),G}const n=new wt;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),M(s,{code:N.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),M(s,{code:N.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):ue.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new jl({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:H.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:H.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}jl.create=t=>new jl({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Q.ZodDate,...re(t)});class um extends le{_parse(e){if(this._getType(e)!==z.symbol){const n=this._getOrReturnCtx(e);return M(n,{code:N.invalid_type,expected:z.symbol,received:n.parsedType}),G}return jt(e.data)}}um.create=t=>new um({typeName:Q.ZodSymbol,...re(t)});class dm extends le{_parse(e){if(this._getType(e)!==z.undefined){const n=this._getOrReturnCtx(e);return M(n,{code:N.invalid_type,expected:z.undefined,received:n.parsedType}),G}return jt(e.data)}}dm.create=t=>new dm({typeName:Q.ZodUndefined,...re(t)});class hm extends le{_parse(e){if(this._getType(e)!==z.null){const n=this._getOrReturnCtx(e);return M(n,{code:N.invalid_type,expected:z.null,received:n.parsedType}),G}return jt(e.data)}}hm.create=t=>new hm({typeName:Q.ZodNull,...re(t)});class fm extends le{constructor(){super(...arguments),this._any=!0}_parse(e){return jt(e.data)}}fm.create=t=>new fm({typeName:Q.ZodAny,...re(t)});class pm extends le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return jt(e.data)}}pm.create=t=>new pm({typeName:Q.ZodUnknown,...re(t)});class Pn extends le{_parse(e){const r=this._getOrReturnCtx(e);return M(r,{code:N.invalid_type,expected:z.never,received:r.parsedType}),G}}Pn.create=t=>new Pn({typeName:Q.ZodNever,...re(t)});class mm extends le{_parse(e){if(this._getType(e)!==z.undefined){const n=this._getOrReturnCtx(e);return M(n,{code:N.invalid_type,expected:z.void,received:n.parsedType}),G}return jt(e.data)}}mm.create=t=>new mm({typeName:Q.ZodVoid,...re(t)});class dr extends le{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==z.array)return M(r,{code:N.invalid_type,expected:z.array,received:r.parsedType}),G;if(s.exactLength!==null){const o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(M(r,{code:o?N.too_big:N.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(M(r,{code:N.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(M(r,{code:N.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Rn(r,o,r.path,a)))).then(o=>wt.mergeArray(n,o));const i=[...r.data].map((o,a)=>s.type._parseSync(new Rn(r,o,r.path,a)));return wt.mergeArray(n,i)}
vendor: 5,068 bytes, line 153
153get element(){return this._def.type}min(e,r){return new dr({...this._def,minLength:{value:e,message:H.toString(r)}})}max(e,r){return new dr({...this._def,maxLength:{value:e,message:H.toString(r)}})}length(e,r){return new dr({...this._def,exactLength:{value:e,message:H.toString(r)}})}nonempty(e){return this.min(1,e)}}dr.create=(t,e)=>new dr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Q.ZodArray,...re(e)});function Ss(t){if(t instanceof Ce){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=_n.create(Ss(n))}return new Ce({...t._def,shape:()=>e})}else return t instanceof dr?new dr({...t._def,type:Ss(t.element)}):t instanceof _n?_n.create(Ss(t.unwrap())):t instanceof yi?yi.create(Ss(t.unwrap())):t instanceof os?os.create(t.items.map(e=>Ss(e))):t}class Ce extends le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=ue.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==z.object){const c=this._getOrReturnCtx(e);return M(c,{code:N.invalid_type,expected:z.object,received:c.parsedType}),G}const{status:n,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Pn&&this._def.unknownKeys==="strip"))for(const c in s.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=i[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Rn(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof Pn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")a.length>0&&(M(s,{code:N.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Rn(s,d,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>wt.mergeObjectSync(n,c)):wt.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return H.errToObj,new Ce({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:H.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new Ce({...this._def,unknownKeys:"strip"})}passthrough(){return new Ce({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ce({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ce({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Q.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Ce({...this._def,catchall:e})}pick(e){const r={};for(const n of ue.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Ce({...this._def,shape:()=>r})}omit(e){const r={};for(const n of ue.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Ce({...this._def,shape:()=>r})}deepPartial(){return Ss(this)}partial(e){const r={};for(const n of ue.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}return new Ce({...this._def,shape:()=>r})}required(e){const r={};for(const n of ue.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof _n;)i=i._def.innerType;r[n]=i}return new Ce({...this._def,shape:()=>r})}keyof(){return ww(ue.objectKeys(this.shape))}}Ce.create=(t,e)=>new Ce({shape:()=>t,unknownKeys:"strip",catchall:Pn.create(),typeName:Q.ZodObject,...re(e)});Ce.strictCreate=(t,e)=>new Ce({shape:()=>t,unknownKeys:"strict",catchall:Pn.create(),typeName:Q.ZodObject,...re(e)});Ce.lazycreate=(t,e)=>new Ce({shape:t,unknownKeys:"strip",catchall:Pn.create(),typeName:Q.ZodObject,...re(e)});class Ol extends le{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new fr(a.ctx.common.issues));return M(r,{code:N.invalid_union,unionErrors:o}),G}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of n){const c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;
vendor: 4,993 bytes, line 153
153const a=o.map(l=>new fr(l));return M(r,{code:N.invalid_union,unionErrors:a}),G}}get options(){return this._def.options}}Ol.create=(t,e)=>new Ol({options:t,typeName:Q.ZodUnion,...re(e)});function Sd(t,e){const r=Jr(t),n=Jr(e);if(t===e)return{valid:!0,data:t};if(r===z.object&&n===z.object){const s=ue.objectKeys(e),i=ue.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(const a of i){const l=Sd(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(r===z.array&&n===z.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],a=e[i],l=Sd(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return r===z.date&&n===z.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Il extends le{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(i,o)=>{if(om(i)||om(o))return G;const a=Sd(i.value,o.value);return a.valid?((am(i)||am(o))&&r.dirty(),{status:r.value,value:a.data}):(M(n,{code:N.invalid_intersection_types}),G)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Il.create=(t,e,r)=>new Il({left:t,right:e,typeName:Q.ZodIntersection,...re(r)});class os extends le{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==z.array)return M(n,{code:N.invalid_type,expected:z.array,received:n.parsedType}),G;if(n.data.length<this._def.items.length)return M(n,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&n.data.length>this._def.items.length&&(M(n,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Rn(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>wt.mergeArray(r,o)):wt.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new os({...this._def,rest:e})}}os.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new os({items:t,typeName:Q.ZodTuple,rest:null,...re(e)})};class gm extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==z.map)return M(n,{code:N.invalid_type,expected:z.map,received:n.parsedType}),G;const s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,l],c)=>({key:s._parse(new Rn(n,a,n.path,[c,"key"])),value:i._parse(new Rn(n,l,n.path,[c,"value"]))}));if(n.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return G;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return G;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),a.set(c.value,u.value)}return{status:r.value,value:a}}}}gm.create=(t,e,r)=>new gm({valueType:e,keyType:t,typeName:Q.ZodMap,...re(r)});class Io extends le{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==z.set)return M(n,{code:N.invalid_type,expected:z.set,received:n.parsedType}),G;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(M(n,{code:N.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(M(n,{code:N.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return G;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}const a=[...n.data.values()].map((l,c)=>i._parse(new Rn(n,l,n.path,c)));return n.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,r){return new Io({...this._def,minSize:{value:e,message:H.toString(r)}})}max(e,r){return new Io({...this._def,maxSize:{value:e,message:H.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Io.create=(t,e)=>new Io({valueType:t,minSize:null,maxSize:null,typeName:Q.ZodSet,...re(e)});class ym extends le{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ym.create=(t,e)=>new ym({getter:t,typeName:Q.ZodLazy,...re(e)});class vm extends le{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return M(r,{received:r.data,code:N.invalid_literal,expected:this._def.value}),G}
vendor: 5,343 bytes, line 153
153return{status:"valid",value:e.data}}get value(){return this._def.value}}vm.create=(t,e)=>new vm({value:t,typeName:Q.ZodLiteral,...re(e)});function ww(t,e){return new mi({values:t,typeName:Q.ZodEnum,...re(e)})}class mi extends le{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return M(r,{expected:ue.joinValues(n),received:r.parsedType,code:N.invalid_type}),G}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return M(r,{received:r.data,code:N.invalid_enum_value,options:n}),G}return jt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return mi.create(e,{...this._def,...r})}exclude(e,r=this._def){return mi.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}mi.create=ww;class wm extends le{_parse(e){const r=ue.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==z.string&&n.parsedType!==z.number){const s=ue.objectValues(r);return M(n,{expected:ue.joinValues(s),received:n.parsedType,code:N.invalid_type}),G}if(this._cache||(this._cache=new Set(ue.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=ue.objectValues(r);return M(n,{received:n.data,code:N.invalid_enum_value,options:s}),G}return jt(e.data)}get enum(){return this._def.values}}wm.create=(t,e)=>new wm({values:t,typeName:Q.ZodNativeEnum,...re(e)});class Ll extends le{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==z.promise&&r.common.async===!1)return M(r,{code:N.invalid_type,expected:z.promise,received:r.parsedType}),G;const n=r.parsedType===z.promise?r.data:Promise.resolve(r.data);return jt(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ll.create=(t,e)=>new Ll({type:t,typeName:Q.ZodPromise,...re(e)});class gi extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{M(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return G;const l=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return l.status==="aborted"?G:l.status==="dirty"||r.value==="dirty"?Vi(l.value):l});{if(r.value==="aborted")return G;const a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?G:a.status==="dirty"||r.value==="dirty"?Vi(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?G:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?G:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!pi(o))return G;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>pi(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):G);ue.assertNever(s)}}gi.create=(t,e,r)=>new gi({schema:t,typeName:Q.ZodEffects,effect:e,...re(r)});gi.createWithPreprocess=(t,e,r)=>new gi({schema:e,effect:{type:"preprocess",transform:t},typeName:Q.ZodEffects,...re(r)});class _n extends le{_parse(e){return this._getType(e)===z.undefined?jt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}_n.create=(t,e)=>new _n({innerType:t,typeName:Q.ZodOptional,...re(e)});class yi extends le{_parse(e){return this._getType(e)===z.null?jt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}yi.create=(t,e)=>new yi({innerType:t,typeName:Q.ZodNullable,...re(e)});class Ed extends le{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===z.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Ed.create=(t,e)=>new Ed({innerType:t,typeName:Q.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...re(e)});class Cd extends le{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Nl(s)?s.then(i=>
153({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fr(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new fr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Cd.create=(t,e)=>new Cd({innerType:t,typeName:Q.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...re(e)});class xm extends le{_parse(e){if(this._getType(e)!==z.nan){const n=this._getOrReturnCtx(e);return M(n,{code:N.invalid_type,expected:z.nan,received:n.parsedType}),G}return{status:"valid",value:e.data}}}xm.create=t=>new xm({typeName:Q.ZodNaN,...re(t)});class IT extends le{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class nf extends le{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?G:i.status==="dirty"?(r.dirty(),Vi(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?G:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new nf({in:e,out:r,typeName:Q.ZodPipeline})}}class Ad extends le{_parse(e){const r=this._def.innerType._parse(e),n=s=>(pi(s)&&(s.value=Object.freeze(s.value)),s);return Nl(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Ad.create=(t,e)=>new Ad({innerType:t,typeName:Q.ZodReadonly,...re(e)});Ce.lazycreate;var Q;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Q||(Q={}));const Aa=un.create;Pn.create;dr.create;const LT=Ce.create;Ce.strictCreate;Ol.create;Il.create;os.create;mi.create;Ll.create;_n.create;yi.create;function DT(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}const $T=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class sf extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class MT extends sf{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class bm extends sf{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class _m extends sf{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Td;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Td||(Td={}));class UT{constructor(e,{headers:r={},customFetch:n,region:s=Td.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=$T(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return DT(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:d}=n;let f={},{region:h}=n;h||(h=this.region);const w=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,w.searchParams.set("forceFunctionRegion",h));let v;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",v=c):typeof c=="string"?(f["Content-Type"]="text/plain",v=c):typeof FormData<"u"&&c instanceof FormData?v=c:(f["Content-Type"]="application/json",v=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?v=JSON.stringify(c):v=c;let x=u;d&&(o=new AbortController,i=setTimeout(()=>
153o.abort(),d),u?(x=o.signal,u.addEventListener("abort",()=>o.abort())):x=o.signal);const g=yield this.fetch(w.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:v,signal:x}).catch(k=>{throw new MT(k)}),p=g.headers.get("x-relay-error");if(p&&p==="true")throw new bm(g);if(!g.ok)throw new _m(g);let y=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return y==="application/json"?_=yield g.json():y==="application/octet-stream"||y==="application/pdf"?_=yield g.blob():y==="text/event-stream"?_=g:y==="multipart/form-data"?_=yield g.formData():_=yield g.text(),{data:_,error:null,response:g}}catch(a){return{data:null,error:a,response:a instanceof _m||a instanceof bm?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const xw=3,km=t=>Math.min(1e3*2**t,3e4),FT=[520,503],bw=["GET","HEAD","OPTIONS"];var Sm=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Em(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",s),r()},t);function s(){clearTimeout(n),r()}e==null||e.addEventListener("abort",s)})}function BT(t,e,r,n){return!(!n||r>=xw||!bw.includes(t)||!FT.includes(e))}var zT=class{constructor(t){var e,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var 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()=>{let o=0;for(;;){const c=new Headers(r.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await n(r.url.toString(),{method:r.method,headers:c,body:JSON.stringify(r.body,(d,f)=>typeof f=="bigint"?f.toString():f),signal:r.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!bw.includes(r.method))throw d;if(r.retryEnabled&&o<xw){const f=km(o);o++,await Em(f,r.signal);continue}throw d}if(BT(r.method,u.status,o,r.retryEnabled)){var a,l;const d=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:km(o);await u.text(),o++,await Em(f,r.signal);continue}return await r.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const d=o==null?void 0:o.cause;if(d){var f,h,w,v;const p=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",y=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(w=o==null?void 0:o.name)!==null&&w!==void 0?w:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 154 155Caused by: ${(v=d==null?void 0:d.name)!==null&&v!==void 0?v:"Error"}: ${p}
155`,y&&(l+=` (${y})`),d!=null&&d.stack&&(l+=` 156${d.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const g=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",g>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${g} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",g>this.urlLengthLimit&&(c+=`. Your request URL is ${g} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}})),i.then(t,e)}async processResponse(t){var e=this;let r=null,n=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var c;const f=await t.text();if(f!=="")if(e.headers.get("Accept")==="text/csv")n=f;else if(e.headers.get("Accept")&&(!((c=e.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,e.shouldThrowOnError)throw new Sm({message:f,details:"",hint:"",code:""})}}const u=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&d&&d.length>1&&(s=parseInt(d[1])),e.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(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"):n.length===1?n=n[0]:n=null)}else{const u=await t.text();try{r=JSON.parse(u),Array.isArray(r)&&t.status===404&&(n=[],r=null,i=200,o="OK")}catch{t.status===404&&u===""?(i=204,o="No Content"):r={message:u}}if(r&&e.shouldThrowOnError)throw new Sm(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},HT=class extends zT{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!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},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{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,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"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(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const Cm=new RegExp("[,()]");var Es=class extends HT{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&Cm.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&Cm.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config: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(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>
156r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},WT=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),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(t,e){const{head:r=!1,count:n}=e??{},s=r?"HEAD":"GET";let i=!1;const o=(t??"*").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 Es({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),r||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
1560){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new Es({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,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`),e!==void 0&&a.searchParams.set("on_conflict",e),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);a.searchParams.set("columns",u.join(","))}}return new Es({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Es({method:n,url:s,headers:i,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new Es({method:r,url:n,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Lo(t){"@babel/helpers - typeof";return Lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lo(t)}function VT(t,e){if(Lo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Lo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qT(t){var e=VT(t,"string");return Lo(e)=="symbol"?e:e+""}function KT(t,e,r){return(e=qT(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Am(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Ta(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Am(Object(r),!0).forEach(function(n){KT(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Am(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var GT=class _w{constructor(e,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),i),h=u==null?void 0:u.signal;if(h){if(h.aborted)return clearTimeout(f),l(c,u);const w=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",w,{once:!0}),l(c,Ta(Ta({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",w)})}return l(c,Ta(Ta({},u),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new WT(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new _w(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;const u=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(u)),d=n&&Object.values(r).some(u);d?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([h,w])=>w!==void 0).map(([h,w])=>[h,Array.isArray(w)?`{${w.join(",")}}`:`${w}
156`]).forEach(([h,w])=>{l.searchParams.append(h,w)})):(a="POST",c=r);const f=new Headers(this.headers);return d?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new Es({method:a,url:l,headers:f,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class QT{constructor(){}static detectEnvironment(){var e;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"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const o=i.node,a=parseInt(o.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 157import ws from "ws" 158new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=` 159 160Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const JT="2.107.0",YT=`realtime-js/${JT}`,ZT="1.0.0",kw="2.0.0",XT=kw,eR=1e4,tR=100,Xr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Sw={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Rd={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class rR{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var r,n;const s=(n=(r=e.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(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,r,n){var s,i;const o=e.topic,a=(s=e.ref)!==null&&s!==void 0?s:"",l=(i=e.join_ref)!==null&&i!==void 0?i:"",c=e.payload.event,u=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
160let w=new DataView(h),v=0;w.setUint8(v++,this.KINDS.userBroadcastPush),w.setUint8(v++,l.length),w.setUint8(v++,a.length),w.setUint8(v++,o.length),w.setUint8(v++,c.length),w.setUint8(v++,d.length),w.setUint8(v++,r),Array.from(l,g=>w.setUint8(v++,g.charCodeAt(0))),Array.from(a,g=>w.setUint8(v++,g.charCodeAt(0))),Array.from(o,g=>w.setUint8(v++,g.charCodeAt(0))),Array.from(c,g=>w.setUint8(v++,g.charCodeAt(0))),Array.from(d,g=>w.setUint8(v++,g.charCodeAt(0)));var x=new Uint8Array(h.byteLength+n.byteLength);return x.set(new Uint8Array(h),0),x.set(new Uint8Array(n),h.byteLength),x.buffer}decode(e,r){if(this._isArrayBuffer(e)){let n=this._binaryDecode(e);return r(n)}if(typeof e=="string"){const n=JSON.parse(e),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(e){const r=new DataView(e),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,s)}}_decodeUserBroadcast(e,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(e.slice(l,l+s));l=l+s;const u=n.decode(e.slice(l,l+i));l=l+i;const d=n.decode(e.slice(l,l+o));l=l+o;const f=e.slice(l,e.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,w={type:this.BROADCAST_EVENT,event:u,payload:h};return o>0&&(w.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([n])=>r.includes(n)))}}var pe;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(pe||(pe={}));const Tm=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=nR(o,t,e,s),i),{}):{}},nR=(t,e,r,n)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=r[t];return i&&!n.includes(i)?Ew(i,o):Pd(o)},Ew=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return aR(e,r)}switch(t){case pe.bool:return sR(e);case pe.float4:case pe.float8:case pe.int2:case pe.int4:case pe.int8:case pe.numeric:case pe.oid:return iR(e);case pe.json:case pe.jsonb:return oR(e);case pe.timestamp:return lR(e);case pe.abstime:case pe.date:case pe.daterange:case pe.int4range:case pe.int8range:case pe.money:case pe.reltime:case pe.text:case pe.time:case pe.timestamptz:case pe.timetz:case pe.tsrange:case pe.tstzrange:return Pd(e);default:return Pd(e)}},Pd=t=>t,sR=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},iR=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},oR=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},aR=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let i;const o=t.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>Ew(e,a))}return t},lR=t=>typeof t=="string"?t.replace(" ","T"):t,Cw=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var io=t=>typeof t=="function"?t:function(){return t},cR=typeof self<"u"?self:null,Cs=typeof window<"u"?window:null,nr=cR||Cs||globalThis,uR="2.0.0",dR=1e4,hR=1e3,ar={connecting:0,open:1,closing:2,closed:3},it={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"},Nd={longpoll:"longpoll",websocket:"websocket"},fR={complete:4},jd="base64url.bearer.phx.",Ra=class{constructor(t,e,r,n){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHo
vendor: 21,724 bytes, lines 160-161
160oks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Aw=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},pR=class{constructor(t,e,r){this.state=it.closed,this.topic=t,this.params=io(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ra(this,br.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Aw(()=>{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=it.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=it.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=it.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=it.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 Ra(this,br.leave,io({}),this.timeout).send(),this.state=it.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(br.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=it.closed,this.bindings=[]}onClose(t){this.on(br.close,t)}onError(t){return this.on(br.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Ra(this,t,function(){return e},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=it.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(br.close,"leave")},r=new Ra(this,br.leave,io({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,n){return this.topic!==t?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=it.joining,this.joinPush.resend(t))}trigger(t,e,r,n){let s=this.onMessage(t,e,r,n);if(e&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===t&&this.filterBindings(o,e,r));for(let o=0;o<i.length;o++)i[o].callback(s,r,n||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===it.closed}isErrored(){return this.state===it.errored}isJoined(){return this.state===it.joined}isJoining(){return this.state===it.joining}isLeaving(){return this.state===it.leaving}},Dl=class{static request(t,e,r,n,s,i,o){if(nr.XDomainRequest){let a=new nr.XDomainRequest;return this.xdomainRequest(a,t,e,n,s,i,o)}else if(nr.XMLHttpRequest){let a=new nr.XMLHttpRequest;return this.xhrRequest(a,t,e,r,n,s,i,o)}else{if(nr.fetch&&nr.AbortController)return this.fetchRequest(t,e,r,n,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,n,s,i,o){let a={method:t,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),nr.fetch(e,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(t,e,r,n,s,i,o){return t.timeout=s,t.open(e,r),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,r,n,s,i,o,a){t.open(e,r,!0),t.timeout=i;for(let[l,c]of Object.entries(n))t.setRequestHeader(l,c);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===fR.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},o&&(t.ontimeout=o),t.send(s),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=e?`${e}[${n}]`:n,i=t[n];typeof i=="object"?r.push(this.serialize(i,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},mR=t=>{let e="",r=new Uint8Array(t),n=r.byteLength;for(let s=0;s<n;s++)e+=String.fromCharCode(r[s]);return btoa(e)},ws=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(jd)&&(this.authToken=atob(e[1].slice(jd.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=ar.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Nd.websocket),"$1/"+Nd.longpoll)}endpointURL(){return Dl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=ar.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ar.open||this.readyState===ar.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:n,messages:s}=e;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=ar.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(t){typeof t!="string"&&(t=mR(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(` 161`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,r){for(let s of this.reqs)s.abort();this.readyState=ar.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(t,e,r,n,s){let i,o=()=>{this.reqs.delete(i),n()};i=Dl.request(t,this.endpointURL(),e,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},gR=class qi{constructor(e,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=qi.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=qi.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=qi.syncDiff(this.state,s,i,o),a())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return qi.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,n,s){let i=this.clone(e),o={},a={};return this.map(i,(l,c)=>{r[l]||(a[l]=c)}),this.map(r,(l,c)=>{let u=i[l];if(u){let d=c.metas.map(v=>v.phx_ref),f=u.metas.map(v=>v.phx_ref),h=c.metas.filter(v=>f.indexOf(v.phx_ref)<0),w=u.metas.filter(v=>d.indexOf(v.phx_ref)<0);h.length>0&&(o[l]=c,o[l].metas=h),w.length>0&&(a[l]=this.clone(u),a[l].metas=w)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(e,r,n,s){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=e[a];if(e[a]=this.clone(l),c){let u=e[a].metas.map(f=>f.phx_ref),d=c.metas.filter(f=>u.indexOf(f.phx_ref)<0);e[a].metas.unshift(...d)}n(a,c,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;let u=l.metas.map(d=>d.phx_ref);c.metas=c.metas.filter(d=>u.indexOf(d.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete e[a]}),e}static list(e,r){return r||(r=function(n,s){return s}),this.map(e,(n,s)=>r(n,s))}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static clone(e){return JSON.parse(JSON.stringify(e))}},Pa={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,n,s,i,o]=JSON.parse(t);return e({join_ref:r,ref:n,topic:s,event:i,payload:o})}},binaryEncode(t){let{join_ref:e,ref:r,event:n,topic:s,payload:i}=t,o=this.META_LENGTH+e.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,r.length),l.setUint8(c++,s.length),l.setUint8(c++,n.length),Array.from(e,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(c++,d.charCodeAt(0)));var u=new Uint8Array(a.byteLength+i.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(i),a.byteLength),u.buffer},binaryDecode(t){let e=new DataView(t),r=e.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,n);case this.KINDS.reply:return this.decodeReply(t,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,n)}},decodePush(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(t.slice(o,o+n));o=o+n;let l=r.decode(t.slice(o,o+s));o=o+s;let c=r.decode(t.slice(o,o+i));o=o+i;let u=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(t.slice(a,a+n));a=a+n;let c=r.decode(t.slice(a,a+s));a=a+s;let u=r.decode(t.slice(a,a+i));a=a+i;let d=r.decode(t.slice(a,a+o));a=a+o;let f=t.slice(a,t.byteLength),h={status:d,response:f};return{join_ref:l,ref:c,topic:u,event:br.reply,payload:h}},decodeBroadcast(t,e,r){let n=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(t.slice(i,i+n));i=i+n;let a=r.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},yR=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||dR,this.transport=e.transport||nr.WebSocket||ws,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=nr&&nr.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Pa.encode.bind(Pa),this.defaultDecoder=Pa.decode.bind(Pa),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ws?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;Cs&&Cs.addEventListener&&(Cs.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),Cs.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),Cs.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>e.rejoinAfterMs?e.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>e.reconnectAfterMs?e.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=io(e.params||{}),this.endPoint=`${t}/${Nd.websocket}`,this.vsn=e.vsn||uR,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Aw(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return ws}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Dl.appendParams(Dl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=io(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ws?this.connectWithFallback(ws,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(s=>{s.ref===e&&(this.off([n]),t(Date.now()-r))});return!0}transportName(t){switch(t){case ws:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${jd}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,o=this.transportName(t),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),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(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,e),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(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),hR,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const n=this.conn;this.waitForBufferDone(n,()=>{e?n.close(e,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),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===ar.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}
161triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(br.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case ar.connecting:return"connecting";case ar.open:return"open";case ar.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new pR(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:n,ref:s,join_ref:i}=t;this.log("push",`${e} ${r} (${i}, ${s})`,n)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:n,payload:s,ref:i,join_ref:o}=e;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",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,n])=>{try{n(...e)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class oo{constructor(e,r){const n=wR(r);this.presence=new gR(e.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=oo.onJoinPayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=oo.onLeavePayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return oo.transformState(this.presence.state)}static transformState(e){return e=vR(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=e[n];return r[n]=Za(s),r},{})}static onJoinPayload(e,r,n){const s=Rm(r),i=Za(n);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,r,n){const s=Rm(r),i=Za(n);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function Za(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function vR(t){return JSON.parse(JSON.stringify(t))}function wR(t){return(t==null?void 0:t.events)&&{events:t.events}}function Rm(t){return t!=null&&t.metas?Za(t):[]}var Pm;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Pm||(Pm={}));class xR{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new oo(this.channel.channelAdapter,r)}}function bR(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
161if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class _R{constructor(e,r,n){const s=kR(n);this.channel=e.getSocket().channel(r,s),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,n){let s;try{s=this.channel.push(e,r,n)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>tR){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(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===Xr.joined}isJoined(){return this.state===Xr.joined}isJoining(){return this.state===Xr.joining}isClosed(){return this.state===Xr.closed}isLeaving(){return this.state===Xr.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function kR(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var Nm;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Nm||(Nm={}));var Fs;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Fs||(Fs={}));var _r;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(_r||(_r={}));class ao{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,r={config:{}},n){var s,i;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new _R(this.socket.socketAdapter,e,this.params),this.presence=new xR(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Cw(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(e,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[Fs.PRESENCE]&&this.bindings[Fs.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{e==null||e(_r.CHANNEL_ERROR,bR(h))}),this._onClose(()=>e==null?void 0:e(_r.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){e==null||e(_r.SUBSCRIBED);return}this._updatePostgresBindings(h,e)}).receive("error",h=>{this.state=Xr.errored;const w=Object.values(h).join(", ")||"error";e==null||e(_r.CHANNEL_ERROR,new Error(w,{cause:h}))}).receive("timeout",()=>{e==null||e(_r.TIMED_OUT)})}return this}_updatePostgresBindings(e,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:u,table:d,filter:f}}=l,h=e&&e[a];if(h&&h.event===c&&ao.isFilterValueEqual(h.schema,u)&&ao.isFilterValueEqual(h.table,d)&&ao.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Xr.errored,r==null||r(_r.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Xr.errored&&r&&r(_r.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===Fs.PRESENCE||e===Fs.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,n)}async httpSend(e,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(e)}`,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};let u=c.statusText;
161try{const d=await c.json();u=d.error||d.message||u}catch{}return Promise.reject(new Error(u))}async send(e,r={}){var n,s;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c instanceof Error&&c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.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(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(e,r,n){const s=e.toLocaleLowerCase(),i=this.channelAdapter.on(e,n),o={type:s,filter:r,callback:n,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,n)=>{var s,i,o,a,l,c,u;const d=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,n))return!1;const f=(s=this.bindings[d])===null||s===void 0?void 0:s.find(h=>h.ref===e.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,w=(i=f.filter)===null||i===void 0?void 0:i.event;return h&&((o=r.ids)===null||o===void 0?void 0:o.includes(h))&&(w==="*"||(w==null?void 0:w.toLocaleLowerCase())===((a=r.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const h=(c=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return h==="*"||h===((u=r==null?void 0:r.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(e,r){const{close:n,error:s,leave:i,join:o}=Sw;return r&&[n,s,i,o].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,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(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const n of e.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=Tm(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Tm(e.columns,e.old_record)),r}}class SR{constructor(e,r){this.socket=new yR(e,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(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,r,n,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{e(),i("ok")},r,n)})}push(e){this.socket.push(e)}log(e,r,n){this.socket.log(e,r,n)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Rd.connecting}isDisconnecting(){return this.socket.connectionState()==Rd.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const jm={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},ER=[1e3,2e3,5e3,1e4],CR=1e4;function AR(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var r;return(r=Array.from(t.keys())[e])!==null&&r!==void 0?r:null},removeItem(e){t.delete(e)},setItem(e,r){t.set(e,String(r))}}}function TR(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return AR()}const RR=` 162 addEventListener("message", (e) => { 163 if (e.data.event === "start") { 164 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 165 } 166 });`;class PR{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
166,this.ref=0,this.serializer=new rR,this._manuallySetToken=!1,this._authPromise=null,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 SR(e,s),this.httpEndpoint=Cw(e),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(e){const r=e.message;throw r.includes("Node.js")?new Error(`${r} 167 168To use Realtime in Node.js, you need to provide a WebSocket implementation: 169 170Option 1: Use Node.js 22+ which has native WebSocket support 171Option 2: Install and provide the "ws" package: 172 173 npm install ws 174 175 import ws from "ws" 176 const client = new RealtimeClient(url, { 177 ...options, 178 transport: ws 179 })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,n){this.socketAdapter.log(e,r,n)}connectionState(){return this.socketAdapter.connectionState()||Rd.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const n=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new ao(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
179this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let r,n=!1;if(e)r=e,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const i={access_token:r,version:YT};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(Sw.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,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(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,n)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=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(e){let r;if(e)r=e;else{const n=new Blob([RR],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(e){var r,n,s,i,o,a,l,c,u,d,f,h;this.worker=(r=e==null?void 0:e.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=e==null?void 0:e.accessToken)!==null&&n!==void 0?n:null;const w={};w.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:eR,w.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:jm.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:jm.HEARTBEAT_INTERVAL),w.transport=(l=e==null?void 0:e.transport)!==null&&l!==void 0?l:QT.getWebSocketConstructor(),w.params=e==null?void 0:e.params,w.logger=e==null?void 0:e.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),w.sessionStorage=(c=e==null?void 0:e.sessionStorage)!==null&&c!==void 0?c:TR(),w.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:p=>ER[p-1]||CR;let v,x;const g=(d=e==null?void 0:e.vsn)!==null&&d!==void 0?d:XT;switch(g){case ZT:v=(p,y)=>y(JSON.stringify(p)),x=(p,y)=>y(JSON.parse(p));break;case kw:v=this.serializer.encode.bind(this.serializer),x=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=g,w.encode=(f=e==null?void 0:e.encode)!==null&&f!==void 0?f:v,w.decode=(h=e==null?void 0:e.decode)!==null&&h!==void 0?h:x,w.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
179var Do=class extends Error{constructor(t,e){var r;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((r=e.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function NR(t,e,r){const n=new URL(e,t);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function jR(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function OR(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=NR(t.baseUrl,n,s),l=await jR(t.auth),c=await e(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),f=d&&u?JSON.parse(u):u;if(!c.ok){const h=d?f:void 0,w=h==null?void 0:h.error;throw new Do((w==null?void 0:w.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:h})}return{status:c.status,headers:c.headers,data:f}}}}function Na(t){return t.join("�")}var IR=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Na(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Na(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Na(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Na(t.namespace)}`}),!0}catch(e){if(e instanceof Do&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof Do&&r.status===409)return;throw r}}};function xs(t){return t.join("�")}var LR=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${xs(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${xs(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${xs(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${xs(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${xs(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${xs(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof Do&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof Do&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},DR=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=OR({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new IR(this.client,e),this.tableOps=new LR(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
179async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function $o(t){"@babel/helpers - typeof";return $o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$o(t)}function $R(t,e){if($o(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if($o(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function MR(t){var e=$R(t,"string");return $o(e)=="symbol"?e:e+""}function UR(t,e,r){return(e=MR(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Om(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function V(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Om(Object(r),!0).forEach(function(n){UR(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Om(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var yc=class extends Error{constructor(t,e="storage",r,n){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function vc(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Od=class extends yc{constructor(t,e,r,n="storage"){super(t,n,e,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return V({},super.toJSON())}},Tw=class extends yc{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function $l(t,e,r){const n=V({},t),s=e.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function FR(t){const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e}const BR=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),zR=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Id=t=>{if(Array.isArray(t))return t.map(r=>Id(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Id(n)}),e},HR=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Im=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},WR=async(t,e,r,n)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const s=t;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+"";e(new Od(Im(o),i,a,n))}).catch(()=>{const o=i+"";e(new Od(s.statusText||`HTTP ${i} error`,i,o,n))})}else e(new Tw(Im(t),t,n))},VR=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!n)return V(V({},s),r);if(zR(n)){var i;const o=(e==null?void 0:e.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=$l(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return e!=null&&e.duplex&&(s.duplex=e.duplex),V(V({},s),r)};async function Mi(t,e,r,n,s,i,o){return new Promise((a,l)=>{t(r,VR(e,n,s,i)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>WR(c,l,n,o))})}function Rw(t="storage"){return{get:async(e,r,n,s)=>Mi(e,"GET",r,n,s,void 0,t),post:async(e,r,n,s,i)=>Mi(e,"POST",r,s,i,n,t),put:async(e,r,n,s,i)=>Mi(e,"PUT",r,s,i,n,t),head:async(e,r,n,s)=>Mi(e,"HEAD",r,V(V({},n),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,r,n,s,i)=>Mi(e,"DELETE",r,s,i,n,t)}}const qR=Rw("storage"),{get:Mo,post:Bt,put:Ld,head:KR,remove:of}=qR,pt=Rw("vectors");var Ei=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=FR(e),this.fetch=BR(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=$l(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(vc(r))return{data:null,error:r};throw r}}};let Pw;Pw=Symbol.toStringTag;var GR=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Pw]="StreamDownloadBuilder",this.promise=null}
179then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(vc(e))return{data:null,error:e};throw e}}};let Nw;Nw=Symbol.toStringTag;var QR=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Nw]="BlobDownloadBuilder",this.promise=null}asStream(){return new GR(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(vc(e))return{data:null,error:e};throw e}}};const JR={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Lm={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var YR=class extends Ei{constructor(t,e={},r,n){super(t,e,n,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=V(V({},Lm),n);let a=V(V({},s.headers),t==="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[f,h]of Object.entries(n.headers))a=$l(a,f,h);const c=s._removeEmptyFolders(e),u=s._getFinalPath(c),d=await(t=="PUT"?Ld:Bt)(s.fetch,`${s.url}/object/${u}`,i,V({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}async uploadToSignedUrl(t,e,r,n){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const c=V(V({},Lm),n);let u=V(V({},s.headers),{"x-upsert":String(c.upsert)});const d=c.metadata;if(typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),d&&l.append("metadata",s.encodeMetadata(d)),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),d&&!l.has("metadata")&&l.append("metadata",s.encodeMetadata(d))):(l=r,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType,d&&(u["x-metadata"]=s.toBase64(s.encodeMetadata(d))),(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[f,h]of Object.entries(n.headers))u=$l(u,f,h);return{path:i,fullPath:(await Ld(s.fetch,a.toString(),l,V({headers:u},c!=null&&c.duplex?{duplex:c.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(t);const s=V({},r.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await Bt(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 yc("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var n=this;return n.handleOperation(async()=>await Bt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(t,e,r){var n=this;return n.handleOperation(async()=>({path:(await Bt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(t,e,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(t);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await Bt(n.fetch,`${n.url}/object/sign/${s}
179`,V({expiresIn:e},i?{transform:r.transform}:{}),{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(t,e,r){var n=this;return n.handleOperation(async()=>{const s=await Bt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:e,paths:t},{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(t,e,r){const n=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),o=this._getFinalPath(t),a=()=>Mo(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new QR(a,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>Id(await Mo(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await KR(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(vc(s)){var n;const i=s instanceof Od?s.status:s instanceof Tw?(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(t,e){const r=this._getFinalPath(t),n=new URLSearchParams;e!=null&&e.download&&n.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(n,e.transform),(e==null?void 0:e.cacheNonce)!=null&&n.set("cacheNonce",String(e.cacheNonce));const s=n.toString(),i=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}`)+(s?`?${s}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await of(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var n=this;return n.handleOperation(async()=>{const s=V(V(V({},JR),e),{},{prefix:t||""});return await Bt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const n=V({},t);return await Bt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const ZR="2.107.0",ea={"X-Client-Info":`storage-js/${ZR}`};var XR=class extends Ei{constructor(t,e={},r,n){const s=new URL(t);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({},ea),e);super(i,o,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await Mo(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Mo(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await Bt(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await Ld(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Bt(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await of(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}}
179,eP=class extends Ei{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},ea),e);super(n,s,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Bt(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),s=n?`${e.url}/bucket?${n}`:`${e.url}/bucket`;return await Mo(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await of(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!HR(t))throw new yc("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new DR({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.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}}}}})}},tP=class extends Ei{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},ea),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await pt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await pt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},rP=class extends Ei{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},ea),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},nP=class extends Ei{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=V(V({},ea),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await pt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},sP=class extends nP{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new iP(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},iP=class extends tP{constructor(t,e,r,n){super(t,e,n),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new oP(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},oP=class extends rP{constructor(t,e,r,n,s){super(t,e,s),this.vectorBucketName=r,this.indexName=n}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,V(V({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},aP=class extends XR{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new YR(this.url,this.headers,t,this.fetch)}get vectors(){return new sP(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new eP(this.url+"/iceberg",this.headers,this.fetch)}};function wc(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}const jw="2.107.0",Kr=30*1e3,Ki=3,lu=Ki*Kr,lP="http://localhost:9999",cP="supabase.auth.token",uP={"X-Client-Info":`gotrue-js/${jw}`},Dd="X-Supabase-Api-Version",Ow={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},dP=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,hP=10*60*1e3;
179class Uo extends Error{constructor(e,r,n){super(e),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 L(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class fP extends Uo{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function pP(t){return L(t)&&t.name==="AuthApiError"}class qt extends Uo{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class mr extends Uo{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}}class Me extends mr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ja(t){return L(t)&&t.name==="AuthSessionMissingError"}class bs extends mr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Oa extends mr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Ia extends mr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function mP(t){return L(t)&&t.name==="AuthImplicitGrantRedirectError"}class Dm extends mr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class gP extends mr{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 $d extends mr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function cu(t){return L(t)&&t.name==="AuthRetryableFetchError"}class $m extends mr{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function yP(t){return L(t)&&t.name==="AuthRefreshDiscardedError"}class Mm extends mr{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Ml extends mr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ul="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Um=` 180\r=`.split(""),vP=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Um.length;e+=1)t[Um[e].charCodeAt(0)]=-2;for(let e=0;e<Ul.length;e+=1)t[Ul[e].charCodeAt(0)]=e;return t})();function Fm(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Ul[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Ul[n]),e.queuedBits-=6}}function Iw(t,e,r){const n=vP[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Bm(t){const e=[],r=o=>{e.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{bP(o,n,r)};for(let o=0;o<t.length;o+=1)Iw(t.charCodeAt(o),s,i);return e.join("")}function wP(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function xP(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}wP(n,e)}}function bP(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function Qs(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;
180s+=1)Iw(t.charCodeAt(s),r,n);return new Uint8Array(e)}function _P(t){const e=[];return xP(t,r=>e.push(r)),new Uint8Array(e)}function Wn(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>Fm(s,r,n)),Fm(null,r,n),e.join("")}function kP(t){return Math.round(Date.now()/1e3)+t}function SP(){return Symbol("auth-callback")}const Qe=()=>typeof window<"u"&&typeof document<"u",$n={tested:!1,writable:!1},Lw=()=>{if(!Qe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if($n.tested)return $n.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),$n.tested=!0,$n.writable=!0}catch{$n.tested=!0,$n.writable=!1}return $n.writable};function EP(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{e[s]=n}),e}const Dw=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),CP=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",As=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},yr=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Ie=async(t,e)=>{await t.removeItem(e)};class xc{constructor(){this.promise=new xc.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}xc.promiseConstructor=Promise;function La(t){const e=t.split(".");if(e.length!==3)throw new Ml("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!dP.test(e[n]))throw new Ml("JWT not in base64url format");return{header:JSON.parse(Bm(e[0])),payload:JSON.parse(Bm(e[1])),signature:Qs(e[2]),raw:{header:e[0],payload:e[1]}}}async function AP(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function TP(t,e){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){n(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function RP(t){return("0"+t.toString(16)).substr(-2)}function PP(){const e=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(e),Array.from(e,RP).join("")}async function NP(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function jP(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await NP(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function _s(t,e,r=!1){const n=PP();let s=n;r&&(s+="/recovery"),await As(t,`${e}-code-verifier`,s);const i=await jP(n);return[i,n===i?"plain":"s256"]}const OP=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function IP(t){const e=t.headers.get(Dd);if(!e||!e.match(OP))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function LP(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function DP(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const $P=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function vr(t){if(!$P.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Mt(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function uu(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,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:(e,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 MP(t,e){return new Proxy(t,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
180if(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!e.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."),e.value=!0),Reflect.get(r,n,s)}})}function zm(t){return JSON.parse(JSON.stringify(t))}const Fn=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},UP=[502,503,504,520,521,522,523,524,530];async function Hm(t){var e;if(!CP(t))throw new $d(Fn(t),0);if(UP.includes(t.status))throw new $d(Fn(t),t.status);let r;try{r=await t.json()}catch(i){throw new qt(Fn(i),i)}let n;const s=IP(t);if(s&&s.getTime()>=Ow["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 Mm(Fn(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Me}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 Mm(Fn(r),t.status,r.weak_password.reasons);throw new fP(Fn(r),t.status||500,n)}const FP=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function B(t,e,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Dd]||(i[Dd]=Ow["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 BP(t,e,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 BP(t,e,r,n,s,i){const o=FP(e,n,s,i);let a;try{a=await t(r,Object.assign({},o))}catch(l){throw console.error(l),new $d(Fn(l),0)}if(a.ok||await Hm(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Hm(l)}}function kt(t){var e;let r=null;WP(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=kP(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:typeof(t==null?void 0:t.id)=="string"?t:null;return{data:{session:r,user:n},error:null}}function Wm(t){const e=kt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function en(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function zP(t){return{data:t,error:null}}function HP(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=t,o=wc(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,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 Vm(t){return t}function WP(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const du=["global","local","others"];class VP{constructor({url:e="",headers:r={},fetch:n,experimental:s}){this.url=e,this.headers=r,this.fetch=Dw(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(e,r=du[0]){if(du.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${du.join(", ")}`);try{return await B(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(L(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await B(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:en})}catch(n){if(L(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=wc(e,["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 B(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:HP,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(L(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await B(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:en})}catch(r){if(L(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await B(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Vm});if(u.error)throw u.error;const d=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
1800&&(h.forEach(w=>{const v=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);c[`${x}Page`]=v}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(L(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){vr(e);try{return await B(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:en})}catch(r){if(L(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){vr(e);try{return await B(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:en})}catch(n){if(L(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){vr(e);try{return await B(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:en})}catch(n){if(L(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){vr(e.userId);try{const{data:r,error:n}=await B(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _deleteFactor(e){vr(e.userId),vr(e.id);try{return{data:await B(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await B(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Vm});if(u.error)throw u.error;const d=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(w=>{const v=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(w.split(";")[1].split("=")[1]);c[`${x}Page`]=v}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(L(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(e){try{return await B(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await B(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await B(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(L(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await B(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await B(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e!=null&&e.type&&(r.type=e.type),await B(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(L(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await B(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{return await B(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{return await B(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(L(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(e){try{return await B(this.fetch,"DELET
180E",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){Mt(this.experimental),vr(e.userId);try{return await B(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(L(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){Mt(this.experimental),vr(e.userId),vr(e.passkeyId);try{return await B(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(L(r))return{data:null,error:r};throw r}}}function qm(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}globalThis&&Lw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class qP extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function KP(){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 $w(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function GP(t){return parseInt(t,16)}function QP(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function JP(t){var e;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:d,version:f}=t;{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(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 181`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const h=$w(t.address),w=u?`${u}://${n}`:n,v=t.statement?`${t.statement} 182`:"",x=`${w} wants you to sign in with your Ethereum account: 183${h} 184 185${v}`;let g=`URI: ${d} 186Version: ${f} 187Chain ID: ${r}${o?` 188Nonce: ${o}`:""} 189Issued At: ${i.toISOString()}`;if(s&&(g+=` 190Expiration Time: ${s.toISOString()}`),a&&(g+=` 191Not Before: ${a.toISOString()}`),l&&(g+=` 192Request ID: ${l}`),c){let p=` 193Resources:`;for(const y of c){if(!y||typeof y!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${y}`);p+=` 194- ${y}`}g+=p}return`${x} 195${g}`}class Pe extends Error{constructor({message:e,code:r,cause:n,name:s}){var i;super(e,{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 Fl extends Pe{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function YP({error:t,options:e}){var r,n,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Pe({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Pe({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Pe({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Pe({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Pe({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Pe({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Pe({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Pe({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(Mw(o)){if(i.rp.id!==o)return new Pe({message:`The RP ID "${i.rp.id}
195" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Pe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Pe({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Pe({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Pe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function ZP({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Pe({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Pe({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(Mw(n)){if(r.rpId!==n)return new Pe({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Pe({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Pe({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Pe({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class XP{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Md=new XP;function Km(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,s=wc(t,["challenge","user","excludeCredentials"]),i=Qs(e).buffer,o=Object.assign(Object.assign({},r),{id:Qs(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:Qs(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function Gm(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=wc(t,["challenge","allowCredentials"]),s=Qs(e).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:Qs(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function Qm(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Wn(new Uint8Array(t.response.attestationObject)),clientDataJSON:Wn(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Jm(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Wn(new Uint8Array(s.authenticatorData)),clientDataJSON:Wn(new Uint8Array(s.clientDataJSON)),signature:Wn(new Uint8Array(s.signature)),userHandle:s.userHandle?Wn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Mw(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Bl(){var t,e;return!!(Qe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function Uw(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Fl("Browser returned unexpected credential type",e)}:{data:null,error:new Fl("Empty credential response",e)}}catch(e){return{data:null,error:YP({error:e,options:t})}}}async function Fw(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Fl("Browser returned unexpected credential type",e)}:{data:null,error:new Fl("Empty credential response",e)}}catch(e){return{data:null,error:ZP({error:e,options:t})}}}const eN={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},tN={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function zl(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of t)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(e(o)){const a=n[i];e(a)?n[i]=zl(a,o):n[i]=zl(o)}else n[i]=o}return n}function rN(t,e){return zl(eN,t,e||{})}function nN(t,e){return zl(tN,t,e||{})}class sN{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!a)return{data:null,error:l};const c=s??Md.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const d=n;if(d)u.name=`${u.id}:${d}`;else{const h=(await this.client.getUser()).data.user,w=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";u.name=`${u.id}:${w}`}}u.displayName||(u.displayName=u.name)}
195switch(a.webauthn.type){case"create":{const u=rN(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await Uw({publicKey:u,signal:c});return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const u=nN(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await Fw(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return L(a)?{data:null,error:a}:{data:null,error:new qt("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,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 Uo("rpId is required for WebAuthn authentication")};try{if(!Bl())return{data:null,error:new qt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return L(o)?{data:null,error:o}:{data:null,error:new qt("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,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 Uo("rpId is required for WebAuthn registration")};try{if(!Bl())return{data:null,error:new qt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===e&&f.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId: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 L(o)?{data:null,error:o}:{data:null,error:new qt("Unexpected error in register",o)}}}}KP();const iN={url:lP,storageKey:cP,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:uP,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},ks={};class Fo{get jwks(){var e,r;return(r=(e=ks[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){ks[this.storageKey]=Object.assign(Object.assign({},ks[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=ks[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){ks[this.storageKey]=Object.assign(Object.assign({},ks[this.storageKey]),{cachedAt:e})}constructor(e){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._sessionRemovalEpoch=0,this.initializePromise=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({},iN),e);if(this.storageKey=i.storageKey,this.instanceID=(r=Fo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Fo.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Qe()){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 VP({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=Dw(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),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 sN(this)}
195,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:Lw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=qm(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=qm(this.memoryStorage)),Qe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${jw}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var e;try{let r={},n="none";if(Qe()&&(r=EP(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Qe()&&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),mP(i)){const l=(e=i.details)===null||e===void 0?void 0:e.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 L(r)?this._returnResult({error:r}):this._returnResult({error:new qt("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const i=await B(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:kt}),{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(L(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var r,n,s;try{let i;if("email"in e){const{email:u,password:d,options:f}=e;let h=null,w=null;this.flowType==="pkce"&&([h,w]=await _s(this.storage,this.storageKey)),i=await B(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,password:d,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:h,code_challenge_method:w},xform:kt})}else if("phone"in e){const{phone:u,password:d,options:f}=e;i=await B(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,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:kt})}else throw new Oa("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Ie(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),L(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let r;if("email"in e){const{email:i,password:o,options:a}=e;r=await B(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:Wm})}else if("phone"in e){const{phone:i,password:o,options:a}=e;r=await B(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:Wm})}else throw new Oa("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 bs;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(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e)):this._exchangeCodeForSession(e)}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,s,i,o,a,l,c,u,d,f;let h,w;if("message"in e)h=e.message,w=e.signature;else{const{chain:v,wallet:x,statement:g,options:p}=e;let y;if(Qe())if(typeof x=="object")y=x;else{const j=window;if("ethereum"in j&&typeof j.ethereum=="object"&&"request"in j.ethereum&&typeof j.ethereum.request=="function")y=j.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(p!=null&&p.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");y=x}const _=new URL((r=p==null?void 0:p.url)!==null&&r!==void 0?r:window.location.href),k=await y.request({method:"eth_requestAccounts"}).then(j=>j).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=$w(k[0]);
195let E=(n=p==null?void 0:p.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!E){const j=await y.request({method:"eth_chainId"});E=GP(j)}const R={domain:_.host,address:S,statement:g,uri:_.href,version:"1",chainId:E,nonce:(s=p==null?void 0:p.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=p==null?void 0:p.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=p==null?void 0:p.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=p==null?void 0:p.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=p==null?void 0:p.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=p==null?void 0:p.signInWithEthereum)===null||u===void 0?void 0:u.resources};h=JP(R),w=await y.request({method:"personal_sign",params:[QP(h),S]})}try{const{data:v,error:x}=await B(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:w},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:kt});if(x)throw x;if(!v||!v.session||!v.user){const g=new bs;return this._returnResult({data:{user:null,session:null},error:g})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:x})}catch(v){if(L(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithSolana(e){var r,n,s,i,o,a,l,c,u,d,f,h;let w,v;if("message"in e)w=e.message,v=e.signature;else{const{chain:x,wallet:g,statement:p,options:y}=e;let _;if(Qe())if(typeof g=="object")_=g;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))_=S.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 g!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=g}const k=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const S=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),p?{statement:p}:null));let E;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")E=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)E=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)w=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),v=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${k.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...p?["",p,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(n=y==null?void 0:y.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=y==null?void 0:y.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...!((a=y==null?void 0:y.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...!((l=y==null?void 0:y.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...!((c=y==null?void 0:y.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...!((d=(u=y==null?void 0:y.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...y.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 196`);const S=await _.signMessage(new TextEncoder().encode(w),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=S}}try{const{data:x,error:g}=await B(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:Wn(v)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:kt});if(g)throw g;if(!x||!x.session||!x.user){const p=new bs;return this._returnResult({data:{user:null,session:null},error:p})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:g})}
196catch(x){if(L(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(e){const r=await yr(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new gP;const{data:i,error:o}=await B(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:kt});if(await Ie(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new bs;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),L(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=e,a=await B(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:kt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new bs;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await _s(this.storage,this.storageKey));const{error:d}=await B(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await B(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new Oa("You must provide either an email or phone number.")}catch(a){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),L(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var r,n;try{let s,i;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,i=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await B(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:kt});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(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(L(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await _s(this.storage,this.storageKey));const c=await B(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:zP});return!((i=c.data)===null||i===void 0)&&i.url&&Qe()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),L(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 e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Me;const{error:s}=await B(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:i}=e,{error:o}=await B(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in e){const{phone:n,type:s,options:i}=e,{data:o,error:a}=await B(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new Oa("You must provide either an email or phone number and a type")}catch(r){if(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);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}`,e,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(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(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 e=null;const r=await yr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not val
196id"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<lu:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await yr(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=uu()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=MP(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);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(e){try{return e?await B(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:en}):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 Me}:await B(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:en})})}catch(r){if(L(r))return ja(r)&&(await this._removeSession(),await Ie(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r)):await this._updateUser(e,r)}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new Me;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await _s(this.storage,this.storageKey));const{data:c,error:u}=await B(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:en});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),L(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Me;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=La(e.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(e.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(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.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(L(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:a}=r;if(a)throw a;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new Me;const{data:s,error:i}=await this._callRefreshToken(e.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(L(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var n;try{if(!Qe())throw new Ia("No browser detected.");
196if(e.error||e.error_description||e.error_code)throw new Ia(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Dm("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ia("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Dm("No code detected.");const{data:y,error:_}=await this._exchangeCodeForSession(e.code);if(_)throw _;const k=new URL(window.location.href);return k.searchParams.delete("code"),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:y.session,redirectType:(n=y.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:u}=e;if(!o||!l||!a||!u)throw new Ia("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let h=d+f;c&&(h=parseInt(c));const w=h-d;w*1e3<=Kr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${f}s`);const v=h-f;d-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,h,d):d-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,h,d);const{data:x,error:g}=await this._getUser(o);if(g)throw g;const p={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:h,refresh_token:a,token_type:u,user:x.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:p,redirectType:e.type},error:null})}catch(s){if(L(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){const r=await yr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!ja(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(pP(a)&&(a.status===404||a.status===401||a.status===403)||ja(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await Ie(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=SP(),n={id:r,callback:e,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(e){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(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),ja(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await _s(this.storage,this.storageKey,!0));try{return await B(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),L(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:f}=i;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await B(this.fetch,"GET",h,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return Qe()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(L(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){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:u}=e,d=await B(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:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:kt}),{data:f,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new bs}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Ie(this.storage,`${this.storageKey}-code-verifier`),L(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
196return await B(this.fetch,"DELETE",`${this.url}/user/identities/${e.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(L(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const n=Date.now();return await TP(async s=>(s>0&&await AP(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await B(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:kt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&cu(i)&&Date.now()+o-n<Kr})}catch(n){if(this._debug(r,"error",n),L(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),Qe()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await yr(this.storage,this.storageKey);if(s&&this.userStorage){let o=await yr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await As(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:uu()}else if(s&&!s.user&&!s.user){const o=await yr(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ie(this.storage,this.storageKey+"-user"),await As(this.storage,this.storageKey,s)):s.user=uu()}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()<lu;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${lu}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(yP(o)?this._debug(n,"refresh discarded by commit guard",o):(console.error(o),cu(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession())))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(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),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Me;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new xc;const i=await yr(this.storage,this.storageKey),{data:o,error:a}=await this._refreshAccessToken(e);if(a)throw a;if(!o.session)throw new Me;const l=await yr(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 f={data:null,error:new $m};return this.refreshingDeferred.resolve(f),f}const u=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==u){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await Ie(this.storage,this.storageKey),this.userStorage&&await Ie(this.userStorage,this.storageKey+"-user");const f={data:null,error:new $m};return this.refreshingDeferred.resolve(f),f}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const d={data:o.session,error:null};return this.refreshingDeferred.resolve(d),d}catch(i){if(this._debug(s,"error",i),L(i)){const o={data:null,error:i};return cu(i)||await this._removeSession(),(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(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,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(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Ie(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await As(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=zm(s);await As(this.storage,this.storageKey,i)}else{const s=zm(r);await As(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ie(this.storage,this.storageKey),await Ie(this.storage,this.storageKey+"-code-verifier"),await Ie(this.storage,this.storageKey+"-user"),this.userStorage&&await Ie(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Qe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
196catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Kr);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);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 e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);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 e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.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 e=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-e)/Kr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Kr}ms, refresh threshold is ${Ki} ticks`),s<=Ki&&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(e){if(e instanceof qP)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=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-e)/Kr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Kr}ms, refresh threshold is ${Ki} ticks`),s<=Ki&&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()"),!Qe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});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(e,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await _s(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}
196):await B(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){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:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:c}=await B(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}):(e.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(L(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){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:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Qm(e.webauthn.credential_response):Jm(e.webauthn.credential_response)})}:{code:e.code}),{data:l,error:c}=await B(this.fetch,"POST",`${this.url}/factors/${e.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(L(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(e){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 B(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,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:Km(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:Gm(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(L(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,s,i;if(e)try{const{payload:h}=La(e);let w=null;h.aal&&(w=h.aal);let v=w;const{data:{user:x},error:g}=await this.getUser(e);if(g)return this._returnResult({data:null,error:g});((n=(r=x==null?void 0:x.factors)===null||r===void 0?void 0:r.filter(_=>_.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(v="aal2");const y=h.amr||[];return{data:{currentLevel:w,nextLevel:v,currentAuthenticationMethods:y},error:null}}catch(h){if(L(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
196=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}=La(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const f=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await B(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Me})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,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 Me});const o=await B(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(L(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,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 Me});const o=await B(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(L(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await B(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 Me})})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await B(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Me})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(a=>a.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===e),n&&this.jwks_cached_at+hP>s)return n;const{data:i,error:o}=await B(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===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:h,error:w}
196=await this.getSession();if(w||!h.session)return this._returnResult({data:null,error:w});n=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=La(n);if(!(r!=null&&r.allowExpired))try{LP(i.exp)}catch(h){throw new Ml(h instanceof Error?h.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:h}=await this.getUser(n);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const u=DP(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,_P(`${a}.${l}`)))throw new Ml("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(L(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(e){var r,n,s;Mt(this.experimental);try{if(!Bl())return this._returnResult({data:null,error:new qt("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=Gm(i.options),l=(s=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:Md.createNewAbortSignal(),{data:c,error:u}=await Fw({publicKey:a,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new qt("WebAuthn ceremony failed",null)});const d=Jm(c);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:d})}catch(i){if(L(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(e){var r,n;Mt(this.experimental);try{if(!Bl())return this._returnResult({data:null,error:new qt("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=Km(s.options),a=(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:Md.createNewAbortSignal(),{data:l,error:c}=await Uw({publicKey:o,signal:a});if(c||!l)return this._returnResult({data:null,error:c??new qt("WebAuthn ceremony failed",null)});const u=Qm(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if(L(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){Mt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Me});const{data:s,error:i}=await B(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(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){Mt(this.experimental);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 Me});const{data:i,error:o}=await B(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;Mt(this.experimental);try{const{data:n,error:s}=await B(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e==null?void 0:e.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(L(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(e){Mt(this.experimental);try{const{data:r,error:n}=await B(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:kt});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(L(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){Mt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Me});const{data:s,error:i}=await B(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(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){Mt(this.experimental);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 Me});const{data:i,error:o}=await B(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(L(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){Mt(this.experimental);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 Me});const{error:i}
196=await B(this.fetch,"DELETE",`${this.url}/passkeys/${e.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(L(r))return this._returnResult({data:null,error:r});throw r}}}Fo.nextInstanceID={};const oN=Fo,aN="2.107.0";let Gi="",Hl;if(typeof Deno<"u"){var hu;Gi="deno",Hl=(hu=Deno.version)===null||hu===void 0?void 0:hu.deno}else if(typeof document<"u")Gi="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Gi="react-native";else{var fu;Gi="node",Hl=typeof process<"u"?(fu=process.version)===null||fu===void 0?void 0:fu.replace(/^v/,""):void 0}const Bw=[`runtime=${Gi}`];Hl&&Bw.push(`runtime-version=${Hl}`);const lN={"X-Client-Info":`supabase-js/${aN}; ${Bw.join("; ")}`},cN={headers:lN},uN={schema:"public"},dN={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},hN={},fN={enabled:!1,respectSamplingDecision:!0};function pN(t,e,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(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,[])).next())})}let pu=null;const mN="@opentelemetry/api";function gN(){return pu===null&&(pu=import(mN).catch(()=>null)),pu}function yN(){return pN(this,void 0,void 0,function*(){try{const t=yield gN();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function vN(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,n,s,i]=e;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 wN(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const n of e)try{if(typeof n=="string"){if(xN(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 xN(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function bN(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function Bo(t){"@babel/helpers - typeof";return Bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bo(t)}function _N(t,e){if(Bo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Bo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kN(t){var e=_N(t,"string");return Bo(e)=="symbol"?e:e+""}function SN(t,e,r){return(e=kN(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ym(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Ee(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ym(Object(r),!0).forEach(function(n){SN(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ym(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const EN=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),CN=()=>Headers,AN=(t,e,r,n,s)=>{const i=EN(n),o=CN(),a=(s==null?void 0:s.enabled)===!0,l=(s==null?void 0:s.respectSamplingDecision)!==!1,c=a?bN(e):null;return async(u,d)=>{var f;const h=(f=await r())!==null&&f!==void 0?f:t;let w=new o(d==null?void 0:d.headers);if(w.has("apikey")||w.set("apikey",t),w.has("Authorization")||w.set("Authorization",`Bearer ${h}`),c){const v=await TN(u,c,l);v&&(v.traceparent&&!w.has("traceparent")&&w.set("traceparent",v.traceparent),v.tracestate&&!w.has("tracestate")&&w.set("tracestate",v.tracestate),v.baggage&&!w.has("baggage")&&w.set("baggage",v.baggage))}return i(u,Ee(Ee({},d),{},{headers:w}))}};async function TN(t,e,r){if(!wN(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const n=await yN();if(!n||!n.traceparent)return null;if(r){const s=vN(n.traceparent);if(s&&!s.isSampled)return null}return n}function Zm(t){return typeof t=="boolean"?{enabled:t}:t}function RN(t){return t.endsWith("/")?t:t+"/"}function PN(t,e){var r,n,s,i,o,a;const{db:l,auth:c,realtime:u,global:d}=t,{db:f,auth:h,realtime:w,global:v}
196=e,x=Zm(t.tracePropagation),g=Zm(e.tracePropagation),p={db:Ee(Ee({},f),l),auth:Ee(Ee({},h),c),realtime:Ee(Ee({},w),u),storage:{},global:Ee(Ee(Ee({},v),d),{},{headers:Ee(Ee({},(r=v==null?void 0:v.headers)!==null&&r!==void 0?r:{}),(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(s=(i=x==null?void 0:x.enabled)!==null&&i!==void 0?i:g==null?void 0:g.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=x==null?void 0:x.respectSamplingDecision)!==null&&a!==void 0?a:g==null?void 0:g.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return t.accessToken?p.accessToken=t.accessToken:delete p.accessToken,p}function NN(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(RN(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var jN=class extends oN{constructor(t){super(t)}},ON=class{constructor(t,e,r){var n,s;this.supabaseUrl=t,this.supabaseKey=e;const i=NN(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:uN,realtime:hN,auth:Ee(Ee({},dN),{},{storageKey:o}),global:cN,tracePropagation:fN},l=PN(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:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=AN(e,t,this._getAccessToken.bind(this),l.global.fetch,l.tracePropagation),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(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new GT(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new aP(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new UT(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:f},h,w){const v={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new jN({url:this.authUrl.href,headers:Ee(Ee({},v),h),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,fetch:w,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(x=>x.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new PR(this.realtimeUrl.href,Ee(Ee({},t),{},{params:Ee(Ee({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const IN=(t,e,r)=>new ON(t,e,r);function LN(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}LN()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
196ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function DN(){var x,g;if(typeof window>"u")return;const t=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(p=>t===p||t.endsWith("."+p)),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?((x=t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:x[1])??((g=t.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:g[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",d=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(p,y,_)=>new Promise(k=>{const S=f();let E=!1,R;const j=$=>{E||(E=!0,clearTimeout(R),window.removeEventListener("message",I),k($))},I=$=>{if(c.indexOf($.origin)<0)return;const J=$.data;J&&J.type===u&&J.requestId===S&&j(J)};window.addEventListener("message",I);const q={type:p,requestId:S,projectId:s,key:y};_!==void 0&&(q.value=_);for(const $ of c)window.parent.postMessage(q,$);R=setTimeout(()=>j(null),d)});let w=!0;const v=250;return{getItem:async p=>{let y=await h("lovable-preview-auth:get",p);return!y&&w&&(await new Promise(_=>setTimeout(_,v)),y=await h("lovable-preview-auth:get",p)),w=!1,y&&y.ok&&typeof y.value=="string"?y.value===""?(localStorage.removeItem(p),null):y.value:localStorage.getItem(p)},setItem:(p,y)=>(localStorage.setItem(p,y),h("lovable-preview-auth:set",p,y).then(()=>{})),removeItem:p=>(localStorage.removeItem(p),h("lovable-preview-auth:remove",p).then(()=>{}))}}const $N="https://mgdxxrxyrpwbqnmeqqif.supabase.co",MN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1nZHh4cnh5cnB3YnFubWVxcWlmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjEzNDEwNTQsImV4cCI6MjA3NjkxNzA1NH0.z0xttFE8SfkKtndN6jw4CSJnN23ourpMZ2eZbRoeQDs",UN=IN($N,MN,{auth:{storage:DN(),persistSession:!0,autoRefreshToken:!0}}),Ui=LT({name:Aa().trim().min(1,{message:"Name is required"}).max(100,{message:"Name must be less than 100 characters"}),email:Aa().trim().email({message:"Please enter a valid email address"}).max(255,{message:"Email must be less than 255 characters"}),phone:Aa().trim().max(20,{message:"Phone must be less than 20 characters"}).optional(),message:Aa().trim().min(1,{message:"Message is required"}).max(2e3,{message:"Message must be less than 2000 characters"})}),FN=()=>{const{toast:t}=kv(),[e,r]=b.useState({name:"",email:"",phone:"",message:""}),[n,s]=b.useState({name:"",email:"",phone:"",message:""}),i=()=>e.name.trim()!==""&&e.email.trim()!==""&&e.message.trim()!==""&&!n.name&&!n.email&&!n.message,o=(c,u)=>{try{switch(c){case"name":Ui.shape.name.parse(u);break;case"email":Ui.shape.email.parse(u);break;case"phone":Ui.shape.phone.parse(u);break;case"message":Ui.shape.message.parse(u);break}s(d=>({...d,[c]:""}))}catch(d){d instanceof fr&&s(f=>({...f,[c]:d.errors[0].message}))}},a=c=>{o(c,e[c])},l=async c=>{c.preventDefault();const u=Ui.safeParse(e);if(!u.success){const d={name:"",email:"",phone:"",message:""};u.error.errors.forEach(f=>{const h=f.path[0];d[h]=f.message}),s(d);return}try{console.log("Sending contact form submission");const{data:d,error:f}=await UN.functions.invoke("send-contact-email",{body:e});if(f)throw f;console.log("Email sent successfully"),t({title:"Message Sent!",description:"We'll get back to you as soon as possible."}),r({name:"",email:"",phone:"",message:""}),s({name:"",email:"",phone:"",message:""})}catch(d){console.error("Error sending message:",d),t({title:"Error",description:"Failed to send message. Please try again.",variant:"destructive"})}};return m.jsx("div",{className:"min-h-screen pt-24 pb-4",children:m.jsxs("div",{className:"container mx-auto px-4",children:[m.jsxs("div",{className:"max-w-4xl mx-auto mb-12 text-center",children:[m.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6 text-primary",children:"Contact Us"}),m.jsx("p",{className:"text-xl text-muted-foreground",children:"Have questions about our camp? We're here to help. Reach out to us using the form below or contact us directly."})]}),m.jsxs(xn,{className:"max-w-2xl mx-auto border-border",children:[m.jsx(gc,{children:m.jsx(Zh,{className:"text-2xl text-center",children:"Send us a Message"})}),m.jsx(bn,{children:m.jsxs("form",{onSubmit:l,className:"space-y-6",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(Wi,{htmlFor:"name",children:"Name *"}),m.jsx(Ya,{id:"name",value:e.name,onChange:c=>r({...e,name:c.target.value}),onBlur:()=>a("name"),placeholder:"Your name",maxLength:100,required:!0,className:n.name?"border-destructive":""}),n.name&&m.jsx("p",{className:"text-sm text-destructive",children:n.name})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(Wi,{htmlFor:"email",children:"Email *"}),m.jsx(Ya,{id:"email",type:"email",value:e.email,onChange:c=>r({...e,email:c.target.value}),onBlur:()=>a("email"),placeholder:"[email protected]",maxLength:255,required:!0,className:n.email?"border-destructive":""}),n.email&&m.jsx("p",{className:"text-sm text-destructive",children:n.email})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(Wi,{htmlFor:"phone",children:"Phone"}),m.jsx(Ya,{id:"phone",type:"tel",value:e.phone,onChange:c=>r({...e,phone:c.target.value}),onBlur:()=>a("phone"),placeholder:"(555) 123-4567",maxLength:20,className:n.phone?"border-destructive":""}),n.phone&&m.jsx("p",{className:"text-sm text-destructive",children:n.phone})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(Wi,{htmlFor:"message",children:"Message *"}),m.jsx(pw,{id:"message",value:e.message,onChange:c=>r({...e,message:c.target.value}),onBlur:()=>a("message"),placeholder:"Enter your questions or comments and we will c
196ontact you as soon as possible.",rows:6,maxLength:2e3,required:!0,className:n.message?"border-destructive":""}),n.message&&m.jsx("p",{className:"text-sm text-destructive",children:n.message})]}),m.jsx(is,{type:"submit",variant:"hero",className:"w-full",size:"lg",disabled:!i(),children:"Send Message"})]})})]})]})})},BN=()=>{const t=ds();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),m.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-100",children:m.jsxs("div",{className:"text-center",children:[m.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),m.jsx("p",{className:"mb-4 text-xl text-gray-600",children:"Oops! Page not found"}),m.jsx("a",{href:"/",className:"text-blue-500 underline hover:text-blue-700",children:"Return to Home"})]})})},zN=new BE,HN=()=>m.jsx(HE,{client:zN,children:m.jsxs(yE,{children:[m.jsx(fk,{}),m.jsx(Vk,{}),m.jsxs(FC,{children:[m.jsx(GC,{}),m.jsx(KC,{}),m.jsxs("div",{className:"flex flex-col min-h-screen",children:[m.jsx(VC,{}),m.jsx("main",{id:"main-content",className:"flex-1",children:m.jsxs(OC,{children:[m.jsx(qr,{path:"/",element:m.jsx(wA,{})}),m.jsx(qr,{path:"/camp",element:m.jsx(kA,{})}),m.jsx(qr,{path:"/staff",element:m.jsx(sT,{})}),m.jsx(qr,{path:"/gallery",element:m.jsx(iT,{})}),m.jsx(qr,{path:"/register",element:m.jsx(oT,{})}),m.jsx(qr,{path:"/contact",element:m.jsx(FN,{})}),m.jsx(qr,{path:"*",element:m.jsx(BN,{})})]})}),m.jsx(qC,{})]})]})]})});_v(document.getElementById("root")).render(m.jsx(HN,{}));
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.