vendor: 2,025 bytes, lines 1-9
1var Ff=e=>{throw TypeError(e)};var Mu=(e,t,r)=>t.has(e)||Ff("Cannot "+r);var P=(e,t,r)=>(Mu(e,t,"read from private field"),r?r.call(e):t.get(e)),ie=(e,t,r)=>t.has(e)?Ff("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Z=(e,t,r,n)=>(Mu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),qe=(e,t,r)=>(Mu(e,t,"access private method"),r);var la=(e,t,r,n)=>({set _(s){Z(e,t,s,r)},get _(){return P(e,t,n)}});function zx(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function _g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Eg={exports:{}},Xl={},kg={exports:{}},ne={};/** 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 Ho=Symbol.for("react.element"),Hx=Symbol.for("react.portal"),Wx=Symbol.for("react.fragment"),Vx=Symbol.for("react.strict_mode"),K
vendor: 9,152 bytes, lines 9-25
9x=Symbol.for("react.profiler"),qx=Symbol.for("react.provider"),Gx=Symbol.for("react.context"),Jx=Symbol.for("react.forward_ref"),Qx=Symbol.for("react.suspense"),Yx=Symbol.for("react.memo"),Xx=Symbol.for("react.lazy"),Uf=Symbol.iterator;function Zx(e){return e===null||typeof e!="object"?null:(e=Uf&&e[Uf]||e["@@iterator"],typeof e=="function"?e:null)}var Cg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tg=Object.assign,Rg={};function di(e,t,r){this.props=e,this.context=t,this.refs=Rg,this.updater=r||Cg}di.prototype.isReactComponent={};di.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};di.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pg(){}Pg.prototype=di.prototype;function ch(e,t,r){this.props=e,this.context=t,this.refs=Rg,this.updater=r||Cg}var dh=ch.prototype=new Pg;dh.constructor=ch;Tg(dh,di.prototype);dh.isPureReactComponent=!0;var Bf=Array.isArray,Ag=Object.prototype.hasOwnProperty,hh={current:null},Ng={key:!0,ref:!0,__self:!0,__source:!0};function jg(e,t,r){var n,s={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Ag.call(t,n)&&!Ng.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:Ho,type:e,key:i,ref:o,props:s,_owner:hh.current}}function eb(e,t){return{$$typeof:Ho,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function fh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ho}function tb(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var zf=/\/+/g;function Fu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tb(""+e.key):t.toString(36)}function Ba(e,t,r,n,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Ho:case Hx:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+Fu(o,0):n,Bf(s)?(r="",e!=null&&(r=e.replace(zf,"$&/")+"/"),Ba(s,t,r,"",function(u){return u})):s!=null&&(fh(s)&&(s=eb(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(zf,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",Bf(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+Fu(i,a);o+=Ba(i,t,r,l,s)}else if(l=Zx(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+Fu(i,a++),o+=Ba(i,t,r,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ua(e,t,r){if(e==null)return e;var n=[],s=0;return Ba(e,n,"","",function(i){return t.call(r,i,s++)}),n}function rb(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ot={current:null},za={transition:null},nb={ReactCurrentDispatcher:ot,ReactCurrentBatchConfig:za,ReactCurrentOwner:hh};function Og(){throw Error("act(...) is not supported in production builds of React.")}ne.Children={map:ua,forEach:function(e,t,r){ua(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ua(e,function(){t++}),t},toArray:function(e){return ua(e,function(t){return t})||[]},only:function(e){if(!fh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ne.Component=di;ne.Fragment=Wx;ne.Profiler=Kx;ne.PureComponent=ch;ne.StrictMode=Vx;ne.Suspense=Qx;ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nb;ne.act=Og;ne.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Tg({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=hh.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Ag.call(t,l)&&!Ng.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:Ho,type:e.type,key:s,ref:i,props:n,_owner:o}};ne.createContext=function(e){return e={$$typeof:Gx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:qx,_context:e},e.Consumer=e};ne.createElement=jg;ne.createFactory=function(e){var t=jg.bind(null,e);return t.type=e,t};ne.createRef=function(){return{current:null}};ne.forwardRef=function(e){return{$$typeof:Jx,render:e}};ne.isValidElement=fh;ne.lazy=function(e){return{$$typeof:Xx,_payload:{_status:-1,_result:e},_init:rb}};ne.memo=function(e,t){return{$$typeof:Yx,type:e,compare:t===void 0?null:t}};ne.startTransition=function(e){var t=za.transition;za.transition={};try{e()}finally{za.transition=t}};ne.unstable_act=Og;ne.useCallback=function(e,t){return ot.current.useCallback(e,t)};ne.useContext=function(e){return ot.current.useContext(e)};ne.useDebugValue=function(){};ne.useDeferredValue=function(e){return ot.current.useDeferredValue(e)};ne.useEffect=function(e,t){return ot.current.useEffect(e,t)};ne.useId=function(){return ot.current.useId()};ne.useImperativeHandle=function(e,t,r){return ot.current.useImperativeHandle(e,t,r)};ne.useInsertionEffect=function(e,t){return ot.current.useInsertionEffect(e,t)};ne.useLayoutEffect=function(e,t){return ot.current.useLayoutEffect(e,t)};ne.useMemo=function(e,t){return ot.current.useMemo(e,t)};ne.useReducer=function(e,t,r){return ot.current.useReducer(e,t,r)};ne.useRef=function(e){return ot.current.useRef(e)};ne.useState=function(e){return ot.current.useState(e)};ne.useSyncExternalStore=function(e,t,r){return ot.current.useSyncExternalStore(e,t,r)};ne.useTransition=function(){return ot.current.useTransition()};ne.version="18.3.1";kg.exports=ne;var v=kg.exports;const D=_g(v),Ig=zx({__proto__:null,default:D},[v]);/** 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 sb=v,ib=Symbol.for("react.element"),ob=Symbol.for("react.fragment"),ab=Object.prototype.hasOwnProperty,lb=sb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ub={key:!0,ref:!0,__self:!0,__source:!0};function Lg(e,t,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)ab.call(t,n)&&!ub.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:ib,type:e,key:i,ref:o,props:s,_owner:lb.current}}Xl.Fragment=ob;Xl.jsx=Lg;Xl.jsxs=Lg;Eg.exports=Xl;var p=Eg.exports,Dg={exports:{}},Et={},$g={exports:{}},Mg={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(T,A){var $=T.length;T.push(A);e:for(;0<$;){var J=$-1>>>1,F=T[J];if(0<s(F,A))T[J]=A,T[$]=F,$=J;else break e}}function r(T){return T.length===0?null:T[0]}function n(T){if(T.length===0)return null;var A=T[0],$=T.pop();if($!==A){T[0]=$;e:for(var J=0,F=T.length,q=F>>>1;J<q;){var Y=2*(J+1)-1,oe=T[Y],ye=Y+1,te=T[ye];if(0>s(oe,$))ye<F&&0>s(te,oe)?(T[J]=te,T[ye]=$,J=ye):(T[J]=oe,T[Y]=$,J=Y);else if(ye<F&&0>s(te,$))T[J]=te,T[ye]=$,J=ye;else break e}}return A}function s(T,A){var $=T.sortIndex-A.sortIndex;return $!==0?$:T.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,w=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(T){for(var A=r(u);A!==null;){if(A.callback===null)n(u);else if(A.startTime<=T)n(u),A.sortIndex=A.expirationTime,t(l,A);else break;A=r(u)}}function S(T){if(y=!1,x(T),!w)if(r(l)!==null)w=!0,V(_);else{var A=r(u);A!==null&&H(S,A.startTime-T)}}function _(T,A){w=!1,y&&(y=!1,m(R),R=-1),h=!0;var $=f;try{for(x(A),d=r(l);d!==null&&(!(d.expirationTime>A)||T&&!L());){var J=d.callback;
vendor: 9,152 bytes, lines 25-34
25if(typeof J=="function"){d.callback=null,f=d.priorityLevel;var F=J(d.expirationTime<=A);A=e.unstable_now(),typeof F=="function"?d.callback=F:d===r(l)&&n(l),x(A)}else n(l);d=r(l)}if(d!==null)var q=!0;else{var Y=r(u);Y!==null&&H(S,Y.startTime-A),q=!1}return q}finally{d=null,f=$,h=!1}}var E=!1,k=null,R=-1,N=5,C=-1;function L(){return!(e.unstable_now()-C<N)}function O(){if(k!==null){var T=e.unstable_now();C=T;var A=!0;try{A=k(!0,T)}finally{A?W():(E=!1,k=null)}}else E=!1}var W;if(typeof g=="function")W=function(){g(O)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,K=I.port2;I.port1.onmessage=O,W=function(){K.postMessage(null)}}else W=function(){b(O,0)};function V(T){k=T,E||(E=!0,W())}function H(T,A){R=b(function(){T(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){w||h||(w=!0,V(_))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(T){switch(f){case 1:case 2:case 3:var A=3;break;default:A=f}var $=f;f=A;try{return T()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,A){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var $=f;f=T;try{return A()}finally{f=$}},e.unstable_scheduleCallback=function(T,A,$){var J=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?J+$:J):$=J,T){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=$+F,T={id:c++,callback:A,priorityLevel:T,startTime:$,expirationTime:F,sortIndex:-1},$>J?(T.sortIndex=$,t(u,T),r(l)===null&&T===r(u)&&(y?(m(R),R=-1):y=!0,H(S,$-J))):(T.sortIndex=F,t(l,T),w||h||(w=!0,V(_))),T},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(T){var A=f;return function(){var $=f;f=A;try{return T.apply(this,arguments)}finally{f=$}}}})(Mg);$g.exports=Mg;var cb=$g.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 db=v,_t=cb;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Fg=new Set,uo={};function hs(e,t){ri(e,t),ri(e+"Capture",t)}function ri(e,t){for(uo[e]=t,e=0;e<t.length;e++)Fg.add(t[e])}var Fr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dc=Object.prototype.hasOwnProperty,hb=/^[: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]*$/,Hf={},Wf={};function fb(e){return Dc.call(Wf,e)?!0:Dc.call(Hf,e)?!1:hb.test(e)?Wf[e]=!0:(Hf[e]=!0,!1)}function pb(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mb(e,t,r,n){if(t===null||typeof t>"u"||pb(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function at(e,t,r,n,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new at(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new at(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new at(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new at(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ve[e]=new at(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new at(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ve[e]=new at(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ve[e]=new at(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ve[e]=new at(e,5,!1,e.toLowerCase(),null,!1,!1)});var ph=/[\-:]([a-z])/g;function mh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ph,mh);Ve[t]=new at(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ph,mh);Ve[t]=new at(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ph,mh);Ve[t]=new at(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new at(e,1,!1,e.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new at("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ve[e]=new at(e,1,!1,e.toLowerCase(),null,!0,!0)});function gh(e,t,r,n){var s=Ve.hasOwnProperty(t)?Ve[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(mb(t,r,s,n)&&(r=null),n||s===null?fb(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var qr=db.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ca=Symbol.for("react.element"),Es=Symbol.for("react.portal"),ks=Symbol.for("react.fragment"),yh=Symbol.for("react.strict_mode"),$c=Symbol.for("react.profiler"),Ug=Symbol.for("react.provider"),Bg=Symbol.for("react.context"),vh=Symbol.for("react.forward_ref"),Mc=Symbol.for("react.suspense"),Fc=Symbol.for("react.suspense_list"),wh=Symbol.for("react.memo"),an=Symbol.for("react.lazy"),zg=Symbol.for("react.offscreen"),Vf=Symbol.iterator;function Ci(e){return e===null||typeof e!="object"?null:(e=Vf&&e[Vf]||e["@@iterator"],typeof e=="function"?e:null)}var _e=Object.assign,Uu;function Fi(e){if(Uu===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Uu=t&&t[1]||""}return` 34`+Uu+e}var Bu=!1;function zu(e,t){if(!e||Bu)return"";Bu=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 16,752 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.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 e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Bu=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Fi(e):""}function gb(e){switch(e.tag){case 5:return Fi(e.type);case 16:return Fi("Lazy");case 13:return Fi("Suspense");case 19:return Fi("SuspenseList");case 0:case 2:case 15:return e=zu(e.type,!1),e;case 11:return e=zu(e.type.render,!1),e;case 1:return e=zu(e.type,!0),e;default:return""}}function Uc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ks:return"Fragment";case Es:return"Portal";case $c:return"Profiler";case yh:return"StrictMode";case Mc:return"Suspense";case Fc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bg:return(e.displayName||"Context")+".Consumer";case Ug:return(e._context.displayName||"Context")+".Provider";case vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wh:return t=e.displayName||null,t!==null?t:Uc(e.type)||"Memo";case an:t=e._payload,e=e._init;try{return Uc(e(t))}catch{}}return null}function yb(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Uc(t);case 8:return t===yh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function An(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vb(e){var t=Hg(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function da(e){e._valueTracker||(e._valueTracker=vb(e))}function Wg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Hg(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function al(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Bc(e,t){var r=t.checked;return _e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Kf(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=An(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Vg(e,t){t=t.checked,t!=null&&gh(e,"checked",t,!1)}function zc(e,t){Vg(e,t);var r=An(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Hc(e,t.type,r):t.hasOwnProperty("defaultValue")&&Hc(e,t.type,An(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qf(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Hc(e,t,r){(t!=="number"||al(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ui=Array.isArray;function $s(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+An(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Wc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return _e({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gf(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(j(92));if(Ui(r)){if(1<r.length)throw Error(j(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:An(r)}}function Kg(e,t){var r=An(t.value),n=An(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Jf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function qg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Vc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ha,Gg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ha=ha||document.createElement("div"),ha.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ha.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function co(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Gi={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},wb=["Webkit","ms","Moz","O"];Object.keys(Gi).forEach(function(e){wb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gi[t]=Gi[e]})});function Jg(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Gi.hasOwnProperty(e)&&Gi[e]?(""+t).trim():t+"px"}function Qg(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Jg(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var xb=_e({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 Kc(e,t){if(t){if(xb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function qc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gc=null;function xh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jc=null,Ms=null,Fs=null;function Qf(e){if(e=Ko(e)){if(typeof Jc!="function")throw Error(j(280));var t=e.stateNode;t&&(t=nu(t),Jc(e.stateNode,e.type,t))}}function Yg(e){Ms?Fs?Fs.push(e):Fs=[e]:Ms=e}function Xg(){if(Ms){var e=Ms,t=Fs;if(Fs=Ms=null,Qf(e),t)for(e=0;e<t.length;e++)Qf(t[e])}}function Zg(e,t){return e(t)}function ey(){}var Hu=!1;function ty(e,t,r){if(Hu)return e(t,r);Hu=!0;try{return Zg(e,t,r)}finally{Hu=!1,(Ms!==null||Fs!==null)&&(ey(),Xg())}}function ho(e,t){var r=e.stateNode;if(r===null)return null;var n=nu(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(j(231,t,typeof r));return r}var Qc=!1;if(Fr)try{var Ti={};Object.defineProperty(Ti,"passive",{get:function(){Qc=!0}}),window.addEventListener("test",Ti,Ti),window.removeEventListener("test",Ti,Ti)}catch{Qc=!1}function bb(e,t,r,n,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var Ji=!1,ll=null,ul=!1,Yc=null,Sb={onError:function(e){Ji=!0,ll=e}};function _b(e,t,r,n,s,i,o,a,l){Ji=!1,ll=null,bb.apply(Sb,arguments)}function Eb(e,t,r,n,s,i,o,a,l){if(_b.apply(this,arguments),Ji){if(Ji){var u=ll;Ji=!1,ll=null}else throw Error(j(198));ul||(ul=!0,Yc=u)}}function fs(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function ry(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Yf(e){if(fs(e)!==e)throw Error(j(188))}function kb(e){var t=e.alternate;if(!t){if(t=fs(e),t===null)throw Error(j(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return Yf(s),e;if(i===n)return Yf(s),t;i=i.sibling}throw Error(j(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(j(189))}}if(r.alternate!==n)throw Error(j(190))}if(r.tag!==3)throw Error(j(188));return r.stateNode.current===r?e:t}function ny(e){return e=kb(e),e!==null?sy(e):null}function sy(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=sy(e);if(t!==null)return t;e=e.sibling}return null}var iy=_t.unstable_scheduleCallback,Xf=_t.unstable_cancelCallback,Cb=_t.unstable_shouldYield,Tb=_t.unstable_requestPaint,Ae=_t.unstable_now,Rb=_t.unstable_getCurrentPriorityLevel,bh=_t.unstable_ImmediatePriority,oy=_t.unstable_UserBlockingPriority,cl=_t.unstable_NormalPriority,Pb=_t.unstable_LowPriority,ay=_t.unstable_IdlePriority,Zl=null,wr=null;function Ab(e){if(wr&&typeof wr.onCommitFiberRoot=="function")try{wr.onCommitFiberRoot(Zl,e,void 0,(e.current.flags&128)===128)}catch{}}var er=Math.clz32?Math.clz32:Ob,Nb=Math.log,jb=Math.LN2;function Ob(e){return e>>>=0,e===0?32:31-(Nb(e)/jb|0)|0}var fa=64,pa=4194304;function Bi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dl(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Bi(a):(i&=o,i!==0&&(n=Bi(i)))}else o=r&~s,o!==0?n=Bi(o):i!==0&&(n=Bi(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-er(t),s=1<<r,n|=e[r],t&=~s;return n}function Ib(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Lb(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-er(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=Ib(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Xc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ly(){var e=fa;return fa<<=1,!(fa&4194240)&&(fa=64),e}function Wu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Wo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-er(t),e[t]=r}function Db(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-er(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function Sh(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-er(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ae=0;function uy(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var cy,_h,dy,hy,fy,Zc=!1,ma=[],bn=null,Sn=null,_n=null,fo=new Map,po=new Map,un=[],$b="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 Zf(e,t){switch(e){case"focusin":case"focusout":bn=null;break;case"dragenter":case"dragleave":Sn=null;break;case"mouseover":case"mouseout":_n=null;break;case"pointerover":case"pointerout":fo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":po.delete(t.pointerId)}}function Ri(e,t,r,n,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Ko(t),t!==null&&_h(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Mb(e,t,r,n,s){switch(t){case"focusin":return bn=Ri(bn,e,t,r,n,s),!0;case"dragenter":return Sn=Ri(Sn,e,t,r,n,s),!0;case"mouseover":return _n=Ri(_n,e,t,r,n,s),!0;case"pointerover":var i=s.pointerId;return fo.set(i,Ri(fo.get(i)||null,e,t,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,po.set(i,Ri(po.get(i)||null,e,t,r,n,s)),!0}return!1}function py(e){var t=Kn(e.target);if(t!==null){var r=fs(t);if(r!==null){if(t=r.tag,t===13){if(t=ry(r),t!==null){e.blockedOn=t,fy(e.priority,function(){dy(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ha(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=ed(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Gc=n,r.target.dispatchEvent(n),Gc=null}else return t=Ko(r),t!==null&&_h(t),e.blockedOn=r,!1;t.shift()}return!0}function ep(e,t,r){Ha(e)&&r.delete(t)}function Fb(){Zc=!1,bn!==null&&Ha(bn)&&(bn=null),Sn!==null&&Ha(Sn)&&(Sn=null),_n!==null&&Ha(_n)&&(_n=null),fo.forEach(ep),po.forEac
vendor: 11,826 bytes, line 37
37h(ep)}function Pi(e,t){e.blockedOn===t&&(e.blockedOn=null,Zc||(Zc=!0,_t.unstable_scheduleCallback(_t.unstable_NormalPriority,Fb)))}function mo(e){function t(s){return Pi(s,e)}if(0<ma.length){Pi(ma[0],e);for(var r=1;r<ma.length;r++){var n=ma[r];n.blockedOn===e&&(n.blockedOn=null)}}for(bn!==null&&Pi(bn,e),Sn!==null&&Pi(Sn,e),_n!==null&&Pi(_n,e),fo.forEach(t),po.forEach(t),r=0;r<un.length;r++)n=un[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<un.length&&(r=un[0],r.blockedOn===null);)py(r),r.blockedOn===null&&un.shift()}var Us=qr.ReactCurrentBatchConfig,hl=!0;function Ub(e,t,r,n){var s=ae,i=Us.transition;Us.transition=null;try{ae=1,Eh(e,t,r,n)}finally{ae=s,Us.transition=i}}function Bb(e,t,r,n){var s=ae,i=Us.transition;Us.transition=null;try{ae=4,Eh(e,t,r,n)}finally{ae=s,Us.transition=i}}function Eh(e,t,r,n){if(hl){var s=ed(e,t,r,n);if(s===null)ec(e,t,n,fl,r),Zf(e,n);else if(Mb(s,e,t,r,n))n.stopPropagation();else if(Zf(e,n),t&4&&-1<$b.indexOf(e)){for(;s!==null;){var i=Ko(s);if(i!==null&&cy(i),i=ed(e,t,r,n),i===null&&ec(e,t,n,fl,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else ec(e,t,n,null,r)}}var fl=null;function ed(e,t,r,n){if(fl=null,e=xh(n),e=Kn(e),e!==null)if(t=fs(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ry(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return fl=e,null}function my(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Rb()){case bh:return 1;case oy:return 4;case cl:case Pb:return 16;case ay:return 536870912;default:return 16}default:return 16}}var vn=null,kh=null,Wa=null;function gy(){if(Wa)return Wa;var e,t=kh,r=t.length,n,s="value"in vn?vn.value:vn.textContent,i=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[i-n];n++);return Wa=s.slice(e,1<n?1-n:void 0)}function Va(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ga(){return!0}function tp(){return!1}function kt(e){function t(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ga:tp,this.isPropagationStopped=tp,this}return _e(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ga)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ga)},persist:function(){},isPersistent:ga}),t}var hi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ch=kt(hi),Vo=_e({},hi,{view:0,detail:0}),zb=kt(Vo),Vu,Ku,Ai,eu=_e({},Vo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Th,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ai&&(Ai&&e.type==="mousemove"?(Vu=e.screenX-Ai.screenX,Ku=e.screenY-Ai.screenY):Ku=Vu=0,Ai=e),Vu)},movementY:function(e){return"movementY"in e?e.movementY:Ku}}),rp=kt(eu),Hb=_e({},eu,{dataTransfer:0}),Wb=kt(Hb),Vb=_e({},Vo,{relatedTarget:0}),qu=kt(Vb),Kb=_e({},hi,{animationName:0,elapsedTime:0,pseudoElement:0}),qb=kt(Kb),Gb=_e({},hi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jb=kt(Gb),Qb=_e({},hi,{data:0}),np=kt(Qb),Yb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xb={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"},Zb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zb[e])?!!t[e]:!1}function Th(){return e1}var t1=_e({},Vo,{key:function(e){if(e.key){var t=Yb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Va(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Th,charCode:function(e){return e.type==="keypress"?Va(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Va(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),r1=kt(t1),n1=_e({},eu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sp=kt(n1),s1=_e({},Vo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Th}),i1=kt(s1),o1=_e({},hi,{propertyName:0,elapsedTime:0,pseudoElement:0}),a1=kt(o1),l1=_e({},eu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),u1=kt(l1),c1=[9,13,27,32],Rh=Fr&&"CompositionEvent"in window,Qi=null;Fr&&"documentMode"in document&&(Qi=document.documentMode);var d1=Fr&&"TextEvent"in window&&!Qi,yy=Fr&&(!Rh||Qi&&8<Qi&&11>=Qi),ip=" ",op=!1;function vy(e,t){switch(e){case"keyup":return c1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cs=!1;function h1(e,t){switch(e){case"compositionend":return wy(t);case"keypress":return t.which!==32?null:(op=!0,ip);case"textInput":return e=t.data,e===ip&&op?null:e;default:return null}}function f1(e,t){if(Cs)return e==="compositionend"||!Rh&&vy(e,t)?(e=gy(),Wa=kh=vn=null,Cs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return yy&&t.locale!=="ko"?null:t.data;default:return null}}var p1={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 ap(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!p1[e.type]:t==="textarea"}function xy(e,t,r,n){Yg(n),t=pl(t,"onChange"),0<t.length&&(r=new Ch("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Yi=null,go=null;function m1(e){Ny(e,0)}function tu(e){var t=Ps(e);if(Wg(t))return e}function g1(e,t){if(e==="change")return t}var by=!1;if(Fr){var Gu;if(Fr){var Ju="oninput"in document;if(!Ju){var lp=document.createElement("div");lp.setAttribute("oninput","return;"),Ju=typeof lp.oninput=="function"}Gu=Ju}else Gu=!1;by=Gu&&(!document.documentMode||9<document.documentMode)}function up(){Yi&&(Yi.detachEvent("onpropertychange",Sy),go=Yi=null)}function Sy(e){if(e.propertyName==="value"&&tu(go)){var t=[];xy(t,go,e,xh(e)),ty(m1,t)}}function y1(e,t,r){e==="focusin"?(up(),Yi=t,go=r,Yi.attachEvent("onpropertychange",Sy)):e==="focusout"&&up()}function v1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tu(go)}function w1(e,t){if(e==="click")return tu(t)}function x1(e,t){if(e==="input"||e==="change")return tu(t)}function b1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nr=typeof Object.is=="function"?Object.is:b1;function yo(e,t){if(nr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Dc.call(t,s)||!nr(e[s],t[s]))return!1}return!0}function cp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dp(e,t){var r=cp(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cp(r)}}function _y(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_y(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ey(){for(var e=window,t=al();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=al(e.document)}return t}function Ph(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function S1(e){var t=Ey(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&_y(r.ownerDocument.documentElement,r)){if(n!==null&&Ph(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!e.extend&&i>n&&(s=n,n=i,i=s),s=dp(r,i);var o=dp(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var _1=Fr&&"documentMode"in document&&11>=document.documentMode,Ts=null,td=null,Xi=null,rd=!1;function hp(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;rd||Ts==null||Ts!==al(n)||(n=Ts,"selectionStart"in n&&Ph(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Xi&&yo(Xi,n)||(Xi=n,n=pl(td,"onSelect"),0<n.length&&(t=new Ch("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ts)))}function ya(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Rs={animationend:ya("Animation","AnimationEnd"),animationiteration:ya("Animation","AnimationIteration"),animationstart:ya("Animation","AnimationStart"),transitionend:ya("Transition","TransitionEnd")},Qu={},ky={};Fr&&(ky=document.createElement("div").style,"AnimationEvent"in window||(delete Rs.animationend.animation,delete Rs.animationiteration.animation,delete Rs.animationstart.animation),"TransitionEvent"in window||delete Rs.transitionend.transition);function ru(e){if(Qu[e])return Qu[e];if(!Rs[e])return e;var t=Rs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in ky)return Qu[e]=t[r];return e}var Cy=ru("animationend"),Ty=ru("animationiteration"),Ry=ru("animationstart"),Py=ru("transitionend"),Ay=new Map,fp="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 Ln(e,t){Ay.set(e,t),hs(t,[e])}for(var Yu=0;Yu<fp.length;Yu++){var Xu=fp[Yu],E1=Xu.toLowerCase(),k1=Xu[0].toUpperCase()+Xu.slice(1);Ln(E1,"on"+k1)}Ln(Cy,"onAnimationEnd");Ln(Ty,"onAnimationIteration");Ln(Ry,"onAnimationStart");Ln("dblclick","onDoubleClick");Ln("focusin","onFocus");Ln("focusout","onBlur");Ln(Py,"onTransitionEnd");ri("onMouseEnter",["mouseout","mouseover"]);ri("onMouseLeave",["mouseout","mouseover"]);ri("onPointerEnter",["pointerout","pointerover"]);ri("onPointerLeave",["pointerout","pointerover"]);hs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hs("onBeforeInput",["compositionend","keypress","textInput","paste"]);hs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zi="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(" "),C1=new Set("cancel close invalid load scroll toggle".split(" ").concat(zi));function pp(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Eb(n,t,void 0,e),e.currentTarget=null}function Ny(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;pp(s,a,u),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;pp(s,a,u),i=l}}}if(ul)throw e=Yc,ul=!1,Yc=null,e}function me(e,t){var r=t[ad];r===void 0&&(r=t[ad]=new Set);var n=e+"__bubble";r.has(n)||(jy(t,e,2,!1),r.add(n))}function Zu(e,t,r){var n=0;t&&(n|=4),jy(r,e,n,t)}var va="_reactListening"+Math.random().toString(36).slice(2);function vo(e){if(!e[va]){e[va]=!0,Fg.forEach(function(r){r!=="selectionchange"&&(C1.has(r)||Zu(r,!1,e),Zu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[va]||(t[va]=!0,Zu("selectionchange",!1,t))}}function jy(e,t,r,n){switch(my(t)){case 1:var s=Ub;break;case 4:s=Bb;break;default:s=Eh}r=s.bind(null,t,r,e),s=void 0,!Qc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function ec(e,t,r,n,s){var i=n;
vendor: 4,915 bytes, lines 37-38
37if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Kn(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}ty(function(){var u=i,c=xh(r),d=[];e:{var f=Ay.get(e);if(f!==void 0){var h=Ch,w=e;switch(e){case"keypress":if(Va(r)===0)break e;case"keydown":case"keyup":h=r1;break;case"focusin":w="focus",h=qu;break;case"focusout":w="blur",h=qu;break;case"beforeblur":case"afterblur":h=qu;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=rp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Wb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=i1;break;case Cy:case Ty:case Ry:h=qb;break;case Py:h=a1;break;case"scroll":h=zb;break;case"wheel":h=u1;break;case"copy":case"cut":case"paste":h=Jb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=sp}var y=(t&4)!==0,b=!y&&e==="scroll",m=y?f!==null?f+"Capture":null:f;y=[];for(var g=u,x;g!==null;){x=g;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,m!==null&&(S=ho(g,m),S!=null&&y.push(wo(g,S,x)))),b)break;g=g.return}0<y.length&&(f=new h(f,w,null,r,c),d.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==Gc&&(w=r.relatedTarget||r.fromElement)&&(Kn(w)||w[Ur]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(w=r.relatedTarget||r.toElement,h=u,w=w?Kn(w):null,w!==null&&(b=fs(w),w!==b||w.tag!==5&&w.tag!==6)&&(w=null)):(h=null,w=u),h!==w)){if(y=rp,S="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=sp,S="onPointerLeave",m="onPointerEnter",g="pointer"),b=h==null?f:Ps(h),x=w==null?f:Ps(w),f=new y(S,g+"leave",h,r,c),f.target=b,f.relatedTarget=x,S=null,Kn(c)===u&&(y=new y(m,g+"enter",w,r,c),y.target=x,y.relatedTarget=b,S=y),b=S,h&&w)t:{for(y=h,m=w,g=0,x=y;x;x=ms(x))g++;for(x=0,S=m;S;S=ms(S))x++;for(;0<g-x;)y=ms(y),g--;for(;0<x-g;)m=ms(m),x--;for(;g--;){if(y===m||m!==null&&y===m.alternate)break t;y=ms(y),m=ms(m)}y=null}else y=null;h!==null&&mp(d,f,h,y,!1),w!==null&&b!==null&&mp(d,b,w,y,!0)}}e:{if(f=u?Ps(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=g1;else if(ap(f))if(by)_=x1;else{_=v1;var E=y1}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=w1);if(_&&(_=_(e,u))){xy(d,_,r,c);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&Hc(f,"number",f.value)}switch(E=u?Ps(u):window,e){case"focusin":(ap(E)||E.contentEditable==="true")&&(Ts=E,td=u,Xi=null);break;case"focusout":Xi=td=Ts=null;break;case"mousedown":rd=!0;break;case"contextmenu":case"mouseup":case"dragend":rd=!1,hp(d,r,c);break;case"selectionchange":if(_1)break;case"keydown":case"keyup":hp(d,r,c)}var k;if(Rh)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Cs?vy(e,r)&&(R="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(R="onCompositionStart");R&&(yy&&r.locale!=="ko"&&(Cs||R!=="onCompositionStart"?R==="onCompositionEnd"&&Cs&&(k=gy()):(vn=c,kh="value"in vn?vn.value:vn.textContent,Cs=!0)),E=pl(u,R),0<E.length&&(R=new np(R,e,null,r,c),d.push({event:R,listeners:E}),k?R.data=k:(k=wy(r),k!==null&&(R.data=k)))),(k=d1?h1(e,r):f1(e,r))&&(u=pl(u,"onBeforeInput"),0<u.length&&(c=new np("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=k))}Ny(d,t)})}function wo(e,t,r){return{instance:e,listener:t,currentTarget:r}}function pl(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ho(e,r),i!=null&&n.unshift(wo(e,i,s)),i=ho(e,t),i!=null&&n.push(wo(e,i,s))),e=e.return}return n}function ms(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function mp(e,t,r,n,s){for(var i=t._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=ho(r,i),l!=null&&o.unshift(wo(r,l,a))):s||(l=ho(r,i),l!=null&&o.push(wo(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var T1=/\r\n?/g,R1=/\u0000|\uFFFD/g;function gp(e){return(typeof e=="string"?e:""+e).replace(T1,` 38`).replace(R1,"")}function wa(e,t,r){if(t=gp(t),gp(e)!==t&&r)throw Error(j(425))}function ml(){}
vendor: 4,102 bytes, line 38
38var nd=null,sd=null;function id(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var od=typeof setTimeout=="function"?setTimeout:void 0,P1=typeof clearTimeout=="function"?clearTimeout:void 0,yp=typeof Promise=="function"?Promise:void 0,A1=typeof queueMicrotask=="function"?queueMicrotask:typeof yp<"u"?function(e){return yp.resolve(null).then(e).catch(N1)}:od;function N1(e){setTimeout(function(){throw e})}function tc(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),mo(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);mo(t)}function En(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function vp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var fi=Math.random().toString(36).slice(2),yr="__reactFiber$"+fi,xo="__reactProps$"+fi,Ur="__reactContainer$"+fi,ad="__reactEvents$"+fi,j1="__reactListeners$"+fi,O1="__reactHandles$"+fi;function Kn(e){var t=e[yr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ur]||r[yr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=vp(e);e!==null;){if(r=e[yr])return r;e=vp(e)}return t}e=r,r=e.parentNode}return null}function Ko(e){return e=e[yr]||e[Ur],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ps(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function nu(e){return e[xo]||null}var ld=[],As=-1;function Dn(e){return{current:e}}function ge(e){0>As||(e.current=ld[As],ld[As]=null,As--)}function he(e,t){As++,ld[As]=e.current,e.current=t}var Nn={},Ze=Dn(Nn),ft=Dn(!1),is=Nn;function ni(e,t){var r=e.type.contextTypes;if(!r)return Nn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function pt(e){return e=e.childContextTypes,e!=null}function gl(){ge(ft),ge(Ze)}function wp(e,t,r){if(Ze.current!==Nn)throw Error(j(168));he(Ze,t),he(ft,r)}function Oy(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(j(108,yb(e)||"Unknown",s));return _e({},r,n)}function yl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nn,is=Ze.current,he(Ze,e),he(ft,ft.current),!0}function xp(e,t,r){var n=e.stateNode;if(!n)throw Error(j(169));r?(e=Oy(e,t,is),n.__reactInternalMemoizedMergedChildContext=e,ge(ft),ge(Ze),he(Ze,e)):ge(ft),he(ft,r)}var Ir=null,su=!1,rc=!1;function Iy(e){Ir===null?Ir=[e]:Ir.push(e)}function I1(e){su=!0,Iy(e)}function $n(){if(!rc&&Ir!==null){rc=!0;var e=0,t=ae;try{var r=Ir;for(ae=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ir=null,su=!1}catch(s){throw Ir!==null&&(Ir=Ir.slice(e+1)),iy(bh,$n),s}finally{ae=t,rc=!1}}return null}var Ns=[],js=0,vl=null,wl=0,Nt=[],jt=0,os=null,Dr=1,$r="";function Hn(e,t){Ns[js++]=wl,Ns[js++]=vl,vl=e,wl=t}function Ly(e,t,r){Nt[jt++]=Dr,Nt[jt++]=$r,Nt[jt++]=os,os=e;var n=Dr;e=$r;var s=32-er(n)-1;n&=~(1<<s),r+=1;var i=32-er(t)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,Dr=1<<32-er(t)+s|r<<s|n,$r=i+e}else Dr=1<<i|r<<s|n,$r=e}function Ah(e){e.return!==null&&(Hn(e,1),Ly(e,1,0))}function Nh(e){for(;e===vl;)vl=Ns[--js],Ns[js]=null,wl=Ns[--js],Ns[js]=null;for(;e===os;)os=Nt[--jt],Nt[jt]=null,$r=Nt[--jt],Nt[jt]=null,Dr=Nt[--jt],Nt[jt]=null}var bt=null,xt=null,we=!1,Xt=null;function Dy(e,t){var r=Ot(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function bp(e,t){switch(e.tag){case 5:var r=e.type;
vendor: 13,718 bytes, line 38
38return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,bt=e,xt=En(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,bt=e,xt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=os!==null?{id:Dr,overflow:$r}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Ot(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,bt=e,xt=null,!0):!1;default:return!1}}function ud(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cd(e){if(we){var t=xt;if(t){var r=t;if(!bp(e,t)){if(ud(e))throw Error(j(418));t=En(r.nextSibling);var n=bt;t&&bp(e,t)?Dy(n,r):(e.flags=e.flags&-4097|2,we=!1,bt=e)}}else{if(ud(e))throw Error(j(418));e.flags=e.flags&-4097|2,we=!1,bt=e}}}function Sp(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;bt=e}function xa(e){if(e!==bt)return!1;if(!we)return Sp(e),we=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!id(e.type,e.memoizedProps)),t&&(t=xt)){if(ud(e))throw $y(),Error(j(418));for(;t;)Dy(e,t),t=En(t.nextSibling)}if(Sp(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){xt=En(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}xt=null}}else xt=bt?En(e.stateNode.nextSibling):null;return!0}function $y(){for(var e=xt;e;)e=En(e.nextSibling)}function si(){xt=bt=null,we=!1}function jh(e){Xt===null?Xt=[e]:Xt.push(e)}var L1=qr.ReactCurrentBatchConfig;function Ni(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(j(309));var n=r.stateNode}if(!n)throw Error(j(147,e));var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(j(284));if(!r._owner)throw Error(j(290,e))}return e}function ba(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function _p(e){var t=e._init;return t(e._payload)}function My(e){function t(m,g){if(e){var x=m.deletions;x===null?(m.deletions=[g],m.flags|=16):x.push(g)}}function r(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function n(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function s(m,g){return m=Rn(m,g),m.index=0,m.sibling=null,m}function i(m,g,x){return m.index=x,e?(x=m.alternate,x!==null?(x=x.index,x<g?(m.flags|=2,g):x):(m.flags|=2,g)):(m.flags|=1048576,g)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,g,x,S){return g===null||g.tag!==6?(g=uc(x,m.mode,S),g.return=m,g):(g=s(g,x),g.return=m,g)}function l(m,g,x,S){var _=x.type;return _===ks?c(m,g,x.props.children,S,x.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===an&&_p(_)===g.type)?(S=s(g,x.props),S.ref=Ni(m,g,x),S.return=m,S):(S=Xa(x.type,x.key,x.props,null,m.mode,S),S.ref=Ni(m,g,x),S.return=m,S)}function u(m,g,x,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=cc(x,m.mode,S),g.return=m,g):(g=s(g,x.children||[]),g.return=m,g)}function c(m,g,x,S,_){return g===null||g.tag!==7?(g=ss(x,m.mode,S,_),g.return=m,g):(g=s(g,x),g.return=m,g)}function d(m,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=uc(""+g,m.mode,x),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ca:return x=Xa(g.type,g.key,g.props,null,m.mode,x),x.ref=Ni(m,null,g),x.return=m,x;case Es:return g=cc(g,m.mode,x),g.return=m,g;case an:var S=g._init;return d(m,S(g._payload),x)}if(Ui(g)||Ci(g))return g=ss(g,m.mode,x,null),g.return=m,g;ba(m,g)}return null}function f(m,g,x,S){var _=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return _!==null?null:a(m,g,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ca:return x.key===_?l(m,g,x,S):null;case Es:return x.key===_?u(m,g,x,S):null;case an:return _=x._init,f(m,g,_(x._payload),S)}if(Ui(x)||Ci(x))return _!==null?null:c(m,g,x,S,null);ba(m,x)}return null}function h(m,g,x,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return m=m.get(x)||null,a(g,m,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ca:return m=m.get(S.key===null?x:S.key)||null,l(g,m,S,_);case Es:return m=m.get(S.key===null?x:S.key)||null,u(g,m,S,_);case an:var E=S._init;return h(m,g,x,E(S._payload),_)}if(Ui(S)||Ci(S))return m=m.get(x)||null,c(g,m,S,_,null);ba(g,S)}return null}function w(m,g,x,S){for(var _=null,E=null,k=g,R=g=0,N=null;k!==null&&R<x.length;R++){k.index>R?(N=k,k=null):N=k.sibling;var C=f(m,k,x[R],S);if(C===null){k===null&&(k=N);break}e&&k&&C.alternate===null&&t(m,k),g=i(C,g,R),E===null?_=C:E.sibling=C,E=C,k=N}if(R===x.length)return r(m,k),we&&Hn(m,R),_;if(k===null){for(;R<x.length;R++)k=d(m,x[R],S),k!==null&&(g=i(k,g,R),E===null?_=k:E.sibling=k,E=k);return we&&Hn(m,R),_}for(k=n(m,k);R<x.length;R++)N=h(k,m,R,x[R],S),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?R:N.key),g=i(N,g,R),E===null?_=N:E.sibling=N,E=N);return e&&k.forEach(function(L){return t(m,L)}),we&&Hn(m,R),_}function y(m,g,x,S){var _=Ci(x);if(typeof _!="function")throw Error(j(150));if(x=_.call(x),x==null)throw Error(j(151));for(var E=_=null,k=g,R=g=0,N=null,C=x.next();k!==null&&!C.done;R++,C=x.next()){k.index>R?(N=k,k=null):N=k.sibling;var L=f(m,k,C.value,S);if(L===null){k===null&&(k=N);break}e&&k&&L.alternate===null&&t(m,k),g=i(L,g,R),E===null?_=L:E.sibling=L,E=L,k=N}if(C.done)return r(m,k),we&&Hn(m,R),_;if(k===null){for(;!C.done;R++,C=x.next())C=d(m,C.value,S),C!==null&&(g=i(C,g,R),E===null?_=C:E.sibling=C,E=C);return we&&Hn(m,R),_}for(k=n(m,k);!C.done;R++,C=x.next())C=h(k,m,R,C.value,S),C!==null&&(e&&C.alternate!==null&&k.delete(C.key===null?R:C.key),g=i(C,g,R),E===null?_=C:E.sibling=C,E=C);return e&&k.forEach(function(O){return t(m,O)}),we&&Hn(m,R),_}function b(m,g,x,S){if(typeof x=="object"&&x!==null&&x.type===ks&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case ca:e:{for(var _=x.key,E=g;E!==null;){if(E.key===_){if(_=x.type,_===ks){if(E.tag===7){r(m,E.sibling),g=s(E,x.props.children),g.return=m,m=g;break e}}else if(E.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===an&&_p(_)===E.type){r(m,E.sibling),g=s(E,x.props),g.ref=Ni(m,E,x),g.return=m,m=g;break e}r(m,E);break}else t(m,E);E=E.sibling}x.type===ks?(g=ss(x.props.children,m.mode,S,x.key),g.return=m,m=g):(S=Xa(x.type,x.key,x.props,null,m.mode,S),S.ref=Ni(m,g,x),S.return=m,m=S)}return o(m);case Es:e:{for(E=x.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){r(m,g.sibling),g=s(g,x.children||[]),g.return=m,m=g;break e}else{r(m,g);break}else t(m,g);g=g.sibling}g=cc(x,m.mode,S),g.return=m,m=g}return o(m);case an:return E=x._init,b(m,g,E(x._payload),S)}if(Ui(x))return w(m,g,x,S);if(Ci(x))return y(m,g,x,S);ba(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(r(m,g.sibling),g=s(g,x),g.return=m,m=g):(r(m,g),g=uc(x,m.mode,S),g.return=m,m=g),o(m)):r(m,g)}return b}var ii=My(!0),Fy=My(!1),xl=Dn(null),bl=null,Os=null,Oh=null;function Ih(){Oh=Os=bl=null}function Lh(e){var t=xl.current;ge(xl),e._currentValue=t}function dd(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Bs(e,t){bl=e,Oh=Os=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ht=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(Oh!==e)if(e={context:e,memoizedValue:t,next:null},Os===null){if(bl===null)throw Error(j(308));Os=e,bl.dependencies={lanes:0,firstContext:e}}else Os=Os.next=e;return t}var qn=null;function Dh(e){qn===null?qn=[e]:qn.push(e)}function Uy(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Dh(t)):(r.next=s.next,s.next=r),t.interleaved=r,Br(e,n)}function Br(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ln=!1;function $h(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function By(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function kn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,se&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Br(e,r)}return s=n.interleaved,s===null?(t.next=t,Dh(n)):(t.next=s.next,s.next=t),n.interleaved=t,Br(e,r)}function Ka(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Sh(e,r)}}function Ep(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Sl(e,t,r,n){var s=e.updateQueue;ln=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,y=a;switch(f=t,h=r,y.tag){case 1:if(w=y.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=y.payload,f=typeof w=="function"?w.call(h,d,f):w,f==null)break e;d=_e({},d,f);break e;case 2:ln=!0}}a.callback!==null&&a.lane!==0&&(e.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},c===null?(u=c=h,l=d):c=c.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(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);ls|=o,e.lanes=o,e.memoizedState=d}}function kp(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(j(191,s));s.call(n)}}}var qo={},xr=Dn(qo),bo=Dn(qo),So=Dn(qo);function Gn(e){if(e===qo)throw Error(j(174));return e}function Mh(e,t){switch(he(So,t),he(bo,e),he(xr,qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vc(t,e)}ge(xr),he(xr,t)}function oi(){ge(xr),ge(bo),ge(So)}function zy(e){Gn(So.current);var t=Gn(xr.current),r=Vc(t,e.type);t!==r&&(he(bo,e),he(xr,r))}function Fh(e){bo.current===e&&(ge(xr),ge(bo))}var xe=Dn(0);function _l(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nc=[];function Uh(){for(var e=0;e<nc.length;e++)nc[e]._workInProgressVersionPrimary=null;nc.length=0}var qa=qr.ReactCurrentDispatcher,sc=qr.ReactCurrentBatchConfig,as=0,be=null,Le=null,Fe=null,El=!1,Zi=!1,_o=0,D1=0;function Ge(){throw Error(j(321))}function Bh(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!nr(e[r],t[r]))return!1;return!0}function zh(e,t,r,n,s,i){if(as=i,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,qa.current=e===null||e.memoizedState===null?U1:B1,e=r(n,s),Zi){i=0;do{if(Zi=!1,_o=0,25<=i)throw Error(j(301));i+=1,Fe=Le=null,t.updateQueue=null,qa.current=z1,e=r(n,s)}while(Zi)}if(qa.current=kl,t=Le!==null&&Le.next!==null,as=0,Fe=Le=be=null,El=!1,t)throw Error(j(300));return e}function Hh(){var e=_o!==0;return _o=0,e}function dr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?be.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function Dt(){if(Le===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=Fe===null?be.memoizedState:Fe.next;if(t!==null)Fe=t,Le=e;else{if(e===null)throw Error(j(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},Fe===null?be.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function Eo(e,t){return typeof t=="function"?t(e):t}function ic(e){var t=Dt(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;
vendor: 5,688 bytes, line 38
38var 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,u=i;do{var c=u.lane;if((as&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=n):l=l.next=d,be.lanes|=c,ls|=c}u=u.next}while(u!==null&&u!==i);l===null?o=n:l.next=a,nr(n,t.memoizedState)||(ht=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,be.lanes|=i,ls|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function oc(e){var t=Dt(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);nr(i,t.memoizedState)||(ht=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function Hy(){}function Wy(e,t){var r=be,n=Dt(),s=t(),i=!nr(n.memoizedState,s);if(i&&(n.memoizedState=s,ht=!0),n=n.queue,Wh(qy.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Fe!==null&&Fe.memoizedState.tag&1){if(r.flags|=2048,ko(9,Ky.bind(null,r,n,s,t),void 0,null),Ue===null)throw Error(j(349));as&30||Vy(r,t,s)}return s}function Vy(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Ky(e,t,r,n){t.value=r,t.getSnapshot=n,Gy(t)&&Jy(e)}function qy(e,t,r){return r(function(){Gy(t)&&Jy(e)})}function Gy(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!nr(e,r)}catch{return!0}}function Jy(e){var t=Br(e,1);t!==null&&tr(t,e,1,-1)}function Cp(e){var t=dr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:e},t.queue=e,e=e.dispatch=F1.bind(null,be,e),[t.memoizedState,e]}function ko(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Qy(){return Dt().memoizedState}function Ga(e,t,r,n){var s=dr();be.flags|=e,s.memoizedState=ko(1|t,r,void 0,n===void 0?null:n)}function iu(e,t,r,n){var s=Dt();n=n===void 0?null:n;var i=void 0;if(Le!==null){var o=Le.memoizedState;if(i=o.destroy,n!==null&&Bh(n,o.deps)){s.memoizedState=ko(t,r,i,n);return}}be.flags|=e,s.memoizedState=ko(1|t,r,i,n)}function Tp(e,t){return Ga(8390656,8,e,t)}function Wh(e,t){return iu(2048,8,e,t)}function Yy(e,t){return iu(4,2,e,t)}function Xy(e,t){return iu(4,4,e,t)}function Zy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ev(e,t,r){return r=r!=null?r.concat([e]):null,iu(4,4,Zy.bind(null,t,e),r)}function Vh(){}function tv(e,t){var r=Dt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Bh(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function rv(e,t){var r=Dt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Bh(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function nv(e,t,r){return as&21?(nr(r,t)||(r=ly(),be.lanes|=r,ls|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ht=!0),e.memoizedState=r)}function $1(e,t){var r=ae;ae=r!==0&&4>r?r:4,e(!0);var n=sc.transition;sc.transition={};try{e(!1),t()}finally{ae=r,sc.transition=n}}function sv(){return Dt().memoizedState}function M1(e,t,r){var n=Tn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},iv(e))ov(t,r);else if(r=Uy(e,t,r,n),r!==null){var s=it();tr(r,e,n,s),av(r,t,n)}}function F1(e,t,r){var n=Tn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(iv(e))ov(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,nr(a,o)){var l=t.interleaved;l===null?(s.next=s,Dh(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Uy(e,t,s,n),r!==null&&(s=it(),tr(r,e,n,s),av(r,t,n))}}function iv(e){var t=e.alternate;return e===be||t!==null&&t===be}function ov(e,t){Zi=El=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function av(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Sh(e,r)}}var kl={readContext:Lt,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useInsertionEffect:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useSyncExternalStore:Ge,useId:Ge,unstable_isNewReconciler:!1},U1={readContext:Lt,useCallback:function(e,t){return dr().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:Tp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ga(4194308,4,Zy.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ga(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ga(4,2,e,t)},useMemo:function(e,t){var r=dr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=dr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=M1.bind(null,be,e),[n.memoizedState,e]}
vendor: 7,431 bytes, lines 38-40
38,useRef:function(e){var t=dr();return e={current:e},t.memoizedState=e},useState:Cp,useDebugValue:Vh,useDeferredValue:function(e){return dr().memoizedState=e},useTransition:function(){var e=Cp(!1),t=e[0];return e=$1.bind(null,e[1]),dr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=be,s=dr();if(we){if(r===void 0)throw Error(j(407));r=r()}else{if(r=t(),Ue===null)throw Error(j(349));as&30||Vy(n,t,r)}s.memoizedState=r;var i={value:r,getSnapshot:t};return s.queue=i,Tp(qy.bind(null,n,i,e),[e]),n.flags|=2048,ko(9,Ky.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=dr(),t=Ue.identifierPrefix;if(we){var r=$r,n=Dr;r=(n&~(1<<32-er(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=_o++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=D1++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},B1={readContext:Lt,useCallback:tv,useContext:Lt,useEffect:Wh,useImperativeHandle:ev,useInsertionEffect:Yy,useLayoutEffect:Xy,useMemo:rv,useReducer:ic,useRef:Qy,useState:function(){return ic(Eo)},useDebugValue:Vh,useDeferredValue:function(e){var t=Dt();return nv(t,Le.memoizedState,e)},useTransition:function(){var e=ic(Eo)[0],t=Dt().memoizedState;return[e,t]},useMutableSource:Hy,useSyncExternalStore:Wy,useId:sv,unstable_isNewReconciler:!1},z1={readContext:Lt,useCallback:tv,useContext:Lt,useEffect:Wh,useImperativeHandle:ev,useInsertionEffect:Yy,useLayoutEffect:Xy,useMemo:rv,useReducer:oc,useRef:Qy,useState:function(){return oc(Eo)},useDebugValue:Vh,useDeferredValue:function(e){var t=Dt();return Le===null?t.memoizedState=e:nv(t,Le.memoizedState,e)},useTransition:function(){var e=oc(Eo)[0],t=Dt().memoizedState;return[e,t]},useMutableSource:Hy,useSyncExternalStore:Wy,useId:sv,unstable_isNewReconciler:!1};function Kt(e,t){if(e&&e.defaultProps){t=_e({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function hd(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:_e({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ou={isMounted:function(e){return(e=e._reactInternals)?fs(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=it(),s=Tn(e),i=Mr(n,s);i.payload=t,r!=null&&(i.callback=r),t=kn(e,i,s),t!==null&&(tr(t,e,s,n),Ka(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=it(),s=Tn(e),i=Mr(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=kn(e,i,s),t!==null&&(tr(t,e,s,n),Ka(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=it(),n=Tn(e),s=Mr(r,n);s.tag=2,t!=null&&(s.callback=t),t=kn(e,s,n),t!==null&&(tr(t,e,n,r),Ka(t,e,n))}};function Rp(e,t,r,n,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!yo(r,n)||!yo(s,i):!0}function lv(e,t,r){var n=!1,s=Nn,i=t.contextType;return typeof i=="object"&&i!==null?i=Lt(i):(s=pt(t)?is:Ze.current,n=t.contextTypes,i=(n=n!=null)?ni(e,s):Nn),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ou,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Pp(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&ou.enqueueReplaceState(t,t.state,null)}function fd(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},$h(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Lt(i):(i=pt(t)?is:Ze.current,s.context=ni(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(hd(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&ou.enqueueReplaceState(s,s.state,null),Sl(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ai(e,t){try{var r="",n=t;do r+=gb(n),n=n.return;while(n);var s=r}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function ac(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function pd(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var H1=typeof WeakMap=="function"?WeakMap:Map;function uv(e,t,r){r=Mr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Tl||(Tl=!0,Ed=n),pd(e,t)},r}function cv(e,t,r){r=Mr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){pd(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){pd(e,t),typeof n!="function"&&(Cn===null?Cn=new Set([this]):Cn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function Ap(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new H1;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=nS.bind(null,e,t,r),t.then(e,e))}function Np(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function jp(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Mr(-1,1),t.tag=2,kn(r,t,1))),r.lanes|=1),e)}var W1=qr.ReactCurrentOwner,ht=!1;function nt(e,t,r,n){t.child=e===null?Fy(t,null,r,n):ii(t,e.child,r,n)}function Op(e,t,r,n,s){r=r.render;var i=t.ref;return Bs(t,s),n=zh(e,t,r,n,i,s),r=Hh(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,zr(e,t,s)):(we&&r&&Ah(t),t.flags|=1,nt(e,t,n,s),t.child)}function Ip(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!Zh(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,dv(e,t,i,n,s)):(e=Xa(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:yo,r(o,n)&&e.ref===t.ref)return zr(e,t,s)}return t.flags|=1,e=Rn(i,n),e.ref=t.ref,e.return=t,t.child=e}function dv(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(yo(i,n)&&e.ref===t.ref)if(ht=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(ht=!0);else return t.lanes=e.lanes,zr(e,t,s)}return md(e,t,r,n,s)}function hv(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},he(Ls,yt),yt|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,he(Ls,yt),yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,he(Ls,yt),yt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,he(Ls,yt),yt|=n;return nt(e,t,s,r),t.child}function fv(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function md(e,t,r,n,s){var i=pt(r)?is:Ze.current;return i=ni(t,i),Bs(t,s),r=zh(e,t,r,n,i,s),n=Hh(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,zr(e,t,s)):(we&&n&&Ah(t),t.flags|=1,nt(e,t,r,s),t.child)}function Lp(e,t,r,n,s){if(pt(r)){var i=!0;yl(t)}else i=!1;if(Bs(t,s),t.stateNode===null)Ja(e,t),lv(t,r,n),fd(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=Lt(u):(u=pt(r)?is:Ze.current,u=ni(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&Pp(t,o,n,u),ln=!1;var f=t.memoizedState;o.state=f,Sl(t,n,o,s),l=t.memoizedState,a!==n||f!==l||ft.current||ln?(typeof c=="function"&&(hd(t,r,c,n),l=t.memoizedState),(a=ln||Rp(t,r,a,n,f,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,By(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Kt(t.type,a),o.props=u,d=t.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Lt(l):(l=pt(r)?is:Ze.current,l=ni(t,l));var h=r.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Pp(t,o,n,l),ln=!1,f=t.memoizedState,o.state=f,Sl(t,n,o,s);var w=t.memoizedState;a!==d||f!==w||ft.current||ln?(typeof h=="function"&&(hd(t,r,h,n),w=t.memoizedState),(u=ln||Rp(t,r,u,n,f,w,l)||!1)?(c||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"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),o.props=n,o.state=w,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return gd(e,t,r,n,i,s)}function gd(e,t,r,n,s,i){fv(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&xp(t,r,!1),zr(e,t,i);n=t.stateNode,W1.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=ii(t,e.child,null,i),t.child=ii(t,null,a,i)):nt(e,t,a,i),t.memoizedState=n.state,s&&xp(t,r,!0),t.child}function pv(e){var t=e.stateNode;t.pendingContext?wp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wp(e,t.context,!1),Mh(e,t.containerInfo)}function Dp(e,t,r,n,s){return si(),jh(s),t.flags|=256,nt(e,t,r,n),t.child}var yd={dehydrated:null,treeContext:null,retryLane:0};function vd(e){return{baseLanes:e,cachePool:null,transitions:null}}function mv(e,t,r){var n=t.pendingProps,s=xe.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),he(xe,s&1),e===null)return cd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=uu(o,n,0,null),e=ss(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=vd(r),t.memoizedState=yd,e):Kh(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return V1(e,t,o,n,a,s,r);if(i){i=n.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Rn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Rn(a,i):(i=ss(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?vd(r):{base
vendor: 8,213 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=yd,n}return i=e.child,e=i.sibling,n=Rn(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Kh(e,t){return t=uu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Sa(e,t,r,n){return n!==null&&jh(n),ii(t,e.child,null,r),e=Kh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function V1(e,t,r,n,s,i,o){if(r)return t.flags&256?(t.flags&=-257,n=ac(Error(j(422))),Sa(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,s=t.mode,n=uu({mode:"visible",children:n.children},s,0,null),i=ss(i,s,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&ii(t,e.child,null,o),t.child.memoizedState=vd(o),t.memoizedState=yd,i);if(!(t.mode&1))return Sa(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(j(419)),n=ac(i,n,void 0),Sa(e,t,o,n)}if(a=(o&e.childLanes)!==0,ht||a){if(n=Ue,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,Br(e,s),tr(n,e,s,-1))}return Xh(),n=ac(Error(j(421))),Sa(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=sS.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,xt=En(s.nextSibling),bt=t,we=!0,Xt=null,e!==null&&(Nt[jt++]=Dr,Nt[jt++]=$r,Nt[jt++]=os,Dr=e.id,$r=e.overflow,os=t),t=Kh(t,n.children),t.flags|=4096,t)}function $p(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),dd(e.return,t,r)}function lc(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function gv(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(nt(e,t,n.children,r),n=xe.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$p(e,r,t);else if(e.tag===19)$p(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(he(xe,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&_l(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),lc(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&_l(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}lc(t,!0,r,null,i);break;case"together":lc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ja(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ls|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,r=Rn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Rn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function K1(e,t,r){switch(t.tag){case 3:pv(t),si();break;case 5:zy(t);break;case 1:pt(t.type)&&yl(t);break;case 4:Mh(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;he(xl,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(he(xe,xe.current&1),t.flags|=128,null):r&t.child.childLanes?mv(e,t,r):(he(xe,xe.current&1),e=zr(e,t,r),e!==null?e.sibling:null);he(xe,xe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return gv(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),he(xe,xe.current),n)break;return null;case 22:case 23:return t.lanes=0,hv(e,t,r)}return zr(e,t,r)}var yv,wd,vv,wv;yv=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};wd=function(){};vv=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Gn(xr.current);var i=null;switch(r){case"input":s=Bc(e,s),n=Bc(e,n),i=[];break;case"select":s=_e({},s,{value:void 0}),n=_e({},n,{value:void 0}),i=[];break;case"textarea":s=Wc(e,s),n=Wc(e,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ml)}Kc(r,n);var o;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(uo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="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(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(uo.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&me("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};wv=function(e,t,r,n){r!==n&&(t.flags|=4)};function ji(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function q1(e,t,r){var n=t.pendingProps;switch(Nh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return pt(t.type)&&gl(),Je(t),null;case 3:return n=t.stateNode,oi(),ge(ft),ge(Ze),Uh(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(xa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xt!==null&&(Td(Xt),Xt=null))),wd(e,t),Je(t),null;case 5:Fh(t);var s=Gn(So.current);if(r=t.type,e!==null&&t.stateNode!=null)vv(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(j(166));return Je(t),null}if(e=Gn(xr.current),xa(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[yr]=t,n[xo]=i,e=(t.mode&1)!==0,r){case"dialog":me("cancel",n),me("close",n);break;case"iframe":case"object":case"embed":me("load",n);break;case"video":case"audio":for(s=0;s<zi.length;s++)me(zi[s],n);break;case"source":me("error",n);break;case"img":case"image":case"link":me("error",n),me("load",n);break;case"details":me("toggle",n);break;case"input":Kf(n,i),me("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},me("invalid",n);break;case"textarea":Gf(n,i),me("invalid",n)}Kc(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 32,630 bytes, line 40
40o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&wa(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&wa(n.textContent,a,e),s=["children",""+a]):uo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&me("scroll",n)}switch(r){case"input":da(n),qf(n,i,!0);break;case"textarea":da(n),Jf(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=ml)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=qg(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[yr]=t,e[xo]=n,yv(e,t,!1,!1),t.stateNode=e;e:{switch(o=qc(r,n),r){case"dialog":me("cancel",e),me("close",e),s=n;break;case"iframe":case"object":case"embed":me("load",e),s=n;break;case"video":case"audio":for(s=0;s<zi.length;s++)me(zi[s],e);s=n;break;case"source":me("error",e),s=n;break;case"img":case"image":case"link":me("error",e),me("load",e),s=n;break;case"details":me("toggle",e),s=n;break;case"input":Kf(e,n),s=Bc(e,n),me("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=_e({},n,{value:void 0}),me("invalid",e);break;case"textarea":Gf(e,n),s=Wc(e,n),me("invalid",e);break;default:s=n}Kc(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Qg(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Gg(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&co(e,l):typeof l=="number"&&co(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(uo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&me("scroll",e):l!=null&&gh(e,i,l,o))}switch(r){case"input":da(e),qf(e,n,!1);break;case"textarea":da(e),Jf(e);break;case"option":n.value!=null&&e.setAttribute("value",""+An(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?$s(e,!!n.multiple,i,!1):n.defaultValue!=null&&$s(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ml)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)wv(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(j(166));if(r=Gn(So.current),Gn(xr.current),xa(t)){if(n=t.stateNode,r=t.memoizedProps,n[yr]=t,(i=n.nodeValue!==r)&&(e=bt,e!==null))switch(e.tag){case 3:wa(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wa(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[yr]=t,t.stateNode=n}return Je(t),null;case 13:if(ge(xe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(we&&xt!==null&&t.mode&1&&!(t.flags&128))$y(),si(),t.flags|=98560,i=!1;else if(i=xa(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(j(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(j(317));i[yr]=t}else si(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),i=!1}else Xt!==null&&(Td(Xt),Xt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||xe.current&1?De===0&&(De=3):Xh())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return oi(),wd(e,t),e===null&&vo(t.stateNode.containerInfo),Je(t),null;case 10:return Lh(t.type._context),Je(t),null;case 17:return pt(t.type)&&gl(),Je(t),null;case 19:if(ge(xe),i=t.memoizedState,i===null)return Je(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)ji(i,!1);else{if(De!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=_l(e),o!==null){for(t.flags|=128,ji(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return he(xe,xe.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ae()>li&&(t.flags|=128,n=!0,ji(i,!1),t.lanes=4194304)}else{if(!n)if(e=_l(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ji(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!we)return Je(t),null}else 2*Ae()-i.renderingStartTime>li&&r!==1073741824&&(t.flags|=128,n=!0,ji(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ae(),t.sibling=null,r=xe.current,he(xe,n?r&1|2:r&1),t):(Je(t),null);case 22:case 23:return Yh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?yt&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function G1(e,t){switch(Nh(t),t.tag){case 1:return pt(t.type)&&gl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oi(),ge(ft),ge(Ze),Uh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fh(t),null;case 13:if(ge(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));si()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(xe),null;case 4:return oi(),null;case 10:return Lh(t.type._context),null;case 22:case 23:return Yh(),null;case 24:return null;default:return null}}var _a=!1,Xe=!1,J1=typeof WeakSet=="function"?WeakSet:Set,B=null;function Is(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Te(e,t,n)}else r.current=null}function xd(e,t,r){try{r()}catch(n){Te(e,t,n)}}var Mp=!1;function Q1(e,t){if(nd=hl,e=Ey(),Ph(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,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===e)break t;if(f===r&&++u===s&&(a=o),f===i&&++c===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(sd={focusedElem:e,selectionRange:r},hl=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,b=w.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Kt(t.type,y),b);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(S){Te(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return w=Mp,Mp=!1,w}function eo(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&xd(t,r,i)}s=s.next}while(s!==n)}}function au(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function bd(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function xv(e){var t=e.alternate;t!==null&&(e.alternate=null,xv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yr],delete t[xo],delete t[ad],delete t[j1],delete t[O1])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function bv(e){return e.tag===5||e.tag===3||e.tag===4}function Fp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sd(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ml));else if(n!==4&&(e=e.child,e!==null))for(Sd(e,t,r),e=e.sibling;e!==null;)Sd(e,t,r),e=e.sibling}function _d(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(_d(e,t,r),e=e.sibling;e!==null;)_d(e,t,r),e=e.sibling}var He=null,Yt=!1;function tn(e,t,r){for(r=r.child;r!==null;)Sv(e,t,r),r=r.sibling}function Sv(e,t,r){if(wr&&typeof wr.onCommitFiberUnmount=="function")try{wr.onCommitFiberUnmount(Zl,r)}catch{}switch(r.tag){case 5:Xe||Is(r,t);case 6:var n=He,s=Yt;He=null,tn(e,t,r),He=n,Yt=s,He!==null&&(Yt?(e=He,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):He.removeChild(r.stateNode));break;case 18:He!==null&&(Yt?(e=He,r=r.stateNode,e.nodeType===8?tc(e.parentNode,r):e.nodeType===1&&tc(e,r),mo(e)):tc(He,r.stateNode));break;case 4:n=He,s=Yt,He=r.stateNode.containerInfo,Yt=!0,tn(e,t,r),He=n,Yt=s;break;case 0:case 11:case 14:case 15:if(!Xe&&(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)&&xd(r,t,o),s=s.next}while(s!==n)}tn(e,t,r);break;case 1:if(!Xe&&(Is(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Te(r,t,a)}tn(e,t,r);break;case 21:tn(e,t,r);break;case 22:r.mode&1?(Xe=(n=Xe)||r.memoizedState!==null,tn(e,t,r),Xe=n):tn(e,t,r);break;default:tn(e,t,r)}}function Up(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new J1),t.forEach(function(n){var s=iS.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Bt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:He=a.stateNode,Yt=!1;break e;case 3:He=a.stateNode.containerInfo,Yt=!0;break e;case 4:He=a.stateNode.containerInfo,Yt=!0;break e}a=a.return}if(He===null)throw Error(j(160));Sv(i,o,s),He=null,Yt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Te(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_v(t,e),t=t.sibling}function _v(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),ur(e),n&4){try{eo(3,e,e.return),au(3,e)}catch(y){Te(e,e.return,y)}try{eo(5,e,e.return)}catch(y){Te(e,e.return,y)}}break;case 1:Bt(t,e),ur(e),n&512&&r!==null&&Is(r,r.return);break;case 5:if(Bt(t,e),ur(e),n&512&&r!==null&&Is(r,r.return),e.flags&32){var s=e.stateNode;try{co(s,"")}catch(y){Te(e,e.return,y)}}if(n&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Vg(s,i),qc(a,o);var u=qc(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Qg(s,d):c==="dangerouslySetInnerHTML"?Gg(s,d):c==="children"?co(s,d):gh(s,c,d,u)}switch(a){case"input":zc(s,i);break;case"textarea":Kg(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?$s(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?$s(s,!!i.multiple,i.defaultValue,!0):$s(s,!!i.multiple,i.multiple?[]:"",!1))}s[xo]=i}catch(y){Te(e,e.return,y)}}break;case 6:if(Bt(t,e),ur(e),n&4){if(e.stateNode===null)throw Error(j(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(y){Te(e,e.return,y)}}break;case 3:if(Bt(t,e),ur(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{mo(t.containerInfo)}catch(y){Te(e,e.return,y)}break;case 4:Bt(t,e),ur(e);break;case 13:Bt(t,e),ur(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Jh=Ae())),n&4&&Up(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Xe=(u=Xe)||c,Bt(t,e),Xe=u):Bt(t,e),ur(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(B=e,c=e.child;c!==null;){for(d=B=c;B!==null;){switch(f=B,h=f.child,f.tag){case 0:case 11:case 14:case 15:eo(4,f,f.return);break;case 1:Is(f,f.return);var w=f.stateNode;if(typeof w.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(y){Te(n,r,y)}}break;case 5:Is(f,f.return);break;case 22:if(f.memoizedState!==null){zp(d);continue}}h!==null?(h.return=f,B=h):zp(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(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=Jg("display",o))}catch(y){Te(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){Te(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Bt(t,e),ur(e),n&4&&Up(e);break;case 21:break;default:Bt(t,e),ur(e)}}function ur(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(bv(r)){var n=r;break e}r=r.return}throw Error(j(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(co(s,""),n.flags&=-33);var i=Fp(e);_d(e,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Fp(e);Sd(e,a,o);break;default:throw Error(j(161))}}catch(l){Te(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Y1(e,t,r){B=e,Ev(e)}function Ev(e,t,r){for(var n=(e.mode&1)!==0;B!==null;){var s=B,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||_a;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Xe;a=_a;var u=Xe;if(_a=o,(Xe=l)&&!u)for(B=s;B!==null;)o=B,l=o.child,o.tag===22&&o.memoizedState!==null?Hp(s):l!==null?(l.return=o,B=l):Hp(s);for(;i!==null;)B=i,Ev(i),i=i.sibling;B=s,_a=a,Xe=u}Bp(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,B=i):Bp(e)}}function Bp(e){for(;B!==null;){var t=B;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Xe||au(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Xe)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Kt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&kp(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}kp(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&mo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}Xe||t.flags&512&&bd(t)}catch(f){Te(t,t.return,f)}}if(t===e){B=null;break}if(r=t.sibling,r!==null){r.return=t.return,B=r;break}B=t.return}}function zp(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var r=t.sibling;if(r!==null){r.return=t.return,B=r;break}B=t.return}}function Hp(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{au(4,t)}catch(l){Te(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){Te(t,s,l)}}var i=t.return;try{bd(t)}catch(l){Te(t,i,l)}break;case 5:var o=t.return;try{bd(t)}catch(l){Te(t,o,l)}}}catch(l){Te(t,t.return,l)}if(t===e){B=null;break}var a=t.sibling;if(a!==null){a.return=t.return,B=a;break}B=t.return}}var X1=Math.ceil,Cl=qr.ReactCurrentDispatcher,qh=qr.ReactCurrentOwner,It=qr.ReactCurrentBatchConfig,se=0,Ue=null,Oe=null,We=0,yt=0,Ls=Dn(0),De=0,Co=null,ls=0,lu=0,Gh=0,to=null,dt=null,Jh=0,li=1/0,Ar=null,Tl=!1,Ed=null,Cn=null,Ea=!1,wn=null,Rl=0,ro=0,kd=null,Qa=-1,Ya=0;function it(){return se&6?Ae():Qa!==-1?Qa:Qa=Ae()}function Tn(e){return e.mode&1?se&2&&We!==0?We&-We:L1.transition!==null?(Ya===0&&(Ya=ly()),Ya):(e=ae,e!==0||(e=window.event,e=e===void 0?16:my(e.type)),e):1}function tr(e,t,r,n){if(50<ro)throw ro=0,kd=null,Error(j(185));Wo(e,r,n),(!(se&2)||e!==Ue)&&(e===Ue&&(!(se&2)&&(lu|=r),De===4&&cn(e,We)),mt(e,n),r===1&&se===0&&!(t.mode&1)&&(li=Ae()+500,su&&$n()))}function mt(e,t){var r=e.callbackNode;Lb(e,t);var n=dl(e,e===Ue?We:0);if(n===0)r!==null&&Xf(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Xf(r),t===1)e.tag===0?I1(Wp.bind(null,e)):Iy(Wp.bind(null,e)),A1(function(){!(se&6)&&$n()}),r=null;else{switch(uy(n)){case 1:r=bh;break;case 4:r=oy;break;case 16:r=cl;break;case 536870912:r=ay;break;default:r=cl}r=jv(r,kv.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function kv(e,t){if(Qa=-1,Ya=0,se&6)throw Error(j(327));var r=e.callbackNode;if(zs()&&e.callbackNode!==r)return null;var n=dl(e,e===Ue?We:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Pl(e,n);else{t=n;var s=se;se|=2;var i=Tv();(Ue!==e||We!==t)&&(Ar=null,li=Ae()+500,ns(e,t));do try{tS();break}catch(a){Cv(e,a)}while(!0);Ih(),Cl.current=i,se=s,Oe!==null?t=0:(Ue=null,We=0,t=De)}if(t!==0){if(t===2&&(s=Xc(e),s!==0&&(n=s,t=Cd(e,s))),t===1)throw r=Co,ns(e,0),cn(e,n),mt(e,Ae()),r;if(t===6)cn(e,n);else{if(s=e.current.alternate,!(n&30)&&!Z1(s)&&(t=Pl(e,n),t===2&&(i=Xc(e),i!==0&&(n=i,t=Cd(e,i))),t===1))throw r=Co,ns(e,0),cn(e,n),mt(e,Ae()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(j(345));case 2:Wn(e,dt,Ar);break;case 3:if(cn(e,n),(n&130023424)===n&&(t=Jh+500-Ae(),10<t)){if(dl(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){it(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=od(Wn.bind(null,e,dt,Ar),t);break}Wn(e,dt,Ar);break;case 4:if(cn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-er(n);i=1<<o,o=t[o],o>s&&(s=o),n&=~i}if(n=s,n=Ae()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*X1(n/1960))-n,10<n){e.timeoutHandle=od(Wn.bind(null,e,dt,Ar),n);break}Wn(e,dt,Ar);break;case 5:Wn(e,dt,Ar);break;default:throw Error(j(329))}}}return mt(e,Ae()),e.callbackNode===r?kv.bind(null,e):null}function Cd(e,t){var r=to;return e.current.memoizedState.isDehydrated&&(ns(e,t).flags|=256),e=Pl(e,t),e!==2&&(t=dt,dt=r,t!==null&&Td(t)),e}function Td(e){dt===null?dt=e:dt.push.apply(dt,e)}function Z1(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!nr(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function cn(e,t){for(t&=~Gh,t&=~lu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-er(t),n=1<<r;e[r]=-1,t&=~n}}function Wp(e){if(se&6)throw Error(j(327));zs();var t=dl(e,0);if(!(t&1))return mt(e,Ae()),null;var r=Pl(e,t);if(e.tag!==0&&r===2){var n=Xc(e);n!==0&&(t=n,r=Cd(e,n))}if(r===1)throw r=Co,ns(e,0),cn(e,t),mt(e,Ae()),r;if(r===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Wn(e,dt,Ar),mt(e,Ae()),null}function Qh(e,t){var r=se;se|=1;try{return e(t)}finally{se=r,se===0&&(li=Ae()+500,su&&$n())}}function us(e){wn!==null&&wn.tag===0&&!(se&6)&&zs();var t=se;se|=1;var r=It.transition,n=ae;try{if(It.transition=null,ae=1,e)return e()}finally{ae=n,It.transition=r,se=t,!(se&6)&&$n()}}function Yh(){yt=Ls.current,ge(Ls)}function ns(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,P1(r)),Oe!==null)for(r=Oe.return;r!==null;){var n=r;switch(Nh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&gl();break;case 3:oi(),ge(ft),ge(Ze),Uh();break;case 5:Fh(n);break;case 4:oi();break;case 13:ge(xe);break;case 19:ge(xe);break;case 10:Lh(n.type._context);break;case 22:case 23:Yh()}r=r.return}if(Ue=e,Oe=e=Rn(e.current,null),We=yt=t,De=0,Co=null,Gh=lu=ls=0,dt=to=null,qn!==null){for(t=0;t<qn.length;t++)if(r=qn[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}qn=null}return e}function Cv(e,t){do{var r=Oe;try{if(Ih(),qa.current=kl,El){for(var n=be.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}El=!1}if(as=0,Fe=Le=be=null,Zi=!1,_o=0,qh.current=null,r===null||r.return===null){De=1,Co=t,Oe=null;break}e:{var i=e,o=r.return,a=r,l=t;if(t=We,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Np(o);if(h!==null){h.flags&=-257,jp(h,o,a,i,t),h.mode&1&&Ap(i,u,t),t=h,l=u;var w=t.updateQueue;if(w===null){var y=new Set;y.add(l),t.updateQueue=y}else w.add(l);break e}else{if(!(t&1)){Ap(i,u,t),Xh();break e}l=Error(j(426))}}else if(we&&a.mode&1){var b=Np(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),jp(b,o,a,i,t),jh(ai(l,a));break e}}i=l=ai(l,a),De!==4&&(De=2),to===null?to=[i]:to.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=uv(i,l,t);Ep(i,m);break e;case 1:a=l;var g=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Cn===null||!Cn.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=cv(i,a,t);Ep(i,S);break e}}i=i.return}while(i!==null)}Pv(r)}catch(_){t=_,Oe===r&&r!==null&&(Oe=r=r.return);continue}break}while(!0)}function Tv(){var e=Cl.current;return Cl.current=kl,e===null?kl:e}function Xh(){(De===0||De===3||De===2)&&(De=4),Ue===null||!(ls&268435455)&&!(lu&268435455)||cn(Ue,We)}function Pl(e,t){var r=se;se|=2;var n=Tv();(Ue!==e||We!==t)&&(Ar=null,ns(e,t));do try{eS();break}catch(s){Cv(e,s)}while(!0);if(Ih(),se=r,Cl.current=n,Oe!==null)throw Error(j(261));return Ue=null,We=0,De}function eS(){for(;Oe!==null;)Rv(Oe)}function tS(){for(;Oe!==null&&!Cb();)Rv(Oe)}function Rv(e){var t=Nv(e.alternate,e,yt);e.memoizedProps=e.pendingProps,t===null?Pv(e):Oe=t,qh.current=null}function Pv(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=G1(r,t),r!==null){r.flags&=32767,Oe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{De=6,Oe=null;return}}else if(r=q1(r,t,yt),r!==null){Oe=r;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);De===0&&(De=5)}function Wn(e,t,r){var n=ae,s=It.transition;try{It.transition=null,ae=1,rS(e,t,r,n)}finally{It.transition=s,ae=n}return null}function rS(e,t,r,n){do zs();while(wn!==null);if(se&6)throw Error(j(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Db(e,i),e===Ue&&(Oe=Ue=null,We=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ea||(Ea=!0,jv(cl,function(){return zs(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=It.transition,It.transition=null;var o=ae;ae=1;var a=se;se|=4,qh.current=null,Q1(e,r),_v(r,e),S1(sd),hl=!!nd,sd=nd=null,e.current=r,Y1(r),Tb(),se=a,ae=o,It.transition=i}else e.current=r;if(Ea&&(Ea=!1,wn=e,Rl=s),i=e.pendingLanes,i===0&&(Cn=null),Ab(r.stateNode),mt(e,Ae()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Tl)throw Tl=!1,e=Ed,Ed=null,e;return Rl&1&&e.tag!==0&&zs(),i=e.pendingLanes,i&1?e===kd?ro++:(ro=0,kd=e):ro=0,$n(),null}function zs(){if(wn!==null){var e=uy(Rl),t=It.transition,r=ae;try{if(It.transition=null,ae=16>e?16:e,wn===null)var n=!1;else{if(e=wn,wn=null,Rl=0,se&6)throw Error(j(331));var s=se;for(se|=4,B=e.current;B!==null;){var i=B,o=i.child;if(B.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(B=u;B!==null;){var c=B;switch(c.tag){case 0:case 11:case 15:eo(8,c,i)}var d=c.child;if(d!==null)d.return=c,B=d;else for(;B!==null;){c=B;var f=c.sibling,h=c.return;if(xv(c),c===u){B=null;break}if(f!==null){f.return=h,B=f;break}B=h}}}var w=i.alternate;if(w!==null){var y=w.child;if(y!==null){w.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}B=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,B=o;else e:for(;B!==null;){if(i=B,i.flags&2048)switch(i.tag){case 0:case 11:case 15:eo(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,B=m;break e}B=i.return}}var g=e.current;for(B=g;B!==null;){o=B;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,B=x;else e:for(o=g;B!==null;){if(a=B,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:au(9,a)}}catch(_){Te(a,a.return,_)}if(a===o){B=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,B=S;break e}B=a.return}}if(se=s,$n(),wr&&typeof wr.onPostCommitFiberRoot=="function")try{wr.onPostCommitFiberRoot(Zl,e)}catch{}n=!0}return n}finally{ae=r,It.transition=t}}return!1}function Vp(e,t,r){t=ai(r,t),t=uv(e,t,1),e=kn(e,t,1),t=it(),e!==null&&(Wo(e,1,t),mt(e,t))}function Te(e,t,r){if(e.tag===3)Vp(e,e,r);else for(;t!==null;){if(t.tag===3){Vp(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Cn===null||!Cn.has(n))){e=ai(r,e),e=cv(t,e,1),t=kn(t,e,1),e=it(),t!==null&&(Wo(t,1,e),mt(t,e));break}}t=t.return}}function nS(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=it(),e.pingedLanes|=e.suspendedLanes&r,Ue===e&&(We&r)===r&&(De===4||De===3&&(We&130023424)===We&&500>Ae()-Jh?ns(e,0):Gh|=r),mt(e,t)}function Av(e,t){t===0&&(e.mode&1?(t=pa,pa<<=1,!(pa&130023424)&&(pa=4194304)):t=1);var r=it();e=Br(e,t),e!==null&&(Wo(e,t,r),mt(e,r))}function sS(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Av(e,r)}function iS(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(j(314))}n!==null&&n.delete(t),Av(e,r)}var Nv;Nv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)ht=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ht=!1,K1(e,t,r);ht=!!(e.flags&131072)}else ht=!1,we&&t.flags&1048576&&Ly(t,wl,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ja(e,t),e=t.pendingProps;var s=ni(t,Ze.current);Bs(t,r),s=zh(null,t,n,e,s,r);var i=Hh();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(n)?(i=!0,yl(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,$h(t),s.updater=ou,t.stateNode=s,s._reactInternals=t,fd(t,n,e,r),t=gd(null,t,n,!0,i,r)):(t.tag=0,we&&i&&Ah(t),nt(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ja(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=aS(n),e=Kt(n,e),s){case 0:t=md(null,t,n,e,r);break e;case 1:t=Lp(null,t,n,e,r);break e;case 11:t=Op(null,t,n,e,r);break e;case 14:t=Ip(null,t,n,Kt(n.type,e),r);break e}throw Error(j(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Kt(n,s),md(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Kt(n,s),Lp(e,t,n,s,r);case 3:e:{if(pv(t),e===null)throw Error(j(387));n=t.pendingProps,i=t.memoizedState,s=i.element,By(e,t),Sl(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=ai(Error(j(423)),t),t=Dp(e,t,n,r,s);break e}else if(n!==s){s=ai(Error(j(424)),t),t=Dp(e,t,n,r,s);break e}else for(xt=En(t.stateNode.containerInfo.firstChild),bt=t,we=!0,Xt=null,r=Fy(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(si(),n===s){t=zr(e,t,r);break e}nt(e,t,n,r)}t=t.child}return t;case 5:return zy(t),e===null&&cd(t),n=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,id(n,s)?o=null:i!==null&&id(n,i)&&(t.flags|=32),fv(e,t),nt(e,t,o,r),t.child;case 6:return e===null&&cd(t),null;case 13:return mv(e,t,r);case 4:return Mh(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ii(t,null,n,r):nt(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Kt(n,s),Op(e,t,n,s,r);case 7:return nt(e,t,t.pendingProps,r),t.child;case 8:return nt(e,t,t.pendingProps.children,r),t.child;case 12:return nt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,he(xl,n._currentValue),n._currentValue=o,i!==null)if(nr(i.value,o)){if(i.children===s.children&&!ft.current){t=zr(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Mr(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),dd(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(j(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),dd(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}nt(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Bs(t,r),s=Lt(s),n=n(s),t.flags|=1,nt(e,t,n,r),t.child;case 14:return n=t.type,s=Kt(n,t.pendingProps),s=Kt(n.type,s),Ip(e,t,n,s,r);case 15:return dv(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Kt(n,s),Ja(e,t),t.tag=1,pt(n)?(e=!0,yl(t)):e=!1,Bs(t,r),lv(t,n,s),fd(t,n,s,r),gd(null,t,n,!0,e,r);case 19:return gv(e,t,r);case 22:return hv(e,t,r)}throw Error(j(156,t.tag))};function jv(e,t){return iy(e,t)}function oS(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ot(e,t,r,n){return new oS(e,t,r,n)}function Zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aS(e){if(typeof e=="function")return Zh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vh)return 11;if(e===wh)return 14}return 2}function Rn(e,t){var r=e.alternate;return r===null?(r=Ot(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 6,631 bytes, line 40
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Xa(e,t,r,n,s,i){var o=2;if(n=e,typeof e=="function")Zh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ks:return ss(r.children,s,i,t);case yh:o=8,s|=8;break;case $c:return e=Ot(12,r,t,s|2),e.elementType=$c,e.lanes=i,e;case Mc:return e=Ot(13,r,t,s),e.elementType=Mc,e.lanes=i,e;case Fc:return e=Ot(19,r,t,s),e.elementType=Fc,e.lanes=i,e;case zg:return uu(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ug:o=10;break e;case Bg:o=9;break e;case vh:o=11;break e;case wh:o=14;break e;case an:o=16,n=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=Ot(o,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function ss(e,t,r,n){return e=Ot(7,e,n,t),e.lanes=r,e}function uu(e,t,r,n){return e=Ot(22,e,n,t),e.elementType=zg,e.lanes=r,e.stateNode={isHidden:!1},e}function uc(e,t,r){return e=Ot(6,e,null,t),e.lanes=r,e}function cc(e,t,r){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lS(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ef(e,t,r,n,s,i,o,a,l){return e=new lS(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ot(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},$h(i),e}function uS(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Es,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Ov(e){if(!e)return Nn;e=e._reactInternals;e:{if(fs(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var r=e.type;if(pt(r))return Oy(e,r,t)}return t}function Iv(e,t,r,n,s,i,o,a,l){return e=ef(r,n,!0,e,s,i,o,a,l),e.context=Ov(null),r=e.current,n=it(),s=Tn(r),i=Mr(n,s),i.callback=t??null,kn(r,i,s),e.current.lanes=s,Wo(e,s,n),mt(e,n),e}function cu(e,t,r,n){var s=t.current,i=it(),o=Tn(s);return r=Ov(r),t.context===null?t.context=r:t.pendingContext=r,t=Mr(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=kn(s,t,o),e!==null&&(tr(e,s,o,i),Ka(e,s,o)),o}function Al(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function tf(e,t){Kp(e,t),(e=e.alternate)&&Kp(e,t)}function cS(){return null}var Lv=typeof reportError=="function"?reportError:function(e){console.error(e)};function rf(e){this._internalRoot=e}du.prototype.render=rf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));cu(e,t,null,null)};du.prototype.unmount=rf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;us(function(){cu(null,e,null,null)}),t[Ur]=null}};function du(e){this._internalRoot=e}du.prototype.unstable_scheduleHydration=function(e){if(e){var t=hy();e={blockedOn:null,target:e,priority:t};for(var r=0;r<un.length&&t!==0&&t<un[r].priority;r++);un.splice(r,0,e),r===0&&py(e)}};function nf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function qp(){}function dS(e,t,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var u=Al(o);i.call(u)}}var o=Iv(t,n,e,0,null,!1,!1,"",qp);return e._reactRootContainer=o,e[Ur]=o.current,vo(e.nodeType===8?e.parentNode:e),us(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Al(l);a.call(u)}}var l=ef(e,0,!1,null,null,!1,!1,"",qp);return e._reactRootContainer=l,e[Ur]=l.current,vo(e.nodeType===8?e.parentNode:e),us(function(){cu(t,l,r,n)}),l}function fu(e,t,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Al(o);a.call(l)}}cu(t,o,e,s)}else o=dS(r,t,e,s,n);return Al(o)}cy=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Bi(t.pendingLanes);r!==0&&(Sh(t,r|1),mt(t,Ae()),!(se&6)&&(li=Ae()+500,$n()))}break;case 13:us(function(){var n=Br(e,1);if(n!==null){var s=it();tr(n,e,1,s)}}),tf(e,1)}};_h=function(e){if(e.tag===13){var t=Br(e,134217728);if(t!==null){var r=it();tr(t,e,134217728,r)}tf(e,134217728)}};dy=function(e){if(e.tag===13){var t=Tn(e),r=Br(e,t);if(r!==null){var n=it();tr(r,e,t,n)}tf(e,t)}};hy=function(){return ae};fy=function(e,t){var r=ae;try{return ae=e,t()}finally{ae=r}};Jc=function(e,t,r){switch(t){case"input":if(zc(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=nu(n);if(!s)throw Error(j(90));Wg(n),zc(n,s)}}}break;case"textarea":Kg(e,r);break;case"select":t=r.value,t!=null&&$s(e,!!r.multiple,t,!1)}};Zg=Qh;ey=us;var hS={usingClientEntryPoint:!1,Events:[Ko,Ps,nu,Yg,Xg,Qh]},Oi={findFiberByHostInstance:Kn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fS={bundleType:Oi.bundleType,version:Oi.version,rendererPackageName:Oi.rendererPackageName,rendererConfig:Oi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ny(e),e===null?null:e.stateNode},findFiberByHostInstance:Oi.findFiberByHostInstance||cS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ka=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ka.isDisabled&&ka.supportsFiber)try{Zl=ka.inject(fS),wr=ka}catch{}}Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hS;Et.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nf(t))throw Error(j(200));return uS(e,t,null,r)};Et.createRoot=function(e,t){if(!nf(e))throw Error(j(299));var r=!1,n="",s=Lv;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ef(e,1,!1,null,null,r,!1,n,s),e[Ur]=t.current,vo(e.nodeType===8?e.parentNode:e),new rf(t)};Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=ny(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e){return us(e)};Et.hydrate=function(e,t,r){if(!hu(t))throw Error(j(200));return fu(null,e,t,!0,r)};Et.hydrateRoot=function(e,t,r){if(!nf(e))throw Error(j(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=Lv;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=Iv(t,null,e,1,r??null,s,!1,i,o),e[Ur]=t.current,vo(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new du(t)};Et.render=function(e,t,r){if(!hu(t))throw Error(j(200));return fu(null,e,t,!1,r)};Et.unmountComponentAtNode=function(e){if(!hu(e))throw Error(j(40));return e._reactRootContainer?(us(function(){fu(null,null,e,!1,function(){e._reactRootContainer=null,e[Ur]=null})}),!0):!1};Et.unstable_batchedUpdates=Qh;Et.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!hu(r))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return fu(e,t,r,!1,n)};Et.version="18.3.1-next-f1338f8080-20240426";function Dv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dv)}catch(e){console.error(e)}}Dv(),Dg.exports=Et;var Go=Dg.exports;const $v=_g(Go);var Mv,Gp=Go;Mv=Gp.createRoot,Gp.hydrateRoot;const pS=1,mS=1e6;let dc=0;function gS(){return dc=(dc+1)%Number.MAX_SAFE_INTEGER,dc.toString()}const hc=new Map,Jp=e=>{if(hc.has(e))return;const t=setTimeout(()=>{hc.delete(e),no({type:"REMOVE_TOAST",toastId:e})},mS);hc.set(e,t)},yS=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,pS)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Jp(r):e.toasts.forEach(n=>{Jp(n.id)}),{...e,toasts:e.toasts.map(n=>
40n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Za=[];let el={toasts:[]};function no(e){el=yS(el,e),Za.forEach(t=>{t(el)})}function vS({...e}){const t=gS(),r=s=>no({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>no({type:"DISMISS_TOAST",toastId:t});return no({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function wS(){const[e,t]=v.useState(el);return v.useEffect(()=>(Za.push(t),()=>{const r=Za.indexOf(t);r>-1&&Za.splice(r,1)}),[e]),{...e,toast:vS,dismiss:r=>no({type:"DISMISS_TOAST",toastId:r})}}function ce(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Qp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fv(...e){return t=>{let r=!1;const n=e.map(s=>{const i=Qp(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():Qp(e[s],null)}}}}function $e(...e){return v.useCallback(Fv(...e),e)}function pi(e,t=[]){let r=[];function n(i,o){const a=v.createContext(o),l=r.length;r=[...r,o];const u=d=>{var m;const{scope:f,children:h,...w}=d,y=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,b=v.useMemo(()=>w,Object.values(w));return p.jsx(y.Provider,{value:b,children:h})};u.displayName=i+"Provider";function c(d,f){var y;const h=((y=f==null?void 0:f[e])==null?void 0:y[l])||a,w=v.useContext(h);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const s=()=>{const i=r.map(o=>v.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,xS(s,...t)]}function xS(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Nl(e){const t=SS(e),r=v.forwardRef((n,s)=>{const{children:i,...o}=n,a=v.Children.toArray(i),l=a.find(ES);if(l){const u=l.props.children,c=a.map(d=>d===l?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...o,ref:s,children:v.isValidElement(u)?v.cloneElement(u,void 0,c):null})}return p.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var bS=Nl("Slot");function SS(e){const t=v.forwardRef((r,n)=>{const{children:s,...i}=r;if(v.isValidElement(s)){const o=CS(s),a=kS(i,s.props);return s.type!==v.Fragment&&(a.ref=n?Fv(n,o):o),v.cloneElement(s,a)}return v.Children.count(s)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Uv=Symbol("radix.slottable");function _S(e){const t=({children:r})=>p.jsx(p.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Uv,t}function ES(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Uv}function kS(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function CS(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Bv(e){const t=e+"CollectionProvider",[r,n]=pi(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:b,children:m}=y,g=D.useRef(null),x=D.useRef(new Map).current;return p.jsx(s,{scope:b,itemMap:x,collectionRef:g,children:m})};o.displayName=t;const a=e+"CollectionSlot",l=Nl(a),u=D.forwardRef((y,b)=>{const{scope:m,children:g}=y,x=i(a,m),S=$e(b,x.collectionRef);return p.jsx(l,{ref:S,children:g})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Nl(c),h=D.forwardRef((y,b)=>{const{scope:m,children:g,...x}=y,S=D.useRef(null),_=$e(b,S),E=i(c,m);return D.useEffect(()=>(E.itemMap.set(S,{ref:S,...x}
vendor: 9,174 bytes, line 40
40),()=>void E.itemMap.delete(S))),p.jsx(f,{[d]:"",ref:_,children:g})});h.displayName=c;function w(y){const b=i(e+"CollectionConsumer",y);return D.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const x=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((E,k)=>x.indexOf(E.ref.current)-x.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},w,n]}var TS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ee=TS.reduce((e,t)=>{const r=Nl(`Primitive.${t}`),n=v.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function zv(e,t){e&&Go.flushSync(()=>e.dispatchEvent(t))}function jn(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function RS(e,t=globalThis==null?void 0:globalThis.document){const r=jn(e);v.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var PS="DismissableLayer",Rd="dismissableLayer.update",AS="dismissableLayer.pointerDownOutside",NS="dismissableLayer.focusOutside",Yp,Hv=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sf=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=v.useContext(Hv),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),w=$e(t,k=>d(k)),y=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(b),g=c?y.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=g>=m,_=OS(k=>{const R=k.target,N=[...u.branches].some(C=>C.contains(R));!S||N||(s==null||s(k),o==null||o(k),k.defaultPrevented||a==null||a())},f),E=IS(k=>{const R=k.target;[...u.branches].some(C=>C.contains(R))||(i==null||i(k),o==null||o(k),k.defaultPrevented||a==null||a())},f);return RS(k=>{g===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},f),v.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Yp=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Xp(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Yp)}},[c,f,r,u]),v.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Xp())},[c,u]),v.useEffect(()=>{const k=()=>h({});return document.addEventListener(Rd,k),()=>document.removeEventListener(Rd,k)},[]),p.jsx(Ee.div,{...l,ref:w,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:ce(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ce(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ce(e.onPointerDownCapture,_.onPointerDownCapture)})});sf.displayName=PS;var jS="DismissableLayerBranch",Wv=v.forwardRef((e,t)=>{const r=v.useContext(Hv),n=v.useRef(null),s=$e(t,n);return v.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),p.jsx(Ee.div,{...e,ref:s})});Wv.displayName=jS;function OS(e,t=globalThis==null?void 0:globalThis.document){const r=jn(e),n=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Vv(AS,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function IS(e,t=globalThis==null?void 0:globalThis.document){const r=jn(e),n=v.useRef(!1);return v.useEffect(()=>{const s=i=>{i.target&&!n.current&&Vv(NS,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Xp(){const e=new CustomEvent(Rd);document.dispatchEvent(e)}function Vv(e,t,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?zv(s,i):s.dispatchEvent(i)}var LS=sf,DS=Wv,Hr=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},$S="Portal",Kv=v.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,i]=v.useState(!1);Hr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?$v.createPortal(p.jsx(Ee.div,{...n,ref:t}),o):null});Kv.displayName=$S;function MS(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var pu=e=>{const{present:t,children:r}=e,n=FS(t),s=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),i=$e(n.ref,US(s));return typeof r=="function"||n.isPresent?v.cloneElement(s,{ref:i}):null};pu.displayName="Presence";function FS(e){const[t,r]=v.useState(),n=v.useRef(null),s=v.useRef(e),i=v.useRef("none"),o=e?"mounted":"unmounted",[a,l]=MS(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=Ca(n.current);i.current=a==="mounted"?u:"none"},[a]),Hr(()=>{const u=n.current,c=s.current;if(c!==e){const f=i.current,h=Ca(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Hr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const y=Ca(n.current).includes(h.animationName);if(h.target===t&&y&&(l("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=h=>{h.target===t&&(i.current=Ca(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Ca(e){return(e==null?void 0:e.animationName)||"none"}function US(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var BS=Ig[" useInsertionEffect ".trim().toString()]||Hr;function mu({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,o]=zS({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const c=v.useRef(e!==void 0);v.useEffect(()=>{const d=c.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.`),c.current=a},[a,n])}const u=v.useCallback(c=>{var d;if(a){const f=HS(c)?c(e):c;f!==e&&((d=o.current)==null||d.call(o,f))}else i(c)},[a,e,i,o]);return[l,u]}function zS({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),s=v.useRef(r),i=v.useRef(t);return BS(()=>{i.current=t},[t]),v.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function HS(e){return typeof e=="function"}var WS=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"}),VS="VisuallyHidden",gu=v.forwardRef((e,t)=>p.jsx(Ee.span,{...e,ref:t,style:{...WS,...e.style}}));gu.displayName=VS;var KS=gu,of="ToastProvider",[af,qS,GS]=Bv("Toast"),[qv,Oj]=pi("Toast",[GS]),[JS,yu]=qv(of),Gv=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=v.useState(null),[u,c]=v.useState(0),d=v.useRef(!1),f=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${of}\`. Expected non-empty \`string\`.`),p.jsx(af.Provider,{scope:t,children:p.jsx(JS,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:v.useCallback(()=>c(h=>h+1),[]),onToastRemove:v.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Gv.displayName=of;var Jv="ToastViewport",QS=["F8"],Pd="toast.viewportPause",Ad="toast.viewportResume",Qv=v.forwardRef((e,t)=>
40{const{__scopeToast:r,hotkey:n=QS,label:s="Notifications ({hotkey})",...i}=e,o=yu(Jv,r),a=qS(r),l=v.useRef(null),u=v.useRef(null),c=v.useRef(null),d=v.useRef(null),f=$e(t,d,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;v.useEffect(()=>{const b=m=>{var x;n.length!==0&&n.every(S=>m[S]||m.code===S)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),v.useEffect(()=>{const b=l.current,m=d.current;if(w&&b&&m){const g=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(Pd);m.dispatchEvent(E),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Ad);m.dispatchEvent(E),o.isClosePausedRef.current=!1}},S=E=>{!b.contains(E.relatedTarget)&&x()},_=()=>{b.contains(document.activeElement)||x()};return b.addEventListener("focusin",g),b.addEventListener("focusout",S),b.addEventListener("pointermove",g),b.addEventListener("pointerleave",_),window.addEventListener("blur",g),window.addEventListener("focus",x),()=>{b.removeEventListener("focusin",g),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",g),b.removeEventListener("pointerleave",_),window.removeEventListener("blur",g),window.removeEventListener("focus",x)}}},[w,o.isClosePausedRef]);const y=v.useCallback(({tabbingDirection:b})=>{const g=a().map(x=>{const S=x.ref.current,_=[S,...u_(S)];return b==="forwards"?_:_.reverse()});return(b==="forwards"?g.reverse():g).flat()},[a]);return v.useEffect(()=>{const b=d.current;if(b){const m=g=>{var _,E,k;const x=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!x){const R=document.activeElement,N=g.shiftKey;if(g.target===b&&N){(_=u.current)==null||_.focus();return}const O=y({tabbingDirection:N?"backwards":"forwards"}),W=O.findIndex(I=>I===R);fc(O.slice(W+1))?g.preventDefault():N?(E=u.current)==null||E.focus():(k=c.current)==null||k.focus()}};return b.addEventListener("keydown",m),()=>b.removeEventListener("keydown",m)}},[a,y]),p.jsxs(DS,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&p.jsx(Nd,{ref:u,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"forwards"});fc(b)}}),p.jsx(af.Slot,{scope:r,children:p.jsx(Ee.ol,{tabIndex:-1,...i,ref:f})}),w&&p.jsx(Nd,{ref:c,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"backwards"});fc(b)}})]})});Qv.displayName=Jv;var Yv="ToastFocusProxy",Nd=v.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,i=yu(Yv,r);return p.jsx(gu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&n()}})});Nd.displayName=Yv;var Jo="Toast",YS="toast.swipeStart",XS="toast.swipeMove",ZS="toast.swipeCancel",e_="toast.swipeEnd",Xv=v.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=e,[a,l]=mu({prop:n,defaultProp:s??!0,onChange:i,caller:Jo});return p.jsx(pu,{present:r||a,children:p.jsx(n_,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:jn(e.onPause),onResume:jn(e.onResume),onSwipeStart:ce(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ce(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ce(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Xv.displayName=Jo;var[t_,r_]=qv(Jo,{onClose(){}}),n_=v.forwardRef((e,t)=>
40{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...w}=e,y=yu(Jo,r),[b,m]=v.useState(null),g=$e(t,I=>m(I)),x=v.useRef(null),S=v.useRef(null),_=s||y.duration,E=v.useRef(0),k=v.useRef(_),R=v.useRef(0),{onToastAdd:N,onToastRemove:C}=y,L=jn(()=>{var K;(b==null?void 0:b.contains(document.activeElement))&&((K=y.viewport)==null||K.focus()),o()}),O=v.useCallback(I=>{!I||I===1/0||(window.clearTimeout(R.current),E.current=new Date().getTime(),R.current=window.setTimeout(L,I))},[L]);v.useEffect(()=>{const I=y.viewport;if(I){const K=()=>{O(k.current),u==null||u()},V=()=>{const H=new Date().getTime()-E.current;k.current=k.current-H,window.clearTimeout(R.current),l==null||l()};return I.addEventListener(Pd,V),I.addEventListener(Ad,K),()=>{I.removeEventListener(Pd,V),I.removeEventListener(Ad,K)}}},[y.viewport,_,l,u,O]),v.useEffect(()=>{i&&!y.isClosePausedRef.current&&O(_)},[i,_,y.isClosePausedRef,O]),v.useEffect(()=>(N(),()=>C()),[N,C]);const W=v.useMemo(()=>b?i0(b):null,[b]);return y.viewport?p.jsxs(p.Fragment,{children:[W&&p.jsx(s_,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),p.jsx(t_,{scope:r,onClose:L,children:Go.createPortal(p.jsx(af.ItemSlot,{scope:r,children:p.jsx(LS,{asChild:!0,onEscapeKeyDown:ce(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||L(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(Ee.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...w,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ce(e.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:ce(e.onPointerDown,I=>{I.button===0&&(x.current={x:I.clientX,y:I.clientY})}),onPointerMove:ce(e.onPointerMove,I=>{if(!x.current)return;const K=I.clientX-x.current.x,V=I.clientY-x.current.y,H=!!S.current,T=["left","right"].includes(y.swipeDirection),A=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,$=T?A(0,K):0,J=T?0:A(0,V),F=I.pointerType==="touch"?10:2,q={x:$,y:J},Y={originalEvent:I,delta:q};H?(S.current=q,Ta(XS,d,Y,{discrete:!1})):Zp(q,y.swipeDirection,F)?(S.current=q,Ta(YS,c,Y,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(K)>F||Math.abs(V)>F)&&(x.current=null)}),onPointerUp:ce(e.onPointerUp,I=>{const K=S.current,V=I.target;if(V.hasPointerCapture(I.pointerId)&&V.releasePointerCapture(I.pointerId),S.current=null,x.current=null,K){const H=I.currentTarget,T={originalEvent:I,delta:K};Zp(K,y.swipeDirection,y.swipeThreshold)?Ta(e_,h,T,{discrete:!0}):Ta(ZS,f,T,{discrete:!0}),H.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),s_=e=>{const{__scopeToast:t,children:r,...n}=e,s=yu(Jo,t),[i,o]=v.useState(!1),[a,l]=v.useState(!1);return a_(()=>o(!0)),v.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:p.jsx(Kv,{asChild:!0,children:p.jsx(gu,{...n,children:i&&p.jsxs(p.Fragment,{children:[s.label," ",r]})})})},i_="ToastTitle",Zv=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return p.jsx(Ee.div,{...n,ref:t})});Zv.displayName=i_;var o_="ToastDescription",e0=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return p.jsx(Ee.div,{...n,ref:t})});e0.displayName=o_;var t0="ToastAction",r0=v.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?p.jsx(s0,{altText:r,asChild:!0,children:p.jsx(lf,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${t0}\`. Expected non-empty \`string\`.`),null)});r0.displayName=t0;var n0="ToastClose",lf=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=r_(n0,r);return p.jsx(s0,{asChild:!0,children:p.jsx(Ee.button,{type:"button",...n,ref:t,onClick:ce(e.onClick,s.onClose)})})});lf.displayName=n0;var s0=v.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return p.jsx(Ee.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function i0(e){const t=[];
vendor: 7,341 bytes, lines 40-114
40return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),l_(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...i0(n))}}),t}function Ta(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?zv(s,i):s.dispatchEvent(i)}var Zp=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),i=n>s;return t==="left"||t==="right"?i&&n>r:!i&&s>r};function a_(e=()=>{}){const t=jn(e);Hr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function l_(e){return e.nodeType===e.ELEMENT_NODE}function u_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function fc(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var c_=Gv,o0=Qv,a0=Xv,l0=Zv,u0=e0,c0=r0,d0=lf;function h0(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=h0(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function f0(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=h0(e))&&(n&&(n+=" "),n+=t);return n}const em=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tm=f0,vu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return tm(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],d=i==null?void 0:i[u];if(c===null)return null;const f=em(c)||em(d);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(w=>{let[y,b]=w;return Array.isArray(b)?b.includes({...i,...a}[y]):{...i,...a}[y]===b})?[...u,d,f]:u},[]);return tm(e,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 d_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),p0=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===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 h_={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 f_=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>v.createElement("svg",{ref:l,...h_,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:p0("lucide",s),...a},[...o.map(([u,c])=>v.createElement(u,c)),...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 Be=(e,t)=>{const r=v.forwardRef(({className:n,...s},i)=>v.createElement(f_,{ref:i,iconNode:t,className:p0(`lucide-${d_(e)}`,n),...s}));return r.displayName=`${e}`,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 p_=Be("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const Qo=Be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 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 uf=Be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 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 m_=Be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 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 m0=Be("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 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 pc=Be("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/** 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 mc=Be("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/** 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 g_=Be("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 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 y_=Be("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 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 v_=Be("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/** 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.
vendor: 10,476 bytes, lines 115-150
115 */const g0=Be("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const w_=Be("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"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const rm=Be("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const gc=Be("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const yc=Be("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const x_=Be("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const vc=Be("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const b_=Be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),cf="-",S_=e=>{const t=E_(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const a=o.split(cf);return a[0]===""&&a.length!==1&&a.shift(),y0(a,t)||__(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},y0=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?y0(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(cf);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},nm=/^\[(.+)\]$/,__=e=>{if(nm.test(e)){const t=nm.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},E_=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return C_(Object.entries(e.classGroups),r).forEach(([i,o])=>{jd(o,n,i,t)}),n},jd=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:sm(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(k_(s)){jd(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{jd(o,sm(t,i),r,n)})})},sm=(e,t)=>{let r=e;return t.split(cf).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},k_=e=>e.isThemeGetter,C_=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[r,s]}):e,T_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},v0="!",R_=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let b=0;b<a.length;b++){let m=a[b];if(u===0){if(m===s&&(n||a.slice(b,b+i)===t)){l.push(a.slice(c,b)),c=b+i;continue}if(m==="/"){d=b;continue}}m==="["?u++:m==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(v0),w=h?f.substring(1):f,y=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:w,maybePostfixModifierPosition:y}};return r?a=>r({className:a,parseClassName:o}):o},P_=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},A_=e=>({cache:T_(e.cacheSize),parseClassName:R_(e),...S_(e)}),N_=/\s+/,j_=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(N_);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(u);let w=!!h,y=n(w?f.substring(0,h):f);if(!y){if(!w){a=u+(a.length>0?" "+a:a);continue}if(y=n(f),!y){a=u+(a.length>0?" "+a:a);continue}w=!1}const b=P_(c).join(":"),m=d?b+v0:b,g=m+y;if(i.includes(g))continue;i.push(g);const x=s(y,w);for(let S=0;S<x.length;++S){const _=x[S];i.push(m+_)}a=u+(a.length>0?" "+a:a)}return a};function O_(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=w0(t))&&(n&&(n+=" "),n+=r);return n}const w0=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=w0(e[n]))&&(r&&(r+=" "),r+=t);return r};function I_(e,...t){let r,n,s,i=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return r=A_(u),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const u=n(l);if(u)return u;const c=j_(l,r);return s(l,c),c}return function(){return i(O_.apply(null,arguments))}}const pe=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},x0=/^\[(?:([a-z-]+):)?(.+)\]$/i,L_=/^\d+\/\d+$/,D_=new Set(["px","full","screen"]),$_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,M_=/\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$/,F_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,U_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Tr=e=>Hs(e)||D_.has(e)||L_.test(e),rn=e=>mi(e,"length",J_),Hs=e=>!!e&&!Number.isNaN(Number(e)),wc=e=>mi(e,"number",Hs),Ii=e=>!!e&&Number.isInteger(Number(e)),z_=e=>e.endsWith("%")&&Hs(e.slice(0,-1)),ee=e=>x0.test(e),nn=e=>$_.test(e),H_=new Set(["length","size","percentage"]),W_=e=>mi(e,H_,b0),V_=e=>mi(e,"position",b0),K_=new Set(["image","url"]),q_=e=>mi(e,K_,Y_),G_=e=>mi(e,"",Q_),Li=()=>!0,mi=(e,t,r)=>{const n=x0.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},J_=e=>M_.test(e)&&!F_.test(e),b0=()=>!1,Q_=e=>U_.test(e),Y_=e=>B_.test(e),X_=()=>{const e=pe("colors"),t=pe("spacing"),r=pe("blur"),n=pe("brightness"),s=pe("borderColor"),i=pe("borderRadius"),o=pe("borderSpacing"),a=pe("borderWidth"),l=pe("contrast"),u=pe("grayscale"),c=pe("hueRotate"),d=pe("invert"),f=pe("gap"),h=pe("gradientColorStops"),w=pe("gradientColorStopPositions"),y=pe("inset"),b=pe("margin"),m=pe("opacity"),g=pe("padding"),x=pe("saturate"),S=pe("scale"),_=pe("sepia"),E=pe("skew"),k=pe("space"),R=pe("translate"),N=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ee,t],O=()=>[ee,t],W=()=>["",Tr,rn],I=()=>["auto",Hs,ee],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",ee],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Hs,ee];return{cacheSize:500,separator:":",theme:{colors:[Li],spacing:[Tr,rn],blur:["none","",nn,ee],brightness:J(),borderColor:[e],borderRadius:["none","","full",nn,ee],borderSpacing:O(),borderWidth:W(),contrast:J(),grayscale:A(),hueRotate:J(),invert:A(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[z_,rn],inset:L(),margin:L(),opacity:J(),padding:O(),saturate:J(),scale:J(),sepia:A(),skew:J(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[nn]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...K(),ee]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}
vendor: 9,652 bytes, line 150
150],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ii,ee]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Ii,ee]}],"grid-cols":[{"grid-cols":[Li]}],"col-start-end":[{col:["auto",{span:["full",Ii,ee]},ee]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Li]}],"row-start-end":[{row:["auto",{span:[Ii,ee]},ee]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[nn]},nn]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",nn,rn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wc]}],"font-family":[{font:[Li]}],"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",ee]}],"line-clamp":[{"line-clamp":["none",Hs,wc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Tr,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Tr,rn]}],"underline-offset":[{"underline-offset":["auto",Tr,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],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",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),V_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",W_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},q_]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"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":[m]}],"border-style":[{border:[...V(),"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":[m]}],"divide-style":[{divide:V()}],"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:["",...V()]}],"outline-offset":[{"outline-offset":[Tr,ee]}],"outline-w":[{outline:[Tr,rn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Tr,rn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",nn,G_]}],"shadow-color":[{shadow:[Li]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",nn,ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"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",ee]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Ii,ee]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ee]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}
vendor: 4,942 bytes, line 150
150],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Tr,rn,wc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Z_=I_(X_);function Ie(...e){return Z_(f0(e))}const eE=c_,S0=v.forwardRef(({className:e,...t},r)=>p.jsx(o0,{ref:r,className:Ie("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));S0.displayName=o0.displayName;const tE=vu("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"}}),_0=v.forwardRef(({className:e,variant:t,...r},n)=>p.jsx(a0,{ref:n,className:Ie(tE({variant:t}),e),...r}));_0.displayName=a0.displayName;const rE=v.forwardRef(({className:e,...t},r)=>p.jsx(c0,{ref:r,className:Ie("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));rE.displayName=c0.displayName;const E0=v.forwardRef(({className:e,...t},r)=>p.jsx(d0,{ref:r,className:Ie("absolute right-2 top-2 rounded-md p-1 text-foreground
150/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(b_,{className:"h-4 w-4"})}));E0.displayName=d0.displayName;const k0=v.forwardRef(({className:e,...t},r)=>p.jsx(l0,{ref:r,className:Ie("text-sm font-semibold",e),...t}));k0.displayName=l0.displayName;const C0=v.forwardRef(({className:e,...t},r)=>p.jsx(u0,{ref:r,className:Ie("text-sm opacity-90",e),...t}));C0.displayName=u0.displayName;function nE(){const{toasts:e}=wS();return p.jsxs(eE,{children:[e.map(function({id:t,title:r,description:n,action:s,...i}){return p.jsxs(_0,{...i,children:[p.jsxs("div",{className:"grid gap-1",children:[r&&p.jsx(k0,{children:r}),n&&p.jsx(C0,{children:n})]}),s,p.jsx(E0,{})]},t)}),p.jsx(S0,{})]})}var im=["light","dark"],sE="(prefers-color-scheme: dark)",iE=v.createContext(void 0),oE={setTheme:e=>{},themes:[]},aE=()=>{var e;return(e=v.useContext(iE))!=null?e:oE};v.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",c=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?im.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,y=!1,b=!0)=>{let m=o?o[w]:w,g=y?w+"|| ''":`'${m}'`,x="";return s&&b&&!y&&im.includes(w)&&(x+=`d.style.colorScheme = '${w}';`),r==="class"?y||m?x+=`c.add(${g})`:x+="null":m&&(x+=`d[s](n,${g})`),x},h=e?`!function(){${c}${f(e)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${sE}',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)}}${u?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return v.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var lE=e=>{switch(e){case"success":return dE;case"info":return fE;case"warning":return hE;case"error":return pE;default:return null}},uE=Array(12).fill(0),cE=({visible:e,className:t})=>D.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},D.createElement("div",{className:"sonner-spinner"},uE.map((r,n)=>D.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),dE=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.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"})),hE=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},D.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"})),fE=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.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"})),pE=D.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},D.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"})),mE=D.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"},D.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),D.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),gE=()=>{let[e,t]=D.useState(document.hidden);return D.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Od=1,yE=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
vendor: 1,050 bytes, line 150
150{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Od++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:o,title:r}):a):this.addToast({title:r,...n,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
150this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,i,o=n.then(async l=>{if(i=["resolve",l],D.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(wE(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:u,description:c})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:u,description:c})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Od++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ct=new yE,vE=(e,t)=>{let r=(t==null?void 0:t.id)||Od++;return ct.addToast({title:e,...t,id:r}),r},wE=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xE=vE,bE=()=>ct.toasts,SE=()=>ct.getActiveToasts(),om=Object.assign(xE,{success:ct.success,info:ct.info,warning:ct.warning,error:ct.error,custom:ct.custom,message:ct.message,promise:ct.promise,dismiss:ct.dismiss,loading:ct.loading},{getHistory:bE,getToasts:SE});function _E(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}_E(`: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;
150left: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}
150: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%);
150--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%)} 151`);function Ra(e){return e.label!==void 0}var EE=3,kE="32px",CE="16px",am=4e3,TE=356,RE=14,PE=20,AE=200;function zt(...e){return e.filter(Boolean).join(" ")}function NE(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var jE=e=>{var t,r,n,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:w,interacting:y,setHeights:b,visibleToasts:m,heights:g,index:x,toasts:S,expanded:_,removeToast:E,defaultRichColors:k,closeButton:R,style:N,cancelButtonStyle:C,actionButtonStyle:L,className:O="",descriptionClassName:W="",duration:I,position:K,gap:V,loadingIcon:H,expandByDefault:T,classNames:A,icons:$,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:F}
vendor: 8,206 bytes, line 151
151=e,[q,Y]=D.useState(null),[oe,ye]=D.useState(null),[te,gt]=D.useState(!1),[Ke,Re]=D.useState(!1),[Ne,lt]=D.useState(!1),[Q,ze]=D.useState(!1),[le,Ct]=D.useState(!1),[Cr,ar]=D.useState(0),[lr,Si]=D.useState(0),Mn=D.useRef(h.duration||I||am),na=D.useRef(null),Jr=D.useRef(null),_i=x===0,sa=x+1<=m,et=h.type,Qr=h.dismissible!==!1,ia=h.className||"",Ei=h.descriptionClassName||"",Fn=D.useMemo(()=>g.findIndex(X=>X.toastId===h.id)||0,[g,h.id]),U=D.useMemo(()=>{var X;return(X=h.closeButton)!=null?X:R},[h.closeButton,R]),re=D.useMemo(()=>h.duration||I||am,[h.duration,I]),fe=D.useRef(0),tt=D.useRef(0),ki=D.useRef(0),Yr=D.useRef(null),[Tt,oa]=K.split("-"),ps=D.useMemo(()=>g.reduce((X,ue,ve)=>ve>=Fn?X:X+ue.height,0),[g,Fn]),aa=gE(),Ux=h.invert||f,$u=et==="loading";tt.current=D.useMemo(()=>Fn*V+ps,[Fn,ps]),D.useEffect(()=>{Mn.current=re},[re]),D.useEffect(()=>{gt(!0)},[]),D.useEffect(()=>{let X=Jr.current;if(X){let ue=X.getBoundingClientRect().height;return Si(ue),b(ve=>[{toastId:h.id,height:ue,position:h.position},...ve]),()=>b(ve=>ve.filter(Mt=>Mt.toastId!==h.id))}},[b,h.id]),D.useLayoutEffect(()=>{if(!te)return;let X=Jr.current,ue=X.style.height;X.style.height="auto";let ve=X.getBoundingClientRect().height;X.style.height=ue,Si(ve),b(Mt=>Mt.find(Ft=>Ft.toastId===h.id)?Mt.map(Ft=>Ft.toastId===h.id?{...Ft,height:ve}:Ft):[{toastId:h.id,height:ve,position:h.position},...Mt])},[te,h.title,h.description,b,h.id]);let Xr=D.useCallback(()=>{Re(!0),ar(tt.current),b(X=>X.filter(ue=>ue.toastId!==h.id)),setTimeout(()=>{E(h)},AE)},[h,E,b,tt]);D.useEffect(()=>{if(h.promise&&et==="loading"||h.duration===1/0||h.type==="loading")return;let X;return _||y||F&&aa?(()=>{if(ki.current<fe.current){let ue=new Date().getTime()-fe.current;Mn.current=Mn.current-ue}ki.current=new Date().getTime()})():Mn.current!==1/0&&(fe.current=new Date().getTime(),X=setTimeout(()=>{var ue;(ue=h.onAutoClose)==null||ue.call(h,h),Xr()},Mn.current)),()=>clearTimeout(X)},[_,y,h,et,F,aa,Xr]),D.useEffect(()=>{h.delete&&Xr()},[Xr,h.delete]);function Bx(){var X,ue,ve;return $!=null&&$.loading?D.createElement("div",{className:zt(A==null?void 0:A.loader,(X=h==null?void 0:h.classNames)==null?void 0:X.loader,"sonner-loader"),"data-visible":et==="loading"},$.loading):H?D.createElement("div",{className:zt(A==null?void 0:A.loader,(ue=h==null?void 0:h.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":et==="loading"},H):D.createElement(cE,{className:zt(A==null?void 0:A.loader,(ve=h==null?void 0:h.classNames)==null?void 0:ve.loader),visible:et==="loading"})}return D.createElement("li",{tabIndex:0,ref:Jr,className:zt(O,ia,A==null?void 0:A.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[et],(r=h==null?void 0:h.classNames)==null?void 0:r[et]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:k,"data-styled":!(h.jsx||h.unstyled||w),"data-mounted":te,"data-promise":!!h.promise,"data-swiped":le,"data-removed":Ke,"data-visible":sa,"data-y-position":Tt,"data-x-position":oa,"data-index":x,"data-front":_i,"data-swiping":Ne,"data-dismissible":Qr,"data-type":et,"data-invert":Ux,"data-swipe-out":Q,"data-swipe-direction":oe,"data-expanded":!!(_||T&&te),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${Ke?Cr:tt.current}px`,"--initial-height":T?"auto":`${lr}px`,...N,...h.style},onDragEnd:()=>{lt(!1),Y(null),Yr.current=null},onPointerDown:X=>{$u||!Qr||(na.current=new Date,ar(tt.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(lt(!0),Yr.current={x:X.clientX,y:X.clientY}))},onPointerUp:()=>{var X,ue,ve,Mt;if(Q||!Qr)return;Yr.current=null;let Ft=Number(((X=Jr.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Zr=Number(((ue=Jr.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Un=new Date().getTime()-((ve=na.current)==null?void 0:ve.getTime()),Ut=q==="x"?Ft:Zr,en=Math.abs(Ut)/Un;if(Math.abs(Ut)>=PE||en>.11){ar(tt.current),(Mt=h.onDismiss)==null||Mt.call(h,h),ye(q==="x"?Ft>0?"right":"left":Zr>0?"down":"up"),Xr(),ze(!0),Ct(!1);return}lt(!1),Y(null)},onPointerMove:X=>{var ue,ve,Mt,Ft;if(!Yr.current||!Qr||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;let Zr=X.clientY-Yr.current.y,Un=X.clientX-Yr.current.x,Ut=(ve=e.swipeDirections)!=null?ve:NE(K);!q&&(Math.abs(Un)>1||Math.abs(Zr)>1)&&Y(Math.abs(Un)>Math.abs(Zr)?"x":"y");let en={x:0,y:0};q==="y"?(Ut.includes("top")||Ut.includes("bottom"))&&(Ut.includes("top")&&Zr<0||Ut.includes("bottom")&&Zr>0)&&(en.y=Zr):q==="x"&&(Ut.includes("left")||Ut.includes("right"))&&(Ut.includes("left")&&Un<0||Ut.includes("right")&&Un>0)&&(en.x=Un),(Math.abs(en.x)>0||Math.abs(en.y)>0)&&Ct(!0),(Mt=Jr.current)==null||Mt.style.setProperty("--swipe-amount-x",`${en.x}px`),(Ft=Jr.current)==null||Ft.style.setProperty("--swipe-amount-y",`${en.y}px`)}},U&&!h.jsx?D.createElement("button",{"aria-label":J,"data-disabled":$u,"data-close-button":!0,onClick:$u||!Qr?()=>{}:()=>{var X;Xr(),(X=h.onDismiss)==null||X.call(h,h)},className:zt(A==null?void 0:A.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=$==null?void 0:$.close)!=null?i:mE):null,h.jsx||v.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:D.createElement(D.Fragment,null,et||h.icon||h.promise?D.createElement("div",{"data-icon":"",className:zt(A==null?void 0:A.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Bx():null,h.type!=="loading"?h.icon||($==null?void 0:$[et])||lE(et):null):null,D.createElement("div",{"data-content":"",className:zt(A==null?void 0:A.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},D.createElement("div",{"data-title":"",className:zt(A==null?void 0:A.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?D.createElement("div",{"data-description":"",className:zt(W,Ei,A==null?void 0:A.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),v.isValidElement(h.cancel)?h.cancel:h.cancel&&Ra(h.cancel)?D.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||C,onClick:X=>{var ue,ve;Ra(h.cancel)&&Qr&&((ve=(ue=h.cancel).onClick)==null||ve.call(ue,X),Xr())},className:zt(A==null?void 0:A.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,v.isValidElement(h.action)?h.action:h.action&&Ra(h.action)?D.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:X=>{var ue,ve;Ra(h.action)&&((ve=(ue=h.action).onClick)==null||ve.call(ue,X),!X.defaultPrevented&&Xr())},className:zt(A==null?void 0:A.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function lm(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function OE(e,t){let r={};return[e,t].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?CE:kE;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=a:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var IE=v.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:w=EE,toastOptions:y,dir:b=lm(),gap:m=RE,loadingIcon:g,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:_}=e,[E,k]=D.useState([]),R=D.useMemo(()=>Array.from(new Set([n].concat(E.filter(F=>F.position).map(F=>F.position)))),[E,n]),[N,C]=D.useState([]),[L,O]=D.useState(!1),[W,I]=D.useState(!1),[K,V]=D.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
151k":"light"),H=D.useRef(null),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=D.useRef(null),$=D.useRef(!1),J=D.useCallback(F=>{k(q=>{var Y;return(Y=q.find(oe=>oe.id===F.id))!=null&&Y.delete||ct.dismiss(F.id),q.filter(({id:oe})=>oe!==F.id)})},[]);return D.useEffect(()=>ct.subscribe(F=>{if(F.dismiss){k(q=>q.map(Y=>Y.id===F.id?{...Y,delete:!0}:Y));return}setTimeout(()=>{$v.flushSync(()=>{k(q=>{let Y=q.findIndex(oe=>oe.id===F.id);return Y!==-1?[...q.slice(0,Y),{...q[Y],...F},...q.slice(Y+1)]:[F,...q]})})})}),[]),D.useEffect(()=>{if(c!=="system"){V(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:q})=>{V(q?"dark":"light")})}catch{F.addListener(({matches:Y})=>{try{V(Y?"dark":"light")}catch(oe){console.error(oe)}})}},[c]),D.useEffect(()=>{E.length<=1&&O(!1)},[E]),D.useEffect(()=>{let F=q=>{var Y,oe;s.every(ye=>q[ye]||q.code===ye)&&(O(!0),(Y=H.current)==null||Y.focus()),q.code==="Escape"&&(document.activeElement===H.current||(oe=H.current)!=null&&oe.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[s]),D.useEffect(()=>{if(H.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,$.current=!1)}},[H.current]),D.createElement("section",{ref:t,"aria-label":`${S} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((F,q)=>{var Y;let[oe,ye]=F.split("-");return E.length?D.createElement("ol",{key:F,dir:b==="auto"?lm():b,tabIndex:-1,ref:H,className:a,"data-sonner-toaster":!0,"data-theme":K,"data-y-position":oe,"data-lifted":L&&E.length>1&&!i,"data-x-position":ye,style:{"--front-toast-height":`${((Y=N[0])==null?void 0:Y.height)||0}px`,"--width":`${TE}px`,"--gap":`${m}px`,...h,...OE(l,u)},onBlur:te=>{$.current&&!te.currentTarget.contains(te.relatedTarget)&&($.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||$.current||($.current=!0,A.current=te.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{W||O(!1)},onDragEnd:()=>O(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},E.filter(te=>!te.position&&q===0||te.position===F).map((te,gt)=>{var Ke,Re;return D.createElement(jE,{key:te.id,icons:x,index:gt,toast:te,defaultRichColors:d,duration:(Ke=y==null?void 0:y.duration)!=null?Ke:f,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:r,visibleToasts:w,closeButton:(Re=y==null?void 0:y.closeButton)!=null?Re:o,interacting:W,position:F,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:J,toasts:E.filter(Ne=>Ne.position==te.position),heights:N.filter(Ne=>Ne.position==te.position),setHeights:C,expandByDefault:i,gap:m,loadingIcon:g,expanded:L,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const LE=({...e})=>{const{theme:t="system"}=aE();return p.jsx(IE,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var DE=Ig[" useId ".trim().toString()]||(()=>{}),$E=0;function ME(e){const[t,r]=v.useState(DE());return Hr(()=>{r(n=>n??String($E++))},[e]),t?`radix-${t}`:""}const FE=["top","right","bottom","left"],On=Math.min,vt=Math.max,jl=Math.round,Pa=Math.floor,br=e=>({x:e,y:e}
vendor: 11,921 bytes, line 151
151),UE={left:"right",right:"left",bottom:"top",top:"bottom"},BE={start:"end",end:"start"};function Id(e,t,r){return vt(e,On(t,r))}function Wr(e,t){return typeof e=="function"?e(t):e}function Vr(e){return e.split("-")[0]}function gi(e){return e.split("-")[1]}function df(e){return e==="x"?"y":"x"}function hf(e){return e==="y"?"height":"width"}const zE=new Set(["top","bottom"]);function vr(e){return zE.has(Vr(e))?"y":"x"}function ff(e){return df(vr(e))}function HE(e,t,r){r===void 0&&(r=!1);const n=gi(e),s=ff(e),i=hf(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Ol(o)),[o,Ol(o)]}function WE(e){const t=Ol(e);return[Ld(e),t,Ld(t)]}function Ld(e){return e.replace(/start|end/g,t=>BE[t])}const um=["left","right"],cm=["right","left"],VE=["top","bottom"],KE=["bottom","top"];function qE(e,t,r){switch(e){case"top":case"bottom":return r?t?cm:um:t?um:cm;case"left":case"right":return t?VE:KE;default:return[]}}function GE(e,t,r,n){const s=gi(e);let i=qE(Vr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Ld)))),i}function Ol(e){return e.replace(/left|right|bottom|top/g,t=>UE[t])}function JE(e){return{top:0,right:0,bottom:0,left:0,...e}}function T0(e){return typeof e!="number"?JE(e):{top:e,right:e,bottom:e,left:e}}function Il(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function dm(e,t,r){let{reference:n,floating:s}=e;const i=vr(t),o=ff(t),a=hf(o),l=Vr(t),u=i==="y",c=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:c,y:n.y-s.height};break;case"bottom":h={x:c,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(gi(t)){case"start":h[o]-=f*(r&&u?-1:1);break;case"end":h[o]+=f*(r&&u?-1:1);break}return h}const QE=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:d}=dm(u,n,l),f=n,h={},w=0;for(let y=0;y<a.length;y++){const{name:b,fn:m}=a[y],{x:g,y:x,data:S,reset:_}=await m({x:c,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=g??c,d=x??d,h={...h,[b]:{...h[b],...S}},_&&w<=50&&(w++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:c,y:d}=dm(u,f,l)),y=-1)}return{x:c,y:d,placement:f,strategy:s,middlewareData:h}};async function To(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Wr(t,e),w=T0(h),b=a[f?d==="floating"?"reference":"floating":d],m=Il(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},_=Il(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:l}):g);return{top:(m.top-_.top+w.top)/S.y,bottom:(_.bottom-m.bottom+w.bottom)/S.y,left:(m.left-_.left+w.left)/S.x,right:(_.right-m.right+w.right)/S.x}}const YE=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Wr(e,t)||{};if(u==null)return{};const d=T0(c),f={x:r,y:n},h=ff(s),w=hf(h),y=await o.getDimensions(u),b=h==="y",m=b?"top":"left",g=b?"bottom":"right",x=b?"clientHeight":"clientWidth",S=i.reference[w]+i.reference[h]-f[h]-i.floating[w],_=f[h]-i.reference[h],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let k=E?E[x]:0;(!k||!await(o.isElement==null?void 0:o.isElement(E)))&&(k=a.floating[x]||i.floating[w]);const R=S/2-_/2,N=k/2-y[w]/2-1,C=On(d[m],N),L=On(d[g],N),O=C,W=k-y[w]-L,I=k/2-y[w]/2+R,K=Id(O,I,W),V=!l.arrow&&gi(s)!=null&&I!==K&&i.reference[w]/2-(I<O?C:L)-y[w]/2<0,H=V?I<O?I-O:I-W:0;return{[h]:f[h]+H,data:{[h]:K,centerOffset:I-K-H,...V&&{alignmentOffset:H}},reset:V}}}),XE=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...b}=Wr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const m=Vr(s),g=vr(a),x=Vr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=f||(x||!y?[Ol(a)]:WE(a)),E=w!=="none";!f&&E&&_.push(...GE(a,y,w,S));const k=[a,..._],R=await To(t,b),N=[];let C=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&N.push(R[m]),d){const I=HE(s,o,S);N.push(R[I[0]],R[I[1]])}if(C=[...C,{placement:s,overflows:N}],!N.every(I=>I<=0)){var L,O;const I=(((L=i.flip)==null?void 0:L.index)||0)+1,K=k[I];if(K&&(!(d==="alignment"?g!==vr(K):!1)||C.every(T=>T.overflows[0]>0&&vr(T.placement)===g)))return{data:{index:I,overflows:C},reset:{placement:K}};let V=(O=C.filter(H=>H.overflows[0]<=0).sort((H,T)=>H.overflows[1]-T.overflows[1])[0])==null?void 0:O.placement;if(!V)switch(h){case"bestFit":{var W;const H=(W=C.filter(T=>{if(E){const A=vr(T.placement);return A===g||A==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(A=>A>0).reduce((A,$)=>A+$,0)]).sort((T,A)=>T[1]-A[1])[0])==null?void 0:W[0];H&&(V=H);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function hm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fm(e){return FE.some(t=>e[t]>=0)}const ZE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Wr(e,t);switch(n){case"referenceHidden":{const i=await To(t,{...s,elementContext:"reference"}),o=hm(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:fm(o)}}}case"escaped":{const i=await To(t,{...s,altBoundary:!0}),o=hm(i,r.floating);return{data:{escapedOffsets:o,escaped:fm(o)}}}default:return{}}}}},R0=new Set(["left","top"]);async function ek(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Vr(r),a=gi(r),l=vr(r)==="y",u=R0.has(o)?-1:1,c=i&&l?-1:1,d=Wr(t,e);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*c,y:f*u}:{x:f*u,y:h*c}}const tk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await ek(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},rk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:m,y:g}=b;return{x:m,y:g}}},...l}=Wr(e,t),u={x:r,y:n},c=await To(t,l),d=vr(Vr(s)),f=df(d);let h=u[f],w=u[d];if(i){const b=f==="y"?"top":"left",m=f==="y"?"bottom":"right",g=h+c[b],x=h-c[m];h=Id(g,h,x)}if(o){const b=d==="y"?"top":"left",m=d==="y"?"bottom":"right",g=w+c[b],x=w-c[m];w=Id(g,w,x)}const y=a.fn({...t,[f]:h,[d]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[f]:i,[d]:o}}}}}},nk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Wr(e,t),c={x:r,y:n},d=vr(s),f=df(d);let h=c[f],w=c[d];const y=Wr(a,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const x=f==="y"?"height":"width",S=i.reference[f]-i.floating[x]+b.mainAxis,_=i.reference[f]+i.reference[x]-b.mainAxis;h<S?h=S:h>_&&(h=_)}if(u){var m,g;const x=f==="y"?"width":"height",S=R0.has(Vr(s)),_=i.reference[d]-i.floating[x]+(S&&((m=o.offset)==null?void 0:m[d])||0)+(S?0:b.crossAxis),E=i.reference[d]+i.reference[x]+(S?0:((g=o.offset)==null?void 0:g[d])||0)-(S?b.crossAxis:0);w<_?w=_:w>E&&(w=E)}return{[f]:h,[d]:w}}}},sk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Wr(e,t),c=await To(t,u),d=Vr(s),f=gi(s),h=vr(s)==="y",{width:w,height:y}=i.floating;let b,m;d==="top"||d==="bottom"?(b=d,m=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=d,b=f==="end"?"top":"bottom");const g=y-c.top-c.bottom,x=w-c.left-c.right,S=On(y-c[b],g),_=On(w-c[m],x),E=!t.middlewareData.shift;let k=S,R=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=g),E&&!f){const C=vt(c.left,0),L=vt(c.right,0),O=vt(c.top,0),W=vt(c.bottom,0);h?R=w-2*(C!==0||L!==0?C+L:vt(c.left,c.right)):k=y-2*(O!==0||W!==0?O+W:vt(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:k});const N=await o.getDimensions(a.floating);return w!==N.width||y!==N.height?{reset:{rects:!0}}:{}}}};function wu(){return typeof window<"u"}function yi(e){return P0(e)?(e.nodeName||"").toLowerCase():"#document"}function St(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Er(e){var t;return(t=(P0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function P0(e){return wu()?e instanceof Node||e instanceof St(e).Node:!1}function sr(e){return wu()?e instanceof Element||e instanceof St(e).Element:!1}function Sr(e){return wu()?e instanceof HTMLElement||e instanceof St(e).HTMLElement:!1}function pm(e){return!wu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof St(e).ShadowRoot}const ik=new Set(["inline","contents"]);function Yo(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=ir(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ik.has(s)}const ok=new Set(["table","td","th"]);function ak(e){return ok.has(yi(e))}const lk=[":popover-open",":modal"];function xu(e){return lk.some(t=>{try{return e.matches(t)}catch{return!1}})}const uk=["transform","translate","scale","rotate","perspective"],ck=["transform","translate","scale","rotate","perspective","filter"],dk=["paint","layout","strict","content"];function pf(e){const t=mf(),r=sr(e)?ir(e):e;return uk.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||ck.some(n=>(r.willChange||"").includes(n))||dk.some(n=>(r.contain||"").includes(n))}function hk(e){let t=In(e);for(;Sr(t)&&!ui(t);){if(pf(t))return t;if(xu(t))return null;t=In(t)}return null}function mf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fk=new Set(["html","body","#document"]);function ui(e){return fk.has(yi(e))}function ir(e){return St(e).getComputedStyle(e)}function bu(e){return sr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function In(e){if(yi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pm(e)&&e.host||Er(e);return pm(t)?t.host:t}function A0(e){const t=In(e);return ui(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sr(t)&&Yo(t)?t:A0(t)}function Ro(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=A0(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=St(s);if(i){const a=Dd(o);
vendor: 1,887 bytes, line 151
151return t.concat(o,o.visualViewport||[],Yo(s)?s:[],a&&r?Ro(a):[])}return t.concat(s,Ro(s,[],r))}function Dd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function N0(e){const t=ir(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Sr(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=jl(r)!==i||jl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function gf(e){return sr(e)?e:e.contextElement}function Ws(e){const t=gf(e);if(!Sr(t))return br(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=N0(t);let o=(i?jl(r.width):r.width)/n,a=(i?jl(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const pk=br(0);function j0(e){const t=St(e);return!mf()||!t.visualViewport?pk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mk(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==St(e)?!1:t}function cs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=gf(e);let o=br(1);t&&(n?sr(n)&&(o=Ws(n)):o=Ws(e));const a=mk(i,r,n)?j0(i):br(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const f=St(i),h=n&&sr(n)?St(n):n;let w=f,y=Dd(w);for(;y&&n&&h!==w;){const b=Ws(y),m=y.getBoundingClientRect(),g=ir(y),x=m.left+(y.clientLeft+parseFloat(g.paddingLeft))*b.x,S=m.top+(y.clientTop+parseFloat(g.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=x,u+=S,w=St(y),y=Dd(w)}}return Il({width:c,height:d,x:l,y:u})}function yf(e,t){const r=bu(e).scrollLeft;return t?t.left+r:cs(Er(e)).left+r}function O0(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:yf(e,n)),i=n.top+t.scrollTop;return{x:s,y:i}}function gk(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Er(n),a=t?xu(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=br(1);const c=br(0),d=Sr(n);
vendor: 13,858 bytes, line 151
151if((d||!d&&!i)&&((yi(n)!=="body"||Yo(o))&&(l=bu(n)),Sr(n))){const h=cs(n);u=Ws(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const f=o&&!d&&!i?O0(o,l,!0):br(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function yk(e){return Array.from(e.getClientRects())}function vk(e){const t=Er(e),r=bu(e),n=e.ownerDocument.body,s=vt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=vt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+yf(e);const a=-r.scrollTop;return ir(n).direction==="rtl"&&(o+=vt(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function wk(e,t){const r=St(e),n=Er(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=mf();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const xk=new Set(["absolute","fixed"]);function bk(e,t){const r=cs(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Sr(e)?Ws(e):br(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=n*i.y;return{width:o,height:a,x:l,y:u}}function mm(e,t,r){let n;if(t==="viewport")n=wk(e,r);else if(t==="document")n=vk(Er(e));else if(sr(t))n=bk(t,r);else{const s=j0(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Il(n)}function I0(e,t){const r=In(e);return r===t||!sr(r)||ui(r)?!1:ir(r).position==="fixed"||I0(r,t)}function Sk(e,t){const r=t.get(e);if(r)return r;let n=Ro(e,[],!1).filter(a=>sr(a)&&yi(a)!=="body"),s=null;const i=ir(e).position==="fixed";let o=i?In(e):e;for(;sr(o)&&!ui(o);){const a=ir(o),l=pf(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&xk.has(s.position)||Yo(o)&&!l&&I0(e,o))?n=n.filter(c=>c!==o):s=a,o=In(o)}return t.set(e,n),n}function _k(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const o=[...r==="clippingAncestors"?xu(t)?[]:Sk(t,this._c):[].concat(r),n],a=o[0],l=o.reduce((u,c)=>{const d=mm(t,c,s);return u.top=vt(d.top,u.top),u.right=On(d.right,u.right),u.bottom=On(d.bottom,u.bottom),u.left=vt(d.left,u.left),u},mm(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ek(e){const{width:t,height:r}=N0(e);return{width:t,height:r}}function kk(e,t,r){const n=Sr(t),s=Er(t),i=r==="fixed",o=cs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=br(0);function u(){l.x=yf(s)}if(n||!n&&!i)if((yi(t)!=="body"||Yo(s))&&(a=bu(t)),n){const h=cs(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&u();i&&!n&&s&&u();const c=s&&!n&&!i?O0(s,a):br(0),d=o.left+a.scrollLeft-l.x-c.x,f=o.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:o.width,height:o.height}}function xc(e){return ir(e).position==="static"}function gm(e,t){if(!Sr(e)||ir(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Er(e)===r&&(r=r.ownerDocument.body),r}function L0(e,t){const r=St(e);if(xu(e))return r;if(!Sr(e)){let s=In(e);for(;s&&!ui(s);){if(sr(s)&&!xc(s))return s;s=In(s)}return r}let n=gm(e,t);for(;n&&ak(n)&&xc(n);)n=gm(n,t);return n&&ui(n)&&xc(n)&&!pf(n)?r:n||hk(e)||r}const Ck=async function(e){const t=this.getOffsetParent||L0,r=this.getDimensions,n=await r(e.floating);return{reference:kk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Tk(e){return ir(e).direction==="rtl"}const Rk={convertOffsetParentRelativeRectToViewportRelativeRect:gk,getDocumentElement:Er,getClippingRect:_k,getOffsetParent:L0,getElementRects:Ck,getClientRects:yk,getDimensions:Ek,getScale:Ws,isElement:sr,isRTL:Tk};function D0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pk(e,t){let r=null,n;const s=Er(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(a||t(),!f||!h)return;const w=Pa(d),y=Pa(s.clientWidth-(c+f)),b=Pa(s.clientHeight-(d+h)),m=Pa(c),x={rootMargin:-w+"px "+-y+"px "+-b+"px "+-m+"px",threshold:vt(0,On(1,l))||1};let S=!0;function _(E){const k=E[0].intersectionRatio;if(k!==l){if(!S)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!D0(u,e.getBoundingClientRect())&&o(),S=!1}try{r=new IntersectionObserver(_,{...x,root:s.ownerDocument})}catch{r=new IntersectionObserver(_,x)}r.observe(e)}return o(!0),i}function Ak(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=gf(e),c=s||i?[...u?Ro(u):[],...Ro(t)]:[];c.forEach(m=>{s&&m.addEventListener("scroll",r,{passive:!0}),i&&m.addEventListener("resize",r)});const d=u&&a?Pk(u,r):null;let f=-1,h=null;o&&(h=new ResizeObserver(m=>{let[g]=m;g&&g.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let w,y=l?cs(e):null;l&&b();function b(){const m=cs(e);y&&!D0(y,m)&&r(),y=m,w=requestAnimationFrame(b)}return r(),()=>{var m;c.forEach(g=>{s&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),d==null||d(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(w)}}const Nk=tk,jk=rk,Ok=XE,Ik=sk,Lk=ZE,ym=YE,Dk=nk,$k=(e,t,r)=>{const n=new Map,s={platform:Rk,...r},i={...s.platform,_c:n};return QE(e,t,{...s,platform:i})};var Mk=typeof document<"u",Fk=function(){},tl=Mk?v.useLayoutEffect:Fk;function Ll(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Ll(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!Ll(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function $0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vm(e,t){const r=$0(e);return Math.round(t*r)/r}function bc(e){const t=v.useRef(e);return tl(()=>{t.current=e}),t}function Uk(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=v.useState(n);Ll(f,n)||h(n);const[w,y]=v.useState(null),[b,m]=v.useState(null),g=v.useCallback(T=>{T!==E.current&&(E.current=T,y(T))},[]),x=v.useCallback(T=>{T!==k.current&&(k.current=T,m(T))},[]),S=i||w,_=o||b,E=v.useRef(null),k=v.useRef(null),R=v.useRef(c),N=l!=null,C=bc(l),L=bc(s),O=bc(u),W=v.useCallback(()=>{if(!E.current||!k.current)return;const T={placement:t,strategy:r,middleware:f};L.current&&(T.platform=L.current),$k(E.current,k.current,T).then(A=>{const $={...A,isPositioned:O.current!==!1};I.current&&!Ll(R.current,$)&&(R.current=$,Go.flushSync(()=>{d($)}))})},[f,t,r,L,O]);tl(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[u]);const I=v.useRef(!1);tl(()=>(I.current=!0,()=>{I.current=!1}),[]),tl(()=>{if(S&&(E.current=S),_&&(k.current=_),S&&_){if(C.current)return C.current(S,_,W);W()}},[S,_,W,C,N]);const K=v.useMemo(()=>({reference:E,floating:k,setReference:g,setFloating:x}),[g,x]),V=v.useMemo(()=>({reference:S,floating:_}),[S,_]),H=v.useMemo(()=>{const T={position:r,left:0,top:0};if(!V.floating)return T;const A=vm(V.floating,c.x),$=vm(V.floating,c.y);return a?{...T,transform:"translate("+A+"px, "+$+"px)",...$0(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:$}},[r,a,V.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:W,refs:K,elements:V,floatingStyles:H}),[c,W,K,V,H])}const Bk=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ym({element:n.current,padding:s}).fn(r):{}:n?ym({element:n,padding:s}).fn(r):{}}}},zk=(e,t)=>({...Nk(e),options:[e,t]}),Hk=(e,t)=>({...jk(e),options:[e,t]}),Wk=(e,t)=>({...Dk(e),options:[e,t]}),Vk=(e,t)=>({...Ok(e),options:[e,t]}),Kk=(e,t)=>({...Ik(e),options:[e,t]}),qk=(e,t)=>({...Lk(e),options:[e,t]}),Gk=(e,t)=>({...Bk(e),options:[e,t]});var Jk="Arrow",M0=v.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...i}=e;return p.jsx(Ee.svg,{...i,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});M0.displayName=Jk;var Qk=M0;function vf(e){const[t,r]=v.useState(void 0);return Hr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var wf="Popper",[F0,U0]=pi(wf),[Yk,B0]=F0(wf),z0=e=>{const{__scopePopper:t,children:r}=e,[n,s]=v.useState(null);return p.jsx(Yk,{scope:t,anchor:n,onAnchorChange:s,children:r})};z0.displayName=wf;var H0="PopperAnchor",W0=v.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,i=B0(H0,r),o=v.useRef(null),a=$e(t,o);return v.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:p.jsx(Ee.div,{...s,ref:a})});W0.displayName=H0;var xf="PopperContent",[Xk,Zk]=F0(xf),V0=v.forwardRef((e,t)=>{var te,gt,Ke,Re,Ne,lt;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:w,...y}=e,b=B0(xf,r),[m,g]=v.useState(null),x=$e(t,Q=>g(Q)),[S,_]=v.useState(null),E=vf(S),k=(E==null?void 0:E.width)??0,R=(E==null?void 0:E.height)??0,N=n+(i!=="center"?"-"+i:""),C=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},L=Array.isArray(u)?u:[u],O=L.length>0,W={padding:C,boundary:L.filter(tC),altBoundary:O},{refs:I,floatingStyles:K,placement:V,isPositioned:H,middlewareData:T}=Uk({strategy:"fixed",placement:N,whileElementsMounted:(...Q)=>Ak(...Q,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[zk({mainAxis:s+R,alignmentAxis:o}),l&&Hk({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Wk():void 0,...W}),l&&Vk({...W}),Kk({...W,apply:({elements:Q,rects:ze,availableWidth:le,availableHeight:Ct})=>{const{width:Cr,height:ar}=ze.reference,lr=Q.floating.style;lr.setProperty("--radix-popper-available-width",`${le}px`),lr.setProperty("--radix-popper-available-height",`${Ct}px`),lr.setProperty("--radix-popper-anchor-width",`${Cr}px`),lr.setProperty("--radix-popper-anchor-height",`${ar}px`)}}),S&&Gk({element:S,padding:a}),rC({arrowWidth:k,arrowHeight:R}),f&&qk({strategy:"referenceHidden",...W})]}),[A,$]=G0(V),J=jn(w);Hr(()=>{H&&(J==null||J())},[H,J]);const F=(te=T.arrow)==null?void 0:te.x,q=(gt=T.arrow)==null?void 0:gt.y,Y=((Ke=T.arrow)==null?void 0:Ke.centerOffset)!==0,[oe,ye]=v.useState();return Hr(()=>{m&&ye(window.getComputedStyle(m).zIndex)},[m]),p.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:H?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(Re=T.transformOrigin)==null?void 0:Re.x,(Ne=T.transformOrigin)==null?void 0:Ne.y].join(" "),...((lt=T.hide)==null?void 0:lt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Xk,{scope:r,placedSide:A,onArrowChange:_,arrowX:F,arrowY:q,shouldHideArrow:Y,children:p.jsx(Ee.div,{"data-side":A,"data-align":$,...y,ref:x,style:{...y.style,animation:H?void 0:"none"}})})})});V0.displayName=xf;var K0="PopperArrow",eC={top:"bottom",right:"left",bottom:"top",left:"right"},q0=v.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,i=Zk(K0,n),o=eC[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Qk,{...s,ref:r,style:{...s.style,display:"block"}})})});q0.displayName=K0;function tC(e){return e!==null}var rC=e=>({name:"transformOrigin",options:e,fn(t){var b,m,g;const{placement:r,rects:n,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,c]=G0(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(((m=s.arrow)==null?void 0:m.x)??0)+a/2,h=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let w="",y="";return u==="bottom"?(w=o?d:`${f}px`,y=`${-l}px`):u==="top"?(w=o?d:`${f}px`,y=`${n.floating.height+l}px`):u==="right"?(w=`${-l}px`,y=o?d:`${h}px`):u==="left"&&(w=`${n.floating.width+l}px`,y=o?d:`${h}px`),{data:{x:w,y}}}});function G0(e){const[t,r="center"]=e.split("-");return[t,r]}var nC=z0,sC=W0,iC=V0,oC=q0,[Su,Ij]=pi("Tooltip",[U0]),_u=U0(),J0="TooltipProvider",aC=700,$d="tooltip.open",[lC,bf]=Su(J0),Q0=e=>{const{__scopeTooltip:t,delayDuration:r=aC,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=e,o=v.useRef(!0),a=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(lC,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 5,049 bytes, line 151
151o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:v.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};Q0.displayName=J0;var Po="Tooltip",[uC,Eu]=Su(Po),Y0=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,l=bf(Po,e.__scopeTooltip),u=_u(t),[c,d]=v.useState(null),f=ME(),h=v.useRef(0),w=o??l.disableHoverableContent,y=a??l.delayDuration,b=v.useRef(!1),[m,g]=mu({prop:n,defaultProp:s??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent($d))):l.onClose(),i==null||i(k)},caller:Po}),x=v.useMemo(()=>m?b.current?"delayed-open":"instant-open":"closed",[m]),S=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,g(!0)},[g]),_=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g(!1)},[g]),E=v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,g(!0),h.current=0},y)},[y,g]);return v.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(nC,{...u,children:p.jsx(uC,{scope:t,contentId:f,open:m,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{l.isOpenDelayedRef.current?E():S()},[l.isOpenDelayedRef,E,S]),onTriggerLeave:v.useCallback(()=>{w?_():(window.clearTimeout(h.current),h.current=0)},[_,w]),onOpen:S,onClose:_,disableHoverableContent:w,children:r})})};Y0.displayName=Po;var Md="TooltipTrigger",X0=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Eu(Md,r),i=bf(Md,r),o=_u(r),a=v.useRef(null),l=$e(t,a,s.onTriggerChange),u=v.useRef(!1),c=v.useRef(!1),d=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(sC,{asChild:!0,...o,children:p.jsx(Ee.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:ce(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:ce(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:ce(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ce(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ce(e.onBlur,s.onClose),onClick:ce(e.onClick,s.onClose)})})});X0.displayName=Md;var cC="TooltipPortal",[Lj,dC]=Su(cC,{forceMount:void 0}),ci="TooltipContent",Z0=v.forwardRef((e,t)=>{const r=dC(ci,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=e,o=Eu(ci,e.__scopeTooltip);return p.jsx(pu,{present:n||o.open,children:o.disableHoverableContent?p.jsx(ew,{side:s,...i,ref:t}):p.jsx(hC,{side:s,...i,ref:t})})}),hC=v.forwardRef((e,t)=>{const r=Eu(ci,e.__scopeTooltip),n=bf(ci,e.__scopeTooltip),s=v.useRef(null),i=$e(t,s),[o,a]=v.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:d}=n,f=v.useCallback(()=>{a(null),d(!1)},[d]),h=v.useCallback((w,y)=>{const b=w.currentTarget,m={x:w.clientX,y:w.clientY},g=yC(m,b.getBoundingClientRect()),x=vC(m,g),S=wC(y.getBoundingClientRect()),_=bC([...x,...S]);a(_),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(l&&c){const w=b=>h(b,c),y=b=>h(b,l);return l.addEventListener("pointerleave",w),c.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",w),c.removeEventListener("pointerleave",y)}}},[l,c,h,f]),v.useEffect(()=>{if(o){const w=y=>{const b=y.target,m={x:y.clientX,y:y.clientY},g=(l==null?void 0:l.contains(b))||(c==null?void 0:c.contains(b)),x=!xC(m,o);g?f():x&&(f(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,c,o,u,f]),p.jsx(ew,{...e,ref:i})}),[fC,pC]=Su(Po,{isInside:!1}),mC=_S("TooltipContent"),ew=v.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Eu(ci,r),u=_u(r),{onClose:c}=l;return v.useEffect(()=>(document.addEventListener($d,c),()=>document.removeEventListener($d,c)),[c]),v.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),p.jsx(sf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:p.jsxs(iC,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(mC,{children:n}),p.jsx(fC,{scope:r,isInside:!0,children:p.jsx(KS,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Z0.displayName=ci;var tw="TooltipArrow",gC=v.forwardRef((e,t)=>
151{const{__scopeTooltip:r,...n}=e,s=_u(r);return pC(tw,r).isInside?null:p.jsx(oC,{...s,...n,ref:t})});gC.displayName=tw;function yC(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function vC(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function wC(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function xC(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i],l=t[o],u=a.x,c=a.y,d=l.x,f=l.y;c>n!=f>n&&r<(d-u)*(n-c)/(f-c)+u&&(s=!s)}return s}function bC(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),SC(t)}function SC(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var _C=Q0,EC=Y0,kC=X0,rw=Z0;const nw=_C,CC=EC,TC=kC,sw=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>p.jsx(rw,{ref:n,sideOffset:t,className:Ie("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));sw.displayName=rw.displayName;var ku=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Cu=typeof window>"u"||"Deno"in globalThis;function qt(){}function RC(e,t){return typeof e=="function"?e(t):e}function PC(e){return typeof e=="number"&&e>=0&&e!==1/0}function AC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fd(e,t){return typeof e=="function"?e(t):e}function NC(e,t){return typeof e=="function"?e(t):e}function wm(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Sf(o,t.options))return!1}else if(!No(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function xm(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Ao(t.options.mutationKey)!==Ao(i))return!1}else if(!No(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Sf(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ao)(e)}function Ao(e){return JSON.stringify(e,(t,r)=>Ud(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function No(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>No(e[r],t[r])):!1}function iw(e,t){if(e===t)return e;const r=bm(e)&&bm(t);if(r||Ud(e)&&Ud(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<o;c++){const d=r?c:i[c];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,u++):(a[d]=iw(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return s===o&&u===s?e:a}return t}function bm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ud(e){if(!Sm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Sm(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Sm(e){return Object.prototype.toString.call(e)==="[object Object]"}function jC(e){return new Promise(t=>{setTimeout(t,e)})}function OC(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?iw(e,t):t}function IC(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function LC(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var _f=Symbol();function ow(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===_f?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Yn,fn,Gs,mg,DC=(mg=class extends ku{constructor(){super();ie(this,Yn);ie(this,fn);ie(this,Gs);Z(this,Gs,t=>{if(!Cu&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){P(this,fn)||this.setEventListener(P(this,Gs))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,fn))==null||t.call(this),Z(this,fn,void 0))}setEventListener(t){var r;Z(this,Gs,t),(r=P(this,fn))==null||r.call(this),Z(this,fn,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){P(this,Yn)!==t&&(Z(this,Yn,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 20,025 bytes, line 151
151this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof P(this,Yn)=="boolean"?P(this,Yn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Yn=new WeakMap,fn=new WeakMap,Gs=new WeakMap,mg),aw=new DC,Js,pn,Qs,gg,$C=(gg=class extends ku{constructor(){super();ie(this,Js,!0);ie(this,pn);ie(this,Qs);Z(this,Qs,t=>{if(!Cu&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){P(this,pn)||this.setEventListener(P(this,Qs))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,pn))==null||t.call(this),Z(this,pn,void 0))}setEventListener(t){var r;Z(this,Qs,t),(r=P(this,pn))==null||r.call(this),Z(this,pn,t(this.setOnline.bind(this)))}setOnline(t){P(this,Js)!==t&&(Z(this,Js,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return P(this,Js)}},Js=new WeakMap,pn=new WeakMap,Qs=new WeakMap,gg),Dl=new $C;function MC(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function FC(e){return Math.min(1e3*2**e,3e4)}function lw(e){return(e??"online")==="online"?Dl.isOnline():!0}var uw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Sc(e){return e instanceof uw}function cw(e){let t=!1,r=0,n=!1,s;const i=MC(),o=y=>{var b;n||(f(new uw(y)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>aw.isFocused()&&(e.networkMode==="always"||Dl.isOnline())&&e.canRun(),c=()=>lw(e.networkMode)&&e.canRun(),d=y=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,y),s==null||s(),i.resolve(y))},f=y=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,y),s==null||s(),i.reject(y))},h=()=>new Promise(y=>{var b;s=m=>{(n||u())&&y(m)},(b=e.onPause)==null||b.call(e)}).then(()=>{var y;s=void 0,n||(y=e.onContinue)==null||y.call(e)}),w=()=>{if(n)return;let y;const b=r===0?e.initialPromise:void 0;try{y=b??e.fn()}catch(m){y=Promise.reject(m)}Promise.resolve(y).then(d).catch(m=>{var E;if(n)return;const g=e.retry??(Cu?0:3),x=e.retryDelay??FC,S=typeof x=="function"?x(r,m):x,_=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,m);if(t||!_){f(m);return}r++,(E=e.onFail)==null||E.call(e,r,m),jC(S).then(()=>u()?void 0:h()).then(()=>{t?f(m):w()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?w():h().then(w),i)}}var UC=e=>setTimeout(e,0);function BC(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=UC;const i=a=>{t?e.push(a):s(()=>{r(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var st=BC(),Xn,yg,dw=(yg=class{constructor(){ie(this,Xn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),PC(this.gcTime)&&Z(this,Xn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cu?1/0:5*60*1e3))}clearGcTimeout(){P(this,Xn)&&(clearTimeout(P(this,Xn)),Z(this,Xn,void 0))}},Xn=new WeakMap,yg),Ys,Zn,At,es,Ye,Bo,ts,Jt,Pr,vg,zC=(vg=class extends dw{constructor(t){super();ie(this,Jt);ie(this,Ys);ie(this,Zn);ie(this,At);ie(this,es);ie(this,Ye);ie(this,Bo);ie(this,ts);Z(this,ts,!1),Z(this,Bo,t.defaultOptions),this.setOptions(t.options),this.observers=[],Z(this,es,t.client),Z(this,At,P(this,es).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Z(this,Ys,WC(this.options)),this.state=t.state??P(this,Ys),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,Ye))==null?void 0:t.promise}setOptions(t){this.options={...P(this,Bo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,At).remove(this)}setData(t,r){const n=OC(this.state.data,t,this.options);return qe(this,Jt,Pr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){qe(this,Jt,Pr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=P(this,Ye))==null?void 0:n.promise;return(s=P(this,Ye))==null||s.cancel(t),r?r.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,Ys))}isActive(){return this.observers.some(t=>NC(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_f||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Fd(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!AC(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=P(this,Ye))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=P(this,Ye))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,At).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(P(this,Ye)&&(P(this,ts)?P(this,Ye).cancel({revert:!0}):P(this,Ye).cancelRetry()),this.scheduleGc()),P(this,At).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||qe(this,Jt,Pr).call(this,{type:"invalidate"})}fetch(t,r){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(P(this,Ye))return P(this,Ye).continueRetry(),P(this,Ye).promise}if(t&&this.setOptions(t),!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,ts,!0),n.signal)})},i=()=>{const f=ow(this.options,r),w=(()=>{const y={client:P(this,es),queryKey:this.queryKey,meta:this.meta};return s(y),y})();return Z(this,ts,!1),this.options.persister?this.options.persister(f,w,this):f(w)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:P(this,es),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),Z(this,Zn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&qe(this,Jt,Pr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,w,y,b;Sc(f)&&f.silent||qe(this,Jt,Pr).call(this,{type:"error",error:f}),Sc(f)||((w=(h=P(this,At).config).onError)==null||w.call(h,f,this),(b=(y=P(this,At).config).onSettled)==null||b.call(y,this.state.data,f,this)),this.scheduleGc()};return Z(this,Ye,cw({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,w,y,b;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(m){l(m);return}(w=(h=P(this,At).config).onSuccess)==null||w.call(h,f,this),(b=(y=P(this,At).config).onSettled)==null||b.call(y,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{qe(this,Jt,Pr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{qe(this,Jt,Pr).call(this,{type:"pause"})},onContinue:()=>{qe(this,Jt,Pr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),P(this,Ye).start()}},Ys=new WeakMap,Zn=new WeakMap,At=new WeakMap,es=new WeakMap,Ye=new WeakMap,Bo=new WeakMap,ts=new WeakMap,Jt=new WeakSet,Pr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...HC(n.data,this.options),fetchMeta:t.meta??null};case"success":return Z(this,Zn,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Sc(s)&&s.revert&&P(this,Zn)?{...P(this,Zn),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),st.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),P(this,At).notify({query:this,type:"updated",action:t})})},vg);function HC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lw(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function WC(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var fr,wg,VC=(wg=class extends ku{constructor(t={}){super();ie(this,fr);this.config=t,Z(this,fr,new Map)}build(t,r,n){const s=r.queryKey,i=r.queryHash??Sf(s,r);let o=this.get(i);return o||(o=new zC({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){P(this,fr).has(t.queryHash)||(P(this,fr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=P(this,fr).get(t.queryHash);r&&(t.destroy(),r===t&&P(this,fr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){st.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,fr).get(t)}getAll(){return[...P(this,fr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>wm(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>wm(t,n)):r}notify(t){st.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){st.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){st.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},fr=new WeakMap,wg),pr,rt,rs,mr,on,xg,KC=(xg=class extends dw{constructor(t){super();ie(this,mr);ie(this,pr);ie(this,rt);ie(this,rs);this.mutationId=t.mutationId,Z(this,rt,t.mutationCache),Z(this,pr,[]),this.state=t.state||qC(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,pr).includes(t)||(P(this,pr).push(t),this.clearGcTimeout(),P(this,rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Z(this,pr,P(this,pr).filter(r=>r!==t)),this.scheduleGc(),P(this,rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,pr).length||(this.state.status==="pending"?this.scheduleGc():P(this,rt).remove(this))}continue(){var t;return((t=P(this,rs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,l,u,c,d,f,h,w,y,b,m,g,x,S,_,E,k,R;const r=()=>{qe(this,mr,on).call(this,{type:"continue"})};Z(this,rs,cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(N,C)=>{qe(this,mr,on).call(this,{type:"failed",failureCount:N,error:C})},onPause:()=>{qe(this,mr,on).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,rt).canRun(this)}));const n=this.state.status==="pending",s=!P(this,rs).canStart();try{if(n)r();else{qe(this,mr,on).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=P(this,rt).config).onMutate)==null?void 0:o.call(i,t,this));const C=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));C!==this.state.context&&qe(this,mr,on).call(this,{type:"pending",context:C,variables:t,isPaused:s})}const N=await P(this,rs).start();return await((c=(u=P(this,rt).config).onSuccess)==null?void 0:c.call(u,N,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,N,t,this.state.context)),await((w=(h=P(this,rt).config).onSettled)==null?void 0:w.call(h,N,null,this.state.variables,this.state.context,this)),await((b=(y=this.options).onSettled)==null?void 0:b.call(y,N,null,t,this.state.context)),qe(this,mr,on).call(this,{type:"success",data:N}),N}catch(N){try{throw await((g=(m=P(this,rt).config).onError)==null?void 0:g.call(m,N,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,N,t,this.state.context)),await((E=(_=P(this,rt).config).onSettled)==null?void 0:E.call(_,void 0,N,this.state.variables,this.state.context,this)),await((R=(k=this.options).onSettled)==null?void 0:R.call(k,void 0,N,t,this.state.context)),N}finally{qe(this,mr,on).call(this,{type:"error",error:N})}}finally{P(this,rt).runNext(this)}}},pr=new WeakMap,rt=new WeakMap,rs=new WeakMap,mr=new WeakSet,on=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),st.batch(()=>{P(this,pr).forEach(n=>{n.onMutationUpdate(t)}),P(this,rt).notify({mutation:this,type:"updated",action:t})})},xg);function qC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Lr,Qt,zo,bg,GC=(bg=class extends ku{constructor(t={}){super();ie(this,Lr);ie(this,Qt);ie(this,zo);this.config=t,Z(this,Lr,new Set),Z(this,Qt,new Map),Z(this,zo,0)}build(t,r,n){const s=new KC({mutationCache:this,mutationId:++la(this,zo)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){P(this,Lr).add(t);const r=Aa(t);if(typeof r=="string"){const n=P(this,Qt).get(r);n?n.push(t):P(this,Qt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,Lr).delete(t)){const r=Aa(t);if(typeof r=="string"){const n=P(this,Qt).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&P(this,Qt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Aa(t);if(typeof r=="string"){const n=P(this,Qt).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Aa(t);if(typeof r=="string"){const s=(n=P(this,Qt).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){st.batch(()=>{P(this,Lr).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,Lr).clear(),P(this,Qt).clear()})}getAll(){return Array.from(P(this,Lr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>xm(r,n))}findAll(t={}){return this.getAll().filter(r=>xm(t,r))}notify(t){st.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return st.batch(()=>Promise.all(t.map(r=>r.continue().catch(qt))))}},Lr=new WeakMap,Qt=new WeakMap,zo=new WeakMap,bg);function Aa(e){var t;return(t=e.options.scope)==null?void 0:t.id}function _m(e){return{onFetch:(t,r)=>{var c,d,f,h,w;const n=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},m=ow(t.options,t.fetchOptions),g=async(x,S,_)=>{if(y)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const k=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};return b(L),L})(),R=await m(k),{maxPages:N}=t.options,C=_?LC:IC;return{pages:C(x.pages,R,N),pageParams:C(x.pageParams,S,N)}};if(s&&i.length){const x=s==="backward",S=x?JC:Em,_={pages:i,pageParams:o},E=S(n,_);a=await g(_,E,x)}else{const x=e??i.length;do{const S=l===0?o[0]??n.initialPageParam:Em(n,a);if(l>0&&S==null)break;a=await g(a,S),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var y,b;return(b=(y=t.options).persister)==null?void 0:b.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function Em(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function JC(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var ke,mn,gn,Xs,Zs,yn,ei,ti,Sg,QC=(Sg=class{constructor(e={}){ie(this,ke);ie(this,mn);ie(this,gn);ie(this,Xs);ie(this,Zs);ie(this,yn);ie(this,ei);ie(this,ti);Z(this,ke,e.queryCache||new VC),Z(this,mn,e.mutationCache||new GC),Z(this,gn,e.defaultOptions||{}),Z(this,Xs,new Map),Z(this,Zs,new Map),Z(this,yn,0)}mount(){la(this,yn)._++,P(this,yn)===1&&(Z(this,ei,aw.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,ke).onFocus())})),Z(this,ti,Dl.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,ke).onOnline())})))}unmount(){var e,t;la(this,yn)._--,P(this,yn)===0&&((e=P(this,ei))==null||e.call(this),Z(this,ei,void 0),(t=P(this,ti))==null||t.call(this),Z(this,ti,void 0))}isFetching(e){return P(this,ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,mn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=P(this,ke).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=P(this,ke).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Fd(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return P(this,ke).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=P(this,ke).get(n.queryHash),i=s==null?void 0:s.state.data,o=RC(t,i);if(o!==void 0)return P(this,ke).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return st.batch(()=>P(this,ke).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=P(this,ke).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=P(this,ke);st.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=P(this,ke);return st.batch(()=>(r.findAll(e).forEach(n=>
151{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=st.batch(()=>P(this,ke).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(qt).catch(qt)}invalidateQueries(e,t={}){return st.batch(()=>(P(this,ke).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=st.batch(()=>P(this,ke).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(qt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(qt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=P(this,ke).build(this,t);return r.isStaleByTime(Fd(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qt).catch(qt)}fetchInfiniteQuery(e){return e.behavior=_m(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qt).catch(qt)}ensureInfiniteQueryData(e){return e.behavior=_m(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dl.isOnline()?P(this,mn).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,ke)}getMutationCache(){return P(this,mn)}getDefaultOptions(){return P(this,gn)}setDefaultOptions(e){Z(this,gn,e)}setQueryDefaults(e,t){P(this,Xs).set(Ao(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,Xs).values()],r={};return t.forEach(n=>{No(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){P(this,Zs).set(Ao(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,Zs).values()],r={};return t.forEach(n=>{No(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,gn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===_f&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,gn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,ke).clear(),P(this,mn).clear()}},ke=new WeakMap,mn=new WeakMap,gn=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,yn=new WeakMap,ei=new WeakMap,ti=new WeakMap,Sg),YC=v.createContext(void 0),XC=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(YC.Provider,{value:e,children:t}));/** 152 * react-router v7.18.0 153 * 154 * Copyright (c) Remix Software Inc. 155 * 156 * This source code is licensed under the MIT license found in the 157 * LICENSE.md file in the root directory of this source tree. 158 * 159 * @license MIT 160 */var Ef=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,hw=/^[\\/]{2}/;function ZC(e,t){return t+e.replace(/\\/g,"/")}var km="popstate";function Cm(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function eT(e={}){function t(n,s){var u;let i=(u=s.state)==null?void 0:u.masked,{pathname:o,search:a,hash:l}=i||n.location;return Bd("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default",i?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,s){return typeof s=="string"?s:jo(s)}return rT(t,r,null,e)}function Se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _r(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tT(){return Math.random().toString(36).substring(2,10)}function Tm(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Bd(e,t,r=null,n,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?vi(t):t,state:r,key:t&&t.key||n||tT(),mask:s}}function jo({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function vi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function rT(e,t,r,n={}){let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a="POP",l=null,u=c();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function c(){return(o.state||{idx:null}).idx}function d(){a="POP";let b=c(),m=b==null?null:b-u;u=b,l&&l({action:a,location:y.location,delta:m})}function f(b,m){a="PUSH";let g=Cm(b)?b:Bd(y.location,b,m);u=c()+1;let x=Tm(g,u),S=y.createHref(g.mask||g);try{o.pushState(x,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(S)}i&&l&&l({action:a,location:y.location,delta:1})}function h(b,m){a="REPLACE";let g=Cm(b)?b:Bd(y.location,b,m);u=c();let x=Tm(g,u),S=y.createHref(g.mask||g);o.replaceState(x,"",S),i&&l&&l({action:a,location:y.location,delta:0})}function w(b){return nT(s,b)}let y={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(km,d),l=b,()=>{s.removeEventListener(km,d),l=null}},createHref(b){return t(s,b)},createURL:w,encodeLocation(b){let m=w(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:h,go(b){return o.go(b)}};return y}function nT(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),Se(n,"No window.location.(origin|href) available to create URL");let s=typeof t=="string"?t:jo(t);return s=s.replace(/ $/,"%20"),!r&&hw.test(s)&&(s=n+s),new URL(s,n)}function fw(e,t,r="/"){return sT(e,t,r,!1)}function sT(e,t,r,n,s){let i=typeof t=="string"?vi(t):t,o=Kr(i.pathname||"/",r);if(o==null)return null;let a=iT(e),l=null,u=gT(o);for(let c=0;l==null&&c<a.length;++c)l=mT(a[c],u,n);return l}function iT(e){let t=pw(e);return oT(t),t}function pw(e,t=[],r=[],n="",s=!1){let i=(o,a,l=s,u)=>{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(n)&&l)return;Se(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}
160" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length)}let d=rr([n,c.relativePath]),f=r.concat(c);o.children&&o.children.length>0&&(Se(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),pw(o.children,t,f,d,l)),!(o.path==null&&!o.index)&&t.push({path:d,score:fT(d,o.index),routesMeta:f.map((h,w)=>{let[y,b]=yw(h.relativePath,h.caseSensitive,w===f.length-1);return{...h,matcher:y,compiledParams:b}})})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,a);else for(let u of mw(o.path))i(o,a,!0,u)}),t}function mw(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=mw(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function oT(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:pT(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var aT=/^:[\w-]+$/,lT=3,uT=2,cT=1,dT=10,hT=-2,Rm=e=>e==="*";function fT(e,t){let r=e.split("/"),n=r.length;return r.some(Rm)&&(n+=hT),t&&(n+=uT),r.filter(s=>!Rm(s)).reduce((s,i)=>s+(aT.test(i)?lT:i===""?cT:dT),n)}function pT(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function mT(e,t,r=!1){let{routesMeta:n}=e,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",d={path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f=l.matcher&&l.compiledParams?gw(d,c,l.matcher,l.compiledParams):$l(d,c),h=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=$l({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;
160Object.assign(s,f.params),o.push({params:s,pathname:rr([i,f.pathname]),pathnameBase:wT(rr([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=rr([i,f.pathnameBase]))}return o}function $l(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=yw(e.path,e.caseSensitive,e.end);return gw(e,t,r,n)}function gw(e,t,r,n){let s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,{paramName:c,isOptional:d},f)=>{if(c==="*"){let w=a[f]||"";o=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const h=a[f];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function yw(e,t=!1,r=!0){_r(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l,u,c)=>{if(n.push({paramName:a,isOptional:l!=null}),l){let d=c.charAt(u+o.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function gT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return _r(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Kr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function yT(e,t="/"){let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?vi(e):e,i;return r?(r=ww(r),r.startsWith("/")?i=Pm(r.substring(1),"/"):i=Pm(r,t)):i=t,{pathname:i,search:xT(n),hash:bT(s)}}function Pm(e,t){let r=Ml(t).split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function _c(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vT(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function vw(e){let t=vT(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function kf(e,t,r,n=!1){let s;typeof e=="string"?s=vi(e):(s={...e},Se(!s.pathname||!s.pathname.includes("?"),_c("?","pathname","search",s)),Se(!s.pathname||!s.pathname.includes("#"),_c("#","pathname","hash",s)),Se(!s.search||!s.search.includes("#"),_c("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let d=t.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=yT(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var ww=e=>e.replace(/[\\/]{2,}/g,"/"),rr=e=>ww(e.join("/")),Ml=e=>e.replace(/\/+$/,""),wT=e=>Ml(e).replace(/^\/*/,"/"),xT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ST=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function _T(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ET(e){let t=e.map(r=>r.route.path).filter(Boolean);return rr(t)||"/"}var xw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function bw(e,t){let r=e;if(typeof r!="string"||!Ef.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,s=!1;if(xw)try{let i=new URL(window.location.href),o=hw.test(r)?new URL(ZC(r,i.protocol)):new URL(r),a=Kr(o.pathname,t);o.origin===i.origin&&a!=null?r=a+o.search+o.hash:s=!0}catch{_r(!1,`<Link to="${r}">
160 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Sw=["POST","PUT","PATCH","DELETE"];new Set(Sw);var kT=["GET",...Sw];new Set(kT);var CT=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function TT(e){try{return CT.includes(new URL(e).protocol)}catch{return!1}}var wi=v.createContext(null);wi.displayName="DataRouter";var Tu=v.createContext(null);Tu.displayName="DataRouterState";var _w=v.createContext(!1);function RT(){return v.useContext(_w)}var Ew=v.createContext({isTransitioning:!1});Ew.displayName="ViewTransition";var PT=v.createContext(new Map);PT.displayName="Fetchers";var AT=v.createContext(null);AT.displayName="Await";var $t=v.createContext(null);$t.displayName="Navigation";var Xo=v.createContext(null);Xo.displayName="Location";var Gr=v.createContext({outlet:null,matches:[],isDataRoute:!1});Gr.displayName="Route";var Cf=v.createContext(null);Cf.displayName="RouteError";var kw="REACT_ROUTER_ERROR",NT="REDIRECT",jT="ROUTE_ERROR_RESPONSE";function OT(e){if(e.startsWith(`${kw}:${NT}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function IT(e){if(e.startsWith(`${kw}:${jT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ST(t.status,t.statusText,t.data)}catch{}}function LT(e,{relative:t}={}){Se(Zo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=v.useContext($t),{hash:s,pathname:i,search:o}=ea(e,{relative:t}),a=i;return r!=="/"&&(a=i==="/"?r:rr([r,i])),n.createHref({pathname:a,search:o,hash:s})}function Zo(){return v.useContext(Xo)!=null}function or(){return Se(Zo(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Xo).location}var Cw="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Tw(e){v.useContext($t).static||v.useLayoutEffect(e)}function Ru(){let{isDataRoute:e}=v.useContext(Gr);return e?GT():DT()}function DT(){Se(Zo(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(wi),{basename:t,navigator:r}=v.useContext($t),{matches:n}=v.useContext(Gr),{pathname:s}=or(),i=JSON.stringify(vw(n)),o=v.useRef(!1);return Tw(()=>{o.current=!0}),v.useCallback((l,u={})=>{if(_r(o.current,Cw),!o.current)return;if(typeof l=="number"){r.go(l);return}let c=kf(l,JSON.parse(i),s,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:rr([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,s,e])}v.createContext(null);function ea(e,{relative:t}={}){let{matches:r}=v.useContext(Gr),{pathname:n}=or(),s=JSON.stringify(vw(r));return v.useMemo(()=>kf(e,JSON.parse(s),n,t==="path"),[e,s,n,t])}function $T(e,t){return Rw(e,t)}function Rw(e,t,r){var b;Se(Zo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=v.useContext($t),{matches:s}=v.useContext(Gr),i=s[s.length-1],o=i?i.params:{},a=i?i.pathname:"/",l=i?i.pathnameBase:"/",u=i&&i.route;{let m=u&&u.path||"";Aw(a,!u||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 161 162Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let c=or(),d;if(t){let m=typeof t=="string"?vi(t):t;Se(l==="/"||((b=m.pathname)==null?void 0:b.startsWith(l)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${m.pathname}" was given in the \`location\` prop.`),d=m}else d=c;let f=d.pathname||"/",h=f;if(l!=="/"){let m=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let w=r&&r.state.matches.length?r.state.matches.map(m=>Object.assign(m,{route:r.manifest[m.route.id]||m.route})):fw(e,{pathname:h});_r(u||w!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),_r(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=zT(w&&w.map(m=>Object.assign({},m,{params:Object.assign({},o,m.params),pathname:rr([l,n.encodeLocation?n.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:rr([l,n.encodeLocation?n.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),s,r);return t&&y?v.createElement(Xo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},y):y}function MT(){let e=qT(),t=_T(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=v.createElement(v.Fragment,null,v.createElement("p",null,"ð¿ Hey developer ð"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:i},"ErrorBoundary")," or"," ",v.createElement("code",{style:i},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application
162Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:s},r):null,o)}var FT=v.createElement(MT,null),Pw=class extends v.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,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=IT(e.digest);r&&(e=r)}let t=e!==void 0?v.createElement(Gr.Provider,{value:this.props.routeContext},v.createElement(Cf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(UT,{error:e},t):t}};Pw.contextType=_w;var Ec=new WeakMap;function UT({children:e,error:t}){let{basename:r}=v.useContext($t);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=OT(t.digest);if(n){let s=Ec.get(t);if(s)throw s;let i=bw(n.location,r),o=i.absoluteURL||i.to;if(TT(o))throw new Error("Invalid redirect location");if(xw&&!Ec.get(t))if(i.isExternal||n.reloadDocument)window.location.href=o;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw Ec.set(t,a),a}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o}`})}}return e}function BT({routeContext:e,match:t,children:r}){let n=v.useContext(wi);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Gr.Provider,{value:e},r)}function zT(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,i=n==null?void 0:n.errors;if(i!=null){let c=s.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);Se(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),s=s.slice(0,Math.min(s.length,c+1))}let o=!1,a=-1;if(r&&n){o=n.renderFallback;for(let c=0;c<s.length;c++){let d=s[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(a=c),d.route.id){let{loaderData:f,errors:h}=n,w=d.route.loader&&!f.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||w){r.isStatic&&(o=!0),a>=0?s=s.slice(0,a+1):s=[s[0]];break}}}}let l=r==null?void 0:r.onError,u=n&&l?(c,d)=>{var f,h;l(c,{location:n.location,params:((h=(f=n.matches)==null?void 0:f[0])==null?void 0:h.params)??{},pattern:ET(n.matches),errorInfo:d})}:void 0;return s.reduceRight((c,d,f)=>{let h,w=!1,y=null,b=null;n&&(h=i&&d.route.id?i[d.route.id]:void 0,y=d.route.errorElement||FT,o&&(a<0&&f===0?(Aw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,b=null):a===f&&(w=!0,b=d.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,f+1)),g=()=>{let x;return h?x=y:w?x=b:d.route.Component?x=v.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=c,v.createElement(BT,{match:d,routeContext:{outlet:c,matches:m,isDataRoute:n!=null},children:x})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?v.createElement(Pw,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):g()},null)}function Tf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function HT(e){let t=v.useContext(wi);return Se(t,Tf(e)),t}function WT(e){let t=v.useContext(Tu);return Se(t,Tf(e)),t}function VT(e){let t=v.useContext(Gr);return Se(t,Tf(e)),t}function Rf(e){let t=VT(e),r=t.matches[t.matches.length-1];return Se(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function KT(){return Rf("useRouteId")}function qT(){var n;let e=v.useContext(Cf),t=WT("useRouteError"),r=Rf("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function GT(){let{router:e}=HT("useNavigate"),t=Rf("useNavigate"),r=v.useRef(!1);return Tw(()=>{r.current=!0}),v.useCallback(async(s,i={})=>{_r(r.current,Cw),r.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...i}))},[e,t])}var Am={};function Aw(e,t,r){!t&&!Am[e]&&(Am[e]=!0,_r(!1,r))}v.memo(JT);function JT({routes:e,manifest:t,future:r,state:n,isStatic:s,onError:i}){return Rw(e,void 0,{manifest:t,state:n,isStatic:s,onError:i,future:r})}function Hi(e){Se(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function QT({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:s,static:i=!1,useTransitions:o}){Se(!Zo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),l=v.useMemo(()=>({basename:a,navigator:s,static:i,useTransitions:o,future:{}}
162),[a,s,i,o]);typeof r=="string"&&(r=vi(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default",mask:w}=r,y=v.useMemo(()=>{let b=Kr(u,a);return b==null?null:{location:{pathname:b,search:c,hash:d,state:f,key:h,mask:w},navigationType:n}},[a,u,c,d,f,h,n,w]);return _r(y!=null,`<Router basename="${a}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:v.createElement($t.Provider,{value:l},v.createElement(Xo.Provider,{children:t,value:y}))}function YT({children:e,location:t}){return $T(zd(e),t)}function zd(e,t=[]){let r=[];return v.Children.forEach(e,(n,s)=>{if(!v.isValidElement(n))return;let i=[...t,s];if(n.type===v.Fragment){r.push.apply(r,zd(n.props.children,i));return}Se(n.type===Hi,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Se(!n.props.index||!n.props.children,"An index route cannot have child routes.");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,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||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=zd(n.props.children,i)),r.push(o)}),r}var rl="get",nl="application/x-www-form-urlencoded";function Pu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function XT(e){return Pu(e)&&e.tagName.toLowerCase()==="button"}function ZT(e){return Pu(e)&&e.tagName.toLowerCase()==="form"}function eR(e){return Pu(e)&&e.tagName.toLowerCase()==="input"}function tR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function rR(e,t){return e.button===0&&(!t||t==="_self")&&!tR(e)}var Na=null;
162function nR(){if(Na===null)try{new FormData(document.createElement("form"),0),Na=!1}catch{Na=!0}return Na}var sR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kc(e){return e!=null&&!sR.has(e)?(_r(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nl}"`),null):e}function iR(e,t){let r,n,s,i,o;if(ZT(e)){let a=e.getAttribute("action");n=a?Kr(a,t):null,r=e.getAttribute("method")||rl,s=kc(e.getAttribute("enctype"))||nl,i=new FormData(e)}else if(XT(e)||eR(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(n=l?Kr(l,t):null,r=e.getAttribute("formmethod")||a.getAttribute("method")||rl,s=kc(e.getAttribute("formenctype"))||kc(a.getAttribute("enctype"))||nl,i=new FormData(a,e),!nR()){let{name:u,type:c,value:d}=e;if(c==="image"){let f=u?`${u}.`:"";i.append(`${f}x`,"0"),i.append(`${f}y`,"0")}else u&&i.append(u,d)}}else{if(Pu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=rl,n=null,s=nl,o=e}return i&&s==="text/plain"&&(o=i,i=void 0),{action:n,method:r.toLowerCase(),encType:s,formData:i,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pf(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Nw(e,t,r,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:t&&Kr(s.pathname,t)==="/"?s.pathname=`${Ml(t)}/_root.${n}`:s.pathname=`${Ml(s.pathname)}.${n}`,s}async function oR(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function aR(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function lR(e,t,r){let n=await Promise.all(e.map(async s=>{let i=t.routes[s.route.id];if(i){let o=await oR(i,r);return o.links?o.links():[]}return[]}));return hR(n.flat(1).filter(aR).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Nm(e,t,r,n,s,i){let o=(l,u)=>r[u]?l.route.id!==r[u].route.id:!0,a=(l,u)=>{var c;return r[u].pathname!==l.pathname||((c=r[u].route.path)==null?void 0:c.endsWith("*"))&&r[u].params["*"]!==l.params["*"]};return i==="assets"?t.filter((l,u)=>o(l,u)||a(l,u)):i==="data"?t.filter((l,u)=>{var d;let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(o(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((d=r[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function uR(e,t,{includeHydrateFallback:r}={}){return cR(e.map(n=>{let s=t.routes[n.route.id];if(!s)return[];let i=[s.module];return s.clientActionModule&&(i=i.concat(s.clientActionModule)),s.clientLoaderModule&&(i=i.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(i=i.concat(s.hydrateFallbackModule)),s.imports&&(i=i.concat(s.imports)),i}).flat(1))}function cR(e){return[...new Set(e)]}function dR(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function hR(e,t){let r=new Set;return new Set(t),e.reduce((n,s)=>{let i=JSON.stringify(dR(s));return r.has(i)||(r.add(i),n.push({key:i,link:s})),n},[])}function Af(){let e=v.useContext(wi);return Pf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function fR(){let e=v.useContext(Tu);return Pf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Nf=v.createContext(void 0);Nf.displayName="FrameworkContext";function Au(){let e=v.useContext(Nf);return Pf(e,"You must render this element inside a <HydratedRouter> element"),e}function pR(e,t){let r=v.useContext(Nf),[n,s]=v.useState(!1),[i,o]=v.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,f=v.useRef(null);v.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let y=m=>{m.forEach(g=>{o(g.isIntersecting)})},b=new IntersectionObserver(y,{threshold:.5});return f.current&&b.observe(f.current),()=>{b.disconnect()}}},[e]),v.useEffect(()=>{if(n){let y=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(y)}}},[n]);let h=()=>{s(!0)},w=()=>{s(!1),o(!1)};return r?e!=="intent"?[i,f,{}]:[i,f,{onFocus:Di(a,h),onBlur:Di(l,w),onMouseEnter:Di(u,h),onMouseLeave:Di(c,w),onTouchStart:Di(d,h)}]:[!1,f,{}]}function Di(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function mR({page:e,...t}){let r=RT(),{nonce:n}=Au(),{router:s}=Af(),i=v.useMemo(()=>fw(s.routes,e,s.basename),[s.routes,e,s.basename]);return i?(t.nonce==null&&n&&(t={...t,nonce:n}),r?v.createElement(yR,{page:e,matches:i,...t}):v.createElement(vR,{page:e,matches:i,...t})):null}function gR(e){let{manifest:t,routeModules:r}=Au(),[n,s]=v.useState([]);return v.useEffect(()=>{let i=!1;return lR(e,t,r).then(o=>{i||s(o)}),()=>{i=!0}},[e,t,r]),n}function yR({page:e,matches:t,...r}){let n=or(),{future:s}=Au(),{basename:i}=Af(),o=v.useMemo(()=>
162{if(e===n.pathname+n.search+n.hash)return[];let a=Nw(e,i,s.v8_trailingSlashAwareDataRequests,"rsc"),l=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?l=!0:u.push(c.route.id);return l&&u.length>0&&a.searchParams.set("_routes",u.join(",")),[a.pathname+a.search]},[i,s.v8_trailingSlashAwareDataRequests,e,n,t]);return v.createElement(v.Fragment,null,o.map(a=>v.createElement("link",{key:a,rel:"prefetch",as:"fetch",href:a,...r})))}function vR({page:e,matches:t,...r}){let n=or(),{future:s,manifest:i,routeModules:o}=Au(),{basename:a}=Af(),{loaderData:l,matches:u}=fR(),c=v.useMemo(()=>Nm(e,t,u,i,n,"data"),[e,t,u,i,n]),d=v.useMemo(()=>Nm(e,t,u,i,n,"assets"),[e,t,u,i,n]),f=v.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,b=!1;if(t.forEach(g=>{var S;let x=i.routes[g.route.id];!x||!x.hasLoader||(!c.some(_=>_.route.id===g.route.id)&&g.route.id in l&&((S=o[g.route.id])!=null&&S.shouldRevalidate)||x.hasClientLoader?b=!0:y.add(g.route.id))}),y.size===0)return[];let m=Nw(e,a,s.v8_trailingSlashAwareDataRequests,"data");return b&&y.size>0&&m.searchParams.set("_routes",t.filter(g=>y.has(g.route.id)).map(g=>g.route.id).join(",")),[m.pathname+m.search]},[a,s.v8_trailingSlashAwareDataRequests,l,n,i,c,t,e,o]),h=v.useMemo(()=>uR(d,i),[d,i]),w=gR(d);return v.createElement(v.Fragment,null,f.map(y=>v.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),h.map(y=>v.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),w.map(({key:y,link:b})=>v.createElement("link",{key:y,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function wR(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var xR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{xR&&(window.__reactRouterVersion="7.18.0")}catch{}function bR({basename:e,children:t,useTransitions:r,window:n}){let s=v.useRef();s.current==null&&(s.current=eT({window:n,v5Compat:!0}));let i=s.current,[o,a]=v.useState({action:i.action,location:i.location}),l=v.useCallback(u=>{r===!1?a(u):v.startTransition(()=>a(u))},[r]);return v.useLayoutEffect(()=>i.listen(l),[i,l]),v.createElement(QT,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i,useTransitions:r})}var jw=v.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:s,reloadDocument:i,replace:o,mask:a,state:l,target:u,to:c,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:h,...w},y){let{basename:b,navigator:m,useTransitions:g}=v.useContext($t),x=typeof c=="string"&&Ef.test(c),S=bw(c,b);c=S.to;let _=LT(c,{relative:s}),E=or(),k=null;if(a){let K=kf(a,[],E.mask?E.mask.pathname:"/",!0);b!=="/"&&(K.pathname=K.pathname==="/"?b:rr([b,K.pathname])),k=m.createHref(K)}let[R,N,C]=pR(n,w),L=kR(c,{replace:o,mask:a,state:l,target:u,preventScrollReset:d,relative:s,viewTransition:f,defaultShouldRevalidate:h,useTransitions:g});function O(K){t&&t(K),K.defaultPrevented||L(K)}let W=!(S.isExternal||i),I=v.createElement("a",{...w,...C,href:(W?k:void 0)||S.absoluteURL||_,onClick:W?O:t,ref:wR(y,N),target:u,"data-discover":!x&&r==="render"?"true":void 0});return R&&!x?v.createElement(v.Fragment,null,I,v.createElement(mR,{page:_})):I});jw.displayName="Link";var SR=v.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:s=!1,style:i,to:o,viewTransition:a,children:l,...u},c){let d=ea(o,{relative:u.relative}),f=or(),h=v.useContext(Tu),{navigator:w,basename:y}=v.useContext($t),b=h!=null&&AR(d)&&a===!0,m=w.encodeLocation?w.encodeLocation(d).pathname:d.pathname,g=f.pathname,x=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(g=g.toLowerCase(),x=x?x.toLowerCase():null,m=m.toLowerCase()),x&&y&&(x=Kr(x,y)||x);const S=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let _=g===m||!s&&g.startsWith(m)&&g.charAt(S)==="/",E=x!=null&&(x===m||!s&&x.startsWith(m)&&x.charAt(m.length)==="/"),k={isActive:_,isPending:E,isTransitioning:b},R=_?t:void 0,N;typeof n=="function"?N=n(k):N=[n,_?"active":null,E?"pending":null,b?"transitioning":null].filter(
162Boolean).join(" ");let C=typeof i=="function"?i(k):i;return v.createElement(jw,{...u,"aria-current":R,className:N,ref:c,style:C,to:o,viewTransition:a},typeof l=="function"?l(k):l)});SR.displayName="NavLink";var _R=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:s,state:i,method:o=rl,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:f,...h},w)=>{let{useTransitions:y}=v.useContext($t),b=RR(),m=PR(a,{relative:u}),g=o.toLowerCase()==="get"?"get":"post",x=typeof a=="string"&&Ef.test(a),S=_=>{if(l&&l(_),_.defaultPrevented)return;_.preventDefault();let E=_.nativeEvent.submitter,k=(E==null?void 0:E.getAttribute("formmethod"))||o,R=()=>b(E||_.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:s,state:i,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:f});y&&r!==!1?v.startTransition(()=>R()):R()};return v.createElement("form",{ref:w,method:g,action:m,onSubmit:n?l:S,...h,"data-discover":!x&&e==="render"?"true":void 0})});_R.displayName="Form";function ER(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ow(e){let t=v.useContext(wi);return Se(t,ER(e)),t}function kR(e,{target:t,replace:r,mask:n,state:s,preventScrollReset:i,relative:o,viewTransition:a,defaultShouldRevalidate:l,useTransitions:u}={}){let c=Ru(),d=or(),f=ea(e,{relative:o});return v.useCallback(h=>{if(rR(h,t)){h.preventDefault();let w=r!==void 0?r:jo(d)===jo(f),y=()=>c(e,{replace:w,mask:n,state:s,preventScrollReset:i,relative:o,viewTransition:a,defaultShouldRevalidate:l});u?v.startTransition(()=>y()):y()}},[d,c,f,r,n,s,t,e,i,o,a,l,u])}var CR=0,TR=()=>`__${String(++CR)}__`;function RR(){let{router:e}=Ow("useSubmit"),{basename:t}=v.useContext($t),r=KT(),n=e.fetch,s=e.navigate;return v.useCallback(async(i,o={})=>{let{action:a,method:l,encType:u,formData:c,body:d}=iR(i,t);if(o.navigate===!1){let f=o.fetcherKey||TR();await n(f,r,o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,flushSync:o.flushSync})}else await s(o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,s,t,r])}function PR(e,{relative:t}={}){let{basename:r}=v.useContext($t),n=v.useContext(Gr);Se(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),i={...ea(e||".",{relative:t})},o=or();if(e==null){i.search=o.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let c=a.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:rr([r,i.pathname])),jo(i)}function AR(e,{relative:t}={}){let r=v.useContext(Ew);Se(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Ow("useViewTransitionState"),s=ea(e,{relative:t});if(!r.isTransitioning)return!1;let i=Kr(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=Kr(r.nextLocation.pathname,n)||r.nextLocation.pathname;return $l(s.pathname,o)!=null||$l(s.pathname,i)!=null}const Cc=768;function NR(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Cc-1}px)`),n=()=>{t(window.innerWidth<Cc)};return r.addEventListener("change",n),t(window.innerWidth<Cc),()=>r.removeEventListener("change",n)},[]),!!e}const jR=vu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),jf=v.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const o=n?bS:"button";return p.jsx(o,{className:Ie(jR({variant:t,size:r,className:e})),ref:i,...s})});jf.displayName="Button";const sl=v.forwardRef(({className:e,type:t,...r},n)=>p.jsx("input",{type:t,className:Ie("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));
vendor: 5,637 bytes, line 162
162sl.displayName="Input";var OR="Label",Iw=v.forwardRef((e,t)=>p.jsx(Ee.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Iw.displayName=OR;var Lw=Iw;const IR=vu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xn=v.forwardRef(({className:e,...t},r)=>p.jsx(Lw,{ref:r,className:Ie(IR(),e),...t}));xn.displayName=Lw.displayName;function Dw(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Nu="Checkbox",[LR,Dj]=pi(Nu),[DR,Of]=LR(Nu);function $R(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,h]=mu({prop:r,defaultProp:s??!1,onChange:l,caller:Nu}),[w,y]=v.useState(null),[b,m]=v.useState(null),g=v.useRef(!1),x=w?!!o||!!w.closest("form"):!0,S={checked:f,disabled:i,setChecked:h,control:w,setControl:y,name:a,form:o,value:c,hasConsumerStoppedPropagationRef:g,required:u,defaultChecked:Pn(s)?!1:s,isFormControl:x,bubbleInput:b,setBubbleInput:m};return p.jsx(DR,{scope:t,...S,children:MR(d)?d(S):n})}var $w="CheckboxTrigger",Mw=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:i,value:o,disabled:a,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:w}=Of($w,e),y=$e(s,c),b=v.useRef(l);return v.useEffect(()=>{const m=i==null?void 0:i.form;if(m){const g=()=>d(b.current);return m.addEventListener("reset",g),()=>m.removeEventListener("reset",g)}},[i,d]),p.jsx(Ee.button,{type:"button",role:"checkbox","aria-checked":Pn(l)?"mixed":l,"aria-required":u,"data-state":Hw(l),"data-disabled":a?"":void 0,disabled:a,value:o,...n,ref:y,onKeyDown:ce(t,m=>{m.key==="Enter"&&m.preventDefault()}),onClick:ce(r,m=>{d(g=>Pn(g)?!0:!g),w&&h&&(f.current=m.isPropagationStopped(),f.current||m.stopPropagation())})})});Mw.displayName=$w;var If=v.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l,onCheckedChange:u,form:c,...d}=e;return p.jsx($R,{__scopeCheckbox:r,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:u,name:n,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>p.jsxs(p.Fragment,{children:[p.jsx(Mw,{...d,ref:t,__scopeCheckbox:r}),f&&p.jsx(zw,{__scopeCheckbox:r})]})})});If.displayName=Nu;var Fw="CheckboxIndicator",Uw=v.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,i=Of(Fw,r);return p.jsx(pu,{present:n||Pn(i.checked)||i.checked===!0,children:p.jsx(Ee.span,{"data-state":Hw(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});Uw.displayName=Fw;var Bw="CheckboxBubbleInput",zw=v.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:h}=Of(Bw,e),w=$e(r,h),y=Dw(i),b=vf(n);v.useEffect(()=>{const g=f;if(!g)return;const x=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(x,"checked").set,E=!s.current;if(y!==i&&_){const k=new Event("click",{bubbles:E});g.indeterminate=Pn(i),_.call(g,Pn(i)?!1:i),g.dispatchEvent(k)}},[f,y,i,s]);const m=v.useRef(Pn(i)?!1:i);return p.jsx(Ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??m.current,required:a,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});zw.displayName=Bw;function MR(e){return typeof e=="function"}function Pn(e){return e==="indeterminate"}function Hw(e){return Pn(e)?"indeterminate":e?"checked":"unchecked"}const Ww=v.forwardRef(({className:e,...t},r)=>p.jsx(If,{ref:r,className:Ie("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(Uw,{className:Ie("flex items-center justify-center text-current"),children:p.jsx(Qo,{className:"h-4 w-4"})})}));Ww.displayName=If.displayName;const FR=vu("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Vs({className:e,variant:t,...r}){return p.jsx("div",{className:Ie(FR({variant:t}),e),...r})}function Vw(e,[t,r]){return Math.min(r,Math.max(t,e))}var UR=v.createContext(void 0);function BR(e){const t=v.useContext(UR);return e||t||"ltr"}var Kw=["PageUp","PageDown"],qw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Gw={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},xi="Slider",[Hd,zR,HR]=Bv(xi),[Jw,$j]=pi(xi,[HR]),[WR,ju]=Jw(xi),Qw=v.forwardRef((e,t)=>
162{const{name:r,min:n=0,max:s=100,step:i=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[n],value:c,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:w,...y}=e,b=v.useRef(new Set),m=v.useRef(0),x=o==="horizontal"?VR:KR,[S=[],_]=mu({prop:c,defaultProp:u,onChange:L=>{var W;(W=[...b.current][m.current])==null||W.focus(),d(L)}}),E=v.useRef(S);function k(L){const O=YR(S,L);C(L,O)}function R(L){C(L,m.current)}function N(){const L=E.current[m.current];S[m.current]!==L&&f(S)}function C(L,O,{commit:W}={commit:!1}){const I=tP(i),K=rP(Math.round((L-n)/i)*i+n,I),V=Vw(K,[n,s]);_((H=[])=>{const T=JR(H,V,O);if(eP(T,l*i)){m.current=T.indexOf(V);const A=String(T)!==String(H);return A&&W&&f(T),A?T:H}else return H})}return p.jsx(WR,{scope:e.__scopeSlider,name:r,disabled:a,min:n,max:s,valueIndexToChangeRef:m,thumbs:b.current,values:S,orientation:o,form:w,children:p.jsx(Hd.Provider,{scope:e.__scopeSlider,children:p.jsx(Hd.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...y,ref:t,onPointerDown:ce(y.onPointerDown,()=>{a||(E.current=S)}),min:n,max:s,inverted:h,onSlideStart:a?void 0:k,onSlideMove:a?void 0:R,onSlideEnd:a?void 0:N,onHomeKeyDown:()=>!a&&C(n,0,{commit:!0}),onEndKeyDown:()=>!a&&C(s,S.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:O})=>{if(!a){const K=Kw.includes(L.key)||L.shiftKey&&qw.includes(L.key)?10:1,V=m.current,H=S[V],T=i*K*O;C(H+T,V,{commit:!0})}}})})})})});Qw.displayName=xi;var[Yw,Xw]=Jw(xi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),VR=v.forwardRef((e,t)=>{const{min:r,max:n,dir:s,inverted:i,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onStepKeyDown:u,...c}=e,[d,f]=v.useState(null),h=$e(t,x=>f(x)),w=v.useRef(void 0),y=BR(s),b=y==="ltr",m=b&&!i||!b&&i;function g(x){const S=w.current||d.getBoundingClientRect(),_=[0,S.width],k=Lf(_,m?[r,n]:[n,r]);return w.current=S,k(x-S.left)}return p.jsx(Yw,{scope:e.__scopeSlider,startEdge:m?"left":"right",endEdge:m?"right":"left",direction:m?1:-1,size:"width",children:p.jsx(Zw,{dir:y,"data-orientation":"horizontal",...c,ref:h,style:{...c.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=g(x.clientX);o==null||o(S)},onSlideMove:x=>{const S=g(x.clientX);a==null||a(S)},onSlideEnd:()=>{w.current=void 0,l==null||l()},onStepKeyDown:x=>{const _=Gw[m?"from-left":"from-right"].includes(x.key);u==null||u({event:x,direction:_?-1:1})}})})}),KR=v.forwardRef((e,t)=>{const{min:r,max:n,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:a,onStepKeyDown:l,...u}=e,c=v.useRef(null),d=$e(t,c),f=v.useRef(void 0),h=!s;function w(y){const b=f.current||c.current.getBoundingClientRect(),m=[0,b.height],x=Lf(m,h?[n,r]:[r,n]);return f.current=b,x(y-b.top)}return p.jsx(Yw,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:p.jsx(Zw,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const b=w(y.clientY);i==null||i(b)},onSlideMove:y=>{const b=w(y.clientY);o==null||o(b)},onSlideEnd:()=>{f.current=void 0,a==null||a()},onStepKeyDown:y=>{const m=Gw[h?"from-bottom":"from-top"].includes(y.key);l==null||l({event:y,direction:m?-1:1})}})})}),Zw=v.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:l,...u}=e,c=ju(xi,r);return p.jsx(Ee.span,{...u,ref:t,onKeyDown:ce(e.onKeyDown,d=>{d.key==="Home"?(o(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):Kw.concat(qw).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ce(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),c.thumbs.has(f)?f.focus():n(d)}),onPointerMove:ce(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&s(d)}),onPointerUp:ce(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),ex="SliderTrack",tx=v.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=ju(ex,r);return p.jsx(Ee.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});tx.displayName=ex;var Wd="SliderRange",rx=v.forwardRef((e,t)=>
162{const{__scopeSlider:r,...n}=e,s=ju(Wd,r),i=Xw(Wd,r),o=v.useRef(null),a=$e(t,o),l=s.values.length,u=s.values.map(f=>ix(f,s.min,s.max)),c=l>1?Math.min(...u):0,d=100-Math.max(...u);return p.jsx(Ee.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[i.startEdge]:c+"%",[i.endEdge]:d+"%"}})});rx.displayName=Wd;var Vd="SliderThumb",nx=v.forwardRef((e,t)=>{const r=zR(e.__scopeSlider),[n,s]=v.useState(null),i=$e(t,a=>s(a)),o=v.useMemo(()=>n?r().findIndex(a=>a.ref.current===n):-1,[r,n]);return p.jsx(qR,{...e,ref:i,index:o})}),qR=v.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:s,...i}=e,o=ju(Vd,r),a=Xw(Vd,r),[l,u]=v.useState(null),c=$e(t,g=>u(g)),d=l?o.form||!!l.closest("form"):!0,f=vf(l),h=o.values[n],w=h===void 0?0:ix(h,o.min,o.max),y=QR(n,o.values.length),b=f==null?void 0:f[a.size],m=b?XR(b,w,a.direction):0;return v.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${w}% + ${m}px)`},children:[p.jsx(Hd.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(Ee.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:c,style:h===void 0?{display:"none"}:e.style,onFocus:ce(e.onFocus,()=>{o.valueIndexToChangeRef.current=n})})}),d&&p.jsx(sx,{name:s??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:h},n)]})});nx.displayName=Vd;var GR="RadioBubbleInput",sx=v.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const s=v.useRef(null),i=$e(s,n),o=Dw(t);return v.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&c){const d=new Event("input",{bubbles:!0});c.call(a,t),a.dispatchEvent(d)}},[o,t]),p.jsx(Ee.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});sx.displayName=GR;function JR(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function ix(e,t,r){const i=100/(r-t)*(e-t);return Vw(i,[0,100])}function QR(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function YR(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function XR(e,t,r){const n=e/2,i=Lf([0,50],[0,n]);return(n-i(t)*r)*r}function ZR(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function eP(e,t){if(t>0){const r=ZR(e);return Math.min(...r)>=t}return!0}function Lf(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function tP(e){return(String(e).split(".")[1]||"").length}function rP(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var ox=Qw,nP=tx,sP=rx,iP=nx;const il=v.forwardRef(({className:e,...t},r)=>p.jsxs(ox,{ref:r,className:Ie("relative flex w-full touch-none select-none items-center",e),...t,children:[p.jsx(nP,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:p.jsx(sP,{className:"absolute h-full bg-primary"})}),p.jsx(iP,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));il.displayName=ox.displayName;function oP(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(c){try{u(n.next(c))}catch(d){o(d)}}function l(c){try{u(n.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}const aP=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Df extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class lP extends Df{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class jm extends Df{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Om extends Df{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Kd;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Kd||(Kd={}));class uP{constructor(t,{headers:r={},customFetch:n,region:s=Kd.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=aP(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return oP(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:u,signal:c,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 y;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",y=u):typeof u=="string"?(f["Content-Type"]="text/plain",y=u):typeof FormData<"u"&&u instanceof FormData?y=u:(f["Content-Type"]="application/json",y=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?y=JSON.stringify(u):y=u;let b=c;d&&(o=new AbortController,i=setTimeout(()=>
162o.abort(),d),c?(b=o.signal,c.addEventListener("abort",()=>o.abort())):b=o.signal);const m=yield this.fetch(w.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:y,signal:b}).catch(_=>{throw new lP(_)}),g=m.headers.get("x-relay-error");if(g&&g==="true")throw new jm(m);if(!m.ok)throw new Om(m);let x=((s=m.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return x==="application/json"?S=yield m.json():x==="application/octet-stream"||x==="application/pdf"?S=yield m.blob():x==="text/event-stream"?S=m:x==="multipart/form-data"?S=yield m.formData():S=yield m.text(),{data:S,error:null,response:m}}catch(a){return{data:null,error:a,response:a instanceof Om||a instanceof jm?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const ax=3,Im=e=>Math.min(1e3*2**e,3e4),cP=[520,503],lx=["GET","HEAD","OPTIONS"];var Lm=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Dm(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",s),r()},e);function s(){clearTimeout(n),r()}t==null||t.addEventListener("abort",s)})}function dP(e,t,r,n){return!(!n||r>=ax||!lx.includes(e)||!cP.includes(t))}var hP=class{constructor(e){var t,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const u={};r.headers.forEach((d,f)=>{u[f]=d}),o>0&&(u["X-Retry-Count"]=String(o));let c;try{c=await n(r.url.toString(),{method:r.method,headers:u,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"||!lx.includes(r.method))throw d;if(r.retryEnabled&&o<ax){const f=Im(o);o++,await Dm(f,r.signal);continue}throw d}if(dP(r.method,c.status,o,r.retryEnabled)){var a,l;const d=(a=(l=c.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:Im(o);await c.text(),o++,await Dm(f,r.signal);continue}return await r.processResponse(c)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",u="",c="";const d=o==null?void 0:o.cause;if(d){var f,h,w,y;const g=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",x=(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+=` 163 164Caused by: ${(y=d==null?void 0:d.name)!==null&&y!==void 0?y:"Error"}: ${g}`,x&&(l+=` (${x})`),d!=null&&d.stack&&(l+=` 165${d.stack}`)}else{var b;l=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const m=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(c="",u="Request was aborted (timeout or manual cancellation)",m>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${m} 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")&&(c="",u="HTTP headers exceeded server limits (typically 16KB)",m>this.urlLengthLimit&&(u+=`. Your request URL is ${m} 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:u,code:c},data:null,count:null,status:0,statusText:""}}
165)),i.then(e,t)}async processResponse(e){var t=this;let r=null,n=null,s=null,i=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var u;const f=await e.text();if(f!=="")if(t.headers.get("Accept")==="text/csv")n=f;else if(t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text")))n=f;else try{n=JSON.parse(f)}catch{if(r={message:f},n=null,t.shouldThrowOnError)throw new Lm({message:f,details:"",hint:"",code:""})}}const c=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");c&&d&&d.length>1&&(s=parseInt(d[1])),t.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 c=await e.text();try{r=JSON.parse(c),Array.isArray(r)&&e.status===404&&(n=[],r=null,i=200,o="OK")}catch{e.status===404&&c===""?(i=204,o="No Content"):r={message:c}}if(r&&t.shouldThrowOnError)throw new Lm(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},fP=class extends hP{throwOnError(){return super.throwOnError()}select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const $m=new RegExp("[,()]");var bs=class extends fP{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&$m.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&$m.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,r])=>
165r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},pP=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new bs({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),r||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1650){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new bs({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);a.searchParams.set("columns",c.join(","))}}return new bs({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new bs({method:n,url:s,headers:i,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new bs({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Oo(e){"@babel/helpers - typeof";return Oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(e)}function mP(e,t){if(Oo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Oo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gP(e){var t=mP(e,"string");return Oo(t)=="symbol"?t:t+""}function yP(e,t,r){return(t=gP(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function ja(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mm(Object(r),!0).forEach(function(n){yP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vP=class ux{constructor(t,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,c)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),i),h=c==null?void 0:c.signal;if(h){if(h.aborted)return clearTimeout(f),l(u,c);const w=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",w,{once:!0}),l(u,ja(ja({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",w)})}return l(u,ja(ja({},c),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new pP(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new ux(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const c=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(c)),d=n&&Object.values(r).some(c);d?(a="POST",u=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}
165`]).forEach(([h,w])=>{l.searchParams.append(h,w)})):(a="POST",u=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 bs({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class wP{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){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: 166import ws from "ws" 167new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.wsConstructor)return t.wsConstructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 168 169Suggested solution: ${t.workaround}`),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const xP="2.108.2",bP=`realtime-js/${xP}`,SP="1.0.0",cx="2.0.0",_P=cx,EP=1e4,kP=100,dn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},dx={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},qd={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class CP{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,c=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(c).length===0?"":JSON.stringify(c);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(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+u.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
169let w=new DataView(h),y=0;w.setUint8(y++,this.KINDS.userBroadcastPush),w.setUint8(y++,l.length),w.setUint8(y++,a.length),w.setUint8(y++,o.length),w.setUint8(y++,u.length),w.setUint8(y++,d.length),w.setUint8(y++,r),Array.from(l,m=>w.setUint8(y++,m.charCodeAt(0))),Array.from(a,m=>w.setUint8(y++,m.charCodeAt(0))),Array.from(o,m=>w.setUint8(y++,m.charCodeAt(0))),Array.from(u,m=>w.setUint8(y++,m.charCodeAt(0))),Array.from(d,m=>w.setUint8(y++,m.charCodeAt(0)));var b=new Uint8Array(h.byteLength+n.byteLength);return b.set(new Uint8Array(h),0),b.set(new Uint8Array(n),h.byteLength),b.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;const c=n.decode(t.slice(l,l+i));l=l+i;const d=n.decode(t.slice(l,l+o));l=l+o;const f=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,w={type:this.BROADCAST_EVENT,event:c,payload:h};return o>0&&(w.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var de;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(de||(de={}));const Fm=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=TP(o,e,t,s),i),{}):{}},TP=(e,t,r,n)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=r[e];return i&&!n.includes(i)?hx(i,o):Gd(o)},hx=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return NP(t,r)}switch(e){case de.bool:return RP(t);case de.float4:case de.float8:case de.int2:case de.int4:case de.int8:case de.numeric:case de.oid:return PP(t);case de.json:case de.jsonb:return AP(t);case de.timestamp:return jP(t);case de.abstime:case de.date:case de.daterange:case de.int4range:case de.int8range:case de.money:case de.reltime:case de.text:case de.time:case de.timestamptz:case de.timetz:case de.tsrange:case de.tstzrange:return Gd(t);default:return Gd(t)}},Gd=e=>e,RP=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},PP=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},AP=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},NP=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>hx(t,a))}return e},jP=e=>typeof e=="string"?e.replace(" ","T"):e,fx=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var so=e=>typeof e=="function"?e:function(){return e},OP=typeof self<"u"?self:null,Ss=typeof window<"u"?window:null,hr=OP||Ss||globalThis,IP="2.0.0",LP=1e4,DP=1e3,gr={connecting:0,open:1,closing:2,closed:3},ut={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Nr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Jd={longpoll:"longpoll",websocket:"websocket"},$P={complete:4},Qd="base64url.bearer.phx.",Oa=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 169
169oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},px=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},MP=class{constructor(e,t,r){this.state=ut.closed,this.topic=e,this.params=so(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Oa(this,Nr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new px(()=>{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=ut.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=ut.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=ut.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=ut.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 Oa(this,Nr.leave,so({}),this.timeout).send(),this.state=ut.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Nr.reply,(n,s)=>{this.trigger(this.replyEventName(s),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ut.closed,this.bindings=[]}onClose(e){this.on(Nr.close,e)}onError(e){return this.on(Nr.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t>"u"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Oa(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=ut.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Nr.close,"leave")},r=new Oa(this,Nr.leave,so({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=ut.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let s=this.onMessage(e,t,r,n);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<i.length;o++)i[o].callback(s,r,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===ut.closed}isErrored(){return this.state===ut.errored}isJoined(){return this.state===ut.joined}isJoining(){return this.state===ut.joining}isLeaving(){return this.state===ut.leaving}},Fl=class{static request(e,t,r,n,s,i,o){if(hr.XDomainRequest){let a=new hr.XDomainRequest;return this.xdomainRequest(a,e,t,n,s,i,o)}else if(hr.XMLHttpRequest){let a=new hr.XMLHttpRequest;return this.xhrRequest(a,e,t,r,n,s,i,o)}else{if(hr.fetch&&hr.AbortController)return this.fetchRequest(e,t,r,n,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,s,i,o){let a={method:e,headers:r,body:n},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),hr.fetch(t,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(e,t,r,n,s,i,o){return e.timeout=s,e.open(t,r),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,s,i,o,a){e.open(t,r,!0),e.timeout=i;for(let[l,u]of Object.entries(n))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===$P.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let s=t?`${t}[${n}]`:n,i=e[n];typeof i=="object"?r.push(this.serialize(i,s)):r.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return`${e}${r}${this.serialize(t)}`}},FP=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let s=0;s<n;s++)t+=String.fromCharCode(r[s]);return btoa(t)},gs=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Qd)&&(this.authToken=atob(t[1].slice(Qd.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=gr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Jd.websocket),"$1/"+Jd.longpoll)}endpointURL(){return Fl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=gr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===gr.open||this.readyState===gr.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:s}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=gr.open,this.onopen({}),this.poll();break;
169case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(e){typeof e!="string"&&(e=FP(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(` 170`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let s of this.reqs)s.abort();this.readyState=gr.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,s){let i,o=()=>{this.reqs.delete(i),n()};i=Fl.request(e,this.endpointURL(),t,r,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},UP=class Wi{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Wi.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Wi.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=Wi.syncDiff(this.state,s,i,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Wi.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,s){let i=this.clone(t),o={},a={};return this.map(i,(l,u)=>{r[l]||(a[l]=u)}),this.map(r,(l,u)=>{let c=i[l];if(c){let d=u.metas.map(y=>y.phx_ref),f=c.metas.map(y=>y.phx_ref),h=u.metas.filter(y=>f.indexOf(y.phx_ref)<0),w=c.metas.filter(y=>d.indexOf(y.phx_ref)<0);h.length>0&&(o[l]=u,o[l].metas=h),w.length>0&&(a[l]=this.clone(c),a[l].metas=w)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},n,s)}static syncDiff(t,r,n,s){let{joins:i,leaves:o}=this.clone(r);return n||(n=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let c=t[a].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>c.indexOf(f.phx_ref)<0);t[a].metas.unshift(...d)}n(a,u,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;let c=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>c.indexOf(d.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete t[a]}),t}static list(t,r){return r||(r=function(n,s){return s}),this.map(t,(n,s)=>r(n,s))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Ia={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,s,i,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+r.length+s.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,r.length),l.setUint8(u++,s.length),l.setUint8(u++,n.length),Array.from(t,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(u++,d.charCodeAt(0)));var c=new Uint8Array(a.byteLength+i.byteLength);return c.set(new Uint8Array(a),0),c.set(new Uint8Array(i),a.byteLength),c.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;
vendor: 8,661 bytes, line 170
170switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=r.decode(e.slice(o,o+n));o=o+n;let l=r.decode(e.slice(o,o+s));o=o+s;let u=r.decode(e.slice(o,o+i));o=o+i;let c=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:c}},decodeReply(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=r.decode(e.slice(a,a+n));a=a+n;let u=r.decode(e.slice(a,a+s));a=a+s;let c=r.decode(e.slice(a,a+i));a=a+i;let d=r.decode(e.slice(a,a+o));a=a+o;let f=e.slice(a,e.byteLength),h={status:d,response:f};return{join_ref:l,ref:u,topic:c,event:Nr.reply,payload:h}},decodeBroadcast(e,t,r){let n=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=r.decode(e.slice(i,i+n));i=i+n;let a=r.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},BP=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||LP,this.transport=t.transport||hr.WebSocket||gs,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=hr&&hr.sessionStorage}catch{}this.sessionStore=t.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Ia.encode.bind(Ia),this.defaultDecoder=Ia.decode.bind(Ia),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==gs?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;Ss&&Ss.addEventListener&&(Ss.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),n=this.connectClock)}),Ss.addEventListener("pageshow",s=>{n===this.connectClock&&(n=null,this.connect())}),Ss.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=so(t.params||{}),this.endPoint=`${e}/${Jd.websocket}`,this.vsn=t.vsn||IP,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new px(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return gs}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Fl.appendParams(Fl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=so(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==gs?this.connectWithFallback(gs,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(s=>{s.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case gs:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Qd}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,s,i,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),i=this.onError(l=>{this.log("transport","error",l),n&&!r&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),DP,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===gr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 170
170triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Nr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case gr.connecting:return"connecting";case gr.open:return"open";case gr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new MP(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:s,join_ref:i}=e;this.log("push",`${t} ${r} (${i}, ${s})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${r} ${n} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(r,n,s,o)&&l.trigger(n,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class io{constructor(t,r){const n=HP(r);this.presence=new UP(t.getChannel(),n),this.presence.onJoin((s,i,o)=>{const a=io.onJoinPayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=io.onLeavePayload(s,i,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return io.transformState(this.presence.state)}static transformState(t){return t=zP(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return r[n]=ol(s),r},{})}static onJoinPayload(t,r,n){const s=Um(r),i=ol(n);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,r,n){const s=Um(r),i=ol(n);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function ol(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function zP(e){return JSON.parse(JSON.stringify(e))}function HP(e){return(e==null?void 0:e.events)&&{events:e.events}}function Um(e){return e!=null&&e.metas?ol(e):[]}var Bm;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Bm||(Bm={}));class WP{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new io(this.channel.channelAdapter,r)}}function VP(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
170if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const r=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${r}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class KP{constructor(t,r,n){const s=qP(n);this.channel=t.getSocket().channel(r,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let s;try{s=this.channel.push(t,r,n)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>kP){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===dn.joined}isJoined(){return this.state===dn.joined}isJoining(){return this.state===dn.joining}isClosed(){return this.state===dn.closed}isLeaving(){return this.state===dn.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function qP(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var zm;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(zm||(zm={}));var Ds;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ds||(Ds={}));var jr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(jr||(jr={}));class oo{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var s,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new KP(this.socket.socketAdapter,t,this.params),this.presence=new WP(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=fx(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[Ds.PRESENCE]&&this.bindings[Ds.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:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{t==null||t(jr.CHANNEL_ERROR,VP(h))}),this._onClose(()=>t==null?void 0:t(jr.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){t==null||t(jr.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
170).receive("error",h=>{this.state=dn.errored;const w=Object.values(h).join(", ")||"error";t==null||t(jr.CHANNEL_ERROR,new Error(w,{cause:h}))}).receive("timeout",()=>{t==null||t(jr.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const s=this.bindings.postgres_changes,i=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:u,schema:c,table:d,filter:f}}=l,h=t&&t[a];if(h&&h.event===u&&oo.isFilterValueEqual(h.schema,c)&&oo.isFilterValueEqual(h.table,d)&&oo.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=dn.errored,r==null||r(jr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=dn.errored&&r&&r(jr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===Ds.PRESENCE||t===Ds.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i=r instanceof ArrayBuffer||ArrayBuffer.isView(r),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":i?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(t)}`,this.private&&a.searchParams.set("private","true");const l={method:"POST",headers:o,body:i?r:JSON.stringify(r)},u=await this._fetchWithTimeout(a.toString(),l,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(u.status===202)return{success:!0};if(u.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let c=u.statusText;try{const d=await u.json();c=d.error||d.message||c}catch{}return Promise.reject(new Error(c))}async send(t,r={}){var n,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated
170in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_on(t,r,n){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,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(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var s,i,o,a,l,u,c;const d=t.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===t.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=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return h==="*"||h===((c=r==null?void 0:r.event)===null||c===void 0?void 0:c.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,r){const{close:n,error:s,leave:i,join:o}=dx;return r&&[n,s,i,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const s=r.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Fm(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Fm(t.columns,t.old_record)),r}}class GP{constructor(t,r){this.socket=new BP(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==qd.connecting}isDisconnecting(){return this.socket.connectionState()==qd.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Hm={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},JP=[1e3,2e3,5e3,1e4],QP=1e4;function YP(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var r;return(r=Array.from(e.keys())[t])!==null&&r!==void 0?r:null},removeItem(t){e.delete(t)},setItem(t,r){e.set(t,String(r))}}}function XP(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return YP()}const ZP=` 171 addEventListener("message", (e) => { 172 if (e.data.event === "start") { 173 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 174 } 175 });`;class eA{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
175,this.ref=0,this.serializer=new CP,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 GP(t,s),this.httpEndpoint=fx(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error(`${r} 176 177To use Realtime in Node.js, you need to provide a WebSocket implementation: 178 179Option 1: Use Node.js 22+ which has native WebSocket support 180Option 2: Install and provide the "ws" package: 181 182 npm install ws 183 184 import ws from "ws" 185 const client = new RealtimeClient(url, { 186 ...options, 187 transport: ws 188 })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return r==="ok"&&t.teardown(),r}async removeAllChannels(){const t=this.channels.map(async n=>{const s=await n.unsubscribe();return n.teardown(),s}),r=await Promise.all(t);return await this.disconnect(),r}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||qd.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new oo(`realtime:${t}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
188this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let r,n=!1;if(t)r=t,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:bP};r&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(dx.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([ZP],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,s,i,o,a,l,u,c,d,f,h;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const w={};w.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:EP,w.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:Hm.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:Hm.HEARTBEAT_INTERVAL),w.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:wP.getWebSocketConstructor(),w.params=t==null?void 0:t.params,w.logger=t==null?void 0:t.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),w.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:XP(),w.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:g=>JP[g-1]||QP;let y,b;const m=(d=t==null?void 0:t.vsn)!==null&&d!==void 0?d:_P;switch(m){case SP:y=(g,x)=>x(JSON.stringify(g)),b=(g,x)=>x(JSON.parse(g));break;case cx:y=this.serializer.encode.bind(this.serializer),b=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=m,w.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:y,w.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:b,w.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.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=t==null?void 0:t.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
188var Io=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function tA(e,t,r){const n=new URL(t,e);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function rA(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function nA(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=tA(e.baseUrl,n,s),l=await rA(e.auth),u=await t(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),c=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),f=d&&c?JSON.parse(c):c;if(!u.ok){const h=d?f:void 0,w=h==null?void 0:h.error;throw new Io((w==null?void 0:w.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function La(e){return e.join("�")}var sA=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:La(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${La(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${La(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${La(e.namespace)}`}),!0}catch(t){if(t instanceof Io&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Io&&r.status===409)return;throw r}}};function ys(e){return e.join("�")}var iA=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ys(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ys(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ys(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ys(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ys(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ys(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Io&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Io&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},oA=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=nA({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new sA(this.client,t),this.tableOps=new iA(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
188async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function Lo(e){"@babel/helpers - typeof";return Lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lo(e)}function aA(e,t){if(Lo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Lo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lA(e){var t=aA(e,"string");return Lo(t)=="symbol"?t:t+""}function uA(e,t,r){return(t=lA(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function G(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wm(Object(r),!0).forEach(function(n){uA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ou=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Iu(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Yd=class extends Ou{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return G({},super.toJSON())}},mx=class extends Ou{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Ul(e,t,r){const n=G({},e),s=t.toLowerCase();for(const i of Object.keys(n))i.toLowerCase()===s&&delete n[i];return n[s]=r,n}function cA(e){const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}const dA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),hA=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Xd=e=>{if(Array.isArray(e))return e.map(r=>Xd(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=Xd(n)}),t},fA=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Vm=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const r=t.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(e)},pA=async(e,t,r,n)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Yd(Vm(o),i,a,n))}).catch(()=>{const o=i+"";t(new Yd(s.statusText||`HTTP ${i} error`,i,o,n))})}else t(new mx(Vm(e),e,n))},mA=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return G(G({},s),r);if(hA(n)){var i;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=Ul(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(n)}else s.body=n;return t!=null&&t.duplex&&(s.duplex=t.duplex),G(G({},s),r)};async function $i(e,t,r,n,s,i,o){return new Promise((a,l)=>{e(r,mA(t,n,s,i)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(o==="vectors"){const c=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!c||!c.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>pA(u,l,n,o))})}function gx(e="storage"){return{get:async(t,r,n,s)=>$i(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,i)=>$i(t,"POST",r,s,i,n,e),put:async(t,r,n,s,i)=>$i(t,"PUT",r,s,i,n,e),head:async(t,r,n,s)=>$i(t,"HEAD",r,G(G({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,i)=>$i(t,"DELETE",r,s,i,n,e)}}const gA=gx("storage"),{get:Do,post:Gt,put:Zd,head:yA,remove:$f}=gA,wt=gx("vectors");var bi=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=cA(t),this.fetch=dA(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Ul(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Iu(r))return{data:null,error:r};throw r}}};let yx;yx=Symbol.toStringTag;var vA=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[yx]="StreamDownloadBuilder",this.promise=null}
188then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Iu(t))return{data:null,error:t};throw t}}};let vx;vx=Symbol.toStringTag;var wA=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[vx]="BlobDownloadBuilder",this.promise=null}asStream(){return new vA(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Iu(t))return{data:null,error:t};throw t}}};const xA={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Km={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var bA=class extends bi{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=G(G({},Km),n);let a=G(G({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers)for(const[f,h]of Object.entries(n.headers))a=Ul(a,f,h);const u=s._removeEmptyFolders(t),c=s._getFinalPath(u),d=await(e=="PUT"?Zd:Gt)(s.fetch,`${s.url}/object/${c}`,i,G({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;const u=G(G({},Km),n);let c=G(G({},s.headers),{"x-upsert":String(u.upsert)});const d=u.metadata;if(typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.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",u.cacheControl),d&&!l.has("metadata")&&l.append("metadata",s.encodeMetadata(d))):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType,d&&(c["x-metadata"]=s.toBase64(s.encodeMetadata(d))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),n!=null&&n.headers)for(const[f,h]of Object.entries(n.headers))c=Ul(c,f,h);return{path:i,fullPath:(await Zd(s.fetch,a.toString(),l,G({headers:c},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=G({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Gt(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 Ou("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await Gt(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
188stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await Gt(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await Gt(n.fetch,`${n.url}/object/sign/${s}`,G({expiresIn:t},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(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await Gt(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),i=new URLSearchParams;r!=null&&r.download&&i.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&i.set("cacheNonce",String(r.cacheNonce));const o=i.toString();return s.map(a=>G(G({},a),{},{signedUrl:a.signedURL?encodeURI(`${n.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),a=()=>Do(this.fetch,`${this.url}/${n}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new wA(a,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Xd(await Do(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await yA(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Iu(s)){var n;const i=s instanceof Yd?s.status:s instanceof mx?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const s=n.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await $f(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=G(G(G({},xA),t),{},{prefix:e||""});return await Gt(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=G({},e);return await Gt(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const SA="2.108.2",ta={"X-Client-Info":`storage-js/${SA}`};var _A=class extends bi{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=G(G({},ta),t);super(i,o,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Do(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Do(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await Gt(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await Zd(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Gt(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await $f(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},EA=class extends bi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=G(G({},ta),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Gt(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
188{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await Do(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await $f(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!fA(e))throw new Ou("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 oA({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},kA=class extends bi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=G(G({},ta),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await wt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await wt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},CA=class extends bi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=G(G({},ta),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},TA=class extends bi{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=G(G({},ta),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await wt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},RA=class extends TA{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new PA(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},PA=class extends kA{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,G(G({},e),{},{vectorBucketName:r.vectorBucketName}))}
188async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,G(G({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new AA(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},AA=class extends CA{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,G(G({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,G(G({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,G(G({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,G(G({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,G(G({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},NA=class extends _A{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new bA(this.url,this.headers,e,this.fetch)}get vectors(){return new RA(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new EA(this.url+"/iceberg",this.headers,this.fetch)}};function Lu(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}const wx="2.108.2",Or=30*1e3,Vi=3,Tc=Vi*Or,jA=2*Or,OA="http://localhost:9999",IA="supabase.auth.token",LA={"X-Client-Info":`gotrue-js/${wx}`},eh="X-Supabase-Api-Version",xx={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},DA=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,$A=10*60*1e3;class $o extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function M(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class MA extends $o{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function FA(e){return M(e)&&e.name==="AuthApiError"}class Zt extends $o{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class kr extends $o{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class Me extends kr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Da(e){return M(e)&&e.name==="AuthSessionMissingError"}class vs extends kr{constructor(){super("Auth session or user missing","AuthInvalidToken
188ResponseError",500,void 0)}}class $a extends kr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ma extends kr{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function UA(e){return M(e)&&e.name==="AuthImplicitGrantRedirectError"}class qm extends kr{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class BA extends kr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class th extends kr{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Gm(e){return M(e)&&e.name==="AuthRetryableFetchError"}class Jm extends kr{constructor(t="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(t,"AuthRefreshDiscardedError",409,void 0)}}function zA(e){return M(e)&&e.name==="AuthRefreshDiscardedError"}class Qm extends kr{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Bl extends kr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const zl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Ym=` 189\r=`.split(""),HA=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Ym.length;t+=1)e[Ym[t].charCodeAt(0)]=-2;for(let t=0;t<zl.length;t+=1)e[zl[t].charCodeAt(0)]=t;return e})();function Xm(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(zl[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(zl[n]),t.queuedBits-=6}}function bx(e,t,r){const n=HA[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Zm(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{KA(o,n,r)};for(let o=0;o<e.length;o+=1)bx(e.charCodeAt(o),s,i);return t.join("")}function WA(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function VA(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}WA(n,t)}}function KA(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Ks(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)bx(e.charCodeAt(s),r,n);return new Uint8Array(t)}function qA(e){const t=[];return VA(e,r=>t.push(r)),new Uint8Array(t)}function Jn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Xm(s,r,n)),Xm(null,r,n),t.join("")}function GA(e){return Math.round(Date.now()/1e3)+e}function JA(){return Symbol("auth-callback")}const Qe=()=>typeof window<"u"&&typeof document<"u",Bn={tested:!1,writable:!1},Sx=()=>
189{if(!Qe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Bn.tested)return Bn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Bn.tested=!0,Bn.writable=!0}catch{Bn.tested=!0,Bn.writable=!1}return Bn.writable};function QA(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const _x=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),YA=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",_s=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Ht=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Pe=async(e,t)=>{await e.removeItem(t)};class Du{constructor(){this.promise=new Du.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Du.promiseConstructor=Promise;function Fa(e){const t=e.split(".");if(t.length!==3)throw new Bl("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!DA.test(t[n]))throw new Bl("JWT not in base64url format");return{header:JSON.parse(Zm(t[0])),payload:JSON.parse(Zm(t[1])),signature:Ks(t[2]),raw:{header:t[0],payload:t[1]}}}async function XA(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function ZA(e,t){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function eN(e){return("0"+e.toString(16)).substr(-2)}function tN(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,eN).join("")}async function rN(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function nN(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await rN(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function zn(e,t,r=!1){const n=tN();let s=n;r&&(s+="/recovery"),await _s(e,`${t}-code-verifier`,s);const i=await nN(n);return[i,n===i?"plain":"s256"]}const sN=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function iN(e){const t=e.headers.get(eh);if(!t||!t.match(sN))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function oN(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function aN(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const lN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Rr(e){if(!lN.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Vt(e){if(!e.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 Rc(){const e={};return new Proxy(e,{get:(t,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:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function uN(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;
189if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function eg(e){return JSON.parse(JSON.stringify(e))}const Vn=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},cN=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function tg(e){var t;if(!YA(e))throw new th(Vn(e),0);if(cN.includes(e.status))throw new th(Vn(e),e.status);let r;try{r=await e.json()}catch(i){throw new Zt(Vn(i),i)}let n;const s=iN(e);if(s&&s.getTime()>=xx["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 Qm(Vn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.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 Qm(Vn(r),e.status,r.weak_password.reasons);throw new MA(Vn(r),e.status||500,n)}const dN=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function z(e,t,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[eh]||(i[eh]=xx["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 hN(e,t,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function hN(e,t,r,n,s,i){const o=dN(t,n,s,i);let a;try{a=await e(r,Object.assign({},o))}catch(l){throw console.error(l),new th(Vn(l),0)}if(a.ok||await tg(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await tg(l)}}function Pt(e){var t;let r=null;mN(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=GA(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:typeof(e==null?void 0:e.id)=="string"?e:null;return{data:{session:r,user:n},error:null}}function rg(e){const t=Pt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function hn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function fN(e){return{data:e,error:null}}function pN(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=e,o=Lu(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function ng(e){return e}function mN(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Pc=["global","local","others"];class gN{constructor({url:t="",headers:r={},fetch:n,experimental:s}){this.url=t,this.headers=r,this.fetch=_x(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)}}
vendor: 4,751 bytes, line 189
189async signOut(t,r=Pc[0]){if(Pc.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Pc.join(", ")}`);try{return await z(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(M(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await z(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:hn})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Lu(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await z(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:pN,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(M(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await z(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:hn})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await z(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:ng});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(M(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Rr(t);try{return await z(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:hn})}catch(r){if(M(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Rr(t);try{return await z(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:hn})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Rr(t);try{return await z(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:hn})}catch(n){if(M(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Rr(t.userId);try{const{data:r,error:n}=await z(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Rr(t.userId),Rr(t.id);try{return{data:await z(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await z(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:ng});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(M(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await z(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await z(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await z(this.fetch,"DELET
189E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await z(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _listCustomProviders(t){try{const r={};return t!=null&&t.type&&(r.type=t.type),await z(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(M(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(t){try{return await z(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _getCustomProvider(t){try{return await z(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _updateCustomProvider(t,r){try{return await z(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(M(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(t){try{return await z(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}async _adminListPasskeys(t){Vt(this.experimental),Rr(t.userId);try{return await z(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(M(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(t){Vt(this.experimental),Rr(t.userId),Rr(t.passkeyId);try{return await z(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(M(r))return{data:null,error:r};throw r}}}function sg(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}globalThis&&Sx()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class yN extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}function vN(){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 Ex(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function wN(e){return parseInt(e,16)}function xN(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function bN(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:c,uri:d,version:f}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!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(!((t=e.statement)===null||t===void 0)&&t.includes(` 190`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=Ex(e.address),w=c?`${c}://${n}`:n,y=e.statement?`${e.statement} 191`:"",b=`${w} wants you to sign in with your Ethereum account: 192${h} 193 194${y}`;let m=`URI: ${d} 195Version: ${f} 196Chain ID: ${r}${o?` 197Nonce: ${o}`:""} 198Issued At: ${i.toISOString()}`;if(s&&(m+=` 199Expiration Time: ${s.toISOString()}`),a&&(m+=` 200Not Before: ${a.toISOString()}`),l&&(m+=` 201Request ID: ${l}`),u){let g=` 202Resources:`;for(const x of u){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);g+=` 203- ${x}`}m+=g}return`${b} 204${m}`}
204class je extends Error{constructor({message:t,code:r,cause:n,name:s}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Hl extends je{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function SN({error:e,options:t}){var r,n,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new je({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new je({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new je({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new je({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new je({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new je({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new je({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new je({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(kx(o)){if(i.rp.id!==o)return new je({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new je({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new je({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new je({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new je({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function _N({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new je({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new je({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(kx(n)){if(r.rpId!==n)return new je({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new je({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new je({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new je({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class EN{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const rh=new EN;function ig(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=Lu(e,["challenge","user","excludeCredentials"]),i=Ks(t).buffer,o=Object.assign(Object.assign({},r),{id:Ks(r.id).buffer}),a=Object.assign(Object.assign({}
204,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 u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Ks(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function og(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Lu(e,["challenge","allowCredentials"]),s=Ks(t).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Ks(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function ag(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Jn(new Uint8Array(e.response.attestationObject)),clientDataJSON:Jn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function lg(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Jn(new Uint8Array(s.authenticatorData)),clientDataJSON:Jn(new Uint8Array(s.clientDataJSON)),signature:Jn(new Uint8Array(s.signature)),userHandle:s.userHandle?Jn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function kx(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Wl(){var e,t;return!!(Qe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function Cx(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Hl("Browser returned unexpected credential type",t)}:{data:null,error:new Hl("Empty credential response",t)}}catch(t){return{data:null,error:SN({error:t,options:e})}}}async function Tx(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Hl("Browser returned unexpected credential type",t)}:{data:null,error:new Hl("Empty credential response",t)}}catch(t){return{data:null,error:_N({error:t,options:e})}}}const kN={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},CN={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Vl(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(t(o)){const a=n[i];t(a)?n[i]=Vl(a,o):n[i]=Vl(o)}else n[i]=o}return n}function TN(e,t){return Vl(kN,e,t||{})}function RN(e,t){return Vl(CN,e,t||{})}class PN{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:l};const u=s??rh.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:c}=a.webauthn.credential_options.publicKey;if(!c.name){const d=n;if(d)c.name=`${c.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";c.name=`${c.id}:${w}`}}c.displayName||(c.displayName=c.name)}switch(a.webauthn.type){case"create":{const c=TN(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await Cx({publicKey:c,signal:u});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const c=RN(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await Tx(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return M(a)?{data:null,error:a}:{data:null,error:new Zt("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new $o("rpId is required for WebAuthn authentication")};try{if(!Wl())return{data:null,error:new Zt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new Zt("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new $o("rpId is required for WebAuthn registration")};try{if(!Wl())return{data:null,error:new Zt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=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:u}}catch(o){return M(o)?{data:null,error:o}:{data:null,error:new Zt("Unexpected error in register",o)}}}}vN();const AN={url:OA,storageKey:IA,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:LA,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},ws={};class Mo{get jwks(){var t,r;return(r=(t=ws[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){ws[this.storageKey]=Object.assign(Object.assign({},ws[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=ws[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ws[this.storageKey]=Object.assign(Object.assign({},ws[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this.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({},AN),t);if(this.storageKey=i.storageKey,this.instanceID=(r=Mo.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Mo.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 gN({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=_x(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 PN(this)}
204,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:Sx()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=sg(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=sg(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),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${wx}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Qe()&&(r=QA(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),UA(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return M(r)?this._returnResult({error:r}):this._returnResult({error:new Zt("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const i=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Pt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,s;try{let i;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,w=null;this.flowType==="pkce"&&([h,w]=await zn(this.storage,this.storageKey)),i=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,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:Pt})}else if("phone"in t){const{phone:c,password:d,options:f}=t;i=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,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:Pt})}else throw new $a("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Pe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(await Pe(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:a}=t;r=await z(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:rg})}else if("phone"in t){const{phone:i,password:o,options:a}=t;r=await z(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:rg})}else throw new $a("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 vs;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(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t)):this._exchangeCodeForSession(t)}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,i,o,a,l,u,c,d,f;let h,w;if("message"in t)h=t.message,w=t.signature;else{const{chain:y,wallet:b,statement:m,options:g}=t;let x;if(Qe())if(typeof b=="object")x=b;else{const N=window;if("ethereum"in N&&typeof N.ethereum=="object"&&"request"in N.ethereum&&typeof N.ethereum.request=="function")x=N.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=b}const S=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href),_=await x.request({method:"eth_requestAccounts"}).then(N=>N).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=Ex(_[0]);let k=(n=g==null?void 0:g.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!k){const N=await x.request({method:"eth_chainId"});k=wN(N)}const R={domain:S.host,address:E,statement:m,uri:S.href,version:"1",chainId:k,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=bN(R),w=await x.request({method:"personal_sign",params:[xN(h),E]})}try{const{data:y,error:b}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:w},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Pt});if(b)throw b;if(!y||!y.session||!y.user){const m=new vs;return this._returnResult({data:{user:null,session:null},error:m})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:b})}catch(y){if(M(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var r,n,s,i,o,a,l,u,c,d,f,h;let w,y;if("message"in t)w=t.message,y=t.signature;else{const{chain:b,wallet:m,statement:g,options:x}=t;let S;if(Qe())if(typeof m=="object")S=m;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))S=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof m!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=m}const _=new URL((r=x==null?void 0:x.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in S&&S.signIn){const E=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),g?{statement:g}:null));let k;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")k=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)k=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)w=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),y=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${_.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(s=(n=x==null?void 0:x.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=x==null?void 0:x.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((d=(c=x==null?void 0:x.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...x.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(` 205`);const E=await S.signMessage(new TextEncoder().encode(w),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=E}}try{const{data:b,error:m}=await z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:Jn(y)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Pt});if(m)throw m;if(!b||!b.session||!b.user){const g=new vs;return this._returnResult({data:{user:null,session:null},error:g})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:m})}catch(b){if(M(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const r=await Ht(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new BA;const{data:i,error:o}=await z(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Pt});if(await Pe(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new vs;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 Pe(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=t,a=await z(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:Pt}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new vs;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,i,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await zn(this.storage,this.storageKey));const{error:d}=await z(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=
205=null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new $a("You must provide either an email or phone number.")}catch(a){if(await Pe(this.storage,`${this.storageKey}-code-verifier`),M(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,i;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await z(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Pt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await zn(this.storage,this.storageKey));const u=await z(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:fN});return!((i=u.data)===null||i===void 0)&&i.url&&Qe()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Pe(this.storage,`${this.storageKey}-code-verifier`),M(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Me;const{error:s}=await z(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(M(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:i}=t;let o=null,a=null;this.flowType==="pkce"&&([o,a]=await zn(this.storage,this.storageKey));const{error:l}=await z(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken},code_challenge:o,code_challenge_method:a},redirectTo:i==null?void 0:i.emailRedirectTo});return l&&await Pe(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l})}else if("phone"in t){const{phone:n,type:s,options:i}=t,{data:o,error:a}=await z(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 $a("You must provide either an email or phone number and a type")}catch(r){if(await Pe(this.storage,`${this.storageKey}-code-verifier`),M(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 t=>t)):await this._useSession(async t=>t)}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Ht(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
205id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Tc:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await Ht(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Rc()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=uN(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);if(i){if(!!(t.expires_at&&t.expires_at*1e3>Date.now())){const a=await Ht(this.storage,this.storageKey);if(a&&a.refresh_token===t.refresh_token)return this._returnResult({data:{session:t},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;let r;return this.lock!=null?r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):r=await this._getUser(),r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:hn}):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 z(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:hn})})}catch(r){if(M(r))return Da(r)&&(await this._removeSession(),await Pe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r)):await this._updateUser(t,r)}async _updateUser(t,r={}){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"&&t.email!=null&&([a,l]=await zn(this.storage,this.storageKey));const{data:u,error:c}=await z(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:hn});if(c)throw c;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await Pe(this.storage,`${this.storageKey}-code-verifier`),M(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t)):await this._setSession(t)}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Me;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=Fa(t.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(M(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t)):await this._refreshSession(t)}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:a}=r;if(a)throw a;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Me;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(M(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){var n;try{if(!Qe())throw new Ma("No browser detected.");
205if(t.error||t.error_description||t.error_code)throw new Ma(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new qm("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ma("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new qm("No code detected.");const{data:x,error:S}=await this._exchangeCodeForSession(t.code);if(S)throw S;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:x.session,redirectType:(n=x.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:u,token_type:c}=t;if(!o||!l||!a||!c)throw new Ma("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let h=d+f;u&&(h=parseInt(u));const w=h-d;w*1e3<=Or&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${f}s`);const y=h-f;d-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,h,d):d-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,h,d);const{data:b,error:m}=await this._getUser(o);if(m)throw m;const g={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:h,refresh_token:a,token_type:c,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:g,redirectType:t.type},error:null})}catch(s){if(M(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error||t.error_description||t.error_code)}async _isPKCECallback(t){const r=await Ht(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t)):await this._signOut(t)}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!Da(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,t);if(a&&!(FA(a)&&(a.status===404||a.status===401||a.status===403)||Da(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Pe(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=JA(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)}):await this._emitInitialSession(r)))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),Da(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await zn(this.storage,this.storageKey,!0));try{return await z(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await Pe(this.storage,`${this.storageKey}-code-verifier`),M(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,u,c;const{data:d,error:f}=i;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await z(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return Qe()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(M(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:c}=t,d=await z(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:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Pt}),{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 vs}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Pe(this.storage,`${this.storageKey}-code-verifier`),M(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
205return await z(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r="#_refreshAccessToken()";this._debug(r,"begin");try{const n=Date.now();return await ZA(async s=>(s>0&&await XA(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await z(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Pt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Gm(i)&&Date.now()+o-n<Or})}catch(n){if(this._debug(r,"error",n),M(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Qe()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Ht(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Ht(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await _s(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Rc()}else if(s&&!s.user&&!s.user){const o=await Ht(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Pe(this.storage,this.storageKey+"-user"),await _s(this.storage,this.storageKey,s)):s.user=Rc()}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()<Tc;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Tc}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(zA(o)?this._debug(n,"refresh discarded by commit guard",o):this._debug(n,"refresh failed",o))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Me;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===t&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new Du;const i=await Ht(this.storage,this.storageKey),{data:o,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!o.session)throw new Me;const l=await Ht(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 Jm};return this.refreshingDeferred.resolve(f),f}const c=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==c){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, und
205oing write"),await Pe(this.storage,this.storageKey),this.userStorage&&await Pe(this.userStorage,this.storageKey+"-user");const f={data:null,error:new Jm};return this.refreshingDeferred.resolve(f),f}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const d={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(d),d}catch(i){if(this._debug(s,"error",i),M(i)){const o={data:null,error:i};if(!Gm(i)){const a=await Ht(this.storage,this.storageKey);!!(a!=null&&a.expires_at&&a.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:t,result:o,expiresAt:Date.now()+jA},(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Pe(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await _s(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=eg(s);await _s(this.storage,this.storageKey,i)}else{const s=eg(r);await _s(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Pe(this.storage,this.storageKey),await Pe(this.storage,this.storageKey+"-code-verifier"),await Pe(this.storage,this.storageKey+"-user"),this.userStorage&&await Pe(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Qe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Or);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var t;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(t=this.broadcastChannel)===null||t===void 0||t.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/Or);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Or}ms, refresh threshold is ${Vi} ticks`),s<=Vi&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t instanceof yN)this._debug("auto refresh token tick lock not available");else throw t}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const t=Date.now();try{await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/Or);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Or}ms, refresh threshold is ${Vi} ticks`),s<=Vi&&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(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;if(this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!t)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
205{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(r,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){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 zn(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}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await z(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await z(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 u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?ag(t.webauthn.credential_response):lg(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:u}=await z(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return u?this._returnResult({data:null,error:u}):(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:u}))})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challenge(t){const r=async()=>{try{return await this._useSession(async n=>{var s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=await z(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:ig(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:og(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,r):r()}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,i;if(t)try{const{payload:h}=Fa(t);let w=null;h.aal&&(w=h.aal);let y=w;const{data:{user:b},error:m}=await this.getUser(t);if(m)return this._returnResult({data:null,error:m});((n=(r=b==null?void 0:b.factors)===null||r===void 0?void 0:r.filter(S=>S.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(y="aal2");const x=h.amr||[];return{data:{currentLevel:w,nextLevel:y,currentAuthenticationMethods:x},error:null}}catch(h){if(M(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
205=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}=Fa(o.access_token);let u=null;l.aal&&(u=l.aal);let c=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(c="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:c,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await z(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Me})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Me});const o=await z(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Me});const o=await z(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await z(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(t){if(M(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await z(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Me})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+$A>s)return n;const{data:i,error:o}=await z(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:w}
205=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}}=Fa(n);if(!(r!=null&&r.allowExpired))try{oN(i.exp)}catch(h){throw new Bl(h instanceof Error?h.message:"JWT validation failed")}const u=!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(!u){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const c=aN(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,o,qA(`${a}.${l}`)))throw new Bl("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(t){var r,n,s;Vt(this.experimental);try{if(!Wl())return this._returnResult({data:null,error:new Zt("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=og(i.options),l=(s=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:rh.createNewAbortSignal(),{data:u,error:c}=await Tx({publicKey:a,signal:l});if(c||!u)return this._returnResult({data:null,error:c??new Zt("WebAuthn ceremony failed",null)});const d=lg(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:d})}catch(i){if(M(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var r,n;Vt(this.experimental);try{if(!Wl())return this._returnResult({data:null,error:new Zt("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=ig(s.options),a=(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:rh.createNewAbortSignal(),{data:l,error:u}=await Cx({publicKey:o,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new Zt("WebAuthn ceremony failed",null)});const c=ag(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:c})}catch(s){if(M(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){Vt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Me});const{data:s,error:i}=await z(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(M(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Vt(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 z(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(t){var r;Vt(this.experimental);try{const{data:n,error:s}=await z(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if(M(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(t){Vt(this.experimental);try{const{data:r,error:n}=await z(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Pt});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(M(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){Vt(this.experimental);try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Me});const{data:s,error:i}=await z(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(M(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Vt(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 z(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(t){Vt(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}
205=await z(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(r){if(M(r))return this._returnResult({data:null,error:r});throw r}}}Mo.nextInstanceID={};const NN=Mo,jN="2.108.2";let Ki="",Kl;if(typeof Deno<"u"){var Ac;Ki="deno",Kl=(Ac=Deno.version)===null||Ac===void 0?void 0:Ac.deno}else if(typeof document<"u")Ki="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Ki="react-native";else{var Nc;Ki="node",Kl=typeof process<"u"?(Nc=process.version)===null||Nc===void 0?void 0:Nc.replace(/^v/,""):void 0}const Rx=[`runtime=${Ki}`];Kl&&Rx.push(`runtime-version=${Kl}`);const ON={"X-Client-Info":`supabase-js/${jN}; ${Rx.join("; ")}`},IN={headers:ON},LN={schema:"public"},DN={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},$N={},MN={enabled:!1,respectSamplingDecision:!0};function FN(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(c){try{u(n.next(c))}catch(d){o(d)}}function l(c){try{u(n.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((n=n.apply(e,[])).next())})}let jc=null;const UN="@opentelemetry/api";function BN(){return jc===null&&(jc=import(UN).catch(()=>null)),jc}function zN(){return FN(this,void 0,void 0,function*(){try{const e=yield BN();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const r=t.traceparent;return r?{traceparent:r,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function HN(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[r,n,s,i]=t;if(r.length!==2||n.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(r)||!o.test(n)||!o.test(s)||!o.test(i)||n==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:r,traceId:n,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function WN(e,t){if(!e||!t||t.length===0)return!1;let r;if(e instanceof URL)r=e;else try{r=new URL(e)}catch{return!1}for(const n of t)try{if(typeof n=="string"){if(VN(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 VN(e,t){if(t===e)return!0;if(t.startsWith("*.")){const r=t.slice(2);if(e.endsWith(r)&&(e===r||e.endsWith("."+r)))return!0}return!1}function KN(e){const t=[];try{const r=new URL(e);t.push(r.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Fo(e){"@babel/helpers - typeof";return Fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fo(e)}function qN(e,t){if(Fo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Fo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GN(e){var t=qN(e,"string");return Fo(t)=="symbol"?t:t+""}function JN(e,t,r){return(t=GN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ug(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ug(Object(r),!0).forEach(function(n){JN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ug(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const QN=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),YN=()=>Headers,XN=(e,t,r,n,s)=>{const i=QN(n),o=YN(),a=(s==null?void 0:s.enabled)===!0,l=(s==null?void 0:s.respectSamplingDecision)!==!1,u=a?KN(t):null;return async(c,d)=>{var f;const h=(f=await r())!==null&&f!==void 0?f:e;let w=new o(d==null?void 0:d.headers);if(w.has("apikey")||w.set("apikey",e),w.has("Authorization")||w.set("Authorization",`Bearer ${h}`),u){const y=await ZN(c,u,l);y&&(y.traceparent&&!w.has("traceparent")&&w.set("traceparent",y.traceparent),y.tracestate&&!w.has("tracestate")&&w.set("tracestate",y.tracestate),y.baggage&&!w.has("baggage")&&w.set("baggage",y.baggage))}return i(c,Ce(Ce({},d),{},{headers:w}))}};async function ZN(e,t,r){if(!WN(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const n=await zN();if(!n||!n.traceparent)return null;if(r){const s=HN(n.traceparent);if(s&&!s.isSampled)return null}return n}function cg(e){return typeof e=="boolean"?{enabled:e}:e}function ej(e){return e.endsWith("/")?e:e+"/"}function tj(e,t){var r,n,s,i,o,a;const{db:l,auth:u,realtime:c,global:d}=e,{db:f,auth:h,realtime:w,global:y}=t,b=cg(e.tracePropagation),m=cg(t.tracePropagation),g={db:Ce(Ce({},f),l),auth:Ce(Ce({},h),u),realtime:Ce(Ce({},w),c),storage:{},global:Ce(Ce(Ce({},y),d),{},{headers:Ce(Ce({},(r=y==null?void 0:y.headers)!==null&&r!==void 0?r:{}),(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(s=(i=b==null?void 0:b.enabled)!==null&&i!==void 0?i:m==null?void 0:m.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=b==null?void 0:b.respectSamplingDecision)!==null&&a!==void 0?a:m==null?void 0:m.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return e.accessToken?g.accessToken=e.accessToken:delete g.accessToken,g}function rj(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");
205if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(ej(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var nj=class extends NN{constructor(e){super(e)}},sj=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const i=rj(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:LN,realtime:$N,auth:Ce(Ce({},DN),{},{storageKey:o}),global:IN,tracePropagation:MN},l=tj(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:(c,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 u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=XN(t,e,this._getAccessToken.bind(this),l.global.fetch,l.tracePropagation),this.realtime=this._initRealtimeClient(Ce({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(c=>this.realtime.setAuth(c)).catch(c=>console.warn("Failed to set initial Realtime auth token:",c)),this.rest=new vP(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 NA(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new uP(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,lockAcquireTimeout:d,skipAutoInitialize:f},h,w){const y={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new nj({url:this.authUrl.href,headers:Ce(Ce({},y),h),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,fetch:w,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new eA(this.realtimeUrl.href,Ce(Ce({},e),{},{params:Ce(Ce({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const ij=(e,t,r)=>new sj(e,t,r);function oj(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}oj()&&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
205ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const aj="https://nugpnvjieyqcvxusfruc.supabase.co",lj="sb_publishable_pLkiWj_1idT2BStVoxZsFA_EMlF6UIa",Uo=ij(aj,lj,{auth:{persistSession:!1,autoRefreshToken:!1,storageKey:"company-sb"}}),Px="mdr-quote-params";let qi=null;const Ax=()=>{try{const e=sessionStorage.getItem(Px);if(!e)return{};const t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}},uj=e=>{try{sessionStorage.setItem(Px,JSON.stringify(e))}catch{}},Nx=()=>{if(typeof window>"u")return{};const e=Ax(),t=new URLSearchParams(window.location.search),r={...e};for(const[n,s]of t.entries())r[n]=s;return uj(r),qi=r,r},jx=()=>qi||(qi=Ax(),qi),ds=e=>{const t=jx()[e];return t??null},nh=()=>{const e=jx(),t=new URLSearchParams(e).toString();return t?`?${t}`:""};typeof window<"u"&&Nx();const ql="mdr_draft_id",cj=800,dj=new Set(["first_name","last_name","company","title","email","phone","street","line2","city","state","zip","country","selected_package","endpoints","inboxes","price","marketing_consent","employees","use_employee_estimate","manual_core_premium","manual_advanced_premium","manual_complete_premium","current_endpoint_spend","current_email_spend","current_sec_mgmt_spend","sec_mgmt_type","package_1","package_2","package_3","ptot_1","ptot_2","ptot_3","nam_ins","ni_emp","quote_id"]),Gl=e=>{const t={};for(const[r,n]of Object.entries(e))dj.has(r)&&n!==void 0&&(t[r]=n);return t},Ox=()=>{try{let e=localStorage.getItem(ql);return e||(e=sh(),localStorage.setItem(ql,e)),e}catch{return sh()}},sh=()=>globalThis.crypto&&"randomUUID"in globalThis.crypto?globalThis.crypto.randomUUID():`d-${Date.now()}-${Math.random().toString(36).slice(2)}`,hj=e=>{try{localStorage.setItem(ql,e)}catch{}},fj=e=>(e.endpoints??0)>0||(e.inboxes??0)>0||(e.employees??0)>0||e.marketing_consent||["manual_core_premium","manual_advanced_premium","manual_complete_premium","current_endpoint_spend","current_email_spend","current_sec_mgmt_spend","ptot_1","ptot_2","ptot_3","ni_emp"].some(n=>Number(e[n]??0)>0)?!0:["first_name","last_name","company","title","email","phone","street","line2","city","state","zip","country","package_1","package_2","package_3","nam_ins","quote_id"].some(n=>typeof e[n]=="string"&&e[n].trim()!=="");let qs={},Jl={},Qn=null,ao=!1,ih=null;const dg=async(e,t)=>{const{error:r,count:n}=await Uo.from("mdr_quote_submissions").update(t,{count:"exact"}).eq("draft_id",e).eq("status","draft");return r?(console.debug("draft update failed",r),!1):n!==0},hg=async e=>{const t=sh(),{error:r}=await Uo.from("mdr_quote_submissions").insert({draft_id:t,status:"draft",...e});if(r){console.debug("draft recovery insert failed",r);return}hj(t),ao=!0},pj=async()=>{if(Object.keys(qs).length===0)return;const e=Ox(),t=Gl(qs),r=Gl(Jl);qs={};try{if(ao)await dg(e,t)||await hg(r);else{if(!fj(r))return;const{error:n}=await Uo.from("mdr_quote_submissions").insert({draft_id:e,status:"draft",...r});n?n.code==="23505"?await dg(e,r)?ao=!0:await hg(r):console.debug("draft insert failed",n):ao=!0}}catch(n){console.debug("draft sync failed",n)}},mj=()=>{Qn&&clearTimeout(Qn),Qn=setTimeout(()=>{Qn=null,ih=pj()},cj)},lo=e=>{const t=Gl(e);Object.keys(t).length!==0&&(Jl={...Jl,...t},qs={...qs,...t},mj())},gj=async e=>{if(Qn&&(clearTimeout(Qn),Qn=null),ih)try{await ih}catch{}const t=Ox(),r=Gl(e),n=await Uo.from("mdr_quote_submissions").update({...r,status:"submitted"}).eq("draft_id",t).select("id");if(!n.error&&n.data&&n.data.length>0)return fg(),null;const s=await Uo.from("mdr_quote_submissions").insert({...r,status:"submitted"});return s.error?{error:s.error}:(fg(),null)},fg=()=>{try{localStorage.removeItem(ql)}catch{}ao=!1,qs={},Jl={}},oh=()=>{const e={},t=f=>{const h=ds(f);return h&&h.trim().length>0?h.trim():null},r=f=>{const h=ds(f);if(!h)return null;const w=parseInt(h,10);return Number.isFinite(w)?w:null},n=t("package_1");n&&(e.package_1=n);const s=t("package_2");s&&(e.package_2=s);const i=t("package_3");i&&(e.package_3=i);const o=r("PTOT_1");o!==null&&(e.ptot_1=o);const a=r("PTOT_2");a!==null&&(e.ptot_2=a);const l=r("PTOT_3");l!==null&&(e.ptot_3=l);const u=t("Nam_Ins");u&&(e.nam_ins=u,e.company=u);const c=r("NI_EMP");c!==null&&(e.ni_emp=c);const d=t("Quote_ID");return d&&(e.quote_id=d),e},Wt=e=>
205`$${e.toLocaleString()}`,Oc=({label:e,value:t})=>p.jsxs("div",{className:"space-y-1.5",children:[p.jsx("label",{style:{fontSize:13,fontWeight:500,color:"#374151"},children:e}),p.jsxs("div",{className:"flex items-center justify-between",style:{height:44,borderRadius:8,border:"1px solid #E5E7EB",background:"#F8FAFC",padding:"0 12px"},children:[p.jsxs("span",{className:"tabular-nums",style:{fontSize:14,fontWeight:500,color:"#111827"},children:[Wt(t),"/yr"]}),p.jsxs("span",{style:{fontSize:11,color:"#9CA3AF",display:"inline-flex",alignItems:"center",gap:4},children:[p.jsx(g0,{style:{width:11,height:11}}),"From quote"]})]})]}),Ic=({label:e,value:t,onChange:r,placeholder:n,warning:s})=>p.jsxs("div",{className:"space-y-1.5",children:[p.jsx("label",{style:{fontSize:13,fontWeight:500,color:"#374151"},children:e}),p.jsxs("div",{className:"flex items-stretch overflow-hidden",style:{height:44,borderRadius:8,border:"1px solid #D1D5DB"},children:[p.jsx("span",{className:"flex items-center justify-center select-none",style:{background:"#F9FAFB",fontSize:12,color:"#9CA3AF",padding:"0 10px",borderRight:"1px solid #D1D5DB"},children:"$"}),p.jsx("input",{type:"text",value:t,onChange:i=>r(i.target.value),placeholder:n,className:"flex-1 outline-none bg-white",style:{fontSize:14,fontWeight:500,color:"#111827",padding:"0 10px"}}),p.jsx("span",{className:"flex items-center justify-center select-none",style:{background:"#F9FAFB",fontSize:12,color:"#9CA3AF",padding:"0 10px",borderLeft:"1px solid #D1D5DB"},children:"/yr"})]}),s&&p.jsxs("p",{className:"text-xs text-destructive",children:[e," premium should be lower than Core â please check your quote"]})]}),Mi=({text:e})=>p.jsx(nw,{delayDuration:200,children:p.jsxs(CC,{children:[p.jsx(TC,{asChild:!0,children:p.jsx("button",{type:"button",className:"inline-flex cursor-help","aria-label":"More info",children:p.jsx(y_,{style:{width:12,height:12,color:"#9CA3AF"}})})}),p.jsx(sw,{className:"border-0",side:"top",sideOffset:5,style:{background:"#1F2937",color:"#fff",fontSize:12,maxWidth:200,borderRadius:8,padding:"8px 10px",zIndex:9999},children:p.jsx("p",{children:e})})]})}),yj=({selectedPackage:e,endpoints:t,inboxes:r,corePremium:n,packagePremium:s,coreFromUrl:i,advancedFromUrl:o,completeFromUrl:a,advancedPremium:l,completePremium:u,manualCorePremium:c,manualAdvancedPremium:d,manualCompletePremium:f,onManualCorePremiumChange:h,onManualAdvancedPremiumChange:w,onManualCompletePremiumChange:y,advancedWarning:b,completeWarning:m,mdrAnnualPrice:g})=>{const S="mdr-savings-state",_=v.useRef((()=>{try{const Q=sessionStorage.getItem(S);return Q?JSON.parse(Q):{}}catch{return{}}})()).current,[E,k]=v.useState(_.endpointSpend??60),[R,N]=v.useState(_.emailSpend??50),[C,L]=v.useState(_.secMgmtSpend??100),[O,W]=v.useState(_.secMgmtType??"external"),[I,K]=v.useState(_.showSliders??!1);v.useEffect(()=>{try{sessionStorage.setItem(S,JSON.stringify({endpointSpend:E,emailSpend:R,secMgmtSpend:C,secMgmtType:O,showSliders:I}))}catch{}},[E,R,C,O,I]),v.useEffect(()=>{lo({current_endpoint_spend:E,current_email_spend:R,current_sec_mgmt_spend:C,sec_mgmt_type:O})},[E,R,C,O]);const V=Q=>{k(Q)},H=Q=>{W(Q),L(Q==="internal"?50:100)},J=(i||c!=="")&&(e==="advanced"&&(o||d!=="")||e==="complete"&&(a||f!=="")),F=v.useMemo(()=>{if(!J)return null;if(e==="advanced"){const Q=n-l;return Q>0?Q:0}if(e==="complete"){const Q=n-u;return Q>0?Q:0}return 0},[J,e,n,l,u]),q=v.useMemo(()=>{const Q=E*t,ze=e==="complete"?R*r:null,le=e==="complete"?t+r:t,Ct=C*le,Cr=Q+(ze??0)+Ct+(F??0);return{endpointSavings:Q,emailSavings:ze,secMgmtSavings:Ct,total:Cr}},[E,t,R,r,C,e,F]),Y=q.total<=0,oe=v.useMemo(()=>q.total-g,[g,q.total]),ye=oe>=0,te=oe>0?Wt(oe):oe===0?Wt(0):`-${Wt(Math.abs(oe))}`,gt=p.jsxs("div",{className:"space-y-0",children:[!(i&&o&&a)&&p.jsxs("div",{id:"premium-inputs-section",className:"space-y-3",children:[p.jsx("p",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:"#6B7280"},children:"Your insurance premiums"}),p.jsxs("div",{className:"flex items-center gap-2",style:{background:"#EFF6FF",border:"1px solid #BFDBFE",borderRadius:8,padding:"10px 14px",marginBottom:12},children:[p.jsx(g_,{style:{width:16,height:16,color:"#3B82F6",flexShrink:0}}),p.jsx("span",{style:{fontSize:12,color:"#1D4ED8",whiteSpace:"nowrap"},children:"Find these amounts in your At-Bay InsurSec quote"})]}),p.jsxs("div",{className:"space-y-3",children:[i?p.jsx(Oc,{label:"Core package",value:n}):p.jsx(Ic,{label:"Core package",value:c,onChange:h,placeholder:""}),o?p.jsx(Oc,{label:"Advanced package",value:l}):p.jsx(Ic,{label:"Advanced package",value:d,onChange:w,placeholder:"",warning:b}),a?p.jsx(Oc,{label:"Complete package",value:u}):p.jsx(Ic,{label:"Complete package",value:f,onChange:y,placeholder:"",warning:m})]})]}),p.jsxs("div",{style:{marginTop:16},children:[p.jsxs("button",{type:"button",onClick:()=>K(!I),className:"flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-4 lg:hidden",children:["WHAT DO YOU CURRENTLY SPEND ON SECURITY TOOLS?",I?p.jsx(m0,{className:"w-4 h-4"}):p.jsx(uf,{className:"w-4 h-4"})]}),p.jsxs("div",{className:`space-y-5 ${I?"block":"hidden"} lg:block`,children:[p.jsxs("p",{className:"hidden lg:block",style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:"#6B7280",whiteSpace:"pre-line"},children:["WHAT DO YOU CURRENTLY SPEND ON SECURITY TOOLS?",` 206 207`]}),p.jsx("p",{className:"hidden lg:block",style:{fontSize:13,color:"#6B7280",lineHeight:1.5,marginTop:-8,marginBottom:32},children:"If you already pay for endpoint protection, email security, or a managed security provider, enter your current costs below. We'll calculate how much At-Bay MDR could save you by replacing or consolidating those tools â on top of the insurance premium savings from your InsurSec quote."}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(xn,{className:"text-sm",children:"Current endpoint security spend"}),p.jsx(Mi,{text:"e.g. EDR, antivirus tools like SentinelOne or
207CrowdStrike"})]}),p.jsxs("span",{className:"text-sm font-medium text-foreground tabular-nums",children:["$",E,"/device/yr"]})]}),p.jsx(il,{value:[E],onValueChange:([Q])=>V(Q),min:0,max:300,step:5}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Range: $0 â $300/device"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(xn,{className:"text-sm",children:"Current email security spend"}),p.jsx(Mi,{text:"e.g. email gateway or cloud email security tools"})]}),p.jsxs("span",{className:"text-sm font-medium text-foreground tabular-nums",children:["$",R,"/inbox/yr"]})]}),p.jsx(il,{value:[R],onValueChange:([Q])=>N(Q),min:0,max:100,step:5}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Range: $0 â $100/inbox"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(xn,{className:"text-sm",children:"Current security management spend"}),p.jsx(Mi,{text:"e.g. internal SOC team, IT staff time, or external MSSP costs"})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("button",{type:"button",onClick:()=>H("internal"),className:`px-2.5 py-1 text-xs rounded-md font-medium transition-colors ${O==="internal"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-accent/10"}`,children:"Internal"}),p.jsx("button",{type:"button",onClick:()=>H("external"),className:`px-2.5 py-1 text-xs rounded-md font-medium transition-colors ${O==="external"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-accent/10"}`,children:"External"})]})]}),p.jsx("div",{className:"flex items-center justify-end",children:p.jsxs("span",{className:"text-sm font-medium text-foreground tabular-nums",children:["$",C,"/unit/yr"]})}),p.jsx(il,{value:[C],onValueChange:([Q])=>L(Q),min:0,max:150,step:5}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Range: $0 â $150/person"})]}),E===0&&R===0&&C===0&&p.jsx("p",{style:{fontSize:12,color:"#9CA3AF",lineHeight:1.5},children:"No existing tools? Your savings come entirely from your insurance premium reduction â shown on the right."})]})]})]}),Ke=({label:Q,value:ze,note:le,tooltip:Ct,borderTop:Cr,style:ar})=>p.jsxs("div",{className:"flex items-start justify-between",style:{padding:"10px 0",borderTop:Cr,...ar},children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("p",{style:{fontSize:13,color:"#6B7280"},children:Q}),Ct&&p.jsx(Mi,{text:Ct})]}),le&&p.jsx("p",{style:{fontSize:11,color:"#9CA3AF"},children:le})]}),p.jsx("p",{className:"tabular-nums",style:{fontSize:13,fontWeight:500,color:"#111827"},children:ze})]}),Ne=i&&o&&a?p.jsxs("div",{style:{background:"#F8FAFC",border:"1px solid #E5E7EB",borderRadius:8,padding:"12px 14px",marginBottom:16},children:[p.jsx("p",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:"#6B7280",marginBottom:10},children:"Your quote premiums"}),[{label:"Core",value:n,key:"core"},{label:"Advanced",value:l,key:"advanced"},{label:"Complete",value:u,key:"complete"}].map((Q,ze)=>{const le=Q.key!=="core"&&Q.key===e;return p.jsxs("div",{className:"flex items-center justify-between",style:{padding:"6px 6px",borderTop:ze>0?"0.5px solid #F3F4F6":void 0,borderRadius:le?4:void 0,background:le?"#EFF6FF":void 0},children:[p.jsx("p",{style:{fontSize:13,color:le?"#1D4ED8":"#6B7280"},children:Q.label}),p.jsxs("p",{className:"tabular-nums",style:{fontSize:13,fontWeight:500,color:le?"#1D4ED8":"#111827"},children:[Wt(Q.value),"/yr"]})]},Q.key)}),p.jsxs("p",{style:{fontSize:11,color:"#9CA3AF",fontStyle:"italic",marginTop:8,display:"flex",alignItems:"center",gap:4},children:[p.jsx(g0,{style:{width:11,height:11,flexShrink:0}}),"Pulled from your InsurSec quote"]})]}):null,lt=p.jsxs("div",{children:[Ne,q.endpointSavings>0&&p.jsx(Ke,{label:"Endpoint security savings",value:Wt(q.endpointSavings)}
207),e==="complete"&&q.emailSavings!==null&&q.emailSavings>0&&p.jsx(Ke,{label:"Email security savings",value:Wt(q.emailSavings),borderTop:"0.5px solid #F3F4F6"}),q.secMgmtSavings>0&&p.jsx(Ke,{label:"Security management savings",value:Wt(q.secMgmtSavings),borderTop:"0.5px solid #F3F4F6"}),F!==null&&p.jsxs("div",{className:"flex items-start justify-between",style:{padding:"12px 0",borderTop:"1px solid #E5E7EB"},children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("p",{style:{fontSize:13,fontWeight:500,color:"#374151"},children:"Insurance premium savings"}),p.jsx(Mi,{text:"By choosing Advanced or Complete, your insurance premium is lower than Core. This reflects your estimated annual saving."})]}),p.jsx("p",{className:"tabular-nums",style:{fontSize:13,fontWeight:500,color:"#15803D"},children:Wt(F)})]}),p.jsx("div",{style:{borderTop:"1px solid #E5E7EB",margin:"4px 0"}}),p.jsxs("div",{className:"flex items-end justify-between",style:{padding:"14px 0"},children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsx("p",{style:{fontSize:15,fontWeight:500,color:"#111827"},children:"Total estimated savings"}),Y&&p.jsx("p",{style:{fontSize:11,color:"#9CA3AF",maxWidth:280},children:"Your current spend is already below our package priceâtalk to us about a custom quote."})]}),p.jsxs("p",{className:"tabular-nums",style:{fontSize:22,fontWeight:700,color:"hsl(var(--success))"},children:[Wt(Y?0:q.total),p.jsx("span",{style:{fontSize:13,fontWeight:400,color:"#6B7280"},children:" /year"})]})]}),p.jsxs("div",{className:"flex items-center justify-between",style:{padding:"10px 0"},children:[p.jsx("p",{style:{fontSize:13,color:"#6B7280"},children:"MDR package cost"}),p.jsxs("p",{className:"tabular-nums",style:{fontSize:13,fontWeight:400,color:"#6B7280"},children:["(",Wt(g),")"]})]}),p.jsxs("div",{className:"flex items-end justify-between",style:{padding:"12px 0",borderTop:"1px solid #E5E7EB"},children:[p.jsx("p",{style:{fontSize:13,color:"#6B7280"},children:"Net savings"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("p",{className:"tabular-nums",style:{fontSize:20,fontWeight:700,color:ye?"hsl(var(--success))":"#111827"},children:[te,p.jsx("span",{style:{fontSize:13,fontWeight:400,color:"#6B7280"},children:" /year"})]}),ye&&p.jsx(Vs,{className:"bg-green-100 text-green-800 border-green-200 text-xs whitespace-nowrap",children:"MDR pays for itself"})]})]}),p.jsx("p",{style:{fontSize:11,color:"#9CA3AF",marginTop:12},children:"Estimates are based on inputs provided and are for illustrative purposes only. Actual savings may vary."})]});return p.jsxs("section",{className:"space-y-4",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",children:"Your estimated savings"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"At-Bay MDR often offsets its own cost through reduced cyber insurance premiums and consolidation of existing security tools. The estimate below reflects your projected savings based on current spend and your At-Bay InsurSec quote."}),p.jsxs("div",{className:"hidden lg:grid lg:grid-cols-2",style:{background:"#fff",border:"1px solid #E5E7EB",borderRadius:12,padding:24},children:[p.jsx("div",{style:{paddingRight:24,borderRight:"1px solid #E5E7EB"},children:gt}),p.jsx("div",{style:{paddingLeft:24},children:lt})]}),p.jsxs("div",{className:"lg:hidden",style:{background:"#fff",border:"1px solid #E5E7EB",borderRadius:12,padding:24},children:[gt,p.jsx("div",{style:{borderTop:"1px solid #E5E7EB",margin:"20px 0"}}),lt]})]})},Ix="mdr-order-context",ah=e=>{try{sessionStorage.setItem(Ix,JSON.stringify(e))}catch{}},Lx=()=>{try{const e=sessionStorage.getItem(Ix);if(!e)return null;const t=JSON.parse(e);return(t.selectedPackage==="advanced"||t.selectedPackage==="complete")&&typeof t.endpoints=="number"&&typeof t.inboxes=="number"&&typeof t.price=="number"?t:null}catch{return null}},Dx=e=>e==="advanced"?"MDR for Endpoint":"MDR for Endpoint + Email",$x=e=>e==="advanced"?"Required for Advanced":"Required for Complete",Mf={list:144,d5:136,d10:129,d15:122},Mx={list:216,d5:205,d10:194,d15:183},ra=2400;function Ql(e,t){return e>=1001?t.d15:e>=501?t.d10:e>=101?t.d5:t.list}function vj(e,t){if(!e||e<=0)return 0;const r=Ql(e,t),n=Math.round(e*r);return Math.max(n,ra)}function lh(e,t){return!e||e<=0?!1:e*Ql(e,t)<ra}function wj(e,t){const r=Math.max(0,e||0),n=Math.max(0,t||0);if(r<=0&&n<=0)return 0;const s=Ql(r,Mf),o=Ql(r,Mx)-s,a=Math.round(r*s+n*o);return Math.max(a,ra)}function Yl(e,t,r){return e==="advanced"?vj(t,Mf):wj(t,r??t)}function uh(e){return e==="advanced"?Mf:Mx}const Ua=e=>
207e?e.toLocaleString():"",cr=e=>parseInt(e.replace(/,/g,""))||0,Rt=({children:e})=>p.jsxs("div",{className:"flex items-start gap-2 text-sm text-foreground",children:[p.jsx(Qo,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),p.jsx("span",{children:e})]}),Lc=e=>{const t=ds(e);if(!t)return null;const r=parseInt(t);return Number.isFinite(r)&&r>0?r:null},xj=()=>{const e=ds("Nam_Ins");if(e&&e.trim().length>0)return e.trim();const t=ds("company");return t&&t.trim().length>0?t.trim():null},bj=()=>{const e=ds("NI_EMP");if(!e)return null;const t=parseInt(e);return Number.isFinite(t)&&t>0?t:null},pg=e=>{const t=ds(e);if(!t)return null;const r=parseInt(t);return Number.isFinite(r)&&r>0?r:null},Fx="mdr-calculator-state",Sj=()=>{try{const e=sessionStorage.getItem(Fx);if(!e)return{};const t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}},_j=()=>{const e=Ru(),t=v.useRef(Sj()).current,r=v.useRef(pg("endpoints")).current,n=v.useRef(pg("inboxes")).current,[s,i]=v.useState(r??t.endpoints??0),[o,a]=v.useState(n??t.inboxes??0),l=v.useRef(bj()).current,u=r!==null||n!==null,[c,d]=v.useState(u?!1:l!==null?!0:t.useEmployeeEstimate??!1),[f,h]=v.useState(l??t.employees??0),[w,y]=v.useState(!1),[b,m]=v.useState(t.selectedPackage??"complete"),[g,x]=v.useState(!1),[S,_]=v.useState(!1),[E,k]=v.useState(!1),[R,N]=v.useState(0);v.useEffect(()=>{if(!(c?Number.isInteger(f)&&f>0:Number.isInteger(s)&&s>0&&Number.isInteger(o)&&o>0))return;const re=setTimeout(()=>{N(fe=>fe<2?2:fe)},600);return()=>clearTimeout(re)},[s,o,f,c]);const C=NR(),L=v.useRef(null),[O,W]=v.useState(!1);v.useEffect(()=>{const U=L.current;if(!U)return;const re=new IntersectionObserver(([fe])=>W(!fe.isIntersecting),{threshold:0,rootMargin:"0px 0px 0px 0px"});return re.observe(U),()=>re.disconnect()},[]);const[I]=v.useState(()=>Lc("PTOT_1")),[K]=v.useState(()=>Lc("PTOT_2")),[V]=v.useState(()=>Lc("PTOT_3")),[H]=v.useState(xj),[T,A]=v.useState(t.manualCorePremium??""),[$,J]=v.useState(t.manualAdvancedPremium??""),[F,q]=v.useState(t.manualCompletePremium??""),Y=I!==null,oe=K!==null,ye=V!==null,te=Y?I:cr(T),gt=oe?K:cr($),Ke=ye?V:cr(F),Re=c?Math.round(f*1):s,Ne=c?Math.round(f*1):o,lt=c?f>0:s>0&&o>0,Q=c?f>0:s>0,ze=lt,le=v.useMemo(()=>({advanced:Yl("advanced",Re),complete:Re>0||Ne>0?Yl("complete",Re,Ne):0}),[Re,Ne]),Ct=Q&&lh(Re,uh("advanced")),Cr=ze&&lh(Re,uh("complete")),ar=`Minimum annual contract of $${ra.toLocaleString()} applied`,lr=(U,re)=>{const fe=cr(U);re(fe>0?Ua(fe):"")},Si=Y||T!=="",Mn=!oe&&Si&&$!==""&>>te,na=!ye&&Si&&F!==""&&Ke>te;le.advanced>0&&(le.advanced/37e4*100).toFixed(1);const _i=(Y||T!=="")&&(oe||$!=="")&&(ye||F!==""),sa=te-gt,et=te-Ke;v.useEffect(()=>{lo({...oh(),endpoints:Re,inboxes:Ne,selected_package:b,price:b==="advanced"?le.advanced:le.complete,employees:f,use_employee_estimate:c,manual_core_premium:T===""?null:cr(T),manual_advanced_premium:$===""?null:cr($),manual_complete_premium:F===""?null:cr(F),...H?{company:H}:{}})},[Re,Ne,b,le.advanced,le.complete,f,c,T,$,F,H]),v.useEffect(()=>{if(E)return;(c?f>0:s>0&&o>0)&&k(!0)},[s,o,f,c,E]);const Qr=U=>{var re;U.stopPropagation(),(re=document.getElementById("premium-inputs-section"))==null||re.scrollIntoView({behavior:"smooth"})},ia=U=>{var re;U.stopPropagation(),(re=document.getElementById("calculator-inputs-section"))==null||re.scrollIntoView({behavior:"smooth"})},Ei=({text:U,onClick:re})=>p.jsxs("button",{type:"button",onClick:re,className:"w-full my-3 flex items-center gap-2 text-left cursor-pointer transition-colors",style:{background:"#FFF7ED",border:"1px solid #FED7AA",borderRadius:8,padding:"8px 12px"},onMouseEnter:fe=>fe.currentTarget.style.background="#FFEDD5",onMouseLeave:fe=>fe.currentTarget.style.background="#FFF7ED",children:[p.jsx(x_,{style:{width:16,height:16,color:"#EA580C",flexShrink:0}}),p.jsx("span",{style:{fontSize:12,fontWeight:500,color:"#9A3412"},children:U})]}),Fn=({saving:U,ready:re})=>!re&&!_i?p.jsx(Ei,{text:"Enter your details above and add your cyber insurance premiums below to see your price and savings estimate",onClick:ia}):re&&!_i?p.jsx(Ei,{text:"Add your cyber insurance premiums below to see your savings estimate",onClick:Qr}):!re&&_i?p.jsx(Ei,{text:"Enter your details above to see your price",onClick:ia}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"w-full my-3",style:{background:"#F0FDF4",border:"1px solid #BBF7D0",borderRadius:"8px",padding:"8px 12px"},children:[p.jsxs("p",{style:{fontSize:"14px",fontWeight:500,color:"#15803D"}
207,children:["Saves $",U.toLocaleString()," on your premium"]}),p.jsx("p",{style:{fontSize:"11px",color:"#16A34A"},children:"vs. Core package"})]}),p.jsx("p",{style:{fontSize:"11px",fontWeight:600,color:"#6B7280",letterSpacing:"0.05em",textTransform:"uppercase",marginBottom:"8px"},children:"What's included"})]});return p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:L,"aria-hidden":"true",style:{height:1}}),p.jsx("div",{className:"w-full bg-white",style:{position:"sticky",top:0,zIndex:1e3,borderBottom:"1px solid #E5E7EB",boxShadow:O?"0 2px 8px rgba(0,0,0,0.08)":"none",transition:"box-shadow 200ms ease"},children:p.jsx("div",{className:"max-w-[1100px] mx-auto px-4 lg:px-12",style:{paddingTop:O||C?8:16,paddingBottom:O||C?8:16,transition:"padding 200ms ease"},children:p.jsx("ol",{className:"flex items-center justify-between w-full max-w-[640px] mx-auto",style:{minHeight:O||C?28:60,transition:"min-height 200ms ease"},children:[{n:1,label:"Enter your details",shortLabel:"Enter Details"},{n:2,label:"See your quote & savings",shortLabel:"Get Quote"},{n:3,label:"Get official quote",shortLabel:"Get official quote"}].map((U,re,fe)=>{const tt=R>U.n?"completed":R===U.n?"active":"inactive",ki=re<fe.length-1?R>fe[re+1].n?"completed":R===fe[re+1].n?"active":"inactive":null,Yr=ki==="completed"||ki==="active",Tt=O||C,oa=Tt?24:32,ps=Tt?12:16,aa=C?U.shortLabel:U.label;return p.jsxs(D.Fragment,{children:[p.jsxs("li",{className:Ie("flex text-center",Tt?"flex-row items-center":"flex-col items-center"),style:{flex:"0 0 auto",minWidth:Tt?0:96,gap:Tt?8:0},children:[p.jsx("div",{style:{width:oa,height:oa,borderRadius:"9999px",display:"flex",alignItems:"center",justifyContent:"center",background:tt==="inactive"?"#FFFFFF":"hsl(var(--primary))",border:tt==="inactive"?"1px solid #D1D5DB":"none",color:tt==="inactive"?"#9CA3AF":"#FFFFFF",fontSize:ps,fontWeight:tt==="active"?700:500,transition:"all 300ms ease",flexShrink:0},children:tt==="completed"?p.jsx(Qo,{style:{width:ps,height:ps}}):U.n}),p.jsx("span",{style:{marginTop:Tt?0:8,fontSize:Tt?12:13,fontWeight:tt==="inactive"?400:500,color:tt==="active"?"hsl(var(--primary))":tt==="completed"?"#6B7280":"#9CA3AF",whiteSpace:"nowrap",transition:"font-size 200ms ease, margin 200ms ease, color 300ms ease, font-weight 300ms ease"},children:aa})]}),re<fe.length-1&&p.jsx("div",{"aria-hidden":"true",style:{flex:Tt?"0 0 auto":1,width:Tt?48:"auto",height:1,background:Yr?"hsl(var(--primary))":"#E5E7EB",marginTop:Tt?0:16,transition:"background 300ms ease, width 200ms ease, flex 200ms ease, margin 200ms ease"}})]},U.n)})})})}),p.jsxs("div",{className:"max-w-[1100px] mx-auto px-4 lg:px-12 py-12 space-y-8",children:[p.jsxs("section",{id:"calculator-inputs-section",className:"space-y-4",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",children:"ENTER YOUR DETAILS"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Tell us about your environment to see your estimated annual price."}),p.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:c?p.jsxs("div",{className:"space-y-1.5 sm:col-span-2",children:[p.jsx(xn,{htmlFor:"employees",className:"text-sm",children:"Number of employees"}),p.jsx(sl,{id:"employees",type:"text",placeholder:"e.g. 25",value:Ua(f),onChange:U=>h(cr(U.target.value))}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Est: ",Re," endpoints · ",Ne," inboxes"]})]}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-1.5",children:[p.jsx(xn,{htmlFor:"endpoints",className:"text-sm",children:"How many endpoints do you have?"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Laptops, desktops, servers, mobile devices"}),p.jsx(sl,{id:"endpoints",type:"text",placeholder:"e.g. 25",value:Ua(s),onChange:U=>i(cr(U.target.value))})]}),p.jsxs("div",{className:"space-y-1.5",children:[p.jsx(xn,{htmlFor:"inboxes",className:"text-sm",children:"How many inboxes do you have?"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Employee email accounts"}),p.jsx(sl,{id:"inboxes",type:"text",placeholder:"e.g. 25",value:Ua(o),onChange:U=>a(cr(U.target.value))})]})]})}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Ww,{id:"employee-estimate",checked:c,onCheckedChange:U=>d(U===!0)}),p.jsx(xn,{htmlFor:"employee-estimate",className:"text-sm cursor-pointer",children:"Not sure about your numbers? Estimate from employee count instead."})]})]}),p.jsxs("section",{className:"space-y-4",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",children:"SELECT YOUR INSURSEC PACKAGE"}),lt&&p.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose your protection level: Advanced adds endpoint protection and Complete adds email security on top."}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[p.jsxs("div",{onClick:()=>{Q&&m("advanced")},className:Ie("rounded-lg border-2 bg-card p-5 space-y-3 transition-all flex flex-col order-2 md:order-1 self-stretch h-full",Q&&"cursor-pointer hover:shadow-md",b==="advanced"&&Q?"border-primary ring-2 ring-primary/20":"border-border"),children:[p.jsx("div",{className:"flex flex-wrap items-center gap-2",children:p.jsx(Vs,{className:"bg-primary text-primary-foreground border-transparent w-fit",children:"Required for Advanced"})}),p.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"MDR for Endpoint"}),p.jsx("div",{className:"pb-2 border-b border-border",children:Q&&p.jsxs("div",{className:"my-4 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[p.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Estimated annual cost"}),p.jsxs("p",{className:"text-foreground font-bold leading-none flex items-end",style:{fontSize:"48px"}
207,children:["$",le.advanced.toLocaleString(),p.jsx("span",{className:"font-normal text-muted-foreground ml-1 mb-[2px]",style:{fontSize:"18px"},children:"/year"})]}),Ct&&p.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:ar})]})}),p.jsx(Fn,{saving:sa>0?sa:0,ready:Q}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"24/7 endpoint security with enhanced ransomware protection"}),p.jsx("button",{type:"button",onClick:U=>{U.stopPropagation(),x(re=>!re)},className:"text-primary hover:underline underline-offset-4 text-left w-fit cursor-pointer",style:{fontSize:"13px",marginTop:"8px"},"aria-expanded":g,children:g?"Hide details â":"See details â"}),p.jsx("div",{className:"overflow-hidden transition-[max-height] duration-300 ease-in-out flex-1",style:{maxHeight:g?"1000px":"0px"},"aria-hidden":!g,children:p.jsxs("div",{className:"space-y-1.5 pt-2",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",style:{marginBottom:"6px"},children:"MDR for Endpoint"}),p.jsx(Rt,{children:"Next-gen antivirus and EDR"}),p.jsx("p",{className:"text-[11px] font-normal pl-6 mt-0.5 mb-1.5",style:{color:"#9CA3AF"},children:"SentinelOne ⢠CrowdStrike ⢠Microsoft Defender"}),p.jsx(Rt,{children:"Malware and ransomware prevention"}),p.jsx(Rt,{children:"Exploit and behavioral protection"}),p.jsx(Rt,{children:"24/7 monitoring and full remediation"})]})})]}),p.jsxs("div",{onClick:()=>{ze&&m("complete")},className:Ie("rounded-lg border-2 bg-card p-5 space-y-3 relative transition-all flex flex-col order-1 md:order-2 self-stretch h-full",ze&&"cursor-pointer hover:shadow-md",b==="complete"?"border-primary ring-2 ring-primary/20":"border-border"),children:[p.jsx("div",{className:"flex flex-wrap items-center gap-2",children:p.jsx(Vs,{className:"bg-primary text-primary-foreground border-transparent w-fit",children:"Required for Complete"})}),p.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"MDR for Endpoint + Email"}),p.jsx("div",{className:"pb-2 border-b border-border",children:ze&&p.jsxs("div",{className:"my-4 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[p.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Estimated annual cost"}),p.jsxs("p",{className:"text-foreground font-bold leading-none flex items-end",style:{fontSize:"48px"},children:["$",le.complete.toLocaleString(),p.jsx("span",{className:"font-normal text-muted-foreground ml-1 mb-[2px]",style:{fontSize:"18px"},children:"/year"})]}),Cr&&p.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:ar})]})}),p.jsx(Fn,{saving:et>0?et:0,ready:ze}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"24/7 endpoint and email security with enhanced ransomware and fraud protection"}),p.jsx("button",{type:"button",onClick:U=>{U.stopPropagation(),_(re=>!re)},className:"text-primary hover:underline underline-offset-4 text-left w-fit cursor-pointer",style:{fontSize:"13px",marginTop:"8px"},"aria-expanded":S,children:S?"Hide details â":"See details â"}),p.jsxs("div",{className:"overflow-hidden transition-[max-height] duration-300 ease-in-out flex-1",style:{maxHeight:S?"2000px":"0px"},"aria-hidden":!S,children:[p.jsxs("div",{className:"space-y-1.5 pt-2",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",children:"MDR for Endpoint"}),p.jsx(Rt,{children:"Next-gen antivirus and EDR"}),p.jsx("p",{className:"text-[11px] font-normal pl-6 mt-0.5 mb-1.5",style:{color:"#9CA3AF"},children:"SentinelOne ⢠CrowdStrike ⢠Microsoft Defender"}),p.jsx(Rt,{children:"Malware and ransomware prevention"}),p.jsx(Rt,{children:"Exploit and behavioral protection"}),p.jsx(Rt,{children:"24/7 monitoring and full remediation"})]}),p.jsxs("div",{className:"space-y-1.5 pt-4",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",children:"MDR for Email"}),p.jsx(Rt,{children:"Integrated cloud email security (ICES)"}),p.jsx("p",{className:"text-[11px] font-normal pl-6 mt-0.5 mb-1.5",style:{color:"#9CA3AF"},children:"Sublime Security"}),p.jsx(Rt,{children:"Advanced phishing protection"}),p.jsx(Rt,{children:"Financial fraud and BEC protection"}),p.jsx(Rt,{children:"24/7 monitoring and full remediation"})]})]}),p.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 !mt-0",children:p.jsx(Vs,{className:"bg-primary text-primary-foreground",children:"Most Popular"})})]})]})]}),p.jsxs("section",{className:"space-y-4 -mb-4",children:[p.jsx("div",{className:"border-t border-border"}),p.jsxs("button",{onClick:()=>y(!w),className:"flex items-center gap-2 w-full text-left",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",children:"How MDR works"}),p.jsx(uf,{className:Ie("w-4 h-4 text-primary transition-transform",w&&"rotate-180")}
207)]}),w&&p.jsxs("div",{className:"animate-in fade-in slide-in-from-top-2 duration-300",children:[p.jsx("p",{className:"font-normal w-full mt-3 mb-6 text-muted-foreground text-sm text-left",children:"Managed Detection and Response (MDR) provides a 24/7 team of elite security experts who actively watch your systems to identify cyberattacks and immediately step in to neutralize them before they can cause harm."}),p.jsx("div",{className:"hidden lg:flex items-start justify-between",children:[{icon:yc,label:"Deploy",desc:"We deploy and manage enterprise-grade security tools across your endpoints, email, and cloud"},{icon:pc,label:"Detect",desc:"Our MDR analysts monitor for threats around the clock â 24/7/365"},{icon:gc,label:"Investigate",desc:"Every alert is triaged and investigated by a security expert, not an algorithm"},{icon:vc,label:"Remediate",desc:"Threats are fully contained and remediated â no security homework on your end"},{icon:mc,label:"Strengthen",desc:"Incidents are logged and your environment is hardened to reduce future risk"}].map((U,re,fe)=>p.jsxs(D.Fragment,{children:[p.jsxs("div",{className:"flex flex-col items-center text-center space-y-2 flex-1 max-w-[180px]",children:[p.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:p.jsx(U.icon,{className:"w-5 h-5 text-primary"})}),p.jsx("h3",{className:"text-sm font-semibold text-foreground",children:U.label}),p.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:U.desc})]}),re<fe.length-1&&p.jsx("div",{className:"flex items-center pt-3 px-1 shrink-0",children:p.jsx(m_,{className:"w-5 h-5 text-muted-foreground/40"})})]},U.label))}),p.jsx("div",{className:"hidden md:grid lg:hidden grid-cols-3 gap-6",children:[{icon:yc,label:"Deploy",desc:"We deploy and manage enterprise-grade security tools across your endpoints, email, and cloud"},{icon:pc,label:"Detect",desc:"Our MDR analysts monitor for threats around the clock â 24/7/365"},{icon:gc,label:"Investigate",desc:"Every alert is triaged and investigated by a security expert, not an algorithm"},{icon:vc,label:"Remediate",desc:"Threats are fully contained and remediated â no security homework on your end"},{icon:mc,label:"Strengthen",desc:"Incidents are logged and your environment is hardened to reduce future risk"}].map(U=>p.jsxs("div",{className:"space-y-2",children:[p.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:p.jsx(U.icon,{className:"w-5 h-5 text-primary"})}),p.jsx("h3",{className:"text-sm font-semibold text-foreground",children:U.label}),p.jsx("p",{className:"text-sm text-muted-foreground",children:U.desc})]},U.label))}),p.jsx("div",{className:"md:hidden space-y-0",children:[{icon:yc,label:"Deploy",desc:"We deploy and manage enterprise-grade security tools across your endpoints, email, and cloud"},{icon:pc,label:"Detect",desc:"Our MDR analysts monitor for threats around the clock â 24/7/365"},{icon:gc,label:"Investigate",desc:"Every alert is triaged and investigated by a security expert, not an algorithm"},{icon:vc,label:"Remediate",desc:"Threats are fully contained and remediated â no security homework on your end"},{icon:mc,label:"Strengthen",desc:"Incidents are logged and your environment is hardened to reduce future risk"}].map((U,re,fe)=>p.jsxs("div",{className:"flex gap-4",children:[p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:p.jsx(U.icon,{className:"w-5 h-5 text-primary"})}),re<fe.length-1&&p.jsx("div",{className:"w-px flex-1 bg-border my-1"})]}),p.jsxs("div",{className:Ie("pb-6",re===fe.length-1&&"pb-0"),children:[p.jsx("h3",{className:"text-sm font-semibold text-foreground",children:U.label}),p.jsx("p",{className:"text-sm text-muted-foreground",children:U.desc})]})]},U.label))}),p.jsx("div",{className:"pt-6 pb-2 text-center",children:p.jsx("a",{href:"https://www.at-bay.com/mdr/",className:"text-sm no-underline hover:underline hover:opacity-80 transition-opacity text-primary",children:"Learn more about MDR â"})})]})]}),lt&&p.jsxs("div",{id:"savings-section",className:"animate-in fade-in slide-in-from-bottom-4 duration-500",children:[p.jsx("div",{className:"border-t border-border mb-4"}),p.jsx(yj,{selectedPackage:b,endpoints:Re,inboxes:Ne,corePremium:te,packagePremium:b==="advanced"?le.advanced:le.complete,coreFromUrl:Y,advancedFromUrl:oe,completeFromUrl:ye,advancedPremium:gt,completePremium:Ke,manualCorePremium:T,manualAdvancedPremium:$,manualCompletePremium:F,onManualCorePremiumChange:U=>lr(U,A),onManualAdvancedPremiumChange:U=>lr(U,J),onManualCompletePremiumChange:U=>lr(U,q),advancedWarning:!!Mn,completeWarning:!!na,mdrAnnualPrice:b==="advanced"?le.advanced:le.complete})]}),E&&p.jsxs("div",{className:"w-full rounded-xl px-6 py-6 flex items-center justify-center gap-2",style:{background:"#EFF6FF",border:"1px solid #BFDBFE",animation:"fade-in 400ms ease forwards"},children:[p.jsx(rm,{className:"w-5 h-5 shrink-0",style:{color:"#3B82F6"}}),p.jsx("p",{className:"text-base font-medium text-center",style:{color:"#1E3A5F"},children:"Ransomware costs businesses on average $508,000* â more than double the damage of any other type of cyberattack."})]}),p.jsxs("section",{className:"space-y-4",children:[p.jsx("div",{className:"border-t border-border"}),p.jsxs("div",{className:"flex flex-col items-center space-y-3 pt-4",children:[p.jsx(jf,{className:"w-full max-w-[400px]",size:"lg",disabled:!lt,onClick:()=>{const U=b==="advanced"?le.advanced:le.complete;ah({selectedPackage:b,endpoints:Re,inboxes:Ne,price:U,companyName:H??void 0});try{const re={endpoints:s,inboxes:o,useEmployeeEstimate:c,employees:f,selectedPackage:b,manualCorePremium:T,manualAdvancedPremium:$,manualCompletePremium:F};sessionStorage.setItem(Fx,JSON.stringify(re))}catch{}e(`/review${nh()}`,{state:{selectedPackage:b,endpoints:Re,inboxes:Ne,price:U,companyName:H??void 0}})},children:"Get my official quote"}),p.jsx("a",{href:"https://www.at-bay.com/mdr-meeting/",className:"text-sm text-primary hover:underline underline-offset-4",children:"Or book a call with sales here."}),p.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-lg pt-4",children:"At-Bay Stance MDR is provided by At-Bay Security, LLC, a wholly owned subsidiary of At-B
207ay, Inc. At-Bay Security does not provide insurance services."})]})]}),p.jsx("section",{className:"-mx-6 md:-mx-12 lg:-mx-[calc((100vw-1100px)/2+48px)] bg-[hsl(220,14%,96%)] px-6 md:px-12 py-12",children:p.jsxs("div",{className:"max-w-[1100px] mx-auto",children:[p.jsx("p",{className:"text-xs font-semibold tracking-widest uppercase text-muted-foreground mb-1",children:"Helpful Resources"}),p.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Everything you need to evaluate MDR and share with your team."}),p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[{icon:p.jsx(v_,{className:"w-8 h-8 text-primary"}),title:"MDR for Endpoint overview",desc:"Learn what's included in Stance MDR for Endpoint and how it protects your devices around the clock",link:"Download overview â",href:"https://hubs.ly/Q03rkmvJ0"},{icon:p.jsx(w_,{className:"w-8 h-8 text-primary"}),title:"MDR for Email overview",desc:"See how Stance MDR for Email stops phishing, financial fraud, and business email compromise before they become claims",link:"Download overview â",href:"https://hubs.ly/Q033p_QN0"},{icon:p.jsx(rm,{className:"w-8 h-8 text-primary"}),title:`Stopping ransomware on SonicWall in 20 minutes 208`,desc:"A real-world case study showing how At-Bay's MDR team detected and contained an active ransomware attack before it caused damage",link:"Read the case study â",href:"https://www.at-bay.com/case-studies/stopping-akira-ransomware-in-20-minutes/"}].map(U=>p.jsxs("div",{className:"flex flex-col bg-background border border-[hsl(220,13%,91%)] rounded-xl p-6 transition-all hover:shadow-[0_4px_12px_rgba(0,0,0,0.08)] hover:border-primary",children:[p.jsx("div",{className:"mb-3",children:U.icon}),p.jsx("h4",{className:"text-base font-bold text-foreground mb-1",children:U.title}),p.jsx("p",{className:"text-sm text-muted-foreground mb-4 flex-1",children:U.desc}),p.jsx("a",{href:U.href,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary no-underline hover:underline mt-auto",children:U.link})]},U.href))})]})}),p.jsx("footer",{className:"w-full max-w-[1100px] mx-auto px-6 py-8",children:p.jsx("p",{className:"text-xs text-muted-foreground",children:"*At-Bay's 2026 InsurSec Report"})})]})]})},Ej=()=>p.jsx("div",{className:"bg-background min-h-screen",children:p.jsx(_j,{})}),kj=(e,t,r)=>e==="advanced"?Yl("advanced",t):t>0||r>0?Yl("complete",t,r):0,xs=({id:e,label:t,required:r,type:n="text",placeholder:s,value:i,onChange:o,error:a,defaultValue:l})=>{const[u,c]=v.useState(!1);return p.jsxs("div",{className:"space-y-1.5",children:[p.jsxs("label",{htmlFor:e,style:{fontSize:13,fontWeight:500,color:"#374151"},children:[t,r&&p.jsx("span",{className:"text-primary ml-0.5",children:"*"})]}),p.jsx("input",{id:e,type:n,placeholder:s,value:i,defaultValue:l,onChange:d=>o(d.target.value),onFocus:()=>c(!0),onBlur:()=>c(!1),className:Ie("w-full outline-none transition-colors bg-white","focus:border-primary"),style:{height:44,border:`1px solid ${a?"#EF4444":u?"hsl(var(--primary))":"#D1D5DB"}`,borderRadius:8,fontSize:14,color:"#111827",padding:"0 12px"}}),a&&p.jsx("p",{style:{fontSize:12,color:"#EF4444"},children:"This field is required"})]})},Cj=({children:e,mt:t=0})=>p.jsx("p",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:"#6B7280",marginTop:t,marginBottom:16},children:e}),sn=({children:e})=>p.jsxs("div",{className:"flex items-start gap-2 text-sm text-foreground",children:[p.jsx(Qo,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),p.jsx("span",{children:e})]}),Tj=()=>{const e=Ru(),t=or(),r=v.useMemo(()=>{const C=t.state??null;return C&&(C.selectedPackage==="advanced"||C.selectedPackage==="complete")?(ah(C),C):Lx()},[t.state]);v.useEffect(()=>{r||e("/",{replace:!0}),window.scrollTo(0,0)},[r,e]),v.useEffect(()=>{const C=oh();Object.keys(C).length>0&&lo(C)},[]);const[n,s]=v.useState({firstName:"",lastName:"",company:"",title:"",email:"",phone:""}),[i,o]=v.useState(!1),[a,l]=v.useState({}),[u,c]=v.useState(!1),[d,f]=v.useState(!1),[h,w]=v.useState((r==null?void 0:r.selectedPackage)??"complete");v.useEffect(()=>{r!=null&&r.selectedPackage&&w(r.selectedPackage)},[r==null?void 0:r.selectedPackage]);const y=(r==null?void 0:r.endpoints)??0,b=(r==null?void 0:r.inboxes)??0,m=v.useMemo(()=>kj(h,y,b),[h,y,b]),g=h==="complete"&&b<=0;v.useEffect(()=>{r!=null&&r.companyName&&n.company===""&&(s(C=>({...C,company:r.companyName})),lo({company:r.companyName}))},[r]);const x=["firstName","lastName","company","title","email","phone"],_=x.every(C=>n[C].trim()!==""),E=C=>L=>
208{s(W=>({...W,[C]:L})),a[C]&&l(W=>({...W,[C]:!1})),lo({[{firstName:"first_name",lastName:"last_name",company:"company",title:"title",email:"email",phone:"phone"}[C]]:L})},k=async()=>{const C={};if(x.forEach(L=>{n[L].trim()===""&&(C[L]=!0)}),Object.keys(C).length>0){l(C);return}if(r){f(!0);try{const L=await gj({first_name:n.firstName,last_name:n.lastName,company:n.company,title:n.title,email:n.email,phone:n.phone,selected_package:h,endpoints:y,inboxes:h==="complete"?b:0,price:m,marketing_consent:i,...oh()});if(L){console.error("Quote submission failed:",L.error),om.error("Could not submit your order",{description:"Please try again or contact support if the problem persists."}),f(!1);return}try{ah({selectedPackage:h,endpoints:y,inboxes:h==="complete"?b:0,price:m,companyName:r.companyName}),sessionStorage.setItem("mdr-order-submission",JSON.stringify({form:n,ctx:{...r,selectedPackage:h,inboxes:h==="complete"?b:0,price:m}}))}catch{}e("/confirmation")}catch(L){console.error("Quote submission failed:",L),om.error("Could not submit your order",{description:"Please try again or contact support if the problem persists."}),f(!1)}}};if(!r)return null;const R=h==="advanced",N=p.jsxs("div",{style:{background:"#fff",border:"1px solid #E5E7EB",borderRadius:12,padding:24},children:[p.jsx("p",{style:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:"#6B7280",marginBottom:16},children:"Your order"}),p.jsx("div",{role:"tablist","aria-label":"Select package",className:"grid grid-cols-2 mb-4",style:{border:"1px solid #D1D5DB",borderRadius:8,overflow:"hidden",background:"#fff"},children:["advanced","complete"].map(C=>{const L=h===C;return p.jsx("button",{type:"button",role:"tab","aria-selected":L,onClick:()=>w(C),className:"transition-colors",style:{padding:"8px 12px",fontSize:13,fontWeight:600,background:L?"hsl(var(--primary))":"#fff",color:L?"#fff":"#6B7280",border:"none",cursor:"pointer"},children:C==="advanced"?"Advanced":"Complete"},C)})}),p.jsx(Vs,{className:"bg-primary text-primary-foreground border-transparent w-fit mb-3",children:$x(h)}),p.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#111827",marginTop:12,marginBottom:16},children:Dx(h)}),p.jsx("hr",{style:{border:"none",borderTop:"1px solid #E5E7EB",margin:"0 0 4px"}}),[{label:"Endpoints",value:y.toLocaleString(),show:!0,note:null},{label:"Inboxes",value:g?"â":b.toLocaleString(),show:!R,note:g?p.jsxs("p",{style:{fontSize:11,color:"#9CA3AF",marginTop:2},children:["Inbox count not set â"," ",p.jsx("button",{type:"button",onClick:()=>e(`/${nh()}`),className:"text-primary hover:underline underline-offset-2 bg-transparent border-0 p-0 cursor-pointer",style:{fontSize:11},children:"go back"})," ","to update"]}):null},{label:"Billing",value:"Annual",show:!0,note:null}].filter(C=>C.show).map((C,L)=>p.jsxs("div",{style:{padding:"10px 0",borderTop:L>0?"0.5px solid #F3F4F6":void 0},children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("p",{style:{fontSize:13,color:"#6B7280"},children:C.label}),p.jsx("p",{className:"tabular-nums",style:{fontSize:13,fontWeight:500,color:"#111827"},children:C.value})]}),C.note]},C.label)),p.jsx("hr",{style:{border:"none",borderTop:"1px solid #E5E7EB",margin:"8px 0 12px"}}),p.jsx("p",{style:{fontSize:12,color:"#6B7280",marginBottom:4},children:"Estimated annual cost"}),p.jsxs("p",{className:"tabular-nums",style:{fontSize:32,fontWeight:700,color:"#111827",lineHeight:1.1},children:["$",m.toLocaleString(),p.jsx("span",{style:{fontSize:16,fontWeight:400,color:"#6B7280"},children:" /year"})]}),lh(y,uh(h))&&p.jsxs("p",{style:{fontSize:11,color:"#9CA3AF",marginTop:4},children:["Minimum annual contract of $",ra.toLocaleString()," applied"]}),p.jsx("p",{style:{fontSize:11,color:"#9CA3AF",fontStyle:"italic",marginTop:6},children:"Final pricing confirmed in your official quote"}),p.jsx("hr",{style:{border:"none",borderTop:"1px solid #E5E7EB",margin:"16px 0"}}),p.jsxs("button",{type:"button",onClick:()=>c(C=>!C),className:"text-primary hover:underline underline-offset-4 inline-flex items-center gap-1",style:{fontSize:12},children:[u?"Hide details":"View what's included",u?p.jsx(m0,{className:"w-3 h-3"}):p.jsx(uf,{className:"w-3 h-3"})]}),u&&p.jsxs("div",{className:"mt-4 space-y-1.5 animate-in fade-in slide-in-from-top-2 duration-200",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",style:{marginBottom:6},children:"MDR for Endpoint"}),p.jsx(sn,{children:"Next-gen antivirus and EDR"}),p.jsx("p",{className:"text-[11px] font-normal pl-6 mt-0.5 mb-1.5",style:{color:"#9
208CA3AF"},children:"SentinelOne ⢠CrowdStrike ⢠Microsoft Defender"}),p.jsx(sn,{children:"Malware and ransomware prevention"}),p.jsx(sn,{children:"Exploit and behavioral protection"}),p.jsx(sn,{children:"24/7 monitoring and full remediation"}),!R&&p.jsxs("div",{className:"space-y-1.5 pt-3",children:[p.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",style:{marginBottom:6},children:"MDR for Email"}),p.jsx(sn,{children:"Integrated cloud email security (ICES)"}),p.jsx("p",{className:"text-[11px] font-normal pl-6 mt-0.5 mb-1.5",style:{color:"#9CA3AF"},children:"Sublime Security"}),p.jsx(sn,{children:"Advanced phishing protection"}),p.jsx(sn,{children:"Financial fraud and BEC protection"}),p.jsx(sn,{children:"24/7 monitoring and full remediation"})]})]})]});return p.jsx("div",{className:"bg-background min-h-screen",children:p.jsxs("div",{className:"max-w-[1100px] mx-auto px-4 lg:px-12 py-12 space-y-8",children:[p.jsxs("section",{className:"space-y-4",children:[p.jsxs("button",{type:"button",onClick:()=>e(`/${nh()}`),className:"inline-flex items-center gap-1 text-primary no-underline hover:underline underline-offset-4 cursor-pointer bg-transparent border-0 p-0",style:{fontSize:14,marginBottom:16},children:[p.jsx(p_,{className:"w-4 h-4","aria-hidden":"true"}),p.jsx("span",{children:"Back to quote"})]}),p.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground leading-tight",children:"Get your official MDR quote"}),p.jsx("p",{style:{fontSize:16,color:"#6B7280",lineHeight:1.5},children:"Enter your details and we'll send you a formal quote to review with your team. An At-Bay security specialist will follow up to walk you through it."})]}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-8",children:[p.jsx("div",{className:"lg:hidden",children:N}),p.jsxs("div",{className:"lg:col-span-3 space-y-5",children:[p.jsx(Cj,{children:"Your details"}),p.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[p.jsx(xs,{id:"firstName",label:"First name",required:!0,placeholder:"First name",value:n.firstName,onChange:E("firstName"),error:a.firstName}),p.jsx(xs,{id:"lastName",label:"Last name",required:!0,placeholder:"Last name",value:n.lastName,onChange:E("lastName"),error:a.lastName})]}),p.jsx(xs,{id:"company",label:"Company name",required:!0,placeholder:"Company name",value:n.company,onChange:E("company"),error:a.company}),p.jsx(xs,{id:"title",label:"Job title",required:!0,placeholder:"e.g. CEO, CFO, IT Manager",value:n.title,onChange:E("title"),error:a.title}),p.jsx(xs,{id:"email",label:"Work email",required:!0,type:"email",placeholder:"[email protected]",value:n.email,onChange:E("email"),error:a.email}),p.jsx(xs,{id:"phone",label:"Phone number",required:!0,type:"tel",placeholder:"e.g. (555) 555-5555",value:n.phone,onChange:E("phone"),error:a.phone}),p.jsxs("div",{className:"flex flex-col items-center space-y-3 pt-2",children:[p.jsx(jf,{className:"w-full",size:"lg",disabled:!_||d,onClick:k,children:d?"Submittingâ¦":"Get official quote"}),p.jsx("a",{href:"https://www.at-bay.com/mdr-meeting/",className:"text-sm text-primary hover:underline underline-offset-4",children:"Need help? Book a call with sales"}),p.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-lg pt-2",children:"At-Bay Stance MDR is provided by At-Bay Security, LLC, a wholly owned subsidiary of At-Bay, Inc. At-Bay Security does not provide insurance services."})]})]}),p.jsx("aside",{className:"hidden lg:block lg:col-span-2",children:p.jsx("div",{className:"sticky top-8",children:N})})]})]})})},Rj=()=>{const e=Ru(),{ctx:t,email:r}=v.useMemo(()=>{var i;const n=Lx();let s="";try{const o=sessionStorage.getItem("mdr-order-submission");o&&(s=((i=JSON.parse(o).form)==null?void 0:i.email)??"")}catch{}return{ctx:n,email:s}},[]);return v.useEffect(()=>{t||e("/",{replace:!0}),window.scrollTo(0,0)},[t,e]),t?p.jsx("div",{className:"bg-background min-h-screen flex flex-col",children:p.jsx("div",{className:"flex-1 flex items-center justify-center px-4 py-16",children:p.jsxs("div",{className:"w-full max-w-[600px] flex flex-col items-center text-center space-y-6",children:[p.jsx("div",{className:"rounded-full flex items-center justify-center",style:{width:80,height:80,background:"hsl(var(--primary) / 0.1)"},children:p.jsx(Qo,{style:{width:64,height:64},className:"text-primary",strokeWidth:2.5})}),p.jsx("h2",{style:{fontSize:32,fontWeight:700,color:"#111827",lineHeight:1.2},children:"Your quote is on the way."}),p.jsx("p",{style:{fontSize:16,color:"#6B7280",maxWidth:480,lineHeight:1.5},children:"An official quote is being created and an At-Bay security specialist will reach out within 1 business day to walk you through your options and answer any questions."}),p.jsxs("div",{className:"w-full text-left",style:{background:"#fff",border:"1px solid #E5E7EB",borderRadius:12,padding:24},children:[p.jsx(Vs,{className:"bg-primary text-primary-foreground border-transparent w-fit mb-3",children:$x(t.selectedPackage)}),p.jsx("h3",{style:{fontSize:20,fontWeight:700,color:"#111827",marginTop:12,marginBottom:16},children:Dx(t.selectedPackage)}),p.jsx("p",{style:{fontSize:12,color:"#6B7280",marginBottom:4},children:"Estimated annual cost"}),p.jsxs("p",{className:"tabular-nums",style:{fontSize:32,fontWeight:700,color:"#111827",lineHeight:1.1}
208,children:["$",t.price.toLocaleString(),p.jsx("span",{style:{fontSize:16,fontWeight:400,color:"#6B7280"},children:" /year"})]})]}),p.jsx("p",{className:"text-xs text-muted-foreground max-w-lg",style:{paddingTop:16},children:"At-Bay Stance MDR is provided by At-Bay Security, LLC, a wholly owned subsidiary of At-Bay, Inc. At-Bay Security does not provide insurance services."})]})})}):null},Pj=()=>{const e=or();return v.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),p.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-100",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),p.jsx("p",{className:"mb-4 text-xl text-gray-600",children:"Oops! Page not found"}),p.jsx("a",{href:"/",className:"text-blue-500 underline hover:text-blue-700",children:"Return to Home"})]})})},Aj=new QC,Nj=()=>(v.useEffect(()=>{Nx()},[]),p.jsx(XC,{client:Aj,children:p.jsxs(nw,{children:[p.jsx(nE,{}),p.jsx(LE,{}),p.jsx(bR,{children:p.jsxs(YT,{children:[p.jsx(Hi,{path:"/",element:p.jsx(Ej,{})}),p.jsx(Hi,{path:"/review",element:p.jsx(Tj,{})}),p.jsx(Hi,{path:"/confirmation",element:p.jsx(Rj,{})}),p.jsx(Hi,{path:"*",element:p.jsx(Pj,{})})]})})]})}));Mv(document.getElementById("root")).render(p.jsx(Nj,{}));
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.